Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92221
b: refs/heads/master
c: 369b240
h: refs/heads/master
i:
  92219: 3ed392d
v: v3
  • Loading branch information
Roel Kluin authored and Takashi Iwai committed Apr 24, 2008
1 parent 664b126 commit 450d71f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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: 7943a8aba93ab439bdfbd9b92221720a4a4d8153
refs/heads/master: 369b240d6391aef41d376c9e8769fd939c7c6c4d
9 changes: 5 additions & 4 deletions trunk/sound/drivers/dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,14 @@ static int snd_card_dummy_pcm_prepare(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_dummy_pcm *dpcm = runtime->private_data;
unsigned int bps;
int bps;

bps = snd_pcm_format_width(runtime->format) * runtime->rate *
runtime->channels / 8;

bps = runtime->rate * runtime->channels;
bps *= snd_pcm_format_width(runtime->format);
bps /= 8;
if (bps <= 0)
return -EINVAL;

dpcm->pcm_bps = bps;
dpcm->pcm_hz = HZ;
dpcm->pcm_buffer_size = snd_pcm_lib_buffer_bytes(substream);
Expand Down

0 comments on commit 450d71f

Please sign in to comment.