From 6e621948bb44b28dc0c1bd966b6e94e7a543a1a5 Mon Sep 17 00:00:00 2001 From: Simon Wilson Date: Mon, 27 Jun 2011 23:02:00 -0700 Subject: audio: workaround ABE microphone disable problem The analog microphone uplink stops working if any downlink route is changed when the modem PCMs are open, so as a workaround, only modify the earpiece route when the modem PCMs are closed. Change-Id: Ib725a28da5130546015a9e05da4fca4955ce90bd --- audio/audio_hw.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'audio') diff --git a/audio/audio_hw.c b/audio/audio_hw.c index 5f590e0..bc4ff1a 100644 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -477,15 +477,19 @@ static void select_output_device(struct tuna_audio_device *adev) otherwise microphone does not function */ end_call(adev); set_route_by_array(adev->mixer, headset_vx, 1); + if (adev->out_device & AUDIO_DEVICE_OUT_EARPIECE) + set_route_by_array(adev->mixer, earpiece_switch, 1); + else + set_route_by_array(adev->mixer, earpiece_switch, 0); start_call(adev); - } else + } else { set_route_by_array(adev->mixer, headset_mm, 1); + if (adev->out_device & AUDIO_DEVICE_OUT_EARPIECE) + set_route_by_array(adev->mixer, earpiece_switch, 1); + else + set_route_by_array(adev->mixer, earpiece_switch, 0); + } } - - if (adev->out_device & AUDIO_DEVICE_OUT_EARPIECE) - set_route_by_array(adev->mixer, earpiece_switch, 1); - else - set_route_by_array(adev->mixer, earpiece_switch, 0); } static uint32_t out_get_sample_rate(const struct audio_stream *stream) -- cgit v1.1