diff options
author | Weiyin Jiang <wjiang@codeaurora.org> | 2019-07-25 13:18:17 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-11-04 02:27:39 -0800 |
commit | 0791c8e688214c75c4d981d48139a185884888a0 (patch) | |
tree | 39ab9ca0ae23766fb740048fce255ad54416c203 /hal | |
parent | 5171705a38e73290c2b14b7ed778917ea29add15 (diff) | |
download | android_hardware_qcom_audio-0791c8e688214c75c4d981d48139a185884888a0.tar.gz android_hardware_qcom_audio-0791c8e688214c75c4d981d48139a185884888a0.tar.bz2 android_hardware_qcom_audio-0791c8e688214c75c4d981d48139a185884888a0.zip |
hal: add usecase type check
Add usecase type check to avoid stream.out being dereferenced in pcm
capture case.
CRs-Fixed: 2494182
Change-Id: I39ca104e8d34e76d4ff5cdb6177faddea04f6d96
Diffstat (limited to 'hal')
-rw-r--r-- | hal/audio_hw.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c index 38e57a82..d97f517c 100644 --- a/hal/audio_hw.c +++ b/hal/audio_hw.c @@ -2801,6 +2801,7 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id) !(usecase->stream.out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) && (usecase->type != TRANSCODE_LOOPBACK_TX) && (usecase->type != TRANSCODE_LOOPBACK_RX) && + (usecase->type != PCM_CAPTURE) && usecase->stream.out->started) { if (is_bt_soc_on(adev) == false) { ALOGD("BT SCO/A2dp disconnected while in connection"); |