summaryrefslogtreecommitdiffstats
path: root/include/uapi/sound
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2021-10-15 17:08:16 +0900
committerTakashi Iwai <tiwai@suse.de>2021-10-15 17:52:05 +0200
commitbea36afa102e37d5e4d9ea519f14d1c92d512e45 (patch)
tree012b206eb9392098c918556f13d116be0ba7cb75 /include/uapi/sound
parentc18c4966033e6473a472fb65fbd5a6441603fbf7 (diff)
downloadlinux-bea36afa102e37d5e4d9ea519f14d1c92d512e45.tar.bz2
ALSA: firewire-motu: add message parser to gather meter information in register DSP model
Some of MOTU models allows software to configure their DSP parameters by accessing to their registers. The models multiplex messages for status of DSP into isochronous packet as well as PCM frames. The message includes information of hardware metering, MIDI message, current parameters of DSP. For my convenience, I call them as 'register DSP' model. This patch adds message parser for them to gather hardware meter information. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20211015080826.34847-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/uapi/sound')
-rw-r--r--include/uapi/sound/firewire.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/uapi/sound/firewire.h b/include/uapi/sound/firewire.h
index ae12826ed641..347fd7a05596 100644
--- a/include/uapi/sound/firewire.h
+++ b/include/uapi/sound/firewire.h
@@ -108,4 +108,39 @@ struct snd_firewire_tascam_state {
__be32 data[SNDRV_FIREWIRE_TASCAM_STATE_COUNT];
};
+// In below MOTU models, software is allowed to control their DSP by accessing to registers.
+// - 828mk2
+// - 896hd
+// - Traveler
+// - 8 pre
+// - Ultralite
+// - 4 pre
+// - Audio Express
+//
+// On the other hand, the status of DSP is split into specific messages included in the sequence of
+// isochronous packet. ALSA firewire-motu driver gathers the messages and allow userspace applications
+// to read it via ioctl. In 828mk2, 896hd, and Traveler, hardware meter for all of physical inputs
+// are put into the message, while one pair of physical outputs is selected. The selection is done by
+// LSB one byte in asynchronous write quadlet transaction to 0x'ffff'f000'0b2c.
+//
+// I note that V3HD/V4HD uses asynchronous transaction for the purpose. The destination address is
+// registered to 0x'ffff'f000'0b38 and '0b3c by asynchronous write quadlet request. The size of
+// message differs between 23 and 51 quadlets. For the case, the number of mixer bus can be extended
+// up to 12.
+
+#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_COUNT 40
+
+/**
+ * struct snd_firewire_motu_register_dsp_meter - the container for meter information in DSP
+ * controlled by register access
+ * @data: Signal level meters. The mapping between position and input/output channel is
+ * model-dependent.
+ *
+ * The structure expresses the part of DSP status for hardware meter. The u8 storage includes linear
+ * value for audio signal level between 0x00 and 0x7f.
+ */
+struct snd_firewire_motu_register_dsp_meter {
+ __u8 data[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_COUNT];
+};
+
#endif /* _UAPI_SOUND_FIREWIRE_H_INCLUDED */