summaryrefslogtreecommitdiffstats
path: root/include/uapi/sound
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2021-10-15 17:08:17 +0900
committerTakashi Iwai <tiwai@suse.de>2021-10-15 17:52:07 +0200
commit90b28f3bb85c39b11daf29d473ef21a935c70ec5 (patch)
tree9f9c729a02102e59a6932e5503ac76369240d8db /include/uapi/sound
parentbea36afa102e37d5e4d9ea519f14d1c92d512e45 (diff)
downloadlinux-90b28f3bb85c39b11daf29d473ef21a935c70ec5.tar.bz2
ALSA: firewire-motu: add message parser for meter information in command DSP model
Some of MOTU models allows software to configure their DSP parameters by command included in asynchronous transaction. The models multiplex messages for hardware meters into isochronous packet as well as PCM frames. For convenience, I call them as 'command 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-3-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.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/uapi/sound/firewire.h b/include/uapi/sound/firewire.h
index 347fd7a05596..82d4765fbeee 100644
--- a/include/uapi/sound/firewire.h
+++ b/include/uapi/sound/firewire.h
@@ -143,4 +143,34 @@ struct snd_firewire_motu_register_dsp_meter {
__u8 data[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_COUNT];
};
+// In below MOTU models, software is allowed to control their DSP by command in frame of
+// asynchronous transaction to 0x'ffff'0001'0000:
+//
+// - 828 mk3 (FireWire only and Hybrid)
+// - 896 mk3 (FireWire only and Hybrid)
+// - Ultralite mk3 (FireWire only and Hybrid)
+// - Traveler mk3
+// - Track 16
+//
+// On the other hand, the states of hardware meter is split into specific messages included in the
+// sequence of isochronous packet. ALSA firewire-motu driver gathers the message and allow userspace
+// application to read it via ioctl.
+
+#define SNDRV_FIREWIRE_MOTU_COMMAND_DSP_METER_COUNT 400
+
+/**
+ * struct snd_firewire_motu_command_dsp_meter - the container for meter information in DSP
+ * controlled by command
+ * @data: Signal level meters. The mapping between position and signal channel is model-dependent.
+ *
+ * The structure expresses the part of DSP status for hardware meter. The 32 bit storage is
+ * estimated to include IEEE 764 32 bit single precision floating point (binary32) value. It is
+ * expected to be linear value (not logarithm) for audio signal level between 0.0 and +1.0. However,
+ * the last two quadlets (data[398] and data[399]) are filled with 0xffffffff since they are the
+ * marker of one period.
+ */
+struct snd_firewire_motu_command_dsp_meter {
+ __u32 data[SNDRV_FIREWIRE_MOTU_COMMAND_DSP_METER_COUNT];
+};
+
#endif /* _UAPI_SOUND_FIREWIRE_H_INCLUDED */