aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/pcm_lib.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 302654769faf..92ed6d819225 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -159,11 +159,15 @@ snd_pcm_update_hw_ptr_pos(struct snd_pcm_substream *substream,
159 pos = substream->ops->pointer(substream); 159 pos = substream->ops->pointer(substream);
160 if (pos == SNDRV_PCM_POS_XRUN) 160 if (pos == SNDRV_PCM_POS_XRUN)
161 return pos; /* XRUN */ 161 return pos; /* XRUN */
162#ifdef CONFIG_SND_DEBUG
163 if (pos >= runtime->buffer_size) { 162 if (pos >= runtime->buffer_size) {
164 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); 163 if (printk_ratelimit()) {
164 snd_printd(KERN_ERR "BUG: stream = %i, pos = 0x%lx, "
165 "buffer size = 0x%lx, period size = 0x%lx\n",
166 substream->stream, pos, runtime->buffer_size,
167 runtime->period_size);
168 }
169 pos = 0;
165 } 170 }
166#endif
167 pos -= pos % runtime->min_align; 171 pos -= pos % runtime->min_align;
168 return pos; 172 return pos;
169} 173}