diff options
| author | Laxminath Kasam <lkasam@codeaurora.org> | 2012-04-09 16:37:26 +0530 |
|---|---|---|
| committer | Steve Kondik <shade@chemlab.org> | 2012-05-30 15:10:54 -0700 |
| commit | 5a880a20deeec8e1256542e165afb45e1882235c (patch) | |
| tree | 5e447070a9d408ae6689fdf2d3f1eb7f20cd2447 | |
| parent | e0d4e0a3c4c612165267b1970a58a70fe9e5c547 (diff) | |
| download | android_hardware_qcom_media-5a880a20deeec8e1256542e165afb45e1882235c.tar.gz android_hardware_qcom_media-5a880a20deeec8e1256542e165afb45e1882235c.tar.bz2 android_hardware_qcom_media-5a880a20deeec8e1256542e165afb45e1882235c.zip | |
hardware/qcom: msm8660: Fix no voice issue in Voipcall
-When Voip call is triggered, observe voice mute
issue sometimes.
-When Voip call is started, there is a ringer
that comes first and speaker is enabled. After
accepting the call, PolicyManager initiate route
device to Handset for Voip Usecase. Meanwhile
VoipStreamoutDirect thread opens MVS driver and also
routes the voice stream to current active rx device
and enables it. So enable Device is happening in
above two contexts at same time causing issue.
Need to acquire Lock in Voip context to avoid this.
Change-Id: I95c09204ae615e7255ed18beae9bd5c0a154eb8a
CRs-Fixed: 349440
Conflicts:
audio/msm8660/AudioHardware.cpp
| -rw-r--r-- | audio/msm8660/AudioHardware.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/audio/msm8660/AudioHardware.cpp b/audio/msm8660/AudioHardware.cpp index 190137c1..291119b5 100644 --- a/audio/msm8660/AudioHardware.cpp +++ b/audio/msm8660/AudioHardware.cpp @@ -3091,6 +3091,8 @@ ssize_t AudioHardware::AudioStreamOutDirect::write(const void* buffer, size_t by // fill 2 buffers before AUDIO_START mStartCount = AUDIO_HW_NUM_OUT_BUF; mStandby = false; + + Mutex::Autolock lock(mDeviceSwitchLock); //Routing Voip if ((cur_rx != INVALID_DEVICE) && (cur_tx != INVALID_DEVICE)) { @@ -3125,8 +3127,6 @@ ssize_t AudioHardware::AudioStreamOutDirect::write(const void* buffer, size_t by msm_start_voice(); msm_set_voice_tx_mute(0); #endif - if(!isDeviceListEmpty()) - updateDeviceInfo(cur_rx,cur_tx); addToTable(0,cur_rx,cur_tx,VOIP_CALL,true); } } @@ -3953,6 +3953,8 @@ status_t AudioHardware::AudioStreamInVoip::set( } LOGV("Going to enable RX/TX device for voice stream"); + + Mutex::Autolock lock(mDeviceSwitchLock); // Routing Voip if ( (cur_rx != INVALID_DEVICE) && (cur_tx != INVALID_DEVICE)) { @@ -3991,8 +3993,6 @@ status_t AudioHardware::AudioStreamInVoip::set( msm_start_voice(); msm_set_voice_tx_mute(0); #endif - if(!isDeviceListEmpty()) - updateDeviceInfo(cur_rx,cur_tx); addToTable(0,cur_rx,cur_tx,VOIP_CALL,true); } mFormat = *pFormat; |
