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

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

Merge "hal: fix listen and audio calibration concurency"

parents 87f0102b 0de16784
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -329,13 +329,16 @@ int enable_snd_device(struct audio_device *adev,
    } else {
        ALOGV("%s: snd_device(%d: %s)", __func__,
        snd_device, device_name);
        /* due to the possibility of calibration overwrite between listen
            and audio, notify listen hal before audio calibration is sent */
        audio_extn_listen_update_status(snd_device,
                       LISTEN_EVENT_SND_DEVICE_BUSY);
        if (platform_send_audio_calibration(adev->platform, snd_device) < 0) {
            adev->snd_dev_ref_cnt[snd_device]--;
            audio_extn_listen_update_status(snd_device,
                           LISTEN_EVENT_SND_DEVICE_FREE);
            return -EINVAL;
        }
        audio_extn_listen_update_status(snd_device,
                LISTEN_EVENT_SND_DEVICE_BUSY);

        audio_route_apply_path(adev->audio_route, device_name);
    }
    if (update_mixer)