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

Commit e7b935f3 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: remove output device force switch from bt sco to handset"

parents 074178f1 cb3351c9
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -8130,15 +8130,12 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs)
        if (strcmp(value, AUDIO_PARAMETER_VALUE_ON) == 0){
            adev->bt_sco_on = true;
        } else {
            ALOGD("sco is off, reset sco and route device to handset/mic");
            ALOGD("sco is off, reset sco and route device to handset mic");
            adev->bt_sco_on = false;
            audio_extn_sco_reset_configuration();
            list_for_each(node, &adev->usecase_list) {
                usecase = node_to_item(node, struct audio_usecase, list);
                if ((usecase->type == PCM_PLAYBACK) && usecase->stream.out &&
                    (usecase->stream.out->devices & AUDIO_DEVICE_OUT_ALL_SCO))
                    usecase->stream.out->devices = AUDIO_DEVICE_OUT_EARPIECE;
                else if ((usecase->type == PCM_CAPTURE) && usecase->stream.in &&
                if ((usecase->type == PCM_CAPTURE) && usecase->stream.in &&
                    (usecase->stream.in->device & AUDIO_DEVICE_IN_ALL_SCO))
                    usecase->stream.in->device = AUDIO_DEVICE_IN_BUILTIN_MIC;
                else