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

Commit 635e743a authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

Fix parameters passed to pcm_open to include PCM_MONOTONIC

This fixes the problem of not getting CLOCK_MONOTONIC timestamps
from output stream's get_presentation_position function

Bug: 37755299
Test: aaudio LOW_LATENCY mode
Change-Id: I256fa2769ced99139b3c7690e0908ac69359067c
parent 9e737dea
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -1673,7 +1673,7 @@ int start_output_stream(struct stream_out *out)
            goto error_open;
            goto error_open;
        }
        }
    } else {
    } else {
        unsigned int flags = PCM_OUT;
        unsigned int flags = PCM_OUT | PCM_MONOTONIC;
        unsigned int pcm_open_retry_count = 0;
        unsigned int pcm_open_retry_count = 0;


        if (out->usecase == USECASE_AUDIO_PLAYBACK_AFE_PROXY) {
        if (out->usecase == USECASE_AUDIO_PLAYBACK_AFE_PROXY) {
@@ -1681,8 +1681,7 @@ int start_output_stream(struct stream_out *out)
            pcm_open_retry_count = PROXY_OPEN_RETRY_COUNT;
            pcm_open_retry_count = PROXY_OPEN_RETRY_COUNT;
        } else if (out->realtime) {
        } else if (out->realtime) {
            flags |= PCM_MMAP | PCM_NOIRQ;
            flags |= PCM_MMAP | PCM_NOIRQ;
        } else
        }
            flags |= PCM_MONOTONIC;


        while (1) {
        while (1) {
            out->pcm = pcm_open(adev->snd_card, out->pcm_device_id,
            out->pcm = pcm_open(adev->snd_card, out->pcm_device_id,