summaryrefslogtreecommitdiffstats
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.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/sound/firewire/fireface/ff.h b/sound/firewire/fireface/ff.h
index 269fa259d5a7..7be0ea4aaa4b 100644
--- a/sound/firewire/fireface/ff.h
+++ b/sound/firewire/fireface/ff.h
@@ -19,11 +19,13 @@
#include <linux/compat.h>
#include <sound/core.h>
+#include <sound/info.h>
#include "../lib.h"
#define SND_FF_STREAM_MODES 3
+struct snd_ff_protocol;
struct snd_ff_spec {
const char *const name;
@@ -32,6 +34,8 @@ struct snd_ff_spec {
unsigned int midi_in_ports;
unsigned int midi_out_ports;
+
+ struct snd_ff_protocol *protocol;
};
struct snd_ff {
@@ -44,4 +48,31 @@ struct snd_ff {
const struct snd_ff_spec *spec;
};
+
+enum snd_ff_clock_src {
+ SND_FF_CLOCK_SRC_INTERNAL,
+ SND_FF_CLOCK_SRC_SPDIF,
+ SND_FF_CLOCK_SRC_ADAT,
+ SND_FF_CLOCK_SRC_WORD,
+ SND_FF_CLOCK_SRC_LTC,
+ /* TODO: perhaps ADAT2 and TCO exists. */
+};
+
+struct snd_ff_protocol {
+ int (*get_clock)(struct snd_ff *ff, unsigned int *rate,
+ enum snd_ff_clock_src *src);
+ int (*begin_session)(struct snd_ff *ff, unsigned int rate);
+ void (*finish_session)(struct snd_ff *ff);
+ int (*switch_fetching_mode)(struct snd_ff *ff, bool enable);
+
+ void (*dump_sync_status)(struct snd_ff *ff,
+ struct snd_info_buffer *buffer);
+ void (*dump_clock_config)(struct snd_ff *ff,
+ struct snd_info_buffer *buffer);
+
+ u64 midi_high_addr_reg;
+ u64 midi_rx_port_0_reg;
+ u64 midi_rx_port_1_reg;
+};
+
#endif