linux/sound/firewire
Takashi Sakamoto 35033d8cb7 ALSA: firewire-motu: add support MOTU 8pre FireWire
This commit adds support for MOTU 8pre FireWire, which was shipped 2007
and nowadays already discontinued. Userspace applications can transmit
and receive PCM frames and MIDI messages for this model via ALSA PCM
interface and RawMidi/Sequencer interfaces.

Like the other models of MOTU FireWire series, this model has many
quirks in its CIP.

At first, data channels for two pairs of optical interfaces. At lower
sampling transmission frequency, i.e. 44.1 and 48.0 kHz, one pair is
available for ADAT data, thus 8 data chunks are transferred by CIP.
At middle sampling transmission frequency, i.e.  88.2 and 96.0 kHz,
two pairs are available to keep 8 chunks for ADAT data, thus CIP
still includes 8 data chunks.

Apart from data chunks for optical interface, CIP includes fixed number
of data chunks. In tx stream, two chunks for status message, eight
chunks for samples from analog 1-8 input, two chunks for mix-return.
In rx stream, two chunks for control message, two chunks for main 1-2
output, two chunks for phone 1-2 output, two chunks for dummy 1-2.

CIP header in tx stream includes quirks for its dbs and dbc fields.
The value of dbs field is fixed to 0x13, against its actual size.
The value of dbc field is firstly updated to 0x07 from zero, then
it's incremented continuously according to actual number of data h
blocks.

Finally, the model has own bits to disable frame fetch.

This commit uses several options to absorb the above quirks.

$ python2 crpp < /sys/bus/firewire/devices/fw1/config_rom
               ROM header and bus information block
               -----------------------------------------------------------------
400  0410b57d  bus_info_length 4, crc_length 16, crc 46461
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  00083dfb  device_id 0000083dfb  | EUI-64 0001f20000083dfb

               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  0003991c  directory_length 3, crc 39196
42c  120001f2  specifier id
430  1300000f  version
434  17103800  model

               eui-64 leaf at 438
               -----------------------------------------------------------------
438  00022681  leaf_length 2, crc 9857
43c  0001f200  company_id 0001f2     |
440  00083dfb  device_id 0000083dfb  | EUI-64 0001f20000083dfb

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-03-18 14:50:16 +01:00
..
bebob ALSA: bebob: use more identical mod_alias for Saffire Pro 10 I/O against Liquid Saffire 56 2019-02-26 07:11:32 +01:00
dice ALSA: firewire: Remove superfluous snd_info_register() calls 2019-02-06 18:11:38 +01:00
digi00x ALSA: firewire: Remove superfluous snd_info_register() calls 2019-02-06 18:11:38 +01:00
fireface ALSA: firewire: Remove superfluous snd_info_register() calls 2019-02-06 18:11:38 +01:00
fireworks ALSA: firewire: Remove superfluous snd_info_register() calls 2019-02-06 18:11:38 +01:00
motu ALSA: firewire-motu: add support MOTU 8pre FireWire 2019-03-18 14:50:16 +01:00
oxfw ALSA: firewire: Remove superfluous snd_info_register() calls 2019-02-06 18:11:38 +01:00
tascam ALSA: firewire: Remove superfluous snd_info_register() calls 2019-02-06 18:11:38 +01:00
amdtp-am824.c locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE() 2017-10-25 11:01:08 +02:00
amdtp-am824.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
amdtp-stream-trace.h ALSA: firewire-lib: use the same print format for 'without_header' tracepoints 2018-12-16 10:10:21 +01:00
amdtp-stream.c ALSA: firewire-lib: fix wrong handling payload_length as payload_quadlet 2018-12-16 10:10:18 +01:00
amdtp-stream.h Merge branch 'linus' into locking/core, to resolve conflicts 2017-11-07 10:32:44 +01:00
cmp.c ALSA: firewire-lib: fix kerneldoc errors 2014-11-18 18:10:23 +01:00
cmp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fcp.c ALSA: firewire-lib/bebob/oxfw: improve response evaluation for AV/C commands 2017-04-05 21:37:23 +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: isight: fix leak of reference to firewire unit in error path of .probe callback 2018-10-12 08:08:04 +02:00
iso-resources.c ALSA: firewire: fix NULL pointer dereference when releasing uninitialized data of iso-resource 2017-08-20 09:40:32 +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: fireface: add support for Fireface UCX 2019-01-21 15:12:25 +01:00
lib.c ALSA: firewire-lib/firewire-tascam: localize async midi port 2017-04-14 14:50:26 +02:00
lib.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01: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 treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07: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