From 289440605aeda05b0722c64f8798906dcd0af41a Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Sat, 28 Jan 2012 00:43:04 +0100 Subject: imx233/fuze+: set a few recommended power bits by Freescale, remove some uneeded headers, implement audio path selection for playback and radio Change-Id: If926ead9b776504a58eb102fcc0e9acadf4f7379 --- .../arm/imx233/sansa-fuzeplus/audio-fuzeplus.c | 20 +++++++++++++++++++- .../arm/imx233/sansa-fuzeplus/button-fuzeplus.c | 1 + .../arm/imx233/sansa-fuzeplus/power-fuzeplus.c | 2 ++ 3 files changed, 22 insertions(+), 1 deletion(-) (limited to 'firmware/target/arm/imx233/sansa-fuzeplus') diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/audio-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/audio-fuzeplus.c index 1aac9e43e0..abdcda90cb 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/audio-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/audio-fuzeplus.c @@ -25,13 +25,31 @@ #include "audioout-imx233.h" #include "audioin-imx233.h" +static int input_source = AUDIO_SRC_PLAYBACK; +static unsigned input_flags = 0; +static int output_source = AUDIO_SRC_PLAYBACK; + +static void select_audio_path(void) +{ + if(input_source == AUDIO_SRC_PLAYBACK) + imx233_audiout_select_hp_input(false); + else + imx233_audiout_select_hp_input(true); +} + void audio_input_mux(int source, unsigned flags) { (void) source; (void) flags; + input_source = source; + input_flags = flags; + select_audio_path(); } - + void audio_set_output_source(int source) { (void) source; + output_source = source; + select_audio_path(); } + diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c index e349459d6e..b61ce68df0 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c @@ -27,6 +27,7 @@ #include "lcd.h" #include "string.h" #include "usb.h" +#include "power-imx233.h" #ifndef BOOTLOADER diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/power-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/power-fuzeplus.c index bf06abe311..1b72a4b73c 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/power-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/power-fuzeplus.c @@ -24,6 +24,7 @@ #include "tuner.h" #include "fmradio_i2c.h" #include "pinctrl-imx233.h" +#include "power-imx233.h" static bool tuner_enable = false; @@ -37,6 +38,7 @@ bool tuner_power(bool enable) imx233_enable_gpio_output(0, 29, enable); imx233_set_gpio_output(0, 29, enable); tuner_enable = enable; + //imx233_power_set_dcdc_freq(enable, HW_POWER_MISC__FREQSEL__24MHz); } return tuner_enable; } -- cgit v1.2.3