summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisael Lopez Cruz2013-12-13 01:46:07 -0600
committerGerrit Code Review2014-01-24 14:19:11 -0600
commitf5884e73b0e4af502bfc6c18b074e95552d77db6 (patch)
tree31be6a9990f16120565519f1983dbfbe6b8f518c /audio/multizone
parent7f2434e0451f0ce7156713e3bc91856cea5ded9b (diff)
downloaddevice-ti-jacinto6evm-f5884e73b0e4af502bfc6c18b074e95552d77db6.tar.gz
device-ti-jacinto6evm-f5884e73b0e4af502bfc6c18b074e95552d77db6.tar.xz
device-ti-jacinto6evm-f5884e73b0e4af502bfc6c18b074e95552d77db6.zip
audio: Reorder voice call output stream termination
Unregister the voice call downlink stream before letting any ongoing stream on cabin switch back its original writer. Otherwise, it may end up trying to register two streams with the same slot masks. An incorrect log message is also fixed. Change-Id: Ic5cb4d2ed0cc4de4232151df9ed8d45b2de9d5c2 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Diffstat (limited to 'audio/multizone')
-rw-r--r--audio/multizone/AudioHw.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/multizone/AudioHw.cpp b/audio/multizone/AudioHw.cpp
index a7e3586..5432c07 100644
--- a/audio/multizone/AudioHw.cpp
+++ b/audio/multizone/AudioHw.cpp
@@ -195,7 +195,7 @@ int AudioStreamOut::standby()
195 195
196void AudioStreamOut::setVoiceCall(bool on) 196void AudioStreamOut::setVoiceCall(bool on)
197{ 197{
198 ALOGV("AudioStreamOut: standby()"); 198 ALOGV("AudioStreamOut: setVoiceCall() %s", on ? "enter" : "leave");
199 199
200 AutoMutex lock(mLock); 200 AutoMutex lock(mLock);
201 201
@@ -879,9 +879,9 @@ void AudioHwDevice::disableVoiceCall()
879 879
880 sp<AudioStreamOut> outStream = mPrimaryStreamOut.promote(); 880 sp<AudioStreamOut> outStream = mPrimaryStreamOut.promote();
881 if (outStream != NULL) { 881 if (outStream != NULL) {
882 outStream->setVoiceCall(false);
883 if (outStream->mWriter->isStreamRegistered(mVoiceDLOutStream)) 882 if (outStream->mWriter->isStreamRegistered(mVoiceDLOutStream))
884 outStream->mWriter->unregisterStream(mVoiceDLOutStream); 883 outStream->mWriter->unregisterStream(mVoiceDLOutStream);
884 outStream->setVoiceCall(false);
885 } else { 885 } else {
886 ALOGE("AudioHwDevice: primary output stream is not valid"); 886 ALOGE("AudioHwDevice: primary output stream is not valid");
887 } 887 }