aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-11-21 01:31:31 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:29:25 -0500
commit1b98ea4791892399d8c23c93e117567eeff38887 (patch)
tree5128a11d23f34048e7d00f2915326f8e9e32bee5
parent0ef797c5ca8a73853c827cf495caed44676cfe17 (diff)
[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: Clemens Ladisch <clemens@ladisch.de>
-rw-r--r--sound/core/rawmidi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index e6ee0d813783..587ea1eb3197 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -635,6 +635,7 @@ int snd_rawmidi_output_params(struct snd_rawmidi_substream *substream,
635 kfree(runtime->buffer); 635 kfree(runtime->buffer);
636 runtime->buffer = newbuf; 636 runtime->buffer = newbuf;
637 runtime->buffer_size = params->buffer_size; 637 runtime->buffer_size = params->buffer_size;
638 runtime->avail = runtime->buffer_size;
638 } 639 }
639 runtime->avail_min = params->avail_min; 640 runtime->avail_min = params->avail_min;
640 substream->active_sensing = !params->no_active_sensing; 641 substream->active_sensing = !params->no_active_sensing;