summaryrefslogtreecommitdiff
path: root/sound/firewire/fireface/ff.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2018-12-11 19:17:35 +0900
committerTakashi Iwai <tiwai@suse.de>2018-12-11 14:58:01 +0100
commita91f676074c05b3c455700b90849adcfda50079e (patch)
tree73100b2d23e066113c61d499922c5b84c996e389 /sound/firewire/fireface/ff.c
parentaef4ad2f5aa27ec05f0306547bcf7cf86a9e9873 (diff)
ALSA: fireface: add support for Fireface 800 with MIDI functionality only
Fireface 800 is a flagship model of RME GmbH for audio and music units on IEEE 1394 bus, shipped 2004. This model consists of four chips: - TI TSB81BA3D for physical layer on cable environment of EEE 1394 bus - TI TSB82AA2 for link layer for 1394 OHCI bus bridge to PCI bus - Xilinx Spartan-3 FPGA XC3S400 - Xilinx High-Performance CPLD XC9572XL This commit adds support Fireface 800. In this time, the support is restricted to its MIDI functionality, thus this commit adds some condition statements to avoid touching streaming functionality. Unlike Fireface 400, Fireface 800 has no functionality to suppress asynchronous transactions for MIDI messages except for unregister of listen address in controller side, thus the feature is available as is. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/fireface/ff.c')
-rw-r--r--sound/firewire/fireface/ff.c51
1 files changed, 39 insertions, 12 deletions
diff --git a/sound/firewire/fireface/ff.c b/sound/firewire/fireface/ff.c
index 2ce5e115b0eb..d486984c0e5b 100644
--- a/sound/firewire/fireface/ff.c
+++ b/sound/firewire/fireface/ff.c
@@ -31,7 +31,8 @@ static void ff_card_free(struct snd_card *card)
{
struct snd_ff *ff = card->private_data;
- snd_ff_stream_destroy_duplex(ff);
+ if (ff->spec->protocol->begin_session)
+ snd_ff_stream_destroy_duplex(ff);
snd_ff_transaction_unregister(ff);
}
@@ -56,9 +57,11 @@ static void do_registration(struct work_struct *work)
name_card(ff);
- err = snd_ff_stream_init_duplex(ff);
- if (err < 0)
- goto error;
+ if (ff->spec->protocol->begin_session) {
+ err = snd_ff_stream_init_duplex(ff);
+ if (err < 0)
+ goto error;
+ }
snd_ff_proc_init(ff);
@@ -66,13 +69,15 @@ static void do_registration(struct work_struct *work)
if (err < 0)
goto error;
- err = snd_ff_create_pcm_devices(ff);
- if (err < 0)
- goto error;
+ if (ff->spec->protocol->begin_session) {
+ err = snd_ff_create_pcm_devices(ff);
+ if (err < 0)
+ goto error;
- err = snd_ff_create_hwdep_devices(ff);
- if (err < 0)
- goto error;
+ err = snd_ff_create_hwdep_devices(ff);
+ if (err < 0)
+ goto error;
+ }
err = snd_card_register(ff->card);
if (err < 0)
@@ -121,7 +126,7 @@ static void snd_ff_update(struct fw_unit *unit)
snd_ff_transaction_reregister(ff);
- if (ff->registered)
+ if (ff->registered && ff->spec->protocol->begin_session)
snd_ff_stream_update_duplex(ff);
}
@@ -145,6 +150,16 @@ static void snd_ff_remove(struct fw_unit *unit)
fw_unit_put(ff->unit);
}
+static const struct snd_ff_spec spec_ff800 = {
+ .name = "Fireface800",
+ .midi_in_ports = 1,
+ .midi_out_ports = 1,
+ .protocol = &snd_ff_protocol_ff800,
+ .regs = {
+ [SND_FF_REG_TYPE_MIDI_HIGH_ADDR] = 0x000200000320ull,
+ },
+};
+
static const struct snd_ff_spec spec_ff400 = {
.name = "Fireface400",
.pcm_capture_channels = {18, 14, 10},
@@ -158,6 +173,18 @@ static const struct snd_ff_spec spec_ff400 = {
};
static const struct ieee1394_device_id snd_ff_id_table[] = {
+ /* Fireface 800 */
+ {
+ .match_flags = IEEE1394_MATCH_VENDOR_ID |
+ IEEE1394_MATCH_SPECIFIER_ID |
+ IEEE1394_MATCH_VERSION |
+ IEEE1394_MATCH_MODEL_ID,
+ .vendor_id = OUI_RME,
+ .specifier_id = OUI_RME,
+ .version = 0x000001,
+ .model_id = 0x101800,
+ .driver_data = (kernel_ulong_t)&spec_ff800,
+ },
/* Fireface 400 */
{
.match_flags = IEEE1394_MATCH_VENDOR_ID |
@@ -165,7 +192,7 @@ static const struct ieee1394_device_id snd_ff_id_table[] = {
IEEE1394_MATCH_VERSION |
IEEE1394_MATCH_MODEL_ID,
.vendor_id = OUI_RME,
- .specifier_id = 0x000a35,
+ .specifier_id = OUI_RME,
.version = 0x000002,
.model_id = 0x101800,
.driver_data = (kernel_ulong_t)&spec_ff400,