]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: prevent CH345 multiport output SysEx corruption
authorClemens Ladisch <clemens@ladisch.de>
Sun, 15 Nov 2015 21:38:29 +0000 (22:38 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 16 Nov 2015 07:59:24 +0000 (08:59 +0100)
commitbe149ce3ff357ae66312db34b3301d5de6311271
treee8c755c1d8337e0e515d9aa8a4e475a7f2d3b238
parent1d21e1ce013a8ce86723523055bb5fcfef936c8a
ALSA: usb-audio: prevent CH345 multiport output SysEx corruption

The CH345 USB MIDI chip has two output ports.  However, they are
multiplexed through one pin, and the number of ports cannot be reduced
even for hardware that implements only one connector, so for those
devices, data sent to either port ends up on the same hardware output.
This becomes a problem when both ports are used at the same time, as
longer MIDI commands (such as SysEx messages) are likely to be
interrupted by messages from the other port, and thus to get lost.

It would not be possible for the driver to detect how many ports the
device actually has, except that in practice, _all_ devices built with
the CH345 have only one port.  So we can just ignore the device's
descriptors, and hardcode one output port.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: stable@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/midi.c
sound/usb/quirks-table.h
sound/usb/quirks.c
sound/usb/usbaudio.h