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

Commit cee2c712 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: restore device for other active usecases when VOIP stopped" into...

Merge "hal: restore device for other active usecases when VOIP stopped" into audio-userspace.lnx.2.1-dev
parents 9c6e68e3 0154bf13
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1214,7 +1214,8 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id)
        } else if (voice_extn_compress_voip_is_active(adev)) {
            voip_usecase = get_usecase_from_list(adev, USECASE_COMPRESS_VOIP_CALL);
            if ((voip_usecase) && ((voip_usecase->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND) &&
                (usecase->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND) &&
                ((usecase->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND) ||
                  ((usecase->devices & ~AUDIO_DEVICE_BIT_IN) & AUDIO_DEVICE_IN_ALL_CODEC_BACKEND)) &&
                 (voip_usecase->stream.out != adev->primary_output))) {
                    in_snd_device = voip_usecase->in_snd_device;
                    out_snd_device = voip_usecase->out_snd_device;
+7 −0
Original line number Diff line number Diff line
@@ -244,6 +244,7 @@ static int voip_stop_call(struct audio_device *adev)
{
    int ret = 0;
    struct audio_usecase *uc_info;
    struct listnode *node;

    ALOGD("%s: enter, out_stream_count=%d, in_stream_count=%d",
           __func__, voip_data.out_stream_count, voip_data.in_stream_count);
@@ -277,6 +278,12 @@ static int voip_stop_call(struct audio_device *adev)

        list_remove(&uc_info->list);
        free(uc_info);

        // restore device for other active usecases
        list_for_each(node, &adev->usecase_list) {
            uc_info = node_to_item(node, struct audio_usecase, list);
            select_devices(adev, uc_info->id);
        }
    } else
        ALOGV("%s: NO-OP because out_stream_count=%d, in_stream_count=%d",
               __func__, voip_data.out_stream_count, voip_data.in_stream_count);