]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: seq: correctly detect input buffer overflow
authorAdam Goode <agoode@google.com>
Wed, 4 Jun 2014 05:02:51 +0000 (01:02 -0400)
committerTakashi Iwai <tiwai@suse.de>
Wed, 4 Jun 2014 05:12:12 +0000 (07:12 +0200)
commit156a040bb1669d4d4c035192d69afd294b4be666
tree9656b152c0556e280c58a1685eb5c3ad0fce23c0
parent7b9d0f5f70bb21adad4ef3ae536d7c29e6f484c4
ALSA: seq: correctly detect input buffer overflow

snd_seq_event_dup returns -ENOMEM in some buffer-full conditions,
but usually returns -EAGAIN. Make -EAGAIN trigger the overflow
condition in snd_seq_fifo_event_in so that the fifo is cleared
and -ENOSPC is returned to userspace as stated in the alsa-lib docs.

Signed-off-by: Adam Goode <agoode@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/seq/seq_fifo.c