diff options
| author | Marcin Bukat <marcin.bukat@gmail.com> | 2010-10-13 20:35:58 +0000 |
|---|---|---|
| committer | Marcin Bukat <marcin.bukat@gmail.com> | 2010-10-13 20:35:58 +0000 |
| commit | d793a971d8d0a0510c8e6da026ee3212ae4bf9ad (patch) | |
| tree | f41501f6efa3b6701ee03fdfbfe6aa4b9a242aa8 | |
| parent | 29503eea8631348530a22c2e6ef452758821d81e (diff) | |
| download | rockbox-d793a971d8d0a0510c8e6da026ee3212ae4bf9ad.zip rockbox-d793a971d8d0a0510c8e6da026ee3212ae4bf9ad.tar.gz rockbox-d793a971d8d0a0510c8e6da026ee3212ae4bf9ad.tar.bz2 rockbox-d793a971d8d0a0510c8e6da026ee3212ae4bf9ad.tar.xz | |
HD200 - GPIO57 is headphone output enable. Proper handling of this line fixes hissing noise after startup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28270 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/drivers/audio/wm8751.c | 19 | ||||
| -rw-r--r-- | firmware/target/coldfire/crt0.S | 2 |
2 files changed, 20 insertions, 1 deletions
diff --git a/firmware/drivers/audio/wm8751.c b/firmware/drivers/audio/wm8751.c index 5eb90b0..1f2213c 100644 --- a/firmware/drivers/audio/wm8751.c +++ b/firmware/drivers/audio/wm8751.c @@ -190,6 +190,15 @@ void audiohw_preinit(void) GPIOL_OUTPUT_VAL |= 0x10; /* disable */ #endif +#ifdef MPIO_HD200 + /* control headphone output + * disabled on startup + */ + and_l((1<<25),&GPIO1_OUT); + or_l((1<<25), &GPIO1_ENABLE); + or_l((1<<25), &GPIO1_FUNCTION); +#endif + /* * 1. Switch on power supplies. * By default the WM8751 is in Standby Mode, the DAC is @@ -274,6 +283,11 @@ void audiohw_postinit(void) GPIOL_OUTPUT_VAL &= ~0x10; GPIOL_OUTPUT_EN |= 0x10; #endif + +#ifdef MPIO_HD200 + /* enable headphone output */ + or_l((1<<25),&GPIO1_OUT); +#endif } void audiohw_set_master_vol(int vol_l, int vol_r) @@ -327,6 +341,11 @@ void audiohw_close(void) /* 1. Set DACMU = 1 to soft-mute the audio DACs. */ audiohw_mute(true); +#ifdef MPIO_HD200 + /* disable headphone out */ + and_l(~(1<<25), &GPIO1_OUT); +#endif + /* 2. Disable all output buffers. */ wmcodec_write(PWRMGMT2, 0x0); diff --git a/firmware/target/coldfire/crt0.S b/firmware/target/coldfire/crt0.S index 38365c7..a6ef3be 100644 --- a/firmware/target/coldfire/crt0.S +++ b/firmware/target/coldfire/crt0.S @@ -278,7 +278,7 @@ start: #ifdef MPIO_HD200 /* Set KEEP_ACT */ - move.l #0x02200000,%d0 + move.l #0x00200000,%d0 or.l %d0,(0xb4,%a1) or.l %d0,(0xb8,%a1) or.l %d0,(0xbc,%a1) |