]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: firewire-motu: fix truncated bytes in message tracepoints
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 20 Sep 2021 11:07:34 +0000 (20:07 +0900)
committerTakashi Iwai <tiwai@suse.de>
Tue, 21 Sep 2021 16:48:32 +0000 (18:48 +0200)
commit7aa4760d4e9ef46b42e9cd2ba91f59defade9809
tree172bbb14a46f95845078edcb0ff934aba8fcbc35
parent5721101c8e2ef76145642cdaecb9e0f3058505e1
ALSA: firewire-motu: fix truncated bytes in message tracepoints

In MOTU protocol v2/v3, first two data chunks across 2nd and 3rd data
channels includes message bytes from device. The total size of message
is 48 bits per data block.

The 'data_block_message' tracepoints event produced by ALSA firewire-motu
driver exposes the sequence of messages to userspace in 64 bit storage,
however lower 32 bits are actually available since current implementation
truncates 16 bits in upper of the message as a result of bit shift
operation within 32 bit storage.

This commit fixes the bug by perform the bit shift in 64 bit storage.

Fixes: bcf78f5e980b ("ALSA: firewire-motu: add tracepoints for messages for unique protocol")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210920110734.27161-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/motu/amdtp-motu.c