[svn-commits] kpfleming: linux/trunk r4628 - in /linux/trunk: ./ drivers/dahdi/ drivers/dah...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jul 29 17:03:53 CDT 2008


Author: kpfleming
Date: Tue Jul 29 17:03:52 2008
New Revision: 4628

URL: http://svn.digium.com/view/dahdi?view=rev&rev=4628
Log:
make an initial split of dahdi/kernel.h into userspace- and kernelspace-specific parts

Added:
    linux/trunk/include/dahdi/fasthdlc.h
      - copied unchanged from r4627, linux/trunk/drivers/dahdi/fasthdlc.h
Removed:
    linux/trunk/drivers/dahdi/fasthdlc.h
Modified:
    linux/trunk/Makefile
    linux/trunk/drivers/dahdi/dahdi-base.c
    linux/trunk/drivers/dahdi/dahdi_dummy.c
    linux/trunk/drivers/dahdi/dahdi_dynamic.c
    linux/trunk/drivers/dahdi/dahdi_dynamic_eth.c
    linux/trunk/drivers/dahdi/dahdi_dynamic_loc.c
    linux/trunk/drivers/dahdi/dahdi_transcode.c
    linux/trunk/drivers/dahdi/pciradio.c
    linux/trunk/drivers/dahdi/tor2.c
    linux/trunk/drivers/dahdi/wcfxo.c
    linux/trunk/drivers/dahdi/wct1xxp.c
    linux/trunk/drivers/dahdi/wct4xxp/base.c
    linux/trunk/drivers/dahdi/wct4xxp/wct4xxp-diag.c
    linux/trunk/drivers/dahdi/wctc4xxp/base.c
    linux/trunk/drivers/dahdi/wctc4xxp/codec_test.c
    linux/trunk/drivers/dahdi/wctdm.c
    linux/trunk/drivers/dahdi/wctdm24xxp/GpakApi.c
    linux/trunk/drivers/dahdi/wctdm24xxp/GpakCust.c
    linux/trunk/drivers/dahdi/wctdm24xxp/base.c
    linux/trunk/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
    linux/trunk/drivers/dahdi/wcte11xp.c
    linux/trunk/drivers/dahdi/wcte12xp/GpakApi.c
    linux/trunk/drivers/dahdi/wcte12xp/base.c
    linux/trunk/drivers/dahdi/wcte12xp/vpmadt032.c
    linux/trunk/include/dahdi/kernel.h
    linux/trunk/include/dahdi/user.h

Modified: linux/trunk/Makefile
URL: http://svn.digium.com/view/dahdi/linux/trunk/Makefile?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/Makefile (original)
+++ linux/trunk/Makefile Tue Jul 29 17:03:52 2008
@@ -120,6 +120,7 @@
 install-include:
 	install -D -m 644 include/dahdi/kernel.h $(DESTDIR)/usr/include/dahdi/kernel.h
 	install -D -m 644 include/dahdi/user.h $(DESTDIR)/usr/include/dahdi/user.h
+	install -D -m 644 include/dahdi/fasthdlc.h $(DESTDIR)/usr/include/dahdi/fasthdlc.h
 # Include any driver-specific header files here
 	install -D -m 644 include/dahdi/wctdm_user.h $(DESTDIR)/usr/include/dahdi/wctdm_user.h
 

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Tue Jul 29 17:03:52 2008
@@ -78,13 +78,10 @@
 
 /* #define BUF_MUNGE */
 
+#include <dahdi/version.h>
 /* Grab fasthdlc with tables */
 #define FAST_HDLC_NEED_TABLES
-#include "fasthdlc.h"
-
-#include <dahdi/version.h>
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 #include "hpec/hpec_user.h"
 
@@ -4751,7 +4748,7 @@
 		return -ENOSYS;
 
 	switch(cmd) {
-	case DAHDI_SIGFREEZE:
+	case DAHDI_SETSIGFREEZE:
 		get_user(j, (int *)data);
 		spin_lock_irqsave(&chan->lock, flags);
 		if (j) {

Modified: linux/trunk/drivers/dahdi/dahdi_dummy.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi_dummy.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_dummy.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_dummy.c Tue Jul 29 17:03:52 2008
@@ -77,7 +77,6 @@
 #include <linux/moduleparam.h>
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 #ifdef USE_HIGHRESTIMER
 #include <linux/hrtimer.h>

Modified: linux/trunk/drivers/dahdi/dahdi_dynamic.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi_dynamic.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_dynamic.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_dynamic.c Tue Jul 29 17:03:52 2008
@@ -36,7 +36,6 @@
 #include <linux/moduleparam.h>
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 /*
  * Tasklets provide better system interactive response at the cost of the
@@ -434,7 +433,7 @@
 	checkmaster();
 }
 
-static struct dahdi_dynamic *find_dynamic(DAHDI_DYNAMIC_SPAN *zds)
+static struct dahdi_dynamic *find_dynamic(struct dahdi_dynamic_span *zds)
 {
 	struct dahdi_dynamic *z;
 	z = dspans;
@@ -460,7 +459,7 @@
 	return ztd;
 }
 
-static int destroy_dynamic(DAHDI_DYNAMIC_SPAN *zds)
+static int destroy_dynamic(struct dahdi_dynamic_span *zds)
 {
 	unsigned long flags;
 	struct dahdi_dynamic *z, *cur, *prev=NULL;
@@ -534,7 +533,7 @@
 	return 0;
 }
 
-static int create_dynamic(DAHDI_DYNAMIC_SPAN *zds)
+static int create_dynamic(struct dahdi_dynamic_span *zds)
 {
 	struct dahdi_dynamic *z;
 	struct dahdi_dynamic_driver *ztd;
@@ -687,7 +686,7 @@
 
 static int ztdynamic_ioctl(unsigned int cmd, unsigned long data)
 {
-	DAHDI_DYNAMIC_SPAN zds;
+	struct dahdi_dynamic_span zds;
 	int res;
 	switch(cmd) {
 	case 0:
@@ -698,7 +697,7 @@
 			ztdynamic_run();
 		return 0;
 	case DAHDI_DYNAMIC_CREATE:
-		if (copy_from_user(&zds, (DAHDI_DYNAMIC_SPAN *)data, sizeof(zds)))
+		if (copy_from_user(&zds, (struct dahdi_dynamic_span *)data, sizeof(zds)))
 			return -EFAULT;
 		if (debug)
 			printk("Dynamic Create\n");
@@ -707,11 +706,11 @@
 			return res;
 		zds.spanno = res;
 		/* Let them know the new span number */
-		if (copy_to_user((DAHDI_DYNAMIC_SPAN *)data, &zds, sizeof(zds)))
+		if (copy_to_user((struct dahdi_dynamic_span *)data, &zds, sizeof(zds)))
 			return -EFAULT;
 		return 0;
 	case DAHDI_DYNAMIC_DESTROY:
-		if (copy_from_user(&zds, (DAHDI_DYNAMIC_SPAN *)data, sizeof(zds)))
+		if (copy_from_user(&zds, (struct dahdi_dynamic_span *)data, sizeof(zds)))
 			return -EFAULT;
 		if (debug)
 			printk("Dynamic Destroy\n");

Modified: linux/trunk/drivers/dahdi/dahdi_dynamic_eth.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi_dynamic_eth.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_dynamic_eth.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_dynamic_eth.c Tue Jul 29 17:03:52 2008
@@ -34,7 +34,6 @@
 #include <linux/notifier.h>
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 #define ETH_P_DAHDI_DETH	0xd00d
 

Modified: linux/trunk/drivers/dahdi/dahdi_dynamic_loc.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi_dynamic_loc.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_dynamic_loc.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_dynamic_loc.c Tue Jul 29 17:03:52 2008
@@ -58,7 +58,6 @@
 #include <linux/notifier.h>
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 #ifdef DEFINE_SPINLOCK
 static DEFINE_SPINLOCK(zlock);

Modified: linux/trunk/drivers/dahdi/dahdi_transcode.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi_transcode.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_transcode.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_transcode.c Tue Jul 29 17:03:52 2008
@@ -39,7 +39,6 @@
 #include <asm/io.h>
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 static int debug = 0;
 static struct dahdi_transcoder *trans;

Modified: linux/trunk/drivers/dahdi/pciradio.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/pciradio.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/pciradio.c (original)
+++ linux/trunk/drivers/dahdi/pciradio.c Tue Jul 29 17:03:52 2008
@@ -55,7 +55,6 @@
 #include <asm/delay.h> 
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 #define RAD_MAX_IFACES 128
 

Modified: linux/trunk/drivers/dahdi/tor2.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/tor2.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/tor2.c (original)
+++ linux/trunk/drivers/dahdi/tor2.c Tue Jul 29 17:03:52 2008
@@ -35,7 +35,6 @@
 #include <linux/moduleparam.h>
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 #define NEED_PCI_IDS
 #include "tor2-hw.h"
 #include "tor2fw.h"

Modified: linux/trunk/drivers/dahdi/wcfxo.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wcfxo.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/wcfxo.c (original)
+++ linux/trunk/drivers/dahdi/wcfxo.c Tue Jul 29 17:03:52 2008
@@ -35,7 +35,6 @@
 #include <linux/moduleparam.h>
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 /* Uncomment to enable tasklet handling in the FXO driver.  Not recommended
    in general, but may improve interactive performance */

Modified: linux/trunk/drivers/dahdi/wct1xxp.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wct1xxp.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/wct1xxp.c (original)
+++ linux/trunk/drivers/dahdi/wct1xxp.c Tue Jul 29 17:03:52 2008
@@ -35,7 +35,6 @@
 #include <linux/moduleparam.h>
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 #define WC_MAX_CARDS	32
 

Modified: linux/trunk/drivers/dahdi/wct4xxp/base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wct4xxp/base.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wct4xxp/base.c Tue Jul 29 17:03:52 2008
@@ -40,7 +40,6 @@
 #include <linux/moduleparam.h>
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 #include "wct4xxp.h"
 #include "vpm450m.h"

Modified: linux/trunk/drivers/dahdi/wct4xxp/wct4xxp-diag.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wct4xxp/wct4xxp-diag.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/wct4xxp/wct4xxp-diag.c (original)
+++ linux/trunk/drivers/dahdi/wct4xxp/wct4xxp-diag.c Tue Jul 29 17:03:52 2008
@@ -6,7 +6,6 @@
 #include <errno.h>
 #include <string.h>
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 #include "wct4xxp.h"
 
 static struct t4_reg_def {

Modified: linux/trunk/drivers/dahdi/wctc4xxp/base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctc4xxp/base.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/wctc4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctc4xxp/base.c Tue Jul 29 17:03:52 2008
@@ -45,7 +45,6 @@
 #include <linux/firmware.h>
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 
 /* #define USE_TEST_HW */

Modified: linux/trunk/drivers/dahdi/wctc4xxp/codec_test.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctc4xxp/codec_test.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/wctc4xxp/codec_test.c (original)
+++ linux/trunk/drivers/dahdi/wctc4xxp/codec_test.c Tue Jul 29 17:03:52 2008
@@ -37,7 +37,6 @@
 #include <unistd.h>
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 #define MAX_CARDS_TO_TEST	6
 #define MAX_CHANNELS_PER_CARD   96

Modified: linux/trunk/drivers/dahdi/wctdm.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctdm.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm.c (original)
+++ linux/trunk/drivers/dahdi/wctdm.c Tue Jul 29 17:03:52 2008
@@ -110,7 +110,6 @@
 };
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 #include <dahdi/wctdm_user.h>
 
 #include "fxo_modes.h"

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/GpakApi.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/GpakApi.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/GpakApi.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/GpakApi.c Tue Jul 29 17:03:52 2008
@@ -37,7 +37,6 @@
 #include <asm/semaphore.h>
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 #include "GpakHpi.h"
 #include "GpakCust.h"

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/GpakCust.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/GpakCust.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/GpakCust.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/GpakCust.c Tue Jul 29 17:03:52 2008
@@ -40,7 +40,6 @@
 #include <asm/semaphore.h>
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 #include "wctdm24xxp.h"
 #include "GpakCust.h"

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Tue Jul 29 17:03:52 2008
@@ -48,7 +48,6 @@
 #include <asm/semaphore.h>
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 #include <dahdi/wctdm_user.h>
 
 #include "proslic.h"

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/wctdm24xxp.h?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/wctdm24xxp.h (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/wctdm24xxp.h Tue Jul 29 17:03:52 2008
@@ -28,7 +28,6 @@
 #define _WCTDM24XXP_H
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 #include "../voicebus.h"
 #include <asm/semaphore.h>

Modified: linux/trunk/drivers/dahdi/wcte11xp.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wcte11xp.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/wcte11xp.c (original)
+++ linux/trunk/drivers/dahdi/wcte11xp.c Tue Jul 29 17:03:52 2008
@@ -35,7 +35,6 @@
 #include <linux/moduleparam.h>
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 /* XXX: fix this */
 #include "wct4xxp/wct4xxp.h"	/* For certain definitions */

Modified: linux/trunk/drivers/dahdi/wcte12xp/GpakApi.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wcte12xp/GpakApi.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/GpakApi.c (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/GpakApi.c Tue Jul 29 17:03:52 2008
@@ -34,7 +34,6 @@
  */
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 #include "GpakHpi.h"
 #include "vpmadt032.h"

Modified: linux/trunk/drivers/dahdi/wcte12xp/base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wcte12xp/base.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/base.c Tue Jul 29 17:03:52 2008
@@ -38,7 +38,6 @@
 #include <linux/moduleparam.h>
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 #include "../wct4xxp/wct4xxp.h"	/* For certain definitions */
 

Modified: linux/trunk/drivers/dahdi/wcte12xp/vpmadt032.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wcte12xp/vpmadt032.c?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/vpmadt032.c (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/vpmadt032.c Tue Jul 29 17:03:52 2008
@@ -35,7 +35,6 @@
 #include <linux/list.h> 
 
 #include <dahdi/kernel.h>
-#include <dahdi/user.h>
 
 #include "voicebus.h"
 

Modified: linux/trunk/include/dahdi/kernel.h
URL: http://svn.digium.com/view/dahdi/linux/trunk/include/dahdi/kernel.h?view=diff&rev=4628&r1=4627&r2=4628
==============================================================================
--- linux/trunk/include/dahdi/kernel.h (original)
+++ linux/trunk/include/dahdi/kernel.h Tue Jul 29 17:03:52 2008
@@ -12,8 +12,7 @@
  *
  * 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.
+ * the Free Software Foundation; either version 2 of the License.
  * 
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -25,10 +24,12 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  */
 
-#ifndef _LINUX_DAHDI_H
-#define _LINUX_DAHDI_H
-
-#ifdef __KERNEL__
+#ifndef _DAHDI_KERNEL_H
+#define _DAHDI_KERNEL_H
+
+#include <dahdi/user.h>
+#include <dahdi/fasthdlc.h>
+
 #include "dahdi_config.h"
 #include <linux/version.h>
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
@@ -46,6 +47,8 @@
 #include <linux/skbuff.h>
 #include <linux/interrupt.h>
 #endif
+
+#include <linux/poll.h>
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
 #define dahdi_pci_module pci_register_driver
@@ -69,77 +72,6 @@
 #define DAHDI_IRQ_SHARED_DISABLED SA_SHIRQ | SA_INTERRUPT
 #endif
 
-#include "ecdis.h"
-#include "fasthdlc.h"
-
-#endif /* __KERNEL__ */
-
-#include <linux/types.h>
-
-#ifndef ELAST
-#define ELAST 500
-#endif
-
-/* Per-span configuration values */
-#define	DAHDI_CONFIG_TXLEVEL	7	/* bits 0-2 are tx level */
-
-/* Line configuration */
-/* These apply to T1 */
-#define DAHDI_CONFIG_D4	 (1 << 4)	
-#define DAHDI_CONFIG_ESF	 (1 << 5)
-#define DAHDI_CONFIG_AMI	 (1 << 6)
-#define DAHDI_CONFIG_B8ZS 	 (1 << 7)
-/* These apply to E1 */
-#define	DAHDI_CONFIG_CCS	 (1 << 8)	/* CCS (ISDN) instead of CAS (Robbed Bit) */
-#define	DAHDI_CONFIG_HDB3	 (1 << 9)	/* HDB3 instead of AMI (line coding) */
-#define	DAHDI_CONFIG_CRC4   (1 << 10)	/* CRC4 framing */
-#define DAHDI_CONFIG_NOTOPEN (1 << 16)
-
-/* Signalling types */
-#define DAHDI_SIG_BROKEN	(1 << 31)	/* The port is broken and/or failed initialization */
-
-#define __DAHDI_SIG_FXO	(1 << 12)	/* Never use directly */
-#define __DAHDI_SIG_FXS	(1 << 13)	/* Never use directly */
-
-#define DAHDI_SIG_NONE		(0)			/* Channel not configured */
-#define DAHDI_SIG_FXSLS	((1 << 0) | __DAHDI_SIG_FXS)	/* FXS, Loopstart */
-#define DAHDI_SIG_FXSGS	((1 << 1) | __DAHDI_SIG_FXS)	/* FXS, Groundstart */
-#define DAHDI_SIG_FXSKS	((1 << 2) | __DAHDI_SIG_FXS)	/* FXS, Kewlstart */
-
-#define DAHDI_SIG_FXOLS	((1 << 3) | __DAHDI_SIG_FXO)	/* FXO, Loopstart */
-#define DAHDI_SIG_FXOGS	((1 << 4) | __DAHDI_SIG_FXO)	/* FXO, Groupstart */
-#define DAHDI_SIG_FXOKS	((1 << 5) | __DAHDI_SIG_FXO)	/* FXO, Kewlstart */
-
-#define DAHDI_SIG_EM	(1 << 6)		/* Ear & Mouth (E&M) */
-
-/* The following are all variations on clear channel */
-
-#define __DAHDI_SIG_DACS	(1 << 16)
-
-#define DAHDI_SIG_CLEAR	(1 << 7)					/* Clear channel */
-#define DAHDI_SIG_HDLCRAW	((1 << 8)  | DAHDI_SIG_CLEAR)	/* Raw unchecked HDLC */
-#define DAHDI_SIG_HDLCFCS	((1 << 9)  | DAHDI_SIG_HDLCRAW)	/* HDLC with FCS calculation */
-#define DAHDI_SIG_HDLCNET	((1 << 10) | DAHDI_SIG_HDLCFCS)	/* HDLC Network */
-#define DAHDI_SIG_SLAVE	(1 << 11) 					/* Slave to another channel */
-#define	DAHDI_SIG_SF	(1 << 14)			/* Single Freq. tone only, no sig bits */
-#define DAHDI_SIG_CAS	(1 << 15)			/* Just get bits */
-#define DAHDI_SIG_DACS	(__DAHDI_SIG_DACS | DAHDI_SIG_CLEAR)	/* Cross connect */
-#define DAHDI_SIG_EM_E1	(1 << 17)			/* E1 E&M Variation */
-#define DAHDI_SIG_DACS_RBS	((1 << 18) | __DAHDI_SIG_DACS)	/* Cross connect w/ RBS */
-#define DAHDI_SIG_HARDHDLC	((1 << 19) | DAHDI_SIG_CLEAR)
-#define DAHDI_SIG_MTP2	((1 << 20) | DAHDI_SIG_HDLCFCS)	/* MTP2 support  Need HDLC bitstuff and FCS calcuation too */
-
-/* tone flag values */
-#define	DAHDI_REVERSE_RXTONE 1  /* reverse polarity rx tone logic */
-#define	DAHDI_REVERSE_TXTONE 2  /* reverse polarity tx tone logic */
-
-#define DAHDI_ABIT			8
-#define DAHDI_BBIT			4
-#define	DAHDI_CBIT			2
-#define	DAHDI_DBIT			1
-
-#define DAHDI_MAJOR	196
-
 /* Default chunk size for conferences and such -- static right now, might make
    variable sometime.  8 samples = 1 ms = most frequent service interval possible
    for a USB device */
@@ -149,1060 +81,9 @@
 #define DAHDI_MAX_CHUNKSIZE 	 DAHDI_CHUNKSIZE
 #define DAHDI_CB_SIZE		 2
 
-#define DAHDI_MAX_BLOCKSIZE 	 8192
-#define DAHDI_DEFAULT_NUM_BUFS	 2
-#define DAHDI_MAX_NUM_BUFS		 32
-#define DAHDI_MAX_BUF_SPACE         32768
-
-#define DAHDI_DEFAULT_BLOCKSIZE 1024
-#define DAHDI_DEFAULT_MTR_MRU	 2048
-
-#define DAHDI_POLICY_IMMEDIATE	 0		/* Start play/record immediately */
-#define DAHDI_POLICY_WHEN_FULL  1		/* Start play/record when buffer is full */
-
-#define	RING_DEBOUNCE_TIME	2000	/* 2000 ms ring debounce time */
-
-#define DAHDI_GET_PARAMS_RETURN_MASTER 0x40000000
-
-typedef struct dahdi_params
-{
-	int channo;		/* Channel number */
-	int spanno;		/* Span itself */
-	int chanpos;		/* Channel number in span */
-	int sigtype;		/* read-only */
-	int sigcap;		/* read-only */
-	int rxisoffhook;	/* read-only */
-	int rxbits;		/* read-only */
-	int txbits;		/* read-only */
-	int txhooksig;		/* read-only */
-	int rxhooksig;		/* read-only */
-	int curlaw;		/* read-only  -- one of DAHDI_LAW_MULAW or DAHDI_LAW_ALAW */
-	int idlebits;		/* read-only  -- What is considered the idle state */
-	char name[40];		/* Name of channel */
-	int prewinktime;
-	int preflashtime;
-	int winktime;
-	int flashtime;
-	int starttime;
-	int rxwinktime;
-	int rxflashtime;
-	int debouncetime;
-	int pulsebreaktime;
-	int pulsemaketime;
-	int pulseaftertime;
-	__u32 chan_alarms;	/* alarms on this channel */
-} DAHDI_PARAMS;
-
-typedef struct dahdi_spaninfo {
-	int	spanno;		/* span number */
-	char	name[20];	/* Name */
-	char	desc[40];	/* Description */
-	int	alarms;		/* alarms status */
-	int	txlevel;	/* what TX level is set to */
-	int	rxlevel;	/* current RX level */
-	int	bpvcount;	/* current BPV count */
-	int	crc4count;	/* current CRC4 error count */
-	int	ebitcount;	/* current E-bit error count */
-	int	fascount;	/* current FAS error count */
-	int	irqmisses;	/* current IRQ misses */
-	int	syncsrc;	/* span # of current sync source, or 0 for free run  */
-	int	numchans;	/* number of configured channels on this span */
-	int	totalchans;	/* total number of channels on the span */
-	int	totalspans;	/* total number of spans in entire system */
-	int	lbo;		/* line build out */
-	int	lineconfig;	/* framing/coding */
-	char 	lboname[40];	/* line build out in text form */
-	char	location[40];	/* span's device location in system */
-	char	manufacturer[40]; /* manufacturer of span's device */
-	char	devicetype[40];	/* span's device type */
-	int	irq;		/* span's device IRQ */
-	int	linecompat;	/* signaling modes possible on this span */
-	char	spantype[6];	/* type of span in text form */
-} DAHDI_SPANINFO;
-
-typedef struct dahdi_maintinfo
-{
-int	spanno;		/* span number 1-2 */
-int	command;	/* command */
-} DAHDI_MAINTINFO;
-
-typedef struct dahdi_confinfo
-{
-int	chan;		/* channel number, 0 for current */
-int	confno;		/* conference number */
-int	confmode;	/* conferencing mode */
-} DAHDI_CONFINFO;
-
-typedef struct dahdi_gains
-{
-int	chan;		/* channel number, 0 for current */
-unsigned char rxgain[256];	/* Receive gain table */
-unsigned char txgain[256];	/* Transmit gain table */
-} DAHDI_GAINS;
-
-typedef struct dahdi_lineconfig
-{
-int span;		/* Which span number (0 to use name) */
-char name[20];	/* Name of span to use */
-int	lbo;		/* line build-outs */
-int	lineconfig;	/* line config parameters (framing, coding) */
-int	sync;		/* what level of sync source we are */
-} DAHDI_LINECONFIG;
-
-typedef struct dahdi_chanconfig
-{
-int	chan;		/* Channel we're applying this to (0 to use name) */
-char	name[40];	/* Name of channel to use */
-int	sigtype;	/* Signal type */
-int	deflaw;		/* Default law (DAHDI_LAW_DEFAULT, DAHDI_LAW_MULAW, or DAHDI_LAW_ALAW) */
-int	master;		/* Master channel if sigtype is DAHDI_SLAVE */
-int	idlebits;	/* Idle bits (if this is a CAS channel) or
-			   channel to monitor (if this is DACS channel) */
-char	netdev_name[16];/* name for the hdlc network device*/
-} DAHDI_CHANCONFIG;
-
-typedef struct dahdi_sfconfig
-{
-int	chan;		/* Channel we're applying this to (0 to use name) */
-char	name[40];	/* Name of channel to use */
-long	rxp1;		/* receive tone det. p1 */
-long	rxp2;		/* receive tone det. p2 */
-long	rxp3;		/* receive tone det. p3 */
-int	txtone;		/* Tx tone factor */
-int	tx_v2;		/* initial v2 value */
-int	tx_v3;		/* initial v3 value */
-int	toneflag;	/* Tone flags */
-} DAHDI_SFCONFIG;
-
-typedef struct dahdi_bufferinfo
-{
-int txbufpolicy;	/* Policy for handling receive buffers */
-int rxbufpolicy;	/* Policy for handling receive buffers */
-int numbufs;		/* How many buffers to use */
-int bufsize;		/* How big each buffer is */
-int readbufs;		/* How many read buffers are full (read-only) */
-int writebufs;		/* How many write buffers are full (read-only) */
-} DAHDI_BUFFERINFO;
-
-typedef struct dahdi_dialparams {
-	int mfv1_tonelen;	/* MF R1 tone length for digits */
-	int dtmf_tonelen;	/* DTMF tone length */
-	int mfr2_tonelen;	/* MF R2 tone length */
-	int reserved[3];	/* Reserved for future expansion -- always set to 0 */
-} DAHDI_DIAL_PARAMS;
-
-typedef struct dahdi_dynamic_span {
-	char driver[20];	/* Which low-level driver to use */
-	char addr[40];		/* Destination address */
-	int numchans;		/* Number of channels */
-	int timing;		/* Timing source preference */
-	int spanno;		/* Span number (filled in by DAHDI) */
-} DAHDI_DYNAMIC_SPAN;
-
-/* Define the max # of outgoing DTMF, MFR1 or MFR2 digits to queue in-kernel */
-#define DAHDI_MAX_DTMF_BUF 256
-
-#define DAHDI_DIAL_OP_APPEND	1
-#define DAHDI_DIAL_OP_REPLACE	2
-#define DAHDI_DIAL_OP_CANCEL	3
-
-#define DAHDI_LAW_DEFAULT	0	/* Default law for span */
-#define DAHDI_LAW_MULAW	1	/* Mu-law */
-#define DAHDI_LAW_ALAW	2	/* A-law */
-
-typedef struct dahdi_dialoperation {
-	int op;
-	char dialstr[DAHDI_MAX_DTMF_BUF];
-} DAHDI_DIAL_OPERATION;
-
-
-typedef struct dahdi_indirect_data
-{
-int	chan;
-int	op;
-void	*data;
-} DAHDI_INDIRECT_DATA;	
-
-struct dahdi_versioninfo {
-	char version[80];
-	char echo_canceller[80];
-};
-
-struct dahdi_hwgain {
-	__s32 newgain;	/* desired gain in dB but x10.  -3.5dB would be -35 */
-	__u32 tx:1;	/* 0=rx; 1=tx */
-};
-
-struct dahdi_attach_echocan {
-	int	chan;		/* Channel we're applying this to */
-	char	echocan[16];	/* Name of echo canceler to attach to this channel
-				   (leave empty to have no echocan attached */
-};
-
-/* ioctl definitions */
-#define DAHDI_CODE	0xDA
-
-/*
- * Get Transfer Block Size.
- */
-#define DAHDI_GET_BLOCKSIZE	_IOR (DAHDI_CODE, 1, int)
-
-/*
- * Set Transfer Block Size.
- */
-#define DAHDI_SET_BLOCKSIZE	_IOW (DAHDI_CODE, 2, int)
-
-/*
- * Flush Buffer(s) and stop I/O
- */
-#define	DAHDI_FLUSH		_IOW (DAHDI_CODE, 3, int)
-
-/*
- * Wait for Write to Finish
- */
-#define	DAHDI_SYNC		_IOW (DAHDI_CODE, 4, int)
-
-/*
- * Get channel parameters
- */
-#define DAHDI_GET_PARAMS		_IOR (DAHDI_CODE, 5, struct dahdi_params)
-
-/*
- * Get channel parameters
- */
-#define DAHDI_SET_PARAMS		_IOW (DAHDI_CODE, 6, struct dahdi_params)
-
-/*
- * Set Hookswitch Status
- */
-#define DAHDI_HOOK		_IOW (DAHDI_CODE, 7, int)
-
-/*
- * Get Signalling Event
- */
-#define DAHDI_GETEVENT		_IOR (DAHDI_CODE, 8, int)
-
-/*
- * Wait for something to happen (IO Mux)
- */
-#define DAHDI_IOMUX		_IOWR (DAHDI_CODE, 9, int)
-
-/*
- * Get Span Status
- */
-#define DAHDI_SPANSTAT		_IOWR (DAHDI_CODE, 10, struct dahdi_spaninfo)
-
-/*
- * Set Maintenance Mode
- */
-#define DAHDI_MAINT		_IOW (DAHDI_CODE, 11, struct dahdi_maintinfo)
-
-/*
- * Get Conference Mode
- */
-#define DAHDI_GETCONF		_IOWR (DAHDI_CODE, 12, struct dahdi_confinfo)
-
-/*
- * Set Conference Mode
- */
-#define DAHDI_SETCONF		_IOWR (DAHDI_CODE, 13, struct dahdi_confinfo)
-
-/*
- * Setup or Remove Conference Link
- */
-#define DAHDI_CONFLINK		_IOW (DAHDI_CODE, 14, struct dahdi_confinfo)
-
-/*
- * Display Conference Diagnostic Information on Console
- */
-#define DAHDI_CONFDIAG		_IOR (DAHDI_CODE, 15, int)
-
-/*
- * Get Channel audio gains
- */
-#define DAHDI_GETGAINS		_IOWR (DAHDI_CODE, 16, struct dahdi_gains)
-
-/*
- * Set Channel audio gains
- */
-#define DAHDI_SETGAINS		_IOWR (DAHDI_CODE, 17, struct dahdi_gains)
-
-/*
- * Set Line (T1) Configurations and start system
- */
-#define	DAHDI_SPANCONFIG		_IOW (DAHDI_CODE, 18, struct dahdi_lineconfig)
-
-/*
- * Set Channel Configuration
- */
-#define	DAHDI_CHANCONFIG		_IOW (DAHDI_CODE, 19, struct dahdi_chanconfig)
-
-/*
- * Set Conference to mute mode
- */
-#define	DAHDI_CONFMUTE		_IOW (DAHDI_CODE, 20, int)
-
-/*
- * Send a particular tone (see DAHDI_TONE_*)
- */
-#define	DAHDI_SENDTONE		_IOW (DAHDI_CODE, 21, int)
-
-/*
- * Set your region for tones (see DAHDI_TONE_ZONE_*)
- */
-#define	DAHDI_SETTONEZONE		_IOW (DAHDI_CODE, 22, int)
-
-/*
- * Retrieve current region for tones (see DAHDI_TONE_ZONE_*)
- */
-#define	DAHDI_GETTONEZONE		_IOR (DAHDI_CODE, 23, int)
-
-/*
- * Master unit only -- set default zone (see DAHDI_TONE_ZONE_*)
- */
-#define	DAHDI_DEFAULTZONE		_IOW (DAHDI_CODE, 24, int)
-
-/*
- * Load a tone zone from a dahdi_tone_def_header, see
- * below...
- */
-#define DAHDI_LOADZONE		_IOW (DAHDI_CODE, 25, struct dahdi_tone_def_header)
-
-/*
- * Free a tone zone 
- */
-#define DAHDI_FREEZONE		_IOW (DAHDI_CODE, 26, int)
-
-/*
- * Set buffer policy 
- */
-#define DAHDI_SET_BUFINFO		_IOW (DAHDI_CODE, 27, struct dahdi_bufferinfo)
-
-/*
- * Get current buffer info
- */
-#define DAHDI_GET_BUFINFO		_IOR (DAHDI_CODE, 28, struct dahdi_bufferinfo)
-
-/*
- * Get dialing parameters
- */
-#define DAHDI_GET_DIALPARAMS	_IOR (DAHDI_CODE, 29, struct dahdi_dialparams)
-
-/*
- * Set dialing parameters
- */
-#define DAHDI_SET_DIALPARAMS	_IOW (DAHDI_CODE, 30, struct dahdi_dialparams)
-
-/*
- * Append, replace, or cancel a dial string
- */
-#define DAHDI_DIAL			_IOW (DAHDI_CODE, 31, struct dahdi_dialoperation)
-
-/*
- * Set a clear channel into audio mode
- */
-#define DAHDI_AUDIOMODE		_IOW (DAHDI_CODE, 32, int)
-
-/*
- * Enable or disable echo cancellation on a channel 
- *
- * For ECHOCANCEL:
- * The number is zero to disable echo cancellation and non-zero
- * to enable echo cancellation.  If the number is between 32
- * and 1024, it will also set the number of taps in the echo canceller
- *
- * For ECHOCANCEL_PARAMS:
- * The structure contains parameters that should be passed to the
- * echo canceler instance for the selected channel.
- */
-#define DAHDI_ECHOCANCEL		_IOW (DAHDI_CODE, 33, int)
-#define DAHDI_ECHOCANCEL_PARAMS	_IOW (DAHDI_CODE, 33, struct dahdi_echocanparams)
-
-/*
- * Return a channel's channel number (useful for the /dev/zap/pseudo type interfaces 
- */
-#define DAHDI_CHANNO		_IOR (DAHDI_CODE, 34, int)
-
-/*
- * Return a flag indicating whether channel is currently dialing
- */
-#define DAHDI_DIALING		_IOR (DAHDI_CODE, 35, int)
-
-/* Numbers 60 to 90 are reserved for private use of low level hardware
-   drivers */
-
-/*
- * Set a clear channel into HDLC w/out FCS checking/calculation mode
- */
-#define DAHDI_HDLCRAWMODE		_IOW (DAHDI_CODE, 36, int)
-
-/*
- * Set a clear channel into HDLC w/ FCS mode
- */
-#define DAHDI_HDLCFCSMODE		_IOW (DAHDI_CODE, 37, int)
-
-/* 
- * Specify a channel on /dev/zap/chan -- must be done before any other ioctl's and is only
- * valid on /dev/zap/chan
- */
-#define DAHDI_SPECIFY		_IOW (DAHDI_CODE, 38, int)
-
-/*
- * Temporarily set the law on a channel to 
- * DAHDI_LAW_DEFAULT, DAHDI_LAW_ALAW, or DAHDI_LAW_MULAW.  Is reset on close.  
- */
-#define DAHDI_SETLAW		_IOW (DAHDI_CODE, 39, int)
-
-/*
- * Temporarily set the channel to operate in linear mode when non-zero
- * or default law if 0
- */
-#define DAHDI_SETLINEAR		_IOW (DAHDI_CODE, 40, int)
-
-/*
- * Set a clear channel into HDLC w/ PPP interface mode
- */
-#define DAHDI_HDLCPPP		_IOW (DAHDI_CODE, 41, int)
-
-/*
- * Set the ring cadence for FXS interfaces
- */
-#define DAHDI_SETCADENCE		_IOW (DAHDI_CODE, 42, struct dahdi_ring_cadence)
-
-/*
- * Set the bits going out for CAS interface
- */
-#define DAHDI_SETTXBITS			_IOW (DAHDI_CODE, 43, int)
-
-
-/*
- * Display Channel Diagnostic Information on Console
- */
-#define DAHDI_CHANDIAG		_IOR (DAHDI_CODE, 44, int) 
-
-/* 
- * Obtain received signalling
- */
-#define DAHDI_GETRXBITS _IOR (DAHDI_CODE, 45, int)
-
-/*
- * Set Channel's SF Tone Configuration
- */
-#define	DAHDI_SFCONFIG		_IOW (DAHDI_CODE, 46, struct dahdi_sfconfig)
-
-/*
- * Set timer expiration (in samples)
- */
-#define DAHDI_TIMERCONFIG	_IOW (DAHDI_CODE, 47, int)
-
-/*
- * Acknowledge timer expiration (number to acknowledge, or -1 for all)
- */
-#define DAHDI_TIMERACK _IOW (DAHDI_CODE, 48, int)
-
-/*
- * Get Conference to mute mode
- */
-#define	DAHDI_GETCONFMUTE		_IOR (DAHDI_CODE, 49, int)
-
-/*
- * Request echo training in some number of ms (with muting in the mean time)
- */
-#define	DAHDI_ECHOTRAIN		_IOW (DAHDI_CODE, 50, int)
-
-/*
- * Set on hook transfer for n number of ms -- implemnted by low level driver
- */
-#define	DAHDI_ONHOOKTRANSFER		_IOW (DAHDI_CODE, 51, int)
-
-/*
- * Queue Ping
- */
-#define DAHDI_TIMERPING _IOW (DAHDI_CODE, 42, int) /* Should be 52, but works */
-
-/*
- * Acknowledge ping
- */
-#define DAHDI_TIMERPONG _IOW (DAHDI_CODE, 53, int)
-
-/*
- * Set/get signalling freeze
- */
-#define DAHDI_SIGFREEZE _IOW (DAHDI_CODE, 54, int)
-#define DAHDI_GETSIGFREEZE _IOR (DAHDI_CODE, 55, int)
-
-/*
- * Do a channel IOCTL from the /dev/zap/ctl interface
- */
-#define DAHDI_INDIRECT _IOWR (DAHDI_CODE, 56, struct dahdi_indirect_data)
-
-
-/*
- * Get the version of DAHDI that is running, and a description
- * of the compiled-in echo canceller (if any)
- */
-#define DAHDI_GETVERSION _IOR(DAHDI_CODE, 57, struct dahdi_versioninfo)
-
-/*
- * Put the channel in loopback mode (receive from the channel is
- * transmitted back on the interface)
- */
-#define DAHDI_LOOPBACK _IOW(DAHDI_CODE, 58, int)
-
-/*
-  Attach the desired echo canceler module (or none) to a channel in an
-  audio-supporting mode, so that when the channel needs an echo canceler
-  that module will be used to supply one.
- */
-#define DAHDI_ATTACH_ECHOCAN _IOW(DAHDI_CODE, 59, struct dahdi_attach_echocan)
-
-
-/*
- *  60-80 are reserved for private drivers
- *  80-85 are reserved for dynamic span stuff
- */
-
-/*
- * Create a dynamic span
- */
-#define DAHDI_DYNAMIC_CREATE	_IOWR (DAHDI_CODE, 80, struct dahdi_dynamic_span)
-
-/* 
- * Destroy a dynamic span 
- */
-#define DAHDI_DYNAMIC_DESTROY	_IOW (DAHDI_CODE, 81, struct dahdi_dynamic_span)
-
-/*
- * Set the HW gain for a device
- */
-#define DAHDI_SET_HWGAIN		_IOW (DAHDI_CODE, 86, struct dahdi_hwgain)
-
-/*
- * Enable tone detection -- implemented by low level driver
- */
-#define DAHDI_TONEDETECT		_IOW (DAHDI_CODE, 91, int)
-
-/*
- * Set polarity -- implemented by individual driver.  0 = forward, 1 = reverse
- */
-#define	DAHDI_SETPOLARITY		_IOW (DAHDI_CODE, 92, int)
-
-/*
- * Transcoder operations
- */
-#define DAHDI_TRANSCODE_OP		_IOWR(DAHDI_CODE, 93, int)
-
-/*
- * VoiceMail Waiting Indication (WMWI) -- implemented by low-level driver.
- * Value: number of waiting messages (hence 0: switch messages off).
- */
-#define DAHDI_VMWI			_IOWR(DAHDI_CODE, 94, int)
-
-/* 
- * Startup or Shutdown a span
- */
-#define DAHDI_STARTUP		_IOW (DAHDI_CODE, 99, int)
-#define DAHDI_SHUTDOWN		_IOW (DAHDI_CODE, 100, int)
-
-#define DAHDI_TONE_ZONE_MAX		128
-
-#define DAHDI_TONE_ZONE_DEFAULT 	-1	/* To restore default */
-
-#define DAHDI_TONE_STOP		-1
-#define DAHDI_TONE_DIALTONE	0
-#define DAHDI_TONE_BUSY		1
-#define DAHDI_TONE_RINGTONE	2
-#define DAHDI_TONE_CONGESTION	3
-#define DAHDI_TONE_CALLWAIT	4
-#define DAHDI_TONE_DIALRECALL	5
-#define DAHDI_TONE_RECORDTONE	6
-#define DAHDI_TONE_INFO		7
-#define DAHDI_TONE_CUST1		8
-#define DAHDI_TONE_CUST2		9
-#define DAHDI_TONE_STUTTER		10
-#define DAHDI_TONE_MAX		16
-
-#define DAHDI_TONE_DTMF_BASE	64
-#define DAHDI_TONE_MFR1_BASE	80
-#define DAHDI_TONE_MFR2_FWD_BASE	96
-#define DAHDI_TONE_MFR2_REV_BASE	112
-
-enum {
-	DAHDI_TONE_DTMF_0 = DAHDI_TONE_DTMF_BASE,
-	DAHDI_TONE_DTMF_1,
-	DAHDI_TONE_DTMF_2,
-	DAHDI_TONE_DTMF_3,
-	DAHDI_TONE_DTMF_4,
-	DAHDI_TONE_DTMF_5,
-	DAHDI_TONE_DTMF_6,
-	DAHDI_TONE_DTMF_7,
-	DAHDI_TONE_DTMF_8,
-	DAHDI_TONE_DTMF_9,
-	DAHDI_TONE_DTMF_s,
-	DAHDI_TONE_DTMF_p,
-	DAHDI_TONE_DTMF_A,
-	DAHDI_TONE_DTMF_B,
-	DAHDI_TONE_DTMF_C,
-	DAHDI_TONE_DTMF_D
-};
-
-#define DAHDI_TONE_DTMF_MAX DAHDI_TONE_DTMF_D
-
-enum {
-	DAHDI_TONE_MFR1_0 = DAHDI_TONE_MFR1_BASE,
-	DAHDI_TONE_MFR1_1,
-	DAHDI_TONE_MFR1_2,
-	DAHDI_TONE_MFR1_3,
-	DAHDI_TONE_MFR1_4,
-	DAHDI_TONE_MFR1_5,
-	DAHDI_TONE_MFR1_6,
-	DAHDI_TONE_MFR1_7,
-	DAHDI_TONE_MFR1_8,
-	DAHDI_TONE_MFR1_9,
-	DAHDI_TONE_MFR1_KP,
-	DAHDI_TONE_MFR1_ST,
-	DAHDI_TONE_MFR1_STP,
-	DAHDI_TONE_MFR1_ST2P,
-	DAHDI_TONE_MFR1_ST3P,
-};
-
-#define DAHDI_TONE_MFR1_MAX DAHDI_TONE_MFR1_ST3P
-
-enum {
-	DAHDI_TONE_MFR2_FWD_1 = DAHDI_TONE_MFR2_FWD_BASE,
-	DAHDI_TONE_MFR2_FWD_2,
-	DAHDI_TONE_MFR2_FWD_3,
-	DAHDI_TONE_MFR2_FWD_4,
-	DAHDI_TONE_MFR2_FWD_5,
-	DAHDI_TONE_MFR2_FWD_6,
-	DAHDI_TONE_MFR2_FWD_7,
-	DAHDI_TONE_MFR2_FWD_8,
-	DAHDI_TONE_MFR2_FWD_9,
-	DAHDI_TONE_MFR2_FWD_10,
-	DAHDI_TONE_MFR2_FWD_11,
-	DAHDI_TONE_MFR2_FWD_12,
-	DAHDI_TONE_MFR2_FWD_13,
-	DAHDI_TONE_MFR2_FWD_14,
-	DAHDI_TONE_MFR2_FWD_15,
-};
-
-#define DAHDI_TONE_MFR2_FWD_MAX DAHDI_TONE_MFR2_FWD_15
-
-enum {
-	DAHDI_TONE_MFR2_REV_1 = DAHDI_TONE_MFR2_REV_BASE,
-	DAHDI_TONE_MFR2_REV_2,
-	DAHDI_TONE_MFR2_REV_3,
-	DAHDI_TONE_MFR2_REV_4,
-	DAHDI_TONE_MFR2_REV_5,
-	DAHDI_TONE_MFR2_REV_6,
-	DAHDI_TONE_MFR2_REV_7,
-	DAHDI_TONE_MFR2_REV_8,
-	DAHDI_TONE_MFR2_REV_9,
-	DAHDI_TONE_MFR2_REV_10,
-	DAHDI_TONE_MFR2_REV_11,
-	DAHDI_TONE_MFR2_REV_12,
-	DAHDI_TONE_MFR2_REV_13,
-	DAHDI_TONE_MFR2_REV_14,
-	DAHDI_TONE_MFR2_REV_15,
-};
-
-#define DAHDI_TONE_MFR2_REV_MAX DAHDI_TONE_MFR2_REV_15
-
-#define DAHDI_MAX_CADENCE		16
-
-#define DAHDI_TONEDETECT_ON	(1 << 0)		/* Detect tones */
-#define DAHDI_TONEDETECT_MUTE	(1 << 1)		/* Mute audio in received channel */
-
-#define DAHDI_TRANSCODE_MAGIC 0x74a9c0de
-
-/* Operations */
-#define DAHDI_TCOP_ALLOCATE	1			/* Allocate/reset DTE channel */
-#define DAHDI_TCOP_TRANSCODE	2			/* Begin transcoding a block */
-#define DAHDI_TCOP_GETINFO		3			/* Get information (use dahdi_transcode_info) */
-#define DAHDI_TCOP_RELEASE         4                       /* Release DTE channel */
-#define DAHDI_TCOP_TEST            5                       /* test DTE device */
-typedef struct dahdi_transcode_info {
-	unsigned int op;
-	unsigned int tcnum;
-	char name[80];
-	int numchannels;
-	unsigned int srcfmts;
-	unsigned int dstfmts;
-} DAHDI_TRANSCODE_INFO;
-
-#define DAHDI_TCCONF_USETS		(1 << 0)		/* Use/update timestamp field */
-#define DAHDI_TCCONF_USESEQ	(1 << 1)		/* Use/update seqno field */
-
-#define DAHDI_TCSTAT_DSTRDY	(1 << 0)		/* Destination data is ready */
-#define DAHDI_TCSTAT_DSTBUSY	(1 << 1)		/* Destination data is outstanding */
-
-#define __DAHDI_TRANSCODE_BUFSIZ	16384
-#define DAHDI_TRANSCODE_HDRLEN	256
-#define DAHDI_TRANSCODE_BUFSIZ	((__DAHDI_TRANSCODE_BUFSIZ) - (DAHDI_TRANSCODE_HDRLEN))

[... 1769 lines stripped ...]



More information about the svn-commits mailing list