ALSA: fireface: add model-dependent parameter for address to receive async transactio...
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 22 Jan 2019 13:17:03 +0000 (22:17 +0900)
committerTakashi Iwai <tiwai@suse.de>
Tue, 22 Jan 2019 16:20:53 +0000 (17:20 +0100)
Between former and latter models, destination address to receive
asynchronous transactions for MIDI messages is different.

This commit adds model-dependent parameter for the addresses.

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 0506755891ce5181975e200fa1384af127feabec..92ca76ab75376b69666663e97d98a480ac5e660c 100644 (file)
@@ -8,9 +8,6 @@
 
 #include "ff.h"
 
-#define SND_FF_REG_MIDI_RX_PORT_0      0x000080180000ull
-#define SND_FF_REG_MIDI_RX_PORT_1      0x000080190000ull
-
 static void finish_transmit_midi_msg(struct snd_ff *ff, unsigned int port,
                                     int rcode)
 {
@@ -93,10 +90,10 @@ static void transmit_midi_msg(struct snd_ff *ff, unsigned int port)
                fill_midi_buf(ff, port, i, buf[i]);
 
        if (port == 0) {
-               addr = SND_FF_REG_MIDI_RX_PORT_0;
+               addr = ff->spec->midi_rx_addrs[0];
                callback = finish_transmit_midi0_msg;
        } else {
-               addr = SND_FF_REG_MIDI_RX_PORT_1;
+               addr = ff->spec->midi_rx_addrs[1];
                callback = finish_transmit_midi1_msg;
        }
 
index a2a9fd82f27d9a054ec12af907bb84c8ab612b96..675c6ab556eb75869224016183e4337923119f24 100644 (file)
@@ -154,6 +154,7 @@ static const struct snd_ff_spec spec_ff800 = {
        .protocol = &snd_ff_protocol_ff800,
        .midi_high_addr = 0x000200000320ull,
        .midi_addr_range = 12,
+       .midi_rx_addrs = {0x000080180000ull, 0},
 };
 
 static const struct snd_ff_spec spec_ff400 = {
@@ -165,6 +166,7 @@ static const struct snd_ff_spec spec_ff400 = {
        .protocol = &snd_ff_protocol_ff400,
        .midi_high_addr = 0x0000801003f4ull,
        .midi_addr_range = SND_FF_MAXIMIM_MIDI_QUADS * 4,
+       .midi_rx_addrs = {0x000080180000ull, 0x000080190000ull},
 };
 
 static const struct snd_ff_spec spec_ucx = {
@@ -175,6 +177,7 @@ static const struct snd_ff_spec spec_ucx = {
        .protocol = &snd_ff_protocol_latter,
        .midi_high_addr = 0xffff00000034ull,
        .midi_addr_range = 0x80,
+       .midi_rx_addrs = {0xffff00000030ull, 0xffff00000030ull},
 };
 
 static const struct ieee1394_device_id snd_ff_id_table[] = {
index b86ca4fb7d9b9031da1fbef0e0a342aea207baf0..edad75a4b260174e187cef4a9330e3ea26bfbdbd 100644 (file)
@@ -55,6 +55,7 @@ struct snd_ff_spec {
        const struct snd_ff_protocol *protocol;
        u64 midi_high_addr;
        u8 midi_addr_range;
+       u64 midi_rx_addrs[SND_FF_OUT_MIDI_PORTS];
 };
 
 struct snd_ff {