提交 1b98ea47 编写于 作者: C Clemens Ladisch 提交者: Jaroslav Kysela

[ALSA] rawmidi: adjust runtime->avail when changing output buffer size

Modules: RawMidi Midlevel

When the output buffer size is changed, runtime->avail must be
adjusted to the new size; otherwise, draining of a bigger buffer would
appear to fail because avail does not reach buffer_size.
Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
上级 0ef797c5
......@@ -635,6 +635,7 @@ int snd_rawmidi_output_params(struct snd_rawmidi_substream *substream,
kfree(runtime->buffer);
runtime->buffer = newbuf;
runtime->buffer_size = params->buffer_size;
runtime->avail = runtime->buffer_size;
}
runtime->avail_min = params->avail_min;
substream->active_sensing = !params->no_active_sensing;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册