summaryrefslogtreecommitdiff
path: root/sound/firewire/fireface/ff.h
diff options
context:
space:
mode:
Diffstat (limited to 'sound/firewire/fireface/ff.h')
-rw-r--r--sound/firewire/fireface/ff.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/sound/firewire/fireface/ff.h b/sound/firewire/fireface/ff.h
index 7be0ea4aaa4b..bac2e58b2e35 100644
--- a/sound/firewire/fireface/ff.h
+++ b/sound/firewire/fireface/ff.h
@@ -20,11 +20,16 @@
#include <sound/core.h>
#include <sound/info.h>
+#include <sound/rawmidi.h>
#include "../lib.h"
#define SND_FF_STREAM_MODES 3
+#define SND_FF_MAXIMIM_MIDI_QUADS 9
+#define SND_FF_IN_MIDI_PORTS 2
+#define SND_FF_OUT_MIDI_PORTS 2
+
struct snd_ff_protocol;
struct snd_ff_spec {
const char *const name;
@@ -47,6 +52,20 @@ struct snd_ff {
struct delayed_work dwork;
const struct snd_ff_spec *spec;
+
+ /* To handle MIDI tx. */
+ struct snd_rawmidi_substream *tx_midi_substreams[SND_FF_IN_MIDI_PORTS];
+ struct fw_address_handler async_handler;
+
+ /* TO handle MIDI rx. */
+ struct snd_rawmidi_substream *rx_midi_substreams[SND_FF_OUT_MIDI_PORTS];
+ u8 running_status[SND_FF_OUT_MIDI_PORTS];
+ __le32 msg_buf[SND_FF_OUT_MIDI_PORTS][SND_FF_MAXIMIM_MIDI_QUADS];
+ struct work_struct rx_midi_work[SND_FF_OUT_MIDI_PORTS];
+ struct fw_transaction transactions[SND_FF_OUT_MIDI_PORTS];
+ ktime_t next_ktime[SND_FF_OUT_MIDI_PORTS];
+ bool rx_midi_error[SND_FF_OUT_MIDI_PORTS];
+ unsigned int rx_bytes[SND_FF_OUT_MIDI_PORTS];
};
enum snd_ff_clock_src {
@@ -75,4 +94,8 @@ struct snd_ff_protocol {
u64 midi_rx_port_1_reg;
};
+int snd_ff_transaction_register(struct snd_ff *ff);
+int snd_ff_transaction_reregister(struct snd_ff *ff);
+void snd_ff_transaction_unregister(struct snd_ff *ff);
+
#endif