From 6f98369a03b9acb7d362fa6e7511bbdc8cd283a7 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 8 Jun 2009 15:07:46 +0200 Subject: [PATCH] --- yaml --- r: 148378 b: refs/heads/master c: af8500bbbd18438495d2f91ad07bda49fff3b770 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/pci/ctxfi/ctpcm.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 433cd10fc5b8..9f22445ae6d2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 514eef9c2a711b4c24b97bb456d39695a6fe1775 +refs/heads/master: af8500bbbd18438495d2f91ad07bda49fff3b770 diff --git a/trunk/sound/pci/ctxfi/ctpcm.c b/trunk/sound/pci/ctxfi/ctpcm.c index a0bd31c6090d..870fa170f046 100644 --- a/trunk/sound/pci/ctxfi/ctpcm.c +++ b/trunk/sound/pci/ctxfi/ctpcm.c @@ -243,6 +243,8 @@ ct_pcm_playback_pointer(struct snd_pcm_substream *substream) /* Read out playback position */ position = atc->pcm_playback_position(atc, apcm); position = bytes_to_frames(runtime, position); + if (position >= runtime->buffer_size) + position = 0; return position; } @@ -343,6 +345,8 @@ ct_pcm_capture_pointer(struct snd_pcm_substream *substream) /* Read out playback position */ position = atc->pcm_capture_position(atc, apcm); position = bytes_to_frames(runtime, position); + if (position >= runtime->buffer_size) + position = 0; return position; }