summaryrefslogtreecommitdiff
path: root/sound/firewire/motu/motu.h
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2017-03-22 21:30:19 +0900
committerTakashi Iwai <tiwai@suse.de>2017-03-28 12:33:32 +0200
commit2e76701bbb1fbe55f7d8538ae7f6869070eb3446 (patch)
tree32857eb7553612105d0a9e96098b2897ae37bf9f /sound/firewire/motu/motu.h
parent4641c939401076c0ab7faba024827069723f719c (diff)
ALSA: firewire-motu: handle transactions specific for MOTU FireWire models
All models of MOTU FireWire series can be controlled by write transaction to addresses in a range from 0x'ffff'f0000'0b00 to 0x'ffff'f000'0cff. The models support asynchronous notification. This notification has 32 bit field data, and is transferred when status of clock changes. Meaning of the value is not enough clear yet. Drivers can register its address to receive the notification. Write transaction to 0x'ffff'f000'0b04 registers higher 16 bits of the address. Write transaction to 0x'ffff'f0000'0b08 registers the rest of bits. The address includes node ID, thus it should be registered every time of bus reset. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/motu/motu.h')
-rw-r--r--sound/firewire/motu/motu.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/firewire/motu/motu.h b/sound/firewire/motu/motu.h
index cd1b3dd3e371..ed1d779c0dcc 100644
--- a/sound/firewire/motu/motu.h
+++ b/sound/firewire/motu/motu.h
@@ -48,6 +48,10 @@ struct snd_motu {
struct snd_motu_packet_format rx_packet_formats;
struct amdtp_stream tx_stream;
struct amdtp_stream rx_stream;
+
+ /* For notification. */
+ struct fw_address_handler async_handler;
+ u32 msg;
};
enum snd_motu_spec_flags {
@@ -106,4 +110,12 @@ int amdtp_motu_set_parameters(struct amdtp_stream *s, unsigned int rate,
struct snd_motu_packet_format *formats);
int amdtp_motu_add_pcm_hw_constraints(struct amdtp_stream *s,
struct snd_pcm_runtime *runtime);
+
+int snd_motu_transaction_read(struct snd_motu *motu, u32 offset, __be32 *reg,
+ size_t size);
+int snd_motu_transaction_write(struct snd_motu *motu, u32 offset, __be32 *reg,
+ size_t size);
+int snd_motu_transaction_register(struct snd_motu *motu);
+int snd_motu_transaction_reregister(struct snd_motu *motu);
+void snd_motu_transaction_unregister(struct snd_motu *motu);
#endif