summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/sansa-fuzeplus
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233/sansa-fuzeplus')
-rw-r--r--firmware/target/arm/imx233/sansa-fuzeplus/audio-fuzeplus.c20
-rw-r--r--firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c1
-rw-r--r--firmware/target/arm/imx233/sansa-fuzeplus/power-fuzeplus.c2
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
28static int input_source = AUDIO_SRC_PLAYBACK;
29static unsigned input_flags = 0;
30static int output_source = AUDIO_SRC_PLAYBACK;
31
32static 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
28void audio_input_mux(int source, unsigned flags) 40void 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
34void audio_set_output_source(int source) 49void 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
28static bool tuner_enable = false; 29static 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}