Commit a713b583 authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] PCM core - remove SNDRV_PCM_TSTAMP_MMAP condition in snd_pcm_status()

The condition caused that the returned ring buffer position does not match
with timestamp when SNDRV_PCM_TSTAMP_MMAP mode was enabled. Removing
condition makes unified behaviour and interrupt based timestamp can be
accessed via PCM_IOCTL_SYNC_PTR or mmaped status area.
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 0678accd
......@@ -593,13 +593,8 @@ int snd_pcm_status(struct snd_pcm_substream *substream,
if (status->state == SNDRV_PCM_STATE_OPEN)
goto _end;
status->trigger_tstamp = runtime->trigger_tstamp;
if (snd_pcm_running(substream)) {
if (snd_pcm_running(substream))
snd_pcm_update_hw_ptr(substream);
if (runtime->tstamp_mode == SNDRV_PCM_TSTAMP_MMAP)
status->tstamp = runtime->status->tstamp;
else
snd_pcm_gettime(runtime, &status->tstamp);
} else
snd_pcm_gettime(runtime, &status->tstamp);
status->appl_ptr = runtime->control->appl_ptr;
status->hw_ptr = runtime->status->hw_ptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment