Revert "hal: Fix voice call routing issue on headset"
Sometimes rx mute is observed in voice call. Rx sound device
reference count is incrementing incorrectly causing this issue.
Reverting this commit 5c353ebc429495115361f4b53365f8bf3b1a78c8
will fix the issue.
CRs-Fixed: 979685
Change-Id: I559930457f04a0c890c60386d77153593c5e617e
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 35522ac..7ee27f5 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -714,13 +714,15 @@
specified usecase to new snd devices */
list_for_each(node, &adev->usecase_list) {
usecase = node_to_item(node, struct audio_usecase, list);
- /* Update the out_snd_device only for the usecases that are enabled here */
- if (switch_device[usecase->id] && (usecase->type != VOICE_CALL)) {
- usecase->out_snd_device = snd_device;
+ /* Update the out_snd_device only before enabling the audio route */
+ if (switch_device[usecase->id]) {
+ usecase->out_snd_device = snd_device;
+ if (usecase->type != VOICE_CALL) {
ALOGD("%s:becf: enabling usecase (%s) on (%s)", __func__,
- use_case_table[usecase->id],
- platform_get_snd_device_name(usecase->out_snd_device));
+ use_case_table[usecase->id],
+ platform_get_snd_device_name(usecase->out_snd_device));
enable_audio_route(adev, usecase);
+ }
}
}
}