aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/firewire/fireface/ff-protocol-former.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2019-01-24 18:32:03 +0900
committerTakashi Iwai <tiwai@suse.de>2019-01-24 14:39:32 +0100
commitd8002539ec7b8bc793a212b79db4a796ce9bce9c (patch)
treee5182e72e22fad3514318a70a9f38afde0c66aed /sound/firewire/fireface/ff-protocol-former.c
parentALSA: fireface: support rx MIDI functionality for Fireface UCX (diff)
downloadwireguard-linux-d8002539ec7b8bc793a212b79db4a796ce9bce9c.tar.xz
wireguard-linux-d8002539ec7b8bc793a212b79db4a796ce9bce9c.zip
ALSA: fireface: comment cleanup about destination address of async transactions for MIDI messages
In Fireface series, registration of higher 4 bytes of destination address for asynchronous transaction of MIDI messages is done by a write transaction to model-specific register. On the other hand, registration of lower 4 bytes of the address is selectable from 4 options. A register for this registration includes the other purpose options such as input attenuation. Thus this driver expects userspace applications to configure the register. Actual behaviour for the asynchronous transaction is different depending on protocols. In former protocol, destination offset of each transaction is the same as the registered address even if it is block request. In latter models, destination offset of each transaction is the offset of previous transaction plus 4 byte and the transaction is quadlet request. This commit cleanups comments about the above mechanism. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/fireface/ff-protocol-former.c')
-rw-r--r--sound/firewire/fireface/ff-protocol-former.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/sound/firewire/fireface/ff-protocol-former.c b/sound/firewire/fireface/ff-protocol-former.c
index e0acf40a02ee..8d1c2c6e907b 100644
--- a/sound/firewire/fireface/ff-protocol-former.c
+++ b/sound/firewire/fireface/ff-protocol-former.c
@@ -396,6 +396,10 @@ static void ff800_finish_session(struct snd_ff *ff)
FF800_ISOC_COMM_STOP, &reg, sizeof(reg), 0);
}
+// Fireface 800 doesn't allow drivers to register lower 4 bytes of destination
+// address.
+// A write transaction to clear registered higher 4 bytes of destination address
+// has an effect to suppress asynchronous transaction from device.
static void ff800_handle_midi_msg(struct snd_ff *ff, unsigned int offset,
__le32 *buf, size_t length)
{
@@ -525,6 +529,25 @@ static void ff400_finish_session(struct snd_ff *ff)
FF400_ISOC_COMM_STOP, &reg, sizeof(reg), 0);
}
+// For Fireface 400, lower 4 bytes of destination address is configured by bit
+// flag in quadlet register (little endian) at 0x'0000'801'0051c. Drivers can
+// select one of 4 options:
+//
+// bit flags: offset of destination address
+// - 0x04000000: 0x'....'....'0000'0000
+// - 0x08000000: 0x'....'....'0000'0080
+// - 0x10000000: 0x'....'....'0000'0100
+// - 0x20000000: 0x'....'....'0000'0180
+//
+// Drivers can suppress the device to transfer asynchronous transactions by
+// using below 2 bits.
+// - 0x01000000: suppress transmission
+// - 0x02000000: suppress transmission
+//
+// Actually, the register is write-only and includes the other options such as
+// input attenuation. This driver allocates destination address with '0000'0000
+// in its lower offset and expects userspace application to configure the
+// register for it.
static void ff400_handle_midi_msg(struct snd_ff *ff, unsigned int offset,
__le32 *buf, size_t length)
{