Merge branch 'topic/oss' into for-linus

* topic/oss:
  ALSA: allocation may fail in	snd_pcm_oss_change_params()
  sound: vwsnd: Fix setting of cfgval and ctlval in li_setup_dma()
  sound: fix OSS MIDI output data loss
这个提交包含在:
Takashi Iwai
2009-09-10 15:32:58 +02:00
当前提交 fa28519002
修改 3 个文件,包含 14 行新增8 行删除

查看文件

@@ -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));