From eacd76cb80db12adcce74980e69d116911a8cde7 Mon Sep 17 00:00:00 2001 From: Szymon Dziok Date: Tue, 17 Jun 2014 23:13:15 +0000 Subject: Radio and radio recording for Samsung YH-920. There is no simple method to detect radio through the 3-wire interface, so it's not implemented for the YH-925 for now. YH-920 always has a radio. Change-Id: Iea484d752915fcd40dbbbd7dbbf13e81aaf548db --- firmware/target/arm/pp/audio-pp.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'firmware/target/arm/pp/audio-pp.c') diff --git a/firmware/target/arm/pp/audio-pp.c b/firmware/target/arm/pp/audio-pp.c index 6b5b082cc7..76740f2e42 100644 --- a/firmware/target/arm/pp/audio-pp.c +++ b/firmware/target/arm/pp/audio-pp.c @@ -30,6 +30,25 @@ void audio_set_output_source(int source) source = AUDIO_SRC_PLAYBACK; } /* audio_set_output_source */ +#ifdef HAVE_AK4537 +void audio_input_mux(int source, unsigned flags) +{ + (void)flags; + /* Prevent pops from unneeded switching */ + static int last_source = AUDIO_SRC_PLAYBACK; + +#ifdef HAVE_FMRADIO_REC + bool recording = flags & SRCF_RECORDING; + + if ((source == AUDIO_SRC_FMRADIO) && (!recording)) + audiohw_set_recvol(0, 0, AUDIO_GAIN_LINEIN); /* Set line-in vol to 0dB*/ +#endif + if (source != last_source) + audiohw_set_recsrc(source); + + last_source = source; +} +#else void audio_input_mux(int source, unsigned flags) { (void)flags; @@ -132,4 +151,6 @@ void audio_input_mux(int source, unsigned flags) last_source = source; } /* audio_input_mux */ +#endif + #endif /* INPUT_SRC_CAPS != 0 */ -- cgit v1.2.3