]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: firewire-lib/fireworks: fix miss detection of received MIDI messages
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 1 Jul 2019 14:43:53 +0000 (23:43 +0900)
committerTakashi Iwai <tiwai@suse.de>
Mon, 1 Jul 2019 14:59:02 +0000 (16:59 +0200)
commit4fd2b2f622b870ea32eaf9b29e049982f99d6b45
treecbde16bbd3741978beee0d4bd35e7c9fbdb8650c
parent8e60a934a87f8bd3780d00a1262f547d1ad9f78a
ALSA: firewire-lib/fireworks: fix miss detection of received MIDI messages

In IEC 61883-6, 8 MIDI data streams are multiplexed into single
MIDI conformant data channel. The index of stream is calculated by
modulo 8 of the value of data block counter.

In fireworks, the value of data block counter in CIP header has a quirk
with firmware version v5.0.0, v5.7.3 and v5.8.0. This brings ALSA
IEC 61883-1/6 packet streaming engine to miss detection of MIDI
messages.

This commit fixes the miss detection to modify the value of data block
counter for the modulo calculation.

For maintainers, this bug exists since a commit ad8e42877c83 ("ALSA:
fireworks/firewire-lib: add support for recent firmware quirk") in Linux
kernel v4.2. There're many changes since the commit.  This fix can be
backported to Linux kernel v4.4 or later. I tagged a base commit to the
backport for your convenience.

Besides, my work for Linux kernel v5.3 brings heavy code refactoring and
some structure members are renamed in 'sound/firewire/amdtp-stream.h'.
The content of this patch brings conflict when merging -rc tree with
this patch and the latest tree. I request maintainers to solve the
conflict to replace 'tx_first_dbc' with 'ctx_data.tx.first_dbc'.

Fixes: 92b4b9ede28e ("ALSA: firewire-lib: complete AM824 data block processing layer")
Cc: <stable@vger.kernel.org> # v4.4+
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/amdtp-am824.c