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

Commit 77ac9774 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge f5b19d1a on remote branch

Change-Id: Ib143db0b1096f8ba005584dc804c1264518cddab
parents cce8fc1c f5b19d1a
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1218,6 +1218,10 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id)
    if ((usecase->type == VOICE_CALL) ||
        (usecase->type == VOIP_CALL)  ||
        (usecase->type == PCM_HFP_CALL)) {
        if(usecase->stream.out == NULL) {
            ALOGE("%s: stream.out is NULL", __func__);
            return -EINVAL;
        }
        out_snd_device = platform_get_output_snd_device(adev->platform,
                                                        usecase->stream.out);
        in_snd_device = platform_get_input_snd_device(adev->platform, usecase->stream.out->devices);
@@ -1261,6 +1265,10 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id)
            }
        }
        if (usecase->type == PCM_PLAYBACK) {
            if (usecase->stream.out == NULL) {
                ALOGE("%s: stream.out is NULL", __func__);
                return -EINVAL;
            }
            usecase->devices = usecase->stream.out->devices;
            in_snd_device = SND_DEVICE_NONE;
            if (out_snd_device == SND_DEVICE_NONE) {
@@ -1273,6 +1281,10 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id)
                }
            }
        } else if (usecase->type == PCM_CAPTURE) {
            if (usecase->stream.in == NULL) {
                ALOGE("%s: stream.in is NULL", __func__);
                return -EINVAL;
            }
            usecase->devices = usecase->stream.in->device;
            out_snd_device = SND_DEVICE_NONE;
            if (in_snd_device == SND_DEVICE_NONE) {