From be5fc0ff7f01ad2e5b964ca437674c15a7a8bd71 Mon Sep 17 00:00:00 2001 From: Cástor Muñoz Date: Sat, 6 Dec 2014 23:28:31 +0100 Subject: iAP: lingo 1 (microphone) Change-Id: I65da2064951972368a2880d271280e5b5ae878fe --- apps/audio_path.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'apps/audio_path.c') diff --git a/apps/audio_path.c b/apps/audio_path.c index c4a4d1b277..6709d4421d 100644 --- a/apps/audio_path.c +++ b/apps/audio_path.c @@ -34,6 +34,9 @@ #if CONFIG_TUNER #include "radio.h" #endif +#if defined(IPOD_ACCESSORY_PROTOCOL) && defined(HAVE_LINE_REC) +#include "iap.h" +#endif /* Some audio sources may require a boosted CPU */ #ifdef HAVE_ADJUSTABLE_CPU_FREQ @@ -95,6 +98,13 @@ void audio_set_input_source(int source, unsigned flags) radio_start(); #endif +#if defined(IPOD_ACCESSORY_PROTOCOL) && defined(HAVE_LINE_REC) + static bool last_rec_onoff = false; + bool onoff = (source == AUDIO_SRC_LINEIN) ? true : false; + if (last_rec_onoff != onoff) + last_rec_onoff = iap_record(onoff); +#endif + /* set hardware inputs */ audio_input_mux(source, flags); } /* audio_set_source */ -- cgit v1.2.3