Index: firmware/drivers/audio/as3514.c =================================================================== --- firmware/drivers/audio/as3514.c (revision 26688) +++ firmware/drivers/audio/as3514.c (working copy) @@ -164,9 +164,16 @@ #else /* as3514/as3515 */ +#if CONFIG_CPU == AS3525 + /* Set ADC off, mixer on, DAC on, line out on, line in off, mic off */ + /* Turn on SUM, DAC */ + as3514_write(AS3514_AUDIOSET1, AUDIOSET1_DAC_on | AUDIOSET1_LOUT_on | + AUDIOSET1_SUM_on); +#else /* Set ADC off, mixer on, DAC on, line out off, line in off, mic off */ /* Turn on SUM, DAC */ as3514_write(AS3514_AUDIOSET1, AUDIOSET1_DAC_on | AUDIOSET1_SUM_on); +#endif /* CONFIG_CPU == AS3525 */ /* Set BIAS on, DITH off, AGC off, IBR_DAC max reduction, LSP_LP on, IBR_LSP max reduction (50%), taken from c200v2 OF @@ -215,6 +222,12 @@ /* Headphone ON, MUTE, Min volume */ as3514_write(AS3514_HPH_OUT_L, HPH_OUT_L_HP_ON | HPH_OUT_L_HP_MUTE | 0x00); +#if (CONFIG_CPU == AS3525) + /* Line Out Stereo, MUTE, Min volume */ + as3514_write(AS3514_LINE_OUT_L, LINE_OUT_L_LO_SES_DM_SE_ST | + LINE_OUT_L_LO_SES_DM_MUTE | 0x00); +#endif /* CONFIG_CPU == AS3525 */ + /* DAC_Mute_off */ as3514_set(AS3514_DAC_L, DAC_L_DAC_MUTE_off); } @@ -223,8 +236,14 @@ { if (mute) { as3514_set(AS3514_HPH_OUT_L, HPH_OUT_L_HP_MUTE); +#if (CONFIG_CPU == AS3525) + as3514_set(AS3514_LINE_OUT_L, LINE_OUT_L_LO_SES_DM_MUTE); +#endif /* CONFIG_CPU == AS3525 */ } else { as3514_clear(AS3514_HPH_OUT_L, HPH_OUT_L_HP_MUTE); +#if (CONFIG_CPU == AS3525) + as3514_clear(AS3514_LINE_OUT_L, LINE_OUT_L_LO_SES_DM_MUTE); +#endif /* CONFIG_CPU == AS3525 */ } } @@ -237,6 +256,11 @@ ascodec_suppressor_on(false); #endif +#if CONFIG_CPU == AS3525 + /* Set line out volume to 0dB */ + audiohw_set_lineout_vol(0x1b, 0x1b); +#endif /* CONFIG_CPU == AS3525 */ + audiohw_mute(false); } @@ -280,18 +304,19 @@ audiohw_mute(false); } -#if 0 /* unused */ +#if (CONFIG_CPU == AS3525) || defined(HAVE_AS3543) void audiohw_set_lineout_vol(int vol_l, int vol_r) { #ifdef HAVE_AS3543 /* line out volume is set in the same registers */ - audiohw_set_master_vol(vol_l, vol_r); + /* disabled until this can be safely done with respect to headphone vol */ + /* audiohw_set_master_vol(vol_l, vol_r); */ #else as3514_write_masked(AS3514_LINE_OUT_R, vol_r, AS3514_VOL_MASK); as3514_write_masked(AS3514_LINE_OUT_L, vol_l, AS3514_VOL_MASK); #endif } -#endif +#endif /* CONFIG_CPU == AS3525 || defined(HAVE_AS3543)*/ /* Nice shutdown of AS3514 audio codec */ void audiohw_close(void)