aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2008-01-08 06:24:01 -0500
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:29:46 -0500
commita713b5834731f32757b30de038dcb995afac2ad1 (patch)
treeb42219e374bd9a8444a8ba0b33d9dca6fc9de9a2
parent0678accd2da33873455ef8d41d847bd550727159 (diff)
[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: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--sound/core/pcm_native.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 2e7b1e63db94..3fc33deabe35 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -593,14 +593,9 @@ int snd_pcm_status(struct snd_pcm_substream *substream,
593 if (status->state == SNDRV_PCM_STATE_OPEN) 593 if (status->state == SNDRV_PCM_STATE_OPEN)
594 goto _end; 594 goto _end;
595 status->trigger_tstamp = runtime->trigger_tstamp; 595 status->trigger_tstamp = runtime->trigger_tstamp;
596 if (snd_pcm_running(substream)) { 596 if (snd_pcm_running(substream))
597 snd_pcm_update_hw_ptr(substream); 597 snd_pcm_update_hw_ptr(substream);
598 if (runtime->tstamp_mode == SNDRV_PCM_TSTAMP_MMAP) 598 snd_pcm_gettime(runtime, &status->tstamp);
599 status->tstamp = runtime->status->tstamp;
600 else
601 snd_pcm_gettime(runtime, &status->tstamp);
602 } else
603 snd_pcm_gettime(runtime, &status->tstamp);
604 status->appl_ptr = runtime->control->appl_ptr; 599 status->appl_ptr = runtime->control->appl_ptr;
605 status->hw_ptr = runtime->status->hw_ptr; 600 status->hw_ptr = runtime->status->hw_ptr;
606 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 601 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {