[Pkg-voip-commits] r2500 - zaptel/trunk/debian/patches
Tzafrir Cohen
tzafrir-guest at costa.debian.org
Sat Oct 7 22:34:30 UTC 2006
Author: tzafrir-guest
Date: 2006-10-07 22:34:30 +0000 (Sat, 07 Oct 2006)
New Revision: 2500
Added:
zaptel/trunk/debian/patches/zaptelh_14.dpatch
Modified:
zaptel/trunk/debian/patches/00list
Log:
zaptelh_14: declare some new zaptel 1.4 interfaces (not implemented
anywhere, though)
Modified: zaptel/trunk/debian/patches/00list
===================================================================
--- zaptel/trunk/debian/patches/00list 2006-10-07 22:32:15 UTC (rev 2499)
+++ zaptel/trunk/debian/patches/00list 2006-10-07 22:34:30 UTC (rev 2500)
@@ -13,3 +13,4 @@
bristuff_local_zaptelh
Makefile_vzaphfc.dpatch
wctellxp.dpatch
+zaptelh_14
Added: zaptel/trunk/debian/patches/zaptelh_14.dpatch
===================================================================
--- zaptel/trunk/debian/patches/zaptelh_14.dpatch (rev 0)
+++ zaptel/trunk/debian/patches/zaptelh_14.dpatch 2006-10-07 22:34:30 UTC (rev 2500)
@@ -0,0 +1,153 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## zaptelh_14.dpatch by Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: New interfaces of zaptel 1.4. This allows building asterisk 1.4
+
+ at DPATCH@
+diff -urNad zaptel-1.2.9.1.dfsg~/zaptel.h zaptel-1.2.9.1.dfsg/zaptel.h
+--- zaptel-1.2.9.1.dfsg~/zaptel.h 2006-10-08 00:15:11.000000000 +0200
++++ zaptel-1.2.9.1.dfsg/zaptel.h 2006-10-08 00:16:47.000000000 +0200
+@@ -115,6 +115,7 @@
+ #define ZT_SIG_DACS (__ZT_SIG_DACS | ZT_SIG_CLEAR) /* Cross connect */
+ #define ZT_SIG_EM_E1 (1 << 17) /* E1 E&M Variation */
+ #define ZT_SIG_DACS_RBS ((1 << 18) | __ZT_SIG_DACS) /* Cross connect w/ RBS */
++#define ZT_SIG_HARDHDLC ((1 << 19) | ZT_SIG_CLEAR)
+
+ /* tone flag values */
+ #define ZT_REVERSE_RXTONE 1 /* reverse polarity rx tone logic */
+@@ -666,6 +667,11 @@
+ */
+ #define ZT_SETPOLARITY _IOW (ZT_CODE, 92, int)
+
++/*
++ * Transcoder operations
++ */
++#define ZT_TRANSCODE_OP _IOWR(ZT_CODE, 93, int)
++
+ /*
+ * Startup or Shutdown a span
+ */
+@@ -690,11 +696,88 @@
+ #define ZT_TONE_STUTTER 10
+ #define ZT_TONE_MAX 16
+
++#define ZT_TONE_DTMF_BASE 64
++
++/*
++ * These must be in the same order as the dtmf_tones array in tones.h
++ */
++enum {
++ ZT_TONE_DTMF_0 = ZT_TONE_DTMF_BASE,
++ ZT_TONE_DTMF_1,
++ ZT_TONE_DTMF_2,
++ ZT_TONE_DTMF_3,
++ ZT_TONE_DTMF_4,
++ ZT_TONE_DTMF_5,
++ ZT_TONE_DTMF_6,
++ ZT_TONE_DTMF_7,
++ ZT_TONE_DTMF_8,
++ ZT_TONE_DTMF_9,
++ ZT_TONE_DTMF_s,
++ ZT_TONE_DTMF_p,
++ ZT_TONE_DTMF_A,
++ ZT_TONE_DTMF_B,
++ ZT_TONE_DTMF_C,
++ ZT_TONE_DTMF_D
++};
++
++#define ZT_TONE_DTMF_MAX ZT_TONE_DTMF_D
++
+ #define ZT_MAX_CADENCE 16
+
+ #define ZT_TONEDETECT_ON (1 << 0) /* Detect tones */
+ #define ZT_TONEDETECT_MUTE (1 << 1) /* Mute audio in received channel */
+
++#define ZT_TRANSCODE_MAGIC 0x74a9c0de
++
++/* Operations */
++#define ZT_TCOP_RESET 1 /* Reset the channel state / codec selection */
++#define ZT_TCOP_TRANSCODE 2 /* Begin transcoding a block */
++#define ZT_TCOP_GETINFO 3 /* Get information (use zt_transcode_info) */
++
++typedef struct zt_transcode_info {
++ unsigned int op;
++ unsigned int tcnum;
++ char name[80];
++ unsigned int srcfmts;
++ unsigned int dstfmts;
++} ZT_TRANSCODE_INFO;
++
++#define ZT_TCCONF_USETS (1 << 0) /* Use/update timestamp field */
++#define ZT_TCCONF_USESEQ (1 << 1) /* Use/update seqno field */
++
++#define ZT_TCSTAT_DSTRDY (1 << 0) /* Destination data is ready */
++#define ZT_TCSTAT_DSTBUSY (1 << 1) /* Destination data is outstanding */
++
++#define __ZT_TRANSCODE_BUFSIZ 16384
++#define ZT_TRANSCODE_HDRLEN 256
++#define ZT_TRANSCODE_BUFSIZ ((__ZT_TRANSCODE_BUFSIZ) - (ZT_TRANSCODE_HDRLEN))
++#define ZT_TRANSCODE_DSTOFFSET (((ZT_TRANSCODE_BUFSIZ) / 2) + ZT_TRANSCODE_HDRLEN)
++#define ZT_TRANSCODE_SRCOFFSET (((ZT_TRANSCODE_BUFSIZ) / 2) + ZT_TRANSCODE_HDRLEN)
++
++typedef struct zt_transcode_header {
++ unsigned int srcfmt; /* See formats.h -- use TCOP_RESET when you change */
++ unsigned int srcoffset; /* In bytes -- written by user */
++ unsigned int srclen; /* In bytes -- written by user */
++ unsigned int srctimestamp; /* In samples -- written by user (only used if ZT_TCCONF_USETS is set) */
++ unsigned int srcseqno; /* In units -- written by user (only used if ZT_TCCONF_USESEQ is set) */
++
++ unsigned int dstfmt; /* See formats.h -- use TCOP_RESET when you change */
++ unsigned int dstoffset; /* In bytes -- written by user */
++ unsigned int dsttimestamp; /* In samples -- read by user */
++ unsigned int dstseqno; /* In units -- read by user (only used if ZT_TCCONF_USESEQ is set) */
++ unsigned int dstlen; /* In bytes -- read by user */
++ unsigned int dstsamples; /* In timestamp units -- read by user */
++
++ unsigned int magic; /* Magic value -- ZT_TRANSCODE_MAGIC, read by user */
++ unsigned int config; /* Read/write by user */
++ unsigned int status; /* Read/write by user */
++
++ /* XXX: fix this to automatically calculate somehow */
++ unsigned char userhdr[ZT_TRANSCODE_HDRLEN - (sizeof(unsigned int) * 14)]; /* Storage for user parameters */
++ unsigned char srcdata[ZT_TRANSCODE_BUFSIZ / 2]; /* Storage of source data */
++ unsigned char dstdata[ZT_TRANSCODE_BUFSIZ / 2]; /* Storage of destination data */
++} ZT_TRANSCODE_HEADER;
++
+ struct zt_ring_cadence {
+ int ringcadence [ZT_MAX_CADENCE];
+ };
+@@ -1360,6 +1443,33 @@
+ #endif
+ };
+
++struct zt_transcoder_channel {
++ void *pvt;
++ struct zt_transcoder *parent;
++ wait_queue_head_t ready;
++ int errorstatus;
++ int offset;
++ unsigned int flags;
++ unsigned int srcfmt;
++ unsigned int dstfmt;
++ struct zt_transcode_header *tch;
++};
++
++#define ZT_TC_FLAG_BUSY (1 << 0)
++#define ZT_TC_FLAG_TRANSIENT (1 << 1)
++
++
++struct zt_transcoder {
++ struct zt_transcoder *next;
++ char name[80];
++ int numchannels;
++ unsigned int srcfmts;
++ unsigned int dstfmts;
++ int (*operation)(struct zt_transcoder_channel *channel, int op);
++ /* Transcoder channels */
++ struct zt_transcoder_channel channels[0];
++};
++
+ #define ZT_WATCHDOG_NOINTS (1 << 0)
+
+ #define ZT_WATCHDOG_INIT 1000
Property changes on: zaptel/trunk/debian/patches/zaptelh_14.dpatch
___________________________________________________________________
Name: svn:executable
+ *
More information about the Pkg-voip-commits
mailing list