[Pkg-voip-commits] r6111 - in /zaptel/trunk/debian: changelog patches/device_class_2626 patches/headers_2627 patches/series patches/vzaphfc_proc_root_dir patches/wctdm_fix_alarm patches/wcte12xp_flags patches/xpp_fxo_cid_always patches/xpp_fxs_dtmf_leak
tzafrir-guest at alioth.debian.org
tzafrir-guest at alioth.debian.org
Thu Aug 28 18:57:17 UTC 2008
Author: tzafrir-guest
Date: Thu Aug 28 18:57:17 2008
New Revision: 6111
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=6111
Log:
* Patch xpp_fxo_cid_always: do always pass PCM if that's what the user
asked.
* Patch vzaphfc_proc_root_dir: fix vzaphfc on 2.6.26.
* Patch wcte12xp_flags: Proper time for irq save flags.
* Patch headers_2627: Fix location of semaphore.h for 2.6.27 .
* Patch xpp_fxs_dtmf_leak: Don't play DTMFs to the wrong channel.
* Patch wctdm_fix_alarm: Fix sending channel alarms.
* Patch device_class_2626: Fix building 2.6.26 (Closes: #493397).
Added:
zaptel/trunk/debian/patches/device_class_2626
zaptel/trunk/debian/patches/headers_2627
zaptel/trunk/debian/patches/vzaphfc_proc_root_dir
zaptel/trunk/debian/patches/wctdm_fix_alarm
zaptel/trunk/debian/patches/wcte12xp_flags
zaptel/trunk/debian/patches/xpp_fxo_cid_always
zaptel/trunk/debian/patches/xpp_fxs_dtmf_leak
Modified:
zaptel/trunk/debian/changelog
zaptel/trunk/debian/patches/series
Modified: zaptel/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/debian/changelog?rev=6111&op=diff
==============================================================================
--- zaptel/trunk/debian/changelog (original)
+++ zaptel/trunk/debian/changelog Thu Aug 28 18:57:17 2008
@@ -1,9 +1,5 @@
zaptel (1:1.4.11~dfsg-2) UNRELEASED; urgency=low
- [ Mark Purcell ]
- * NOT RELEASED YET
-
- [ Tzafrir Cohen ]
* Patch xpp_fxs_power: Fixed an issue with hook detection of the Astribank
FXS module.
* Don't fail init.d script if fxotune fails. This may happen if running it
@@ -11,6 +7,14 @@
* Add a stanza README.source .
* Bump standards version to 3.8.0.0 .
* Ignore false lintian warning ("m-a a-i" has "a a").
+ * Patch xpp_fxo_cid_always: do always pass PCM if that's what the user
+ asked.
+ * Patch vzaphfc_proc_root_dir: fix vzaphfc on 2.6.26.
+ * Patch wcte12xp_flags: Proper time for irq save flags.
+ * Patch headers_2627: Fix location of semaphore.h for 2.6.27 .
+ * Patch xpp_fxs_dtmf_leak: Don't play DTMFs to the wrong channel.
+ * Patch wctdm_fix_alarm: Fix sending channel alarms.
+ * Patch device_class_2626: Fix building 2.6.26 (Closes: #493397).
-- Tzafrir Cohen <tzafrir.cohen at xorcom.com> Wed, 27 Aug 2008 17:10:18 +0300
Added: zaptel/trunk/debian/patches/device_class_2626
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/debian/patches/device_class_2626?rev=6111&op=file
==============================================================================
--- zaptel/trunk/debian/patches/device_class_2626 (added)
+++ zaptel/trunk/debian/patches/device_class_2626 Thu Aug 28 18:57:17 2008
@@ -1,0 +1,86 @@
+Fix usage of device_class with kernels >= 2.6.26.
+
+Source: svn diff -c 4426 http://svn.digium.com/svn/zaptel/branches/1.4
+* Later fix from rev. 4449
+* Later fixed for kernel 2.6.27 in rev. 4496 from zap-dev.patch in
+ http://bugs.digium.com/13277
+
+--- a/kernel/zaptel-base.c
++++ b/kernel/zaptel-base.c
+@@ -164,12 +164,32 @@ static devfs_handle_t timer;
+ /* udev necessary data structures. Yeah! */
+ #ifdef CONFIG_ZAP_UDEV
+
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
++#define CLASS_DEV_CREATE(class, devt, device, name) \
++ device_create(class, device, devt, NULL, "%s", name)
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++#define CLASS_DEV_CREATE(class, devt, device, name) \
++ device_create(class, device, devt, name)
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
+ #define CLASS_DEV_CREATE(class, devt, device, name) \
+ class_device_create(class, NULL, devt, device, name)
+-#else
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+ #define CLASS_DEV_CREATE(class, devt, device, name) \
+ class_device_create(class, devt, device, name)
++#else
++#define CLASS_DEV_CREATE(class, devt, device, name) \
++ class_simple_device_add(class, devt, device, name)
++#endif
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++#define CLASS_DEV_DESTROY(class, devt) \
++ device_destroy(class, devt)
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
++#define CLASS_DEV_DESTROY(class, devt) \
++ class_device_destroy(class, devt)
++#else
++#define CLASS_DEV_DESTROY(class, devt) \
++ class_simple_device_remove(devt)
+ #endif
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+@@ -178,8 +198,6 @@ static struct class *zap_class = NULL;
+ static struct class_simple *zap_class = NULL;
+ #define class_create class_simple_create
+ #define class_destroy class_simple_destroy
+-#define class_device_create class_simple_device_add
+-#define class_device_destroy(a, b) class_simple_device_remove(b)
+ #endif
+
+ #endif /* CONFIG_ZAP_UDEV */
+@@ -5337,7 +5355,7 @@ int zt_unregister(struct zt_span *span)
+ #ifdef CONFIG_ZAP_UDEV
+ for (x = 0; x < span->channels; x++) {
+ if (span->chans[x].channo < 250)
+- class_device_destroy(zap_class, MKDEV(ZT_MAJOR, span->chans[x].channo));
++ CLASS_DEV_DESTROY(zap_class, MKDEV(ZT_MAJOR, span->chans[x].channo));
+ }
+ #endif /* CONFIG_ZAP_UDEV */
+
+@@ -7825,7 +7843,7 @@ int zt_register_chardev(struct zt_charde
+ int zt_unregister_chardev(struct zt_chardev *dev)
+ {
+ #ifdef CONFIG_ZAP_UDEV
+- class_device_destroy(zap_class, MKDEV(ZT_MAJOR, dev->minor));
++ CLASS_DEV_DESTROY(zap_class, MKDEV(ZT_MAJOR, dev->minor));
+ #endif /* CONFIG_ZAP_UDEV */
+
+ #ifdef CONFIG_DEVFS_FS
+@@ -7904,10 +7922,10 @@ static void __exit zt_cleanup(void) {
+ devfs_unregister_chrdev(ZT_MAJOR, "zaptel");
+ #else
+ #ifdef CONFIG_ZAP_UDEV
+- class_device_destroy(zap_class, MKDEV(ZT_MAJOR, 253)); /* timer */
+- class_device_destroy(zap_class, MKDEV(ZT_MAJOR, 254)); /* channel */
+- class_device_destroy(zap_class, MKDEV(ZT_MAJOR, 255)); /* pseudo */
+- class_device_destroy(zap_class, MKDEV(ZT_MAJOR, 0)); /* ctl */
++ CLASS_DEV_DESTROY(zap_class, MKDEV(ZT_MAJOR, 253)); /* timer */
++ CLASS_DEV_DESTROY(zap_class, MKDEV(ZT_MAJOR, 254)); /* channel */
++ CLASS_DEV_DESTROY(zap_class, MKDEV(ZT_MAJOR, 255)); /* pseudo */
++ CLASS_DEV_DESTROY(zap_class, MKDEV(ZT_MAJOR, 0)); /* ctl */
+ class_destroy(zap_class);
+ #endif /* CONFIG_ZAP_UDEV */
+ unregister_chrdev(ZT_MAJOR, "zaptel");
Added: zaptel/trunk/debian/patches/headers_2627
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/debian/patches/headers_2627?rev=6111&op=file
==============================================================================
--- zaptel/trunk/debian/patches/headers_2627 (added)
+++ zaptel/trunk/debian/patches/headers_2627 Thu Aug 28 18:57:17 2008
@@ -1,0 +1,108 @@
+Fix location of headers for kernel 2.6.27.
+
+Source: svn diff -c 4496 http://svn.digium.com/svn/zaptel/branches/1.4
+Upstream Issue: http://bugs.digium.com/13277
+
+--- a/kernel/xpp/xpd.h
++++ b/kernel/xpp/xpd.h
+@@ -29,8 +29,13 @@
+ #ifdef __KERNEL__
+ #include <linux/kernel.h>
+ #include <linux/device.h>
++#include <linux/version.h>
+ #include <asm/atomic.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++#include <linux/semaphore.h>
++#else
+ #include <asm/semaphore.h>
++#endif
+ #include <linux/moduleparam.h>
+ #ifdef XPP_DEBUGFS
+ #ifndef CONFIG_DEBUG_FS
+--- a/kernel/wctdm24xxp/GpakCust.c
++++ b/kernel/wctdm24xxp/GpakCust.c
+@@ -37,7 +37,11 @@
+
+ #include <linux/version.h>
+ #include <linux/delay.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++#include <linux/semaphore.h>
++#else
+ #include <asm/semaphore.h>
++#endif
+
+ #include "zaptel.h"
+ #include "wctdm24xxp.h"
+--- a/kernel/wctdm24xxp/wctdm24xxp.h
++++ b/kernel/wctdm24xxp/wctdm24xxp.h
+@@ -29,7 +29,12 @@
+
+ #include "../zaptel.h"
+ #include "../voicebus.h"
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++#include <linux/semaphore.h>
++#else
+ #include <asm/semaphore.h>
++#endif
+
+ #define NUM_FXO_REGS 60
+
+--- a/kernel/wctdm24xxp/base.c
++++ b/kernel/wctdm24xxp/base.c
+@@ -44,7 +44,11 @@ Tx Gain - W/Pre-Emphasis: -23.99 to 0.00
+ #include <linux/interrupt.h>
+ #include <linux/workqueue.h>
+ #include <linux/delay.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++#include <linux/semaphore.h>
++#else
+ #include <asm/semaphore.h>
++#endif
+
+ #ifdef LINUX26
+ #include <linux/moduleparam.h>
+--- a/kernel/wctdm24xxp/GpakApi.c
++++ b/kernel/wctdm24xxp/GpakApi.c
+@@ -34,7 +34,11 @@
+ */
+
+ #include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++#include <linux/semaphore.h>
++#else
+ #include <asm/semaphore.h>
++#endif
+
+ #include "zaptel.h"
+
+--- a/kernel/wcte12xp/vpmadt032.c
++++ b/kernel/wcte12xp/vpmadt032.c
+@@ -29,7 +29,12 @@
+ */
+
+ #include <linux/delay.h>
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++#include <linux/semaphore.h>
++#else
+ #include <asm/semaphore.h>
++#endif
+ #include <linux/pci.h>
+ #include <linux/firmware.h>
+ #include <linux/list.h>
+--- a/kernel/wctc4xxp/base.c
++++ b/kernel/wctc4xxp/base.c
+@@ -38,7 +38,12 @@
+ #include <linux/mman.h>
+ #include <linux/delay.h>
+ #include <asm/io.h>
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++#include <linux/semaphore.h>
++#else
+ #include <asm/semaphore.h>
++#endif
+ #include <linux/jiffies.h>
+ #include <linux/workqueue.h>
+ #include <linux/moduleparam.h>
Modified: zaptel/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/debian/patches/series?rev=6111&op=diff
==============================================================================
--- zaptel/trunk/debian/patches/series (original)
+++ zaptel/trunk/debian/patches/series Thu Aug 28 18:57:17 2008
@@ -8,3 +8,10 @@
chan_release_check
florz-vmalloc
xpp_fxs_power
+xpp_fxs_dtmf_leak
+wctdm_fix_alarm
+device_class_2626
+xpp_fxo_cid_always
+headers_2627
+vzaphfc_proc_root_dir
+wcte12xp_flags
Added: zaptel/trunk/debian/patches/vzaphfc_proc_root_dir
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/debian/patches/vzaphfc_proc_root_dir?rev=6111&op=file
==============================================================================
--- zaptel/trunk/debian/patches/vzaphfc_proc_root_dir (added)
+++ zaptel/trunk/debian/patches/vzaphfc_proc_root_dir Thu Aug 28 18:57:17 2008
@@ -1,0 +1,26 @@
+proc_root_driver was defined to NULL before 2.6.26 and removed then.
+It stands for the "root" of procfs. This patch simply replaces that
+symbol with NULL.
+
+Fixes building on 2.6.26.
+
+--- a/kernel/vzaphfc/vzaphfc_main.c
++++ b/kernel/vzaphfc/vzaphfc_main.c
+@@ -1967,7 +1967,7 @@ static int __init hfc_init_module(void)
+ printk(KERN_INFO hfc_DRIVER_PREFIX
+ hfc_DRIVER_STRING " loading\n");
+
+- hfc_proc_zaphfc_dir = proc_mkdir(hfc_DRIVER_NAME, proc_root_driver);
++ hfc_proc_zaphfc_dir = proc_mkdir(hfc_DRIVER_NAME, NULL);
+
+ ret = zap_pci_module(&hfc_driver);
+ return ret;
+@@ -1979,7 +1979,7 @@ static void __exit hfc_module_exit(void)
+ {
+ pci_unregister_driver(&hfc_driver);
+
+- remove_proc_entry(hfc_DRIVER_NAME, proc_root_driver);
++ remove_proc_entry(hfc_DRIVER_NAME, NULL);
+
+ printk(KERN_INFO hfc_DRIVER_PREFIX
+ hfc_DRIVER_STRING " unloaded\n");
Added: zaptel/trunk/debian/patches/wctdm_fix_alarm
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/debian/patches/wctdm_fix_alarm?rev=6111&op=file
==============================================================================
--- zaptel/trunk/debian/patches/wctdm_fix_alarm (added)
+++ zaptel/trunk/debian/patches/wctdm_fix_alarm Thu Aug 28 18:57:17 2008
@@ -1,0 +1,27 @@
+make battery loss to red alarm translation actually work for wctdm and
+wctdm24xxp.
+
+Source: svn diff -c 4429 http://svn.digium.com/svn/zaptel/branches/1.4
+
+--- a/kernel/wctdm.c
++++ b/kernel/wctdm.c
+@@ -928,7 +928,7 @@ static inline void wctdm_voicedaa_check_
+ if (--fxo->battalarm == 0) {
+ /* the alarm timer has expired, so update the battery alarm state
+ for this channel */
+- zt_alarm_channel(&wc->chans[card], fxo->battery ? ZT_ALARM_NONE : ZT_ALARM_RED);
++ zt_alarm_channel(&wc->chans[card], fxo->battery == BATTERY_LOST ? ZT_ALARM_RED : ZT_ALARM_NONE);
+ }
+ }
+
+--- a/kernel/wctdm24xxp/base.c
++++ b/kernel/wctdm24xxp/base.c
+@@ -1306,7 +1306,7 @@ static inline void wctdm_voicedaa_check_
+ if (--fxo->battalarm == 0) {
+ /* the alarm timer has expired, so update the battery alarm state
+ for this channel */
+- zt_alarm_channel(&wc->chans[card], fxo->battery ? ZT_ALARM_NONE : ZT_ALARM_RED);
++ zt_alarm_channel(&wc->chans[card], fxo->battery == BATTERY_LOST ? ZT_ALARM_RED : ZT_ALARM_NONE);
+ }
+ }
+
Added: zaptel/trunk/debian/patches/wcte12xp_flags
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/debian/patches/wcte12xp_flags?rev=6111&op=file
==============================================================================
--- zaptel/trunk/debian/patches/wcte12xp_flags (added)
+++ zaptel/trunk/debian/patches/wcte12xp_flags Thu Aug 28 18:57:17 2008
@@ -1,0 +1,17 @@
+Fixed type of flags parameter to spin_lock_irqsave functions. Fixes
+compilation issues on platforms where int and long do not have the same size.
+
+Source: svn diff -c 4345 http://svn.digium.com/svn/zaptel/branches/1.4
+Upstream issue: http://bugs.digium.com/12787
+
+--- a/kernel/wcte12xp/base.c
++++ b/kernel/wcte12xp/base.c
+@@ -1061,7 +1061,7 @@ static int t1xxp_echocan_with_params(str
+ struct adt_lec_params params;
+ struct t1 *wc = chan->pvt;
+ struct vpm150m *vpm150m = wc->vpm150m;
+- unsigned int flags;
++ unsigned long flags;
+ struct vpm150m_workentry *work;
+ unsigned int ret;
+
Added: zaptel/trunk/debian/patches/xpp_fxo_cid_always
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/debian/patches/xpp_fxo_cid_always?rev=6111&op=file
==============================================================================
--- zaptel/trunk/debian/patches/xpp_fxo_cid_always (added)
+++ zaptel/trunk/debian/patches/xpp_fxo_cid_always Thu Aug 28 18:57:17 2008
@@ -1,0 +1,16 @@
+xpp: fxo: fix caller-id CID_STYLE_PASS_ALWAYS.
+do always pass PCM if that's what the user asked.
+
+Source: svn diff -c 4472 http://svn.digium.com/svn/zaptel/branches/1.4
+
+--- a/kernel/xpp/card_fxo.c
++++ b/kernel/xpp/card_fxo.c
+@@ -466,6 +466,8 @@ static int FXO_card_init(xbus_t *xbus, x
+ priv->polarity[i] = POL_UNKNOWN; /* will be updated on next battery sample */
+ priv->battery[i] = BATTERY_UNKNOWN; /* will be updated on next battery sample */
+ priv->power[i] = POWER_UNKNOWN; /* will be updated on next battery sample */
++ if(caller_id_style == CID_STYLE_PASS_ALWAYS)
++ BIT_SET(xpd->cid_on, i);
+ }
+ XPD_DBG(GENERAL, xpd, "done\n");
+ for_each_line(xpd, i) {
Added: zaptel/trunk/debian/patches/xpp_fxs_dtmf_leak
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/debian/patches/xpp_fxs_dtmf_leak?rev=6111&op=file
==============================================================================
--- zaptel/trunk/debian/patches/xpp_fxs_dtmf_leak (added)
+++ zaptel/trunk/debian/patches/xpp_fxs_dtmf_leak Thu Aug 28 18:57:17 2008
@@ -1,0 +1,56 @@
+Fixes: Muted DTMF PCM (from FXS modules) could "leak" to the next channel.
+(From xpp r5796).
+
+Source: svn diff -c 4353 http://svn.digium.com/svn/zaptel/branches/1.4
+
+--- a/kernel/xpp/xbus-pcm.c
++++ b/kernel/xpp/xbus-pcm.c
+@@ -858,34 +858,36 @@ void generic_card_pcm_tospan(xbus_t *xbu
+ {
+ byte *pcm;
+ xpp_line_t pcm_mask;
++ xpp_line_t pcm_mute;
+ unsigned long flags;
+ int i;
+
+ pcm = RPACKET_FIELD(pack, GLOBAL, PCM_READ, pcm);
+ pcm_mask = RPACKET_FIELD(pack, GLOBAL, PCM_READ, lines);
+ spin_lock_irqsave(&xpd->lock, flags);
++ pcm_mute = xpd->mute_dtmf | xpd->silence_pcm;
+ if(!SPAN_REGISTERED(xpd))
+ goto out;
+ for (i = 0; i < xpd->channels; i++) {
+ volatile u_char *r = xpd->span.chans[i].readchunk;
++ bool got_data = IS_SET(pcm_mask, i);
+
+- if(!IS_SET(xpd->wanted_pcm_mask, i)) {
+- if(IS_SET(xpd->silence_pcm, i)) {
+- memset((u_char *)r, 0x7F, ZT_CHUNKSIZE); // SILENCE
++ if(IS_SET(xpd->wanted_pcm_mask, i)) {
++ /* Must fill zaptel buffers */
++ if(got_data && !IS_SET(pcm_mute, i)) {
++ /* We have and want real data */
++ // memset((u_char *)r, 0x5A, ZT_CHUNKSIZE); // DEBUG
++ // fill_beep((u_char *)r, 1, 1); // DEBUG: BEEP
++ memcpy((u_char *)r, pcm, ZT_CHUNKSIZE);
++ } else {
++ /* Inject SILENCE */
++ memset((u_char *)r, 0x7F, ZT_CHUNKSIZE);
+ memset(xpd->ec_chunk2[i], 0x7F, ZT_CHUNKSIZE);
+ memset(xpd->ec_chunk1[i], 0x7F, ZT_CHUNKSIZE);
+ }
+- continue;
+ }
+- pcm_mask &= ~xpd->mute_dtmf;
+- if(IS_SET(pcm_mask, i)) {
+- // memset((u_char *)r, 0x5A, ZT_CHUNKSIZE); // DEBUG
+- // fill_beep((u_char *)r, 1, 1); // DEBUG: BEEP
+- memcpy((u_char *)r, pcm, ZT_CHUNKSIZE);
++ if(got_data)
+ pcm += ZT_CHUNKSIZE;
+- } else {
+- memset((u_char *)r, 0x7F, ZT_CHUNKSIZE); // SILENCE
+- }
+ }
+ out:
+ XPD_COUNTER(xpd, PCM_READ)++;
More information about the Pkg-voip-commits
mailing list