summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2008-12-16 22:16:55 +0000
committerBertrik Sikken <bertrik@sikken.nl>2008-12-16 22:16:55 +0000
commit2d0a045909ce1351a24366286a3defe43d5440b6 (patch)
tree7fff46ad7c00d834e56aea7f7511a1fc475bf495
parentb32c05b116ac0640d22fc2c021371865d005cdc1 (diff)
downloadrockbox-2d0a045909ce1351a24366286a3defe43d5440b6.zip
rockbox-2d0a045909ce1351a24366286a3defe43d5440b6.tar.gz
rockbox-2d0a045909ce1351a24366286a3defe43d5440b6.tar.bz2
rockbox-2d0a045909ce1351a24366286a3defe43d5440b6.tar.xz
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
-rw-r--r--firmware/drivers/audio/as3514.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c
index ecb577c..1303aae 100644
--- a/firmware/drivers/audio/as3514.c
+++ b/firmware/drivers/audio/as3514.c
@@ -162,8 +162,16 @@ void audiohw_preinit(void)
AUDIOSET2_IBR_DAC_0 | AUDIOSET2_LSP_LP |
AUDIOSET2_IBR_LSP_50);
+/* AMS Sansas based on the AS3525 need HPCM enabled, otherwise they output the
+ L-R signal on both L and R headphone outputs instead of normal stereo.
+ Turning it off saves a little power on targets that don't need it. */
+#if (CONFIG_CPU == AS3525)
/* Set HPCM on, ZCU on */
as3514_write(AS3514_AUDIOSET3, 0);
+#else
+ /* Set HPCM off, ZCU on */
+ as3514_write(AS3514_AUDIOSET3, AUDIOSET3_HPCM_off);
+#endif
/* Mute and disable speaker */
as3514_write(AS3514_LSP_OUT_R, LSP_OUT_R_SP_OVC_TO_256MS | 0x00);
@@ -194,15 +202,6 @@ void audiohw_postinit(void)
/* wait until outputs have stabilized */
sleep(HZ/4);
-/* Sansa Clip and Sansa m200v4 need HPCM enabled, otherwise they output
- the L-R signal on both L and R headphone outputs instead of normal stereo.
- TODO : If this turns out to apply to all ams3525 targets, consider
- simplifying the precompiler condition.
-*/
-#if !defined(SANSA_CLIP) && !defined(SANSA_M200V4) && !defined(SANSA_E200V2)
- as3514_write(AS3514_AUDIOSET3, AUDIOSET3_HPCM_off);
-#endif
-
#ifdef CPU_PP
ascodec_suppressor_on(false);
#endif