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) | |
download | rockbox-289440605aeda05b0722c64f8798906dcd0af41a.tar.gz rockbox-289440605aeda05b0722c64f8798906dcd0af41a.zip |
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 @@ | |||
25 | #include "audioout-imx233.h" | 25 | #include "audioout-imx233.h" |
26 | #include "audioin-imx233.h" | 26 | #include "audioin-imx233.h" |
27 | 27 | ||
28 | static int input_source = AUDIO_SRC_PLAYBACK; | ||
29 | static unsigned input_flags = 0; | ||
30 | static int output_source = AUDIO_SRC_PLAYBACK; | ||
31 | |||
32 | static void select_audio_path(void) | ||
33 | { | ||
34 | if(input_source == AUDIO_SRC_PLAYBACK) | ||
35 | imx233_audiout_select_hp_input(false); | ||
36 | else | ||
37 | imx233_audiout_select_hp_input(true); | ||
38 | } | ||
39 | |||
28 | void audio_input_mux(int source, unsigned flags) | 40 | void audio_input_mux(int source, unsigned flags) |
29 | { | 41 | { |
30 | (void) source; | 42 | (void) source; |
31 | (void) flags; | 43 | (void) flags; |
44 | input_source = source; | ||
45 | input_flags = flags; | ||
46 | select_audio_path(); | ||
32 | } | 47 | } |
33 | 48 | ||
34 | void audio_set_output_source(int source) | 49 | void audio_set_output_source(int source) |
35 | { | 50 | { |
36 | (void) source; | 51 | (void) source; |
52 | output_source = source; | ||
53 | select_audio_path(); | ||
37 | } | 54 | } |
55 | |||
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 @@ | |||
27 | #include "lcd.h" | 27 | #include "lcd.h" |
28 | #include "string.h" | 28 | #include "string.h" |
29 | #include "usb.h" | 29 | #include "usb.h" |
30 | #include "power-imx233.h" | ||
30 | 31 | ||
31 | #ifndef BOOTLOADER | 32 | #ifndef BOOTLOADER |
32 | 33 | ||
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 @@ | |||
24 | #include "tuner.h" | 24 | #include "tuner.h" |
25 | #include "fmradio_i2c.h" | 25 | #include "fmradio_i2c.h" |
26 | #include "pinctrl-imx233.h" | 26 | #include "pinctrl-imx233.h" |
27 | #include "power-imx233.h" | ||
27 | 28 | ||
28 | static bool tuner_enable = false; | 29 | static bool tuner_enable = false; |
29 | 30 | ||
@@ -37,6 +38,7 @@ bool tuner_power(bool enable) | |||
37 | imx233_enable_gpio_output(0, 29, enable); | 38 | imx233_enable_gpio_output(0, 29, enable); |
38 | imx233_set_gpio_output(0, 29, enable); | 39 | imx233_set_gpio_output(0, 29, enable); |
39 | tuner_enable = enable; | 40 | tuner_enable = enable; |
41 | //imx233_power_set_dcdc_freq(enable, HW_POWER_MISC__FREQSEL__24MHz); | ||
40 | } | 42 | } |
41 | return tuner_enable; | 43 | return tuner_enable; |
42 | } | 44 | } |