diff options
author | Xin Li <delphij@google.com> | 2020-11-23 13:14:22 -0800 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2020-11-23 13:14:22 -0800 |
commit | 27a9b76aa24ded058bcc5ee68c0ea4a6290f3a3c (patch) | |
tree | 26e86e09f8578261b3ba6b8ca0631d6e58cbf4e8 | |
parent | d809f306aa11a44185be481dda450688048a6adf (diff) | |
parent | c2510cab636153aca0fbd5959108bb7468b4e231 (diff) | |
download | audio-27a9b76aa24ded058bcc5ee68c0ea4a6290f3a3c.tar.gz |
Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855temp_rvc_qpr_merge
Bug: 172690556
Merged-In: I62dd37dbbe959f869225f57dda0504fd31546e53
Change-Id: I9cd544292abc85430a234bede371e4f4010848b6
-rw-r--r-- | hal/audio_hw.c | 14 |
1 files changed, 6 insertions, 8 deletions
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 @@ 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]); + } } } } @@ -2988,16 +2994,8 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs) 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; } |