1
0
Fork 0
forked from len0rd/rockbox

as3514: detail bit of AS3543_DAC_IF

it lets you select internal PLL or external MCLK and is not related to mute

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25731 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2010-04-26 23:26:08 +00:00
parent 7d8069d2e7
commit be177138d3
2 changed files with 7 additions and 11 deletions

View file

@ -190,7 +190,7 @@ void audiohw_preinit(void)
#endif
#ifdef HAVE_AS3543
as3514_clear(AS3543_DAC_IF, 0x80);
as3514_write(AS3543_DAC_IF, AS3543_DAC_INT_PLL);
as3514_set(AS3514_LINE_IN1_R, LINE_IN_R_LINE_SELECT); /* Line 2 */
#else
/* Mute and disable speaker */
@ -284,15 +284,9 @@ void audiohw_mute(bool mute)
{
if (mute) {
as3514_set(AS3514_HPH_OUT_L, HPH_OUT_L_HP_MUTE);
#ifdef HAVE_AS3543
as3514_set(AS3543_DAC_IF, 0x80);
#endif
} else {
as3514_clear(AS3514_HPH_OUT_L, HPH_OUT_L_HP_MUTE);
#ifdef HAVE_AS3543
as3514_clear(AS3543_DAC_IF, 0x80);
#endif
}
}
@ -313,10 +307,6 @@ void audiohw_close(void)
as3514_clear(AS3514_HPH_OUT_L, HPH_OUT_L_HP_ON);
as3514_write(AS3514_AUDIOSET1, 0x0);
#ifdef HAVE_AS3543
as3514_set(AS3543_DAC_IF, 0x80);
#endif
/* Allow caps to discharge */
sleep(HZ/4);
}

View file

@ -222,6 +222,12 @@ extern void audiohw_set_lineout_vol(int vol_l, int vol_r);
#endif
/* Use AS3514_VOL_MASK */
/* DAC_IF (11h) */
#ifdef HAVE_AS3543
#define AS3543_DAC_INT_PLL (0x0 << 7)
#define AS3543_DAC_EXT_MCLK (0x1 << 7)
#endif
/* AUDIOSET1 (14h)*/
#define AUDIOSET1_ADC_on (0x1 << 7)
#define AUDIOSET1_SUM_on (0x1 << 6)