summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorSimon Wilson <simonwilson@google.com>2011-06-27 23:02:00 -0700
committerSimon Wilson <simonwilson@google.com>2011-06-27 23:02:03 -0700
commit6e621948bb44b28dc0c1bd966b6e94e7a543a1a5 (patch)
treebff82d355cef4d921be583ec6c0e22f9f3401f6e /audio
parent9bf507ff6f1efc70fb87d9eef6afaf152d766582 (diff)
downloaddevice_samsung_tuna-6e621948bb44b28dc0c1bd966b6e94e7a543a1a5.zip
device_samsung_tuna-6e621948bb44b28dc0c1bd966b6e94e7a543a1a5.tar.gz
device_samsung_tuna-6e621948bb44b28dc0c1bd966b6e94e7a543a1a5.tar.bz2
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
Diffstat (limited to 'audio')
-rw-r--r--audio/audio_hw.c16
1 files changed, 10 insertions, 6 deletions
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)