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

Commit f4e1761d authored by Mikhail Naganov's avatar Mikhail Naganov Committed by jrior001
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 e6806f69
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1586,14 +1586,12 @@ int start_output_stream(struct stream_out *out)
          __func__, adev->snd_card, out->pcm_device_id, out->config.format);

    if (!is_offload_usecase(out->usecase)) {
        unsigned int flags = PCM_OUT;
        unsigned int flags = PCM_OUT | PCM_MONOTONIC;
        unsigned int pcm_open_retry_count = 0;
        if (out->usecase == USECASE_AUDIO_PLAYBACK_AFE_PROXY) {
            flags |= PCM_MMAP | PCM_NOIRQ;
            pcm_open_retry_count = PROXY_OPEN_RETRY_COUNT;
        } else
            flags |= PCM_MONOTONIC;

        }
        while (1) {
            out->pcm = pcm_open(adev->snd_card, out->pcm_device_id,
                               flags, &out->config);