summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/audioout-imx233.c
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2014-02-16 20:46:00 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2014-02-16 20:53:08 +0100
commit812c3e7c48e03d0a6457adf754cb549959550f70 (patch)
tree9fca6cc67d60dce58737cf5c403170546fd71491 /firmware/target/arm/imx233/audioout-imx233.c
parent17abb10c641703a7ab421ea17e08981720e88e90 (diff)
downloadrockbox-812c3e7c48e03d0a6457adf754cb549959550f70.tar.gz
rockbox-812c3e7c48e03d0a6457adf754cb549959550f70.tar.bz2
rockbox-812c3e7c48e03d0a6457adf754cb549959550f70.zip
imx233: add support for speaker on stmp3780
Change-Id: I990ca2bd43e12047e257f85ff06f046dfa3f94b3
Diffstat (limited to 'firmware/target/arm/imx233/audioout-imx233.c')
-rw-r--r--firmware/target/arm/imx233/audioout-imx233.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/audioout-imx233.c b/firmware/target/arm/imx233/audioout-imx233.c
index c92804c2d4..3b6203ea44 100644
--- a/firmware/target/arm/imx233/audioout-imx233.c
+++ b/firmware/target/arm/imx233/audioout-imx233.c
@@ -261,6 +261,24 @@ void imx233_audioout_set_3d_effect(int val)
}
}
+void imx233_audioout_enable_spkr(bool en)
+{
+#if IMX233_SUBTARGET >= 3780
+ if(en)
+ {
+ BF_CLR(AUDIOOUT_PWRDN, SPEAKER);
+ BF_CLR(AUDIOOUT_SPEAKERCTRL, MUTE);
+ }
+ else
+ {
+ BF_SET(AUDIOOUT_SPEAKERCTRL, MUTE);
+ BF_SET(AUDIOOUT_PWRDN, SPEAKER);
+ }
+#else
+ (void) en;
+#endif
+}
+
struct imx233_audioout_info_t imx233_audioout_get_info(void)
{
struct imx233_audioout_info_t info;