summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2020-09-02 18:30:56 -0700
committerEric Laurent <elaurent@google.com>2020-09-02 18:30:56 -0700
commit16240d402be8ad6c76c97e464677ba2bc1975c36 (patch)
tree22c052ee9c11ad9875d2f4e03dc776d670e88e91
parent385eee769370340354a11caf21bf0571e9fdb3cd (diff)
downloadaudio-16240d402be8ad6c76c97e464677ba2bc1975c36.tar.gz
audio hal: fix voip volume update in check_and_route_playback_usecases()
When audio-playback-voip use case device shares the same backend as the new device, audio-playback-voip device is switched, and voip volume must be re-applied. Bug: 167288716 Test: repro steps in bug. Change-Id: I61692d7d5acf5d3147c32fc22761d1ed75c487a2
-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 0f9dcf0..b62da23 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1212,6 +1212,12 @@ static void check_and_route_playback_usecases(struct audio_device *adev,
usecase = node_to_item(node, struct audio_usecase, list);
if (switch_device[usecase->id] ) {
enable_audio_route(adev, usecase);
+ if (usecase->stream.out && usecase->id == USECASE_AUDIO_PLAYBACK_VOIP) {
+ struct stream_out *out = usecase->stream.out;
+ audio_extn_utils_send_app_type_gain(out->dev,
+ out->app_type_cfg.app_type,
+ &out->app_type_cfg.gain[0]);
+ }
}
}
}