Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157898
b: refs/heads/master
c: cbbb057
h: refs/heads/master
v: v3
  • Loading branch information
Roel Kluin authored and Takashi Iwai committed Aug 31, 2009
1 parent bd93a08 commit e1ca265
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: f1d269bac24e5ddb3a0650aaeb4117aa806b99f1
refs/heads/master: cbbb05703da4b205bb17fde555d3b2926d8b3194
9 changes: 7 additions & 2 deletions trunk/sound/core/oss/pcm_oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1043,10 +1043,15 @@ static int snd_pcm_oss_change_params(struct snd_pcm_substream *substream)
runtime->oss.channels = params_channels(params);
runtime->oss.rate = params_rate(params);

runtime->oss.params = 0;
runtime->oss.prepare = 1;
vfree(runtime->oss.buffer);
runtime->oss.buffer = vmalloc(runtime->oss.period_bytes);
if (!runtime->oss.buffer) {
err = -ENOMEM;
goto failure;
}

runtime->oss.params = 0;
runtime->oss.prepare = 1;
runtime->oss.buffer_used = 0;
if (runtime->dma_area)
snd_pcm_format_set_silence(runtime->format, runtime->dma_area, bytes_to_samples(runtime, runtime->dma_bytes));
Expand Down

0 comments on commit e1ca265

Please sign in to comment.