forked from len0rd/rockbox
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
This commit is contained in:
parent
29503eea86
commit
d793a971d8
2 changed files with 20 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue