summaryrefslogtreecommitdiffstats
path: root/sound/usb/quirks.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2015-11-15 22:38:29 +0100
committerTakashi Iwai <tiwai@suse.de>2015-11-16 08:59:24 +0100
commit1ca8b201309d842642f221db7f02f71c0af5be2d (patch)
treee8c755c1d8337e0e515d9aa8a4e475a7f2d3b238 /sound/usb/quirks.c
parent98d362becb6621bebdda7ed0eac7ad7ec6c37898 (diff)
downloadop-kernel-dev-1ca8b201309d842642f221db7f02f71c0af5be2d.zip
op-kernel-dev-1ca8b201309d842642f221db7f02f71c0af5be2d.tar.gz
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>
Diffstat (limited to 'sound/usb/quirks.c')
-rw-r--r--sound/usb/quirks.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 5ca80e7..7016ad8 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -538,6 +538,7 @@ int snd_usb_create_quirk(struct snd_usb_audio *chip,
[QUIRK_MIDI_CME] = create_any_midi_quirk,
[QUIRK_MIDI_AKAI] = create_any_midi_quirk,
[QUIRK_MIDI_FTDI] = create_any_midi_quirk,
+ [QUIRK_MIDI_CH345] = create_any_midi_quirk,
[QUIRK_AUDIO_STANDARD_INTERFACE] = create_standard_audio_quirk,
[QUIRK_AUDIO_FIXED_ENDPOINT] = create_fixed_stream_quirk,
[QUIRK_AUDIO_EDIROL_UAXX] = create_uaxx_quirk,
OpenPOWER on IntegriCloud