Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f907ed94 authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Takashi Iwai
Browse files

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: default avatarClemens Ladisch <clemens@ladisch.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 6847e154
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -120,7 +120,8 @@ static int dump_midi(struct snd_rawmidi_substream *substream, const char *buf, i
		return -EINVAL;
	runtime = substream->runtime;
	if ((tmp = runtime->avail) < count) {
		snd_printd("warning, output event was lost (count = %i, available = %i)\n", count, tmp);
		if (printk_ratelimit())
			snd_printk(KERN_ERR "MIDI output buffer overrun\n");
		return -ENOMEM;
	}
	if (snd_rawmidi_kernel_write(substream, buf, count) < count)