diff options
Diffstat (limited to 'firmware/drivers/audio/as3514.c')
-rw-r--r-- | firmware/drivers/audio/as3514.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c index ecb577cb86..1303aae9f5 100644 --- a/firmware/drivers/audio/as3514.c +++ b/firmware/drivers/audio/as3514.c | |||
@@ -162,8 +162,16 @@ void audiohw_preinit(void) | |||
162 | AUDIOSET2_IBR_DAC_0 | AUDIOSET2_LSP_LP | | 162 | AUDIOSET2_IBR_DAC_0 | AUDIOSET2_LSP_LP | |
163 | AUDIOSET2_IBR_LSP_50); | 163 | AUDIOSET2_IBR_LSP_50); |
164 | 164 | ||
165 | /* AMS Sansas based on the AS3525 need HPCM enabled, otherwise they output the | ||
166 | L-R signal on both L and R headphone outputs instead of normal stereo. | ||
167 | Turning it off saves a little power on targets that don't need it. */ | ||
168 | #if (CONFIG_CPU == AS3525) | ||
165 | /* Set HPCM on, ZCU on */ | 169 | /* Set HPCM on, ZCU on */ |
166 | as3514_write(AS3514_AUDIOSET3, 0); | 170 | as3514_write(AS3514_AUDIOSET3, 0); |
171 | #else | ||
172 | /* Set HPCM off, ZCU on */ | ||
173 | as3514_write(AS3514_AUDIOSET3, AUDIOSET3_HPCM_off); | ||
174 | #endif | ||
167 | 175 | ||
168 | /* Mute and disable speaker */ | 176 | /* Mute and disable speaker */ |
169 | as3514_write(AS3514_LSP_OUT_R, LSP_OUT_R_SP_OVC_TO_256MS | 0x00); | 177 | as3514_write(AS3514_LSP_OUT_R, LSP_OUT_R_SP_OVC_TO_256MS | 0x00); |
@@ -194,15 +202,6 @@ void audiohw_postinit(void) | |||
194 | /* wait until outputs have stabilized */ | 202 | /* wait until outputs have stabilized */ |
195 | sleep(HZ/4); | 203 | sleep(HZ/4); |
196 | 204 | ||
197 | /* Sansa Clip and Sansa m200v4 need HPCM enabled, otherwise they output | ||
198 | the L-R signal on both L and R headphone outputs instead of normal stereo. | ||
199 | TODO : If this turns out to apply to all ams3525 targets, consider | ||
200 | simplifying the precompiler condition. | ||
201 | */ | ||
202 | #if !defined(SANSA_CLIP) && !defined(SANSA_M200V4) && !defined(SANSA_E200V2) | ||
203 | as3514_write(AS3514_AUDIOSET3, AUDIOSET3_HPCM_off); | ||
204 | #endif | ||
205 | |||
206 | #ifdef CPU_PP | 205 | #ifdef CPU_PP |
207 | ascodec_suppressor_on(false); | 206 | ascodec_suppressor_on(false); |
208 | #endif | 207 | #endif |