summaryrefslogtreecommitdiff
path: root/voicebus.h
diff options
context:
space:
mode:
authorsruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-04-03 21:37:11 +0000
committersruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-04-03 21:37:11 +0000
commit58853d266e3a76137b4f0da3d91c627ef6b7c94e (patch)
tree6e1b5837ef7a8bd6a9666fb5f0225d96f7d5d22b /voicebus.h
parentb88dcb40c9342fa0307e9c8d020db3fbba699c62 (diff)
svn merge -c4096 https://origsvn.digium.com/svn/zaptel/branches/1.4/kernel/wctdm24xxp wctdm24xxp
svn merge -c4096 https://origsvn.digium.com/svn/zaptel/branches/1.4/kernel/wcte12xp wcte12xp svn cp https://origsvn.digium.com/svn/zaptel/branches/1.4/kernel/voicebus.c . svn cp https://origsvn.digium.com/svn/zaptel/branches/1.4/kernel/voicebus.h . svn cp https://origsvn.digium.com/svn/zaptel/branches/1.4/kernel/fxo_modes.h . git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@4129 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'voicebus.h')
-rw-r--r--voicebus.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/voicebus.h b/voicebus.h
new file mode 100644
index 0000000..c37b2b8
--- /dev/null
+++ b/voicebus.h
@@ -0,0 +1,53 @@
+/*
+ * 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-2008 Digium, Inc.
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+#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,
+ struct voicebus **vb_p);
+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__ */