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>
ALSA: fireworks/bebob: Shorten critical section for stream_stop_duplex()

All assignment for local variables in these functions are not related to
critical section.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: fireworks: Use safer way to arrange ring buffer pointer

To reverse a pointer for the ring buffer, subtraction by buffer
size is better than assignment to the beginning of the buffer.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: fireworks: Improve comments about Fireworks transaction

It includes descriptions to cause misreading.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: fireworks: Remove a constant over width to which it's applied

The constants of enum snd_efw_grp_type is for struct snd_efw_phys_grp.type.
But this member is 1 byte. Although the value is between 0x00-0xff, a constant
has 0x10000. This constant is meaningless.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: fireworks: Remove meaningless mutex_destroy()

Currently mutex_destroy() is called in module's cleanup function. But after
cleaned up, this mutex is automatically released. So this function call
is meaningless.

[fixed a typo in changelog by tiwai]

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: bebob: Remove unused function prototype

snd_bebob_stream_map() is not defined.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>