From 6642e043e9d8b36f7c790c1deb4f1a80c127fdf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20=C4=B0nan?= Date: Thu, 28 Feb 2008 12:46:32 +0100 Subject: [PATCH] --- yaml --- r: 92087 b: refs/heads/master c: 470f23b873679b045908551302fec6b1edf05a5a h: refs/heads/master i: 92085: 4cb954aaca068c4577d8895817f01f84545dc9fd 92083: e76a0bed8cfd49d651df6aedcdec3f7042084dda 92079: d0a20b6e1b88eeecaa61d0752226f55c7ccd3006 v: v3 --- [refs] | 2 +- trunk/sound/drivers/dummy.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 155cdebf5998..b25beea731c6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bed515b0dfdcf8f440c7e6c5bad8ce3eb96fb625 +refs/heads/master: 470f23b873679b045908551302fec6b1edf05a5a diff --git a/trunk/sound/drivers/dummy.c b/trunk/sound/drivers/dummy.c index f67f65829f3e..83ac4980c5fb 100644 --- a/trunk/sound/drivers/dummy.c +++ b/trunk/sound/drivers/dummy.c @@ -259,10 +259,10 @@ static void snd_card_dummy_pcm_timer_function(unsigned long data) dpcm->timer.expires = 1 + jiffies; add_timer(&dpcm->timer); dpcm->pcm_irq_pos += dpcm->pcm_bps; + dpcm->pcm_buf_pos += dpcm->pcm_bps; + dpcm->pcm_buf_pos %= dpcm->pcm_buffer_size * dpcm->pcm_hz; if (dpcm->pcm_irq_pos >= dpcm->pcm_period_size * dpcm->pcm_hz) { dpcm->pcm_irq_pos %= dpcm->pcm_period_size * dpcm->pcm_hz; - dpcm->pcm_buf_pos += dpcm->pcm_period_size; - dpcm->pcm_buf_pos %= dpcm->pcm_buffer_size; spin_unlock_irqrestore(&dpcm->lock, flags); snd_pcm_period_elapsed(dpcm->substream); } else @@ -274,7 +274,7 @@ static snd_pcm_uframes_t snd_card_dummy_pcm_pointer(struct snd_pcm_substream *su struct snd_pcm_runtime *runtime = substream->runtime; struct snd_dummy_pcm *dpcm = runtime->private_data; - return bytes_to_frames(runtime, dpcm->pcm_buf_pos); + return bytes_to_frames(runtime, dpcm->pcm_buf_pos / dpcm->pcm_hz); } static struct snd_pcm_hardware snd_card_dummy_playback =