summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/audioout-imx233.c
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2012-12-02 11:51:17 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2012-12-02 11:51:51 +0100
commitd119fb1fc5b917e430b23a28bebf6ec5db35b34e (patch)
tree6d7c6afb422d8f462ff3c9272f1d4c0901f26880 /firmware/target/arm/imx233/audioout-imx233.c
parent4dd2c5277b6da35ceb200d814c39a581e69c5258 (diff)
downloadrockbox-d119fb1fc5b917e430b23a28bebf6ec5db35b34e.tar.gz
rockbox-d119fb1fc5b917e430b23a28bebf6ec5db35b34e.tar.bz2
rockbox-d119fb1fc5b917e430b23a28bebf6ec5db35b34e.zip
imx233: try to improve audio quality
Change-Id: Idaee93fae8d407e5968f8571c54957b7b87da3bb
Diffstat (limited to 'firmware/target/arm/imx233/audioout-imx233.c')
-rw-r--r--firmware/target/arm/imx233/audioout-imx233.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/audioout-imx233.c b/firmware/target/arm/imx233/audioout-imx233.c
index e5e1e37264..e9b368c9b6 100644
--- a/firmware/target/arm/imx233/audioout-imx233.c
+++ b/firmware/target/arm/imx233/audioout-imx233.c
@@ -53,6 +53,13 @@ void imx233_audioout_preinit(void)
__REG_CLR(HW_AUDIOOUT_PWRDN) = HW_AUDIOOUT_PWRDN__HEADPHONE;
/* Set HP mode to AB */
__REG_SET(HW_AUDIOOUT_ANACTRL) = HW_AUDIOOUT_ANACTRL__HP_CLASSAB;
+ /* change biais to -50% */
+ __REG_CLR(HW_AUDIOOUT_TEST) = HW_AUDIOOUT_TEST__HP_I1_ADJ_BM;
+ __REG_SET(HW_AUDIOOUT_TEST) = HW_AUDIOOUT_TEST__HP_I1_ADJ_M_50;
+ __REG_CLR(HW_AUDIOOUT_REFCTRL) = HW_AUDIOOUT_REFCTRL__BIAS_CTRL_BM;
+ __REG_SET(HW_AUDIOOUT_REFCTRL) = 1 << HW_AUDIOOUT_REFCTRL__BIAS_CTRL_BP;
+ __REG_SET(HW_AUDIOOUT_REFCTRL) = HW_AUDIOOUT_REFCTRL__RAISE_REF;
+ __REG_SET(HW_AUDIOOUT_REFCTRL) = HW_AUDIOOUT_REFCTRL__XTAL_BGR_BIAS;
/* Stop holding to ground */
__REG_CLR(HW_AUDIOOUT_ANACTRL) = HW_AUDIOOUT_ANACTRL__HP_HOLD_GND;
/* Set dmawait count to 31 (see errata, workaround random stop) */