1
0
Fork 0
alistair23-linux/sound/firewire/motu
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
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
amdtp-motu-trace.h ALSA: firewire-motu: add tracepoints for messages for unique protocol 2017-04-11 08:30:47 +02:00
amdtp-motu.c ALSA: firewire-motu: add support MOTU 8pre FireWire 2019-03-18 14:50:16 +01:00
motu-hwdep.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
motu-midi.c ALSA: firewire-motu: constify snd_rawmidi_ops structures 2017-08-15 14:05:16 +02:00
motu-pcm.c ALSA: pcm: Nuke snd_pcm_lib_mmap_vmalloc() 2018-07-18 08:24:29 +02:00
motu-proc.c ALSA: firewire: Remove superfluous snd_info_register() calls 2019-02-06 18:11:38 +01:00
motu-protocol-v2.c ALSA: firewire-motu: add support MOTU 8pre FireWire 2019-03-18 14:50:16 +01:00
motu-protocol-v3.c ALSA: firewire-motu: add a flag for AES/EBU on XLR interface 2018-06-19 20:44:50 +02:00
motu-stream.c ALSA: firewire: Use common error handling code in snd_motu_stream_start_duplex() 2017-09-12 09:23:26 +02:00
motu-transaction.c ALSA: firewire-motu: enable to read transaction cache via hwdep interface 2017-03-28 12:34:06 +02:00
motu.c ALSA: firewire-motu: add support MOTU 8pre FireWire 2019-03-18 14:50:16 +01:00
motu.h ALSA: firewire-motu: add support MOTU 8pre FireWire 2019-03-18 14:50:16 +01:00