[automerger skipped] Skip ab/6749736 in stage. am: d809f306aa -s ours am: c5bb6e19b4 -s ours
am skip reason: Change-Id Ic270dd4a98c9951c094f105a32646741890cf1a4 with SHA-1 fe8ad38246 is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/qcom/audio/+/12796895
Change-Id: I1b116c009b152e80b23d157bfc8f9ea2c7f7ba65
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 0f9dcf0..a3abb8a 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1212,6 +1212,12 @@
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]);
+ }
}
}
}
@@ -2988,16 +2994,8 @@
lock_output_stream(out);
- // The usb driver needs to be closed after usb device disconnection
- // otherwise audio is no longer played on the new usb devices.
- // By forcing the stream in standby, the usb stack refcount drops to 0
- // and the driver is closed.
if (val == AUDIO_DEVICE_NONE &&
audio_is_usb_out_device(out->devices)) {
- if (out->usecase == USECASE_AUDIO_PLAYBACK_OFFLOAD) {
- ALOGD("%s() putting the usb device in standby after disconnection", __func__);
- out_standby_l(&out->stream.common);
- }
val = AUDIO_DEVICE_OUT_SPEAKER;
forced_speaker_fallback = true;
}