hal: Fix input device update improper when device switch for VoIP usecase
Input device is not updated when device switch for VOIP usecase. When
device switch, output device will check in check_usecases_codec_backend
function to make sure all usecase route to valid output device. Ouput
device is updated to new device, but input device is not updted.
When VoIP update voc cal data, the device pair mismatch would happen.
Fix this by update input device togehter when VoIP is active.
CRs-Fixed: 1104278
Change-Id: I93ac90ae7c597f0281bb71489ed163a88b574df3
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index b6e620e..71c05df 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1109,7 +1109,7 @@
if (usecase->type == VOIP_CALL)
status = platform_switch_voice_call_device_post(adev->platform,
usecase->out_snd_device,
- usecase->in_snd_device);
+ platform_get_input_snd_device(adev->platform, uc_info->devices));
enable_audio_route(adev, usecase);
}
}