summaryrefslogtreecommitdiff
path: root/sound/pci/ctxfi/cttimer.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-06-05 16:11:07 +0200
committerTakashi Iwai <tiwai@suse.de>2009-06-05 16:44:13 +0200
commitb7bbf876087e0e2c0ba723a8398083c9a9ac1dfd (patch)
tree69a3e70658fc751ffc99eef5a6f047b19f61a4a2 /sound/pci/ctxfi/cttimer.h
parent6bc5874a1ddf98ac0fe6c4eab7d286c11cb1c748 (diff)
downloadlinux-3.10-b7bbf876087e0e2c0ba723a8398083c9a9ac1dfd.tar.gz
linux-3.10-b7bbf876087e0e2c0ba723a8398083c9a9ac1dfd.tar.bz2
linux-3.10-b7bbf876087e0e2c0ba723a8398083c9a9ac1dfd.zip
ALSA: ctxfi - Use native timer interrupt on emu20k1
emu20k1 has a native timer interrupt based on the audio clock, which is more accurate than the system timer (from the synchronization POV). This patch adds the code to handle this with multiple streams. The system timer is still used on emu20k2, and can be used also for emu20k1 easily by changing USE_SYSTEM_TIMER to 1 in cttimer.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ctxfi/cttimer.h')
-rw-r--r--sound/pci/ctxfi/cttimer.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/sound/pci/ctxfi/cttimer.h b/sound/pci/ctxfi/cttimer.h
new file mode 100644
index 00000000000..97934822929
--- /dev/null
+++ b/sound/pci/ctxfi/cttimer.h
@@ -0,0 +1,29 @@
+/*
+ * Timer handling
+ */
+
+#ifndef __CTTIMER_H
+#define __CTTIMER_H
+
+#include <linux/spinlock.h>
+#include <linux/timer.h>
+#include <linux/list.h>
+
+struct snd_pcm_substream;
+struct ct_atc;
+struct ct_atc_pcm;
+
+struct ct_timer;
+struct ct_timer_instance;
+
+struct ct_timer *ct_timer_new(struct ct_atc *atc);
+void ct_timer_free(struct ct_timer *atimer);
+
+struct ct_timer_instance *
+ct_timer_instance_new(struct ct_timer *atimer, struct ct_atc_pcm *apcm);
+void ct_timer_instance_free(struct ct_timer_instance *ti);
+void ct_timer_start(struct ct_timer_instance *ti);
+void ct_timer_stop(struct ct_timer_instance *ti);
+void ct_timer_prepare(struct ct_timer_instance *ti);
+
+#endif /* __CTTIMER_H */