hal: Fix the device disable/enable sequence for capture usecases

Tx mute is observed in voice call in case of DSDS scenarios.
During device switch, when two or more voice usecases are present,
which share the same backend then the Tx device disable/enable
sequence isn't properly follwed resulting disabling of mic.
Fix this by adding proper check at disable/enable of devices
for capture usecases that share same backend.

CRs-Fixed: 979685
Change-Id: Id1cc27db8ddbbdbf1dffc02c07ce7785b184770b
This commit is contained in:
Karthik Reddy Katta 2015-08-20 13:36:07 +05:30 committed by Gerrit - the friendly Code Review server
parent 62e3422f85
commit 0d4717651e
1 changed files with 2 additions and 1 deletions

View File

@ -754,7 +754,8 @@ static void check_and_route_capture_usecases(struct audio_device *adev,
usecase != uc_info &&
usecase->in_snd_device != snd_device &&
((uc_info->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND) &&
((usecase->devices & ~AUDIO_DEVICE_BIT_IN) & AUDIO_DEVICE_IN_ALL_CODEC_BACKEND)) &&
(((usecase->devices & ~AUDIO_DEVICE_BIT_IN) & AUDIO_DEVICE_IN_ALL_CODEC_BACKEND) ||
(usecase->type == VOICE_CALL))) &&
(usecase->id != USECASE_AUDIO_SPKR_CALIB_TX)) {
ALOGV("%s: Usecase (%s) is active on (%s) - disabling ..",
__func__, use_case_table[usecase->id],