Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc46ef16 authored by Avinash Vaish's avatar Avinash Vaish
Browse files

hal: Prevent de-routing in case the usecase doesn't share codec backend

During device selection for a usecase, other active usecases that share
the same codec backend are supposed to be switched to the new routing
device. Erroneously, during selection of the device for a capture usecase,
other active usecases are being de-routed irrespective of their backends
leading to unwarrented behavior e.g. voice call breakdown when a camcorder
usecase begins.
Add a check to avoid disabling of usecases in above mentioned scenarios
if these do not share the same codec backend.

CRs-Fixed: 813744
Change-Id: Ic7a5b54155e70a55fd0b0b2d5ad7e380de564123
parent c2224fd7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -660,6 +660,7 @@ 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 &&
                (usecase->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND) &&
                (usecase->id != USECASE_AUDIO_SPKR_CALIB_TX)) {
            ALOGV("%s: Usecase (%s) is active on (%s) - disabling ..",
                  __func__, use_case_table[usecase->id],