summaryrefslogtreecommitdiff
path: root/sound/core/pcm_native.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-11-23 12:14:23 (GMT)
committerJaroslav Kysela <perex@perex.cz>2008-01-31 16:29:28 (GMT)
commit7c7fc2d44b7a660846115e65b67772b6742a14d8 (patch)
tree44ddeae0b3962762a5a939acd52d0ef35ae230aa /sound/core/pcm_native.c
parent7f6301cdfad5469312d266bcec3f1a02a8e8b5af (diff)
downloadlinux-7c7fc2d44b7a660846115e65b67772b6742a14d8.tar.xz
[ALSA] Fix PCM MMAP time-stamp mode
When MMAP time-stamp mode is given, it's supposed to update the time-stamp only at period boundary. However, it currently updates at each status call so this is just useless. The patch fixes this misbehavior. Also it fixes the wrong check of tstamp_mode (don't use bit-and for enum). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r--sound/core/pcm_native.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index fb3dde4..6245bda 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -595,7 +595,7 @@ int snd_pcm_status(struct snd_pcm_substream *substream,
status->trigger_tstamp = runtime->trigger_tstamp;
if (snd_pcm_running(substream)) {
snd_pcm_update_hw_ptr(substream);
- if (runtime->tstamp_mode & SNDRV_PCM_TSTAMP_MMAP)
+ if (runtime->tstamp_mode == SNDRV_PCM_TSTAMP_MMAP)
status->tstamp = runtime->status->tstamp;
else
getnstimeofday(&status->tstamp);