diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2008-12-16 22:16:55 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2008-12-16 22:16:55 +0000 |
commit | 2d0a045909ce1351a24366286a3defe43d5440b6 (patch) | |
tree | 7fff46ad7c00d834e56aea7f7511a1fc475bf495 /firmware | |
parent | b32c05b116ac0640d22fc2c021371865d005cdc1 (diff) | |
download | rockbox-2d0a045909ce1351a24366286a3defe43d5440b6.tar.gz rockbox-2d0a045909ce1351a24366286a3defe43d5440b6.zip |
Enable as3514 HPCM codec setting for all AMS3525 targets (and disable it for others).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19460 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-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 |