diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2012-01-28 00:43:04 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2012-02-01 15:02:22 +0100 |
commit | 289440605aeda05b0722c64f8798906dcd0af41a (patch) | |
tree | 39cb9c309c1134e7c10114b5effdd2a1de22b4e6 /firmware/target/arm/imx233/sansa-fuzeplus | |
parent | c18a4e631690250024031be1b306e9003b2300ad (diff) |
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
Diffstat (limited to 'firmware/target/arm/imx233/sansa-fuzeplus')
3 files changed, 22 insertions, 1 deletions
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; } |