aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2009-07-13 07:30:22 -0400
committerTakashi Iwai <tiwai@suse.de>2009-07-15 05:56:06 -0400
commitf907ed94f993b0cd366c26eaa88b90c5454203ae (patch)
treed07aa3f3cf0cb1acf36b0fcf85a67b64f5b5226b /sound/core
parent6847e154e3cd74fca6084124c097980a7634285a (diff)
seq-midi: always log message on output overrun
It turns out that the main cause of output buffer overruns is not slow drivers but applications that generate too many messages. Therefore, it makes more sense to make that error message always visible, and to rate-limit it. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/seq/seq_midi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c
index 4d26146a62cc..3810c52f652e 100644
--- a/sound/core/seq/seq_midi.c
+++ b/sound/core/seq/seq_midi.c
@@ -120,7 +120,8 @@ static int dump_midi(struct snd_rawmidi_substream *substream, const char *buf, i
120 return -EINVAL; 120 return -EINVAL;
121 runtime = substream->runtime; 121 runtime = substream->runtime;
122 if ((tmp = runtime->avail) < count) { 122 if ((tmp = runtime->avail) < count) {
123 snd_printd("warning, output event was lost (count = %i, available = %i)\n", count, tmp); 123 if (printk_ratelimit())
124 snd_printk(KERN_ERR "MIDI output buffer overrun\n");
124 return -ENOMEM; 125 return -ENOMEM;
125 } 126 }
126 if (snd_rawmidi_kernel_write(substream, buf, count) < count) 127 if (snd_rawmidi_kernel_write(substream, buf, count) < count)