diff options
Diffstat (limited to 'sound/pci/ctxfi/ctpcm.c')
-rw-r--r-- | sound/pci/ctxfi/ctpcm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/ctxfi/ctpcm.c b/sound/pci/ctxfi/ctpcm.c index a0bd31c6090d..870fa170f046 100644 --- a/sound/pci/ctxfi/ctpcm.c +++ b/sound/pci/ctxfi/ctpcm.c | |||
@@ -243,6 +243,8 @@ ct_pcm_playback_pointer(struct snd_pcm_substream *substream) | |||
243 | /* Read out playback position */ | 243 | /* Read out playback position */ |
244 | position = atc->pcm_playback_position(atc, apcm); | 244 | position = atc->pcm_playback_position(atc, apcm); |
245 | position = bytes_to_frames(runtime, position); | 245 | position = bytes_to_frames(runtime, position); |
246 | if (position >= runtime->buffer_size) | ||
247 | position = 0; | ||
246 | return position; | 248 | return position; |
247 | } | 249 | } |
248 | 250 | ||
@@ -343,6 +345,8 @@ ct_pcm_capture_pointer(struct snd_pcm_substream *substream) | |||
343 | /* Read out playback position */ | 345 | /* Read out playback position */ |
344 | position = atc->pcm_capture_position(atc, apcm); | 346 | position = atc->pcm_capture_position(atc, apcm); |
345 | position = bytes_to_frames(runtime, position); | 347 | position = bytes_to_frames(runtime, position); |
348 | if (position >= runtime->buffer_size) | ||
349 | position = 0; | ||
346 | return position; | 350 | return position; |
347 | } | 351 | } |
348 | 352 | ||