summaryrefslogtreecommitdiff
path: root/sound/firewire/digi00x/digi00x.h
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2015-09-30 09:39:22 +0900
committerTakashi Iwai <tiwai@suse.de>2015-09-30 15:37:55 +0200
commit44b7308871ac6fd85fc840bfa3ddb466fe7aff23 (patch)
treeece85ff305f91ee7f8f9a1df8b2916ebcee98a3c /sound/firewire/digi00x/digi00x.h
parent660dd3d52ead45b8e60dcf966daf304de2121a28 (diff)
ALSA: firewire-digi00x: add support for asynchronous messaging
Digi 002/003 family uses asynchronous transaction for messaging. The address to transmit this message is stored on a certain register. This commit allocates a range of address on OHCI 1394 host controller to handle the messaging. As long as I know, the purpose of this message seems to notify lost of synchronization. While, the meaning of content of the message is not clear. Actual examples of this messaging: * When clock source is set as internal: - 0x00007051 - 0x00007052 - 0x00007054 - 0x00007057 - 0x00007058 * When clock source is set as somewhat external: - 0x00009000 - 0x00009010 - 0x00009020 - 0x00009021 - 0x00009022 The lost often occurs when using internal clock source. In this case, users hear sounds with quite short gap every several minutes. In fact, the lost is recovered temporarily. When using with external clock source, the lost seems not to occur. The mechanism is not clear yet. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/digi00x/digi00x.h')
-rw-r--r--sound/firewire/digi00x/digi00x.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/firewire/digi00x/digi00x.h b/sound/firewire/digi00x/digi00x.h
index 5ba531806262..b960c868b59b 100644
--- a/sound/firewire/digi00x/digi00x.h
+++ b/sound/firewire/digi00x/digi00x.h
@@ -49,6 +49,9 @@ struct snd_dg00x {
bool dev_lock_changed;
wait_queue_head_t hwdep_wait;
+ /* For asynchronous messages. */
+ struct fw_address_handler async_handler;
+ u32 msg;
};
#define DG00X_ADDR_BASE 0xffffe0000000ull
@@ -110,6 +113,10 @@ int amdtp_dot_add_pcm_hw_constraints(struct amdtp_stream *s,
struct snd_pcm_runtime *runtime);
void amdtp_dot_set_pcm_format(struct amdtp_stream *s, snd_pcm_format_t format);
+int snd_dg00x_transaction_register(struct snd_dg00x *dg00x);
+int snd_dg00x_transaction_reregister(struct snd_dg00x *dg00x);
+void snd_dg00x_transaction_unregister(struct snd_dg00x *dg00x);
+
extern const unsigned int snd_dg00x_stream_rates[SND_DG00X_RATE_COUNT];
extern const unsigned int snd_dg00x_stream_pcm_channels[SND_DG00X_RATE_COUNT];
int snd_dg00x_stream_get_external_rate(struct snd_dg00x *dg00x,