Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92087
b: refs/heads/master
c: 470f23b
h: refs/heads/master
i:
  92085: 4cb954a
  92083: e76a0be
  92079: d0a20b6
v: v3
  • Loading branch information
Ahmet İnan authored and Takashi Iwai committed Apr 24, 2008
1 parent ee42762 commit 6642e04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bed515b0dfdcf8f440c7e6c5bad8ce3eb96fb625
refs/heads/master: 470f23b873679b045908551302fec6b1edf05a5a
6 changes: 3 additions & 3 deletions trunk/sound/drivers/dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 =
Expand Down

0 comments on commit 6642e04

Please sign in to comment.