diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2014-02-16 20:46:00 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2014-02-16 20:53:08 +0100 |
commit | 812c3e7c48e03d0a6457adf754cb549959550f70 (patch) | |
tree | 9fca6cc67d60dce58737cf5c403170546fd71491 /firmware/target/arm/imx233/audioout-imx233.c | |
parent | 17abb10c641703a7ab421ea17e08981720e88e90 (diff) | |
download | rockbox-812c3e7c48e03d0a6457adf754cb549959550f70.tar.gz 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.c | 18 |
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) | |||
261 | } | 261 | } |
262 | } | 262 | } |
263 | 263 | ||
264 | void imx233_audioout_enable_spkr(bool en) | ||
265 | { | ||
266 | #if IMX233_SUBTARGET >= 3780 | ||
267 | if(en) | ||
268 | { | ||
269 | BF_CLR(AUDIOOUT_PWRDN, SPEAKER); | ||
270 | BF_CLR(AUDIOOUT_SPEAKERCTRL, MUTE); | ||
271 | } | ||
272 | else | ||
273 | { | ||
274 | BF_SET(AUDIOOUT_SPEAKERCTRL, MUTE); | ||
275 | BF_SET(AUDIOOUT_PWRDN, SPEAKER); | ||
276 | } | ||
277 | #else | ||
278 | (void) en; | ||
279 | #endif | ||
280 | } | ||
281 | |||
264 | struct imx233_audioout_info_t imx233_audioout_get_info(void) | 282 | struct imx233_audioout_info_t imx233_audioout_get_info(void) |
265 | { | 283 | { |
266 | struct imx233_audioout_info_t info; | 284 | struct imx233_audioout_info_t info; |