aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/pcm_lib.c')
-rw-r--r--sound/core/pcm_lib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 0503980c23d9..3dbf9bf2ac16 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -152,13 +152,12 @@ static inline snd_pcm_uframes_t snd_pcm_update_hw_ptr_pos(snd_pcm_substream_t *s
152 if (pos == SNDRV_PCM_POS_XRUN) 152 if (pos == SNDRV_PCM_POS_XRUN)
153 return pos; /* XRUN */ 153 return pos; /* XRUN */
154 if (runtime->tstamp_mode & SNDRV_PCM_TSTAMP_MMAP) 154 if (runtime->tstamp_mode & SNDRV_PCM_TSTAMP_MMAP)
155 snd_timestamp_now((snd_timestamp_t*)&runtime->status->tstamp, runtime->tstamp_timespec); 155 getnstimeofday((struct timespec *)&runtime->status->tstamp);
156#ifdef CONFIG_SND_DEBUG 156#ifdef CONFIG_SND_DEBUG
157 if (pos >= runtime->buffer_size) { 157 if (pos >= runtime->buffer_size) {
158 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); 158 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);
159 } else 159 }
160#endif 160#endif
161 snd_runtime_check(pos < runtime->buffer_size, return 0);
162 pos -= pos % runtime->min_align; 161 pos -= pos % runtime->min_align;
163 return pos; 162 return pos;
164} 163}