aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/core/pcm_lib.c4
-rw-r--r--sound/core/pcm_native.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 806f1fba5446..93d7ca502730 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -148,8 +148,6 @@ static inline snd_pcm_uframes_t snd_pcm_update_hw_ptr_pos(struct snd_pcm_substre
148 pos = substream->ops->pointer(substream); 148 pos = substream->ops->pointer(substream);
149 if (pos == SNDRV_PCM_POS_XRUN) 149 if (pos == SNDRV_PCM_POS_XRUN)
150 return pos; /* XRUN */ 150 return pos; /* XRUN */
151 if (runtime->tstamp_mode & SNDRV_PCM_TSTAMP_MMAP)
152 getnstimeofday((struct timespec *)&runtime->status->tstamp);
153#ifdef CONFIG_SND_DEBUG 151#ifdef CONFIG_SND_DEBUG
154 if (pos >= runtime->buffer_size) { 152 if (pos >= runtime->buffer_size) {
155 snd_printk(KERN_ERR "BUG: stream = %i, pos = 0x%lx, buffer size = 0x%lx, period size = 0x%lx\n", substream->stream, pos, runtime->buffer_size, runtime->period_size); 153 snd_printk(KERN_ERR "BUG: stream = %i, pos = 0x%lx, buffer size = 0x%lx, period size = 0x%lx\n", substream->stream, pos, runtime->buffer_size, runtime->period_size);
@@ -189,6 +187,8 @@ static inline int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *subs
189 snd_pcm_uframes_t new_hw_ptr, hw_ptr_interrupt; 187 snd_pcm_uframes_t new_hw_ptr, hw_ptr_interrupt;
190 snd_pcm_sframes_t delta; 188 snd_pcm_sframes_t delta;
191 189
190 if (runtime->tstamp_mode == SNDRV_PCM_TSTAMP_MMAP)
191 getnstimeofday((struct timespec *)&runtime->status->tstamp);
192 pos = snd_pcm_update_hw_ptr_pos(substream, runtime); 192 pos = snd_pcm_update_hw_ptr_pos(substream, runtime);
193 if (pos == SNDRV_PCM_POS_XRUN) { 193 if (pos == SNDRV_PCM_POS_XRUN) {
194 xrun(substream); 194 xrun(substream);
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index fb3dde4db045..6245bdaffa68 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,
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 if (runtime->tstamp_mode == SNDRV_PCM_TSTAMP_MMAP)
599 status->tstamp = runtime->status->tstamp; 599 status->tstamp = runtime->status->tstamp;
600 else 600 else
601 getnstimeofday(&status->tstamp); 601 getnstimeofday(&status->tstamp);