linux/sound/firewire
Takashi Sakamoto d13d6b284d ALSA: firewire-motu: add support for MOTU 828
MOTU 828 is a first model in MOTU FireWire series, produced in 2001. This
model consists of three chips:
 * Texas Instruments TSB41AB1 (Physical layer for IEEE 1394 bus)
 * Philips Semiconductors 1394L21BE (Link layer for IEEE 1394 bus and
   packet processing layer)
 * QuickLogic QuickRAM QL4016 (Data block processing layer and digital
   signal processing)

This commit adds a support for this model, with its unique protocol as
version 1. The features of this protocol are:

 * no MIDI support.
 * Rx packets have no data chunks for control and status messages.
 * Tx packets have 2 data chunks for control and status messages in the
   end of each data block. The chunks consist of data block counter
   (4 byte) and message (2 byte).
 * All of settings are represented in bit flag in one quadlet address
   (0x'ffff'f000'0b00).
 * When optical interface is configured as S/PDIF, signals of the interface
   is multiplexed for packets, instead of signals of coaxial interface.
 * The internal multiplexer is not configured by software.

I note that the device has a quirk to mute output voluntarily during
receiving batch of packets in the beginning of packet streaming. The
operation to unmute should be done by software enough after the device
shifts the state, however it's not deterministic. Furthermore, just
after switching rate of sampling clock, the device keeps the state longer.
This patch manages to sleep 100 msec before unmute operation, but it may
fail to release the mute in the case that the rate is changed. As a
workaround, users can restart packet streaming at the same rate, or write
to specific register from userspace.

$ python3 crpp < /sys/bus/firewire/devices/fw1/config_rom
               ROM header and bus information block
               -----------------------------------------------------------------
400  04105c54  bus_info_length 4, crc_length 16, crc 23636
404  31333934  bus_name "1394"
408  20001000  irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 0, max_rec 1 (4)
40c  0001f200  company_id 0001f2     |
410  00005015  device_id 0000005015  | EUI-64 0001f20000005015

               root directory
               -----------------------------------------------------------------
414  0004c65c  directory_length 4, crc 50780
418  030001f2  vendor
41c  0c0083c0  node capabilities per IEEE 1394
420  8d000006  --> eui-64 leaf at 438
424  d1000001  --> unit directory at 428

               unit directory at 428
               -----------------------------------------------------------------
428  00035052  directory_length 3, crc 20562
42c  120001f2  specifier id
430  13000001  version
434  17101800  model

               eui-64 leaf at 438
               -----------------------------------------------------------------
438  0002eeb6  leaf_length 2, crc 61110
43c  0001f200  company_id 0001f2     |
440  00005015  device_id 0000005015  | EUI-64 0001f20000005015

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210616082847.124688-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-17 11:37:08 +02:00
..
bebob ALSA: bebob: Fix bit flag quirk constants 2021-06-16 08:53:24 +02:00
dice ALSA: dice: cease from delayed card registration 2021-06-07 17:14:14 +02:00
digi00x ALSA: firewire-digi00x: cease from delayed card registration 2021-06-07 17:14:29 +02:00
fireface ALSA: fireface: cease from delayed card registration 2021-06-07 17:14:48 +02:00
fireworks ALSA: fireworks: fulfil device entries 2021-06-12 09:33:09 +02:00
motu ALSA: firewire-motu: add support for MOTU 828 2021-06-17 11:37:08 +02:00
oxfw ALSA: oxfw: cease from delayed card registration 2021-06-07 17:14:08 +02:00
tascam ALSA: firewire-tascam: cease from delayed card registration 2021-06-07 17:14:36 +02:00
amdtp-am824.c ALSA: firewire-lib/motu: use int type for the value of bitwise OR with enumerator-constant 2021-05-18 12:21:52 +02:00
amdtp-am824.h ALSA: firewire-lib/motu: use int type for the value of bitwise OR with enumerator-constant 2021-05-18 12:21:52 +02:00
amdtp-stream-trace.h ALSA: firewire-lib: replace in_interrupt() with in_softirq() 2021-06-12 09:31:41 +02:00
amdtp-stream.c ALSA: firewire-lib: replace in_interrupt() with in_softirq() 2021-06-12 09:31:41 +02:00
amdtp-stream.h ALSA: firewire-lib: obsolete workqueue for period update 2021-06-10 09:50:37 +02:00
cmp.c ALSA: firewire: fix kernel-doc 2020-07-07 12:09:32 +02:00
cmp.h ALSA: firewire-lib: split allocation of isochronous resources from establishment of connection 2019-06-17 08:18:36 +02:00
fcp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 345 2019-06-05 17:37:08 +02:00
fcp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
isight.c ALSA: firewire: Drop superfluous ioctl PCM ops 2019-12-11 07:25:27 +01:00
iso-resources.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 345 2019-06-05 17:37:08 +02:00
iso-resources.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig ALSA: firewire-motu: add support for MOTU 828 2021-06-17 11:37:08 +02:00
lib.c ALSA: firewire-lib: delete unused kernel API 2021-06-07 17:14:54 +02:00
lib.h ALSA: firewire-lib: delete unused kernel API 2021-06-07 17:14:54 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
packets-buffer.c ALSA: firewire: fix a memory leak bug 2019-08-08 11:12:26 +02:00
packets-buffer.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00