hal: fix for voip volume setting when select_devices()

voip volume setting will not be applied correctly when select_devices()
since its usecase type won't necessary be voip_usecase
check for voip_usecase existance and not a capture type instead.

Bug: 110446256
Bug: 120052983
Test: self tested 20 times making a DUO video call

Change-Id: If3e6bc46be02a83ccf92bd56fc48a9c88c1e21bd
Signed-off-by: Yung Ti Su <andysu@google.com>
(cherry picked from commit 0bb200f93c8724e3c7805fc9448930239fddb127)
This commit is contained in:
Yung Ti Su 2018-06-22 17:38:47 +08:00 committed by Aniket Kumar Lata
parent 198adc001c
commit 70cb824969
1 changed files with 1 additions and 1 deletions

View File

@ -2558,7 +2558,7 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id)
}
}
if (usecase == voip_usecase) {
if (usecase->type != PCM_CAPTURE && usecase == voip_usecase) {
struct stream_out *voip_out = voip_usecase->stream.out;
audio_extn_utils_send_app_type_gain(adev,
voip_out->app_type_cfg.app_type,