diff options
author | Simon Wilson <simonwilson@google.com> | 2011-06-27 23:02:00 -0700 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2011-06-27 23:02:03 -0700 |
commit | bacbf5c283cd79fcc1d0c58fea02d4f84c894e78 (patch) | |
tree | f39a8c31cc117a4f59572fa70b01e9bf82fc926e /audio | |
parent | e7c6299d7ddfdc0db0e3fda19d3a32ffcdc581e4 (diff) | |
download | device_samsung_tuna-bacbf5c283cd79fcc1d0c58fea02d4f84c894e78.zip device_samsung_tuna-bacbf5c283cd79fcc1d0c58fea02d4f84c894e78.tar.gz device_samsung_tuna-bacbf5c283cd79fcc1d0c58fea02d4f84c894e78.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.c | 16 |
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) |