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

Commit bb6adf40 authored by Mikhail Naganov's avatar Mikhail Naganov Committed by Arne Coucheron
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 0a3c1b0e
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1440,13 +1440,12 @@ int start_output_stream(struct stream_out *out)
    ALOGV("%s: Opening PCM device card_id(%d) device_id(%d)",
          __func__, 0, out->pcm_device_id);
    if (out->usecase != USECASE_AUDIO_PLAYBACK_OFFLOAD) {
        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,