diff options
author | Carter Hsu <carterhsu@google.com> | 2018-10-04 09:24:36 +0800 |
---|---|---|
committer | juyuchen <juyuchen@google.com> | 2018-12-24 12:39:26 +0800 |
commit | 0a1160cff83a82c95b3d7835a76af83569020d17 (patch) | |
tree | e7ffacb9a95a4f801866f27caa6b95d9994c6abe /hal/audio_hw.c | |
parent | 3063649f81f5f682b7e662e4ba3dc366cf6443ab (diff) | |
download | android_hardware_qcom_audio-0a1160cff83a82c95b3d7835a76af83569020d17.tar.gz android_hardware_qcom_audio-0a1160cff83a82c95b3d7835a76af83569020d17.tar.bz2 android_hardware_qcom_audio-0a1160cff83a82c95b3d7835a76af83569020d17.zip |
audio: restrict the force route condition
select_devices should only force route the
capture usecase(s) with snd_device that
shares the same backend with current
usecase.
For example, the "voice-call afe-proxy" doesn't
need to force route the device of audio-record
to be "voice-rx".
Bug: 113700667
Test: manual
Change-Id: I144c9b8e201b2331064cac62367b2839ceec9c9a
Signed-off-by: Carter Hsu <carterhsu@google.com>
Diffstat (limited to 'hal/audio_hw.c')
-rw-r--r-- | hal/audio_hw.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c index e1d53094..5d1b0afb 100644 --- a/hal/audio_hw.c +++ b/hal/audio_hw.c @@ -1173,6 +1173,10 @@ static void check_and_route_capture_usecases(struct audio_device *adev, if (usecase->type != PCM_PLAYBACK && usecase != uc_info && usecase->in_snd_device != snd_device && + ((uc_info->type == VOICE_CALL && + usecase->devices == AUDIO_DEVICE_IN_VOICE_CALL) || + platform_check_backends_match(snd_device,\ + usecase->in_snd_device)) && (usecase->id != USECASE_AUDIO_SPKR_CALIB_TX)) { ALOGV("%s: Usecase (%s) is active on (%s) - disabling ..", __func__, use_case_table[usecase->id], |