]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ALSA: fireface: add model-dependent parameter for address range to receive async...
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 22 Jan 2019 13:17:01 +0000 (22:17 +0900)
committerTakashi Iwai <tiwai@suse.de>
Tue, 22 Jan 2019 16:20:50 +0000 (17:20 +0100)
In Fireface series, drivers can register destination address for
asynchronous transaction which transfers MIDI messages from device.

In former models, all of the transactions arrive at the registered
address without any offset. In latter models, each of the transaction
arrives at the registered address with sequential offset within 0x00
to 0x7f. This seems to be for discontinuity detection.

This commit adds model-dependent member for the address range.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/fireface/ff-transaction.c
sound/firewire/fireface/ff.c
sound/firewire/fireface/ff.h

index d3fde813ce17dc6b9d881345176300e1f5affecc..0506755891ce5181975e200fa1384af127feabec 100644 (file)
@@ -156,7 +156,7 @@ static int allocate_own_address(struct snd_ff *ff, int i)
        struct fw_address_region midi_msg_region;
        int err;
 
-       ff->async_handler.length = SND_FF_MAXIMIM_MIDI_QUADS * 4;
+       ff->async_handler.length = ff->spec->midi_addr_range;
        ff->async_handler.address_callback = handle_midi_msg;
        ff->async_handler.callback_data = ff;
 
index fd9c980e3cf4b92735905e9a3ee274dc6cceb4bc..c09a4875aa86cd1bada5cedf32cd8f8e02757b51 100644 (file)
@@ -159,6 +159,7 @@ static const struct snd_ff_spec spec_ff800 = {
        .midi_out_ports = 1,
        .protocol = &snd_ff_protocol_ff800,
        .midi_high_addr = 0x000200000320ull,
+       .midi_addr_range = 12,
 };
 
 static const struct snd_ff_spec spec_ff400 = {
@@ -169,6 +170,7 @@ static const struct snd_ff_spec spec_ff400 = {
        .midi_out_ports = 2,
        .protocol = &snd_ff_protocol_ff400,
        .midi_high_addr = 0x0000801003f4ull,
+       .midi_addr_range = SND_FF_MAXIMIM_MIDI_QUADS * 4,
 };
 
 static const struct snd_ff_spec spec_ucx = {
index ddcffb8d85c6c68a11929dfc96f1123758d46e25..b86ca4fb7d9b9031da1fbef0e0a342aea207baf0 100644 (file)
@@ -54,6 +54,7 @@ struct snd_ff_spec {
 
        const struct snd_ff_protocol *protocol;
        u64 midi_high_addr;
+       u8 midi_addr_range;
 };
 
 struct snd_ff {