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

Commit 24e9ad5c authored by Dhanalakshmi Siddani's avatar Dhanalakshmi Siddani
Browse files

hal: Fix voice call tx mute issue during voice and sva concurrency

Tx mute is observed for voice call with SVA running in background as
STHAL disables the device enabled by AHAL as it gets intimation about
audio usecase after enabling device.
Fix this by removing prop version check in device status so that STHAL
pauses its session before audio usecase enables device.
Also add check for playback usecase in stream status to send playback
usecase info to STHAL.

Change-Id: I8e575ad7cd198b4367d78f5dbe318fc908f86caf
parent 1b9e83af
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -436,9 +436,6 @@ void audio_extn_sound_trigger_update_device_status(snd_device_t snd_device,
    if (!st_dev)
       return;

    if (st_dev->sthal_prop_api_version >= STHAL_PROP_API_VERSION_1_0)
        return;

    if (snd_device >= SND_DEVICE_OUT_BEGIN &&
        snd_device < SND_DEVICE_OUT_END)
        device_type = PCM_PLAYBACK;
@@ -481,14 +478,15 @@ void audio_extn_sound_trigger_update_stream_status(struct audio_usecase *uc_info
    if (!st_dev)
       return;

    if (st_dev->sthal_prop_api_version < STHAL_PROP_API_VERSION_1_0)
        return;

    if (uc_info == NULL) {
        ALOGE("%s: usecase is NULL!!!", __func__);
        return;
    }

    if ((st_dev->sthal_prop_api_version < STHAL_PROP_API_VERSION_1_0) &&
        (uc_info->type != PCM_PLAYBACK))
        return;

    if ((uc_info->in_snd_device >= SND_DEVICE_IN_BEGIN &&
        uc_info->in_snd_device < SND_DEVICE_IN_END)) {
        if (is_same_as_st_device(uc_info->in_snd_device))