linux/sound
Takashi Sakamoto f0f9f497d4 ALSA: fireface: support rx MIDI functionality for Fireface UCX
In latter model of Fireface series, asynchronous transaction includes
a prefix byte to indicate the way to decode included MIDI bytes.

Upper 4 bits of the prefix byte indicates port number, and the rest 4
bits indicate the way to decode rest of bytes for MIDI messages.

Basically the rest bits indicates the number of bytes for MIDI message.
However, if the last byte of each MIDi message is included, the rest
bits are 0xf. For example:

message: f0 00 00 66 14 20 00 00 f7
offset: content (big endian, port 0)
 '0030: 0x02f00000
 '0030: 0x03006614
 '0030: 0x03200000
 '0030: 0x0ff70000

This commit supports encoding scheme for the above and allows
applications to transfer MIDI messages via ALSA rawmidi interface.
An unused member (running_status) is reused to keep state of
transmission of system exclusive messages.

For your information, this is a dump of config rom.

$ sudo ./hinawa-config-rom-printer /dev/fw1
{ 'bus-info': { 'bmc': False,
                'chip_ID': 13225063715,
                'cmc': False,
                'cyc_clk_acc': 0,
                'imc': False,
                'isc': True,
                'max_rec': 512,
                'name': '1394',
                'node_vendor_ID': 2613},
  'root-directory': [ [ 'NODE_CAPABILITIES',
                        { 'addressing': {'64': True, 'fix': True, 'prv': False},
                          'misc': {'int': False, 'ms': False, 'spt': True},
                          'state': { 'atn': False,
                                     'ded': False,
                                     'drq': True,
                                     'elo': False,
                                     'init': False,
                                     'lst': True,
                                     'off': False},
                          'testing': {'bas': False, 'ext': False}}],
                      ['VENDOR', 2613],
                      ['DESCRIPTOR', 'RME!'],
                      ['EUI_64', 2873037108442403],
                      [ 'UNIT',
                        [ ['SPECIFIER_ID', 2613],
                          ['VERSION', 4],
                          ['MODEL', 1054720],
                          ['DESCRIPTOR', 'Fireface UCX']]]]}

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-01-22 17:20:56 +01:00
..
ac97 ALSA: ac97: fix unbalanced pm_runtime_enable 2018-08-19 18:37:04 +02:00
aoa ALSA: aoa: Remove superfluous snd_pcm_suspend*() calls 2019-01-15 17:47:51 +01:00
arm ALSA: arm: Remove superfluous snd_pcm_suspend*() calls 2019-01-15 17:47:58 +01:00
atmel
core ALSA: pcm: Make snd_pcm_suspend() local static 2019-01-15 17:48:23 +01:00
drivers ALSA: drivers: Remove superfluous snd_pcm_suspend*() calls 2019-01-15 17:47:06 +01:00
firewire ALSA: fireface: support rx MIDI functionality for Fireface UCX 2019-01-22 17:20:56 +01:00
hda ALSA: hda: program stripe bits for controller 2019-01-14 19:52:28 +01:00
i2c ALSA: i2c/cs8427: Fix int to char conversion 2018-10-18 15:44:08 +02:00
isa Merge branch 'topic/pcm-device-suspend' into for-next 2019-01-18 17:37:21 +01:00
mips ALSA: mips: Cleanup indirect PCM helper usages 2018-09-04 12:13:46 +02:00
oss treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
parisc
pci ALSA: hda/tegra: add driver flag for runtime PM 2019-01-22 09:21:56 +01:00
pcmcia ALSA: pcmcia: Remove superfluous snd_pcm_suspend*() calls 2019-01-15 17:48:04 +01:00
ppc ALSA: ppc: Remove superfluous snd_pcm_suspend*() calls 2019-01-15 17:47:45 +01:00
sh
soc ALSA: pcm: Suspend streams globally via device type PM ops 2019-01-15 17:46:36 +01:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next 2018-12-26 10:32:18 -08:00
spi
synth ALSA: emux: Fix potential Spectre v1 vulnerabilities 2018-12-13 09:13:04 +01:00
usb Merge branch 'topic/pcm-device-suspend' into for-next 2019-01-18 17:37:21 +01:00
x86 ALSA: x86: Remove superfluous snd_pcm_suspend*() calls 2019-01-15 17:47:39 +01:00
xen ALSA: xen-front: Use Xen common shared buffer implementation 2018-12-18 12:19:37 -05:00
ac97_bus.c
Kconfig ALSA: xen-front: Introduce Xen para-virtualized sound frontend driver 2018-05-16 12:58:36 +02:00
last.c
Makefile ALSA: xen-front: Introduce Xen para-virtualized sound frontend driver 2018-05-16 12:58:36 +02:00
sound_core.c sound: Use octal not symbolic permissions 2018-05-28 11:27:20 +02:00