summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSathishKumar Mani <smani@codeaurora.org>2012-10-15 14:56:17 -0700
committerThe Android Automerger <android-build@android.com>2012-10-18 13:09:05 -0700
commit73df78f5b4a2ec2b15c9d2f794e6d817a0ea9a37 (patch)
tree9d30618a61efaf6b5871746b1aa9138148735838
parentd765cd646e2b22f95c840426926127a714b8dc94 (diff)
downloadaudio-73df78f5b4a2ec2b15c9d2f794e6d817a0ea9a37.tar.gz
alsa_sound: change voice-call stop sequence
When application processor is paired with an external modem, stop command should be sent to the DSP on the modem before closing the Slimbus channels on the application processor. Bug: 7313016 Change-Id: Ibafeaf9a9badbf32cc955c4e8b5c81e5efdcbb0c Signed-off-by: Iliyan Malchev <malchev@google.com>
-rw-r--r--alsa_sound/alsa_default.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/alsa_sound/alsa_default.cpp b/alsa_sound/alsa_default.cpp
index 18a28d2..40d575c 100644
--- a/alsa_sound/alsa_default.cpp
+++ b/alsa_sound/alsa_default.cpp
@@ -1088,6 +1088,21 @@ static status_t s_close(alsa_handle_t *handle)
handle->rxHandle = 0;
ALOGV("s_close: handle %p h %p", handle, h);
if (h) {
+ if ((!strcmp(handle->useCase, SND_USE_CASE_VERB_VOICECALL) ||
+ !strcmp(handle->useCase, SND_USE_CASE_MOD_PLAY_VOICE)) &&
+ platform_is_Fusion3()) {
+#ifdef QCOM_CSDCLIENT_ENABLED
+ if (csd_stop_voice == NULL) {
+ ALOGE("dlsym:Error:%s Loading csd_client_disable_device", dlerror());
+ } else {
+ err = csd_stop_voice();
+ if (err < 0) {
+ ALOGE("s_close: csd_client error %d\n", err);
+ }
+ }
+#endif
+ }
+
ALOGV("s_close rxHandle\n");
err = pcm_close(h);
if(err != NO_ERROR) {
@@ -1105,21 +1120,6 @@ static status_t s_close(alsa_handle_t *handle)
ALOGE("s_close: pcm_close failed for handle with err %d", err);
}
- if ((!strcmp(handle->useCase, SND_USE_CASE_VERB_VOICECALL) ||
- !strcmp(handle->useCase, SND_USE_CASE_MOD_PLAY_VOICE)) &&
- platform_is_Fusion3()) {
-#ifdef QCOM_CSDCLIENT_ENABLED
- if (csd_stop_voice == NULL) {
- ALOGE("dlsym:Error:%s Loading csd_client_disable_device", dlerror());
- } else {
- err = csd_stop_voice();
- if (err < 0) {
- ALOGE("s_close: csd_client error %d\n", err);
- }
- }
-#endif
- }
-
disableDevice(handle);
} else if((!strcmp(handle->useCase, SND_USE_CASE_VERB_HIFI_LOW_POWER)) ||
(!strcmp(handle->useCase, SND_USE_CASE_MOD_PLAY_LPA)) ||