summaryrefslogtreecommitdiffstats
path: root/hal/audio_hw.c
diff options
context:
space:
mode:
authorArun Mirpuri <amirpuri@qti.qualcomm.com>2018-05-29 17:26:07 -0700
committerNadav Bar <nadavbar@google.com>2018-09-26 14:22:44 +0300
commit0cc2f31cea5144aef2b5b0e3723228d1cd9e2110 (patch)
treeda46ed05478a969dc551eb2f649c515e5ca9d00b /hal/audio_hw.c
parentd2b5ef4dd5feaf36382bcdc1dca5ff3a13c6741f (diff)
downloadandroid_hardware_qcom_audio-0cc2f31cea5144aef2b5b0e3723228d1cd9e2110.tar.gz
android_hardware_qcom_audio-0cc2f31cea5144aef2b5b0e3723228d1cd9e2110.tar.bz2
android_hardware_qcom_audio-0cc2f31cea5144aef2b5b0e3723228d1cd9e2110.zip
hal: Fix in call music stream muted issue when mic is muted
Fix in-call music stream mute issue when mic is muted within dialer app. Issue is caused due to mute applied on mixed voice stream containing both Voice Tx and incall music stream. Solution is to apply mute on voice device as and when mic is muted and incall music usecase is active. Mute cannot be always applied on device as comfort noise can only be applied after Mute in Voice stream topology. Change-Id: I5f3eefdc78590b74beb9c2031139c1da2e41bd1e Test: manual. Bug: 70800193
Diffstat (limited to 'hal/audio_hw.c')
-rw-r--r--hal/audio_hw.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 06376861..261531db 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1980,6 +1980,9 @@ static int stop_output_stream(struct stream_out *out)
audio_low_latency_hint_end();
}
+ if (out->usecase == USECASE_INCALL_MUSIC_UPLINK)
+ voice_set_device_mute_flag(adev, false);
+
/* 1. Get and set stream specific mixer controls */
disable_audio_route(adev, uc_info);
@@ -2103,6 +2106,9 @@ int start_output_stream(struct stream_out *out)
audio_extn_extspk_update(adev->extspk);
+ if (out->usecase == USECASE_INCALL_MUSIC_UPLINK)
+ voice_set_device_mute_flag(adev, true);
+
ALOGV("%s: Opening PCM device card_id(%d) device_id(%d) format(%#x)",
__func__, adev->snd_card, out->pcm_device_id, out->config.format);
if (out->usecase == USECASE_AUDIO_PLAYBACK_OFFLOAD) {