summaryrefslogtreecommitdiff
path: root/drivers/dahdi/voicebus/voicebus.h
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2009-04-29 17:48:39 +0000
committerShaun Ruffell <sruffell@digium.com>2009-04-29 17:48:39 +0000
commit0eab8786edae3a7cc06d9f37793aefb712358cd3 (patch)
tree7feb878aab3e215b5c2011374fb84b68326a55bd /drivers/dahdi/voicebus/voicebus.h
parent1b2c87acf7f48bb85c155a026ef20a8f0be21c57 (diff)
voicebus: Move common vpmadt032 interface into voicebus module.
The voicebus library was previously linked into both the wcte12xp and wctdm24xxp drivers. It is now broken out into it's own module and the common parts of the vpmadt032 interface are now located in that module to reduce duplication between the wcte12xp and wctdm24xxp drivers. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6527 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/voicebus/voicebus.h')
-rw-r--r--drivers/dahdi/voicebus/voicebus.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/drivers/dahdi/voicebus/voicebus.h b/drivers/dahdi/voicebus/voicebus.h
new file mode 100644
index 0000000..eaa51e6
--- /dev/null
+++ b/drivers/dahdi/voicebus/voicebus.h
@@ -0,0 +1,61 @@
+/*
+ * VoiceBus(tm) Interface Library.
+ *
+ * Written by Shaun Ruffell <sruffell@digium.com>
+ * and based on previous work by Mark Spencer <markster@digium.com>,
+ * Matthew Fredrickson <creslin@digium.com>, and
+ * Michael Spiceland <mspiceland@digium.com>
+ *
+ * Copyright (C) 2007-2009 Digium, Inc.
+ *
+ * All rights reserved.
+ *
+ */
+
+/*
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2 as published by the
+ * Free Software Foundation. See the LICENSE file included with
+ * this program for more details.
+ */
+
+
+#ifndef __VOICEBUS_H__
+#define __VOICEBUS_H__
+
+struct voicebus;
+
+#define VOICEBUS_DEFAULT_LATENCY 3
+
+void voicebus_setdebuglevel(struct voicebus *vb, u32 level);
+int voicebus_getdebuglevel(struct voicebus *vb);
+struct pci_dev * voicebus_get_pci_dev(struct voicebus *vb);
+int voicebus_init(struct pci_dev* pdev, u32 framesize,
+ const char *board_name,
+ void (*handle_receive)(void *buffer, void *context),
+ void (*handle_transmit)(void *buffer, void *context),
+ void *context,
+ u32 debuglevel,
+ struct voicebus **vb_p);
+void voicebus_get_handlers(struct voicebus *vb, void **handle_receive,
+ void **handle_transmit, void **context);
+void voicebus_set_handlers(struct voicebus *vb,
+ void (*handle_receive)(void *buffer, void *context),
+ void (*handle_transmit)(void *buffer, void *context),
+ void *context);
+void voicebus_release(struct voicebus *vb);
+int voicebus_start(struct voicebus *vb);
+int voicebus_stop(struct voicebus *vb);
+void * voicebus_alloc(struct voicebus* vb);
+void voicebus_free(struct voicebus *vb, void *vbb);
+int voicebus_transmit(struct voicebus *vb, void *vbb);
+int voicebus_set_minlatency(struct voicebus *vb, unsigned int milliseconds);
+int voicebus_current_latency(struct voicebus *vb) ;
+
+#endif /* __VOICEBUS_H__ */