Bug#317297: marked as done (zaptel-source: ztdummy accuracy improvements on kernel 2.6 (patch))

Debian Bug Tracking System owner at bugs.debian.org
Sat Jul 16 22:33:13 UTC 2005


Your message dated Sat, 16 Jul 2005 17:47:51 -0400
with message-id <E1DtuVj-0002qI-00 at newraff.debian.org>
and subject line Bug#317297: fixed in zaptel 1:1.0.9-4
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 7 Jul 2005 14:05:19 +0000
>From christian at soyuz.spacelabs.nl Thu Jul 07 07:05:17 2005
Return-path: <christian at soyuz.spacelabs.nl>
Received: from pastinakel.tue.nl [131.155.2.7] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DqWzx-0002sT-00; Thu, 07 Jul 2005 07:05:05 -0700
Received: from localhost (localhost [127.0.0.1])
	by pastinakel.tue.nl (Postfix) with ESMTP id 6969C14BEB9;
	Thu,  7 Jul 2005 16:04:54 +0200 (CEST)
Received: from pastinakel.tue.nl ([127.0.0.1])
 by localhost (pastinakel.tue.nl [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 90283-02-11; Thu,  7 Jul 2005 16:04:33 +0200 (CEST)
Received: from soyuz.spacelabs.nl (soyuz.tte.ele.tue.nl [131.155.193.75])
	by pastinakel.tue.nl (Postfix) with ESMTP id CFA3814BE5B;
	Thu,  7 Jul 2005 16:04:14 +0200 (CEST)
Received: from christian by soyuz.spacelabs.nl with local (Exim 3.36 #1 (Debian))
	id 1DqWz8-0008Ib-00; Thu, 07 Jul 2005 16:04:14 +0200
Content-Type: multipart/mixed; boundary="===============1765981715=="
MIME-Version: 1.0
From: Christian Luijten <christian at luijten.org>
To: Debian Bug Tracking System <submit at bugs.debian.org>
Subject: zaptel-source: ztdummy accuracy improvements on kernel 2.6 (patch)
X-Mailer: reportbug 3.15
Date: Thu, 07 Jul 2005 16:04:14 +0200
Message-Id: <E1DqWz8-0008Ib-00 at soyuz.spacelabs.nl>
Sender: Christian Luijten <christian at soyuz.spacelabs.nl>
X-Virus-Scanned: amavisd-new at tue.nl
Delivered-To: submit at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

This is a multi-part MIME message sent by reportbug.

--===============1765981715==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: zaptel-source
Version: 1:1.0.9-2
Severity: normal
Tags: patch

Following http://bugs.digium.com/view.php?id=4301 this patch gravely
improves the accuracy of the ztdummy driver (and thus resolves many
delay-issues).

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.11-1-686
Locale: LANG=C, LC_CTYPE=nl_NL.utf8 (charmap=UTF-8)

Versions of packages zaptel-source depends on:
ii  bzip2                         1.0.2-7    high-quality block-sorting file co
ii  debhelper                     4.9.3      helper programs for debian/rules
ii  dpatch                        2.0.13     patch maintenance system for Debia
ii  module-assistant              0.9.3      tool to make module package creati

Versions of packages zaptel-source recommends:
pn  zaptel                        <none>     (no description available)

-- no debconf information

--===============1765981715==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="ztdummy.patch"

Index: ztdummy.c
===================================================================
RCS file: /usr/cvsroot/zaptel/ztdummy.c,v
retrieving revision 1.4.2.4
diff -u -r1.4.2.4 ztdummy.c
--- ztdummy.c	21 Jan 2005 05:05:18 -0000	1.4.2.4
+++ ztdummy.c	21 May 2005 21:53:28 -0000
@@ -6,6 +6,7 @@
  * Written by Robert Pleh <robert.pleh at hermes.si>
  * 2.6 version by Tony Hoyle
  * Unified by Mark Spencer <markster at digium.com>
+ * Converted to use RTC on i386 by Tony Mountifield <tony at softins.co.uk>
  *
  * Copyright (C) 2002, Hermes Softlab
  * Copyright (C) 2004, Digium, Inc.
@@ -38,6 +39,15 @@
 #  error "This kernel is too old: not supported by this file"
 #endif
 
+/*
+ * NOTE: (only applies to kernel 2.6)
+ * If using an i386 architecture without a PC real-time clock,
+ * the #define USE_RTC should be commented out.
+ */
+#if defined(__i386__)
+#define USE_RTC
+#endif
+
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/module.h>
@@ -54,6 +64,9 @@
 #include <asm/io.h>
 #endif
 #ifdef LINUX26
+#ifdef USE_RTC
+#include <linux/rtc.h>
+#endif
 #include <linux/moduleparam.h>
 #endif
 #include "ztdummy.h"
@@ -77,8 +90,10 @@
 static int debug = 0;
 
 #ifdef LINUX26
+#ifndef USE_RTC
 /* New 2.6 kernel timer stuff */
 static struct timer_list timer;
+#endif
 #else
 #if LINUX_VERSION_CODE < VERSION_CODE(2,4,5)
 #  error "This kernel is too old: not supported by this file"
@@ -103,6 +118,28 @@
 
 
 #ifdef LINUX26
+#ifdef USE_RTC
+/* rtc_interrupt - called at 1024Hz from hook in RTC handler */
+static void rtc_interrupt(void *private_data)
+{
+	struct ztdummy *ztd = private_data;
+	unsigned int ticks;
+
+	atomic_inc(&ztd->ticks);
+	ticks = atomic_read(&ztd->ticks);
+	if (ticks == 42 || ticks == 85) {
+		/* skip it */
+	} else if (ticks >= 128) {
+		/* skip and restart count */
+		atomic_set(&ztd->ticks, 0);
+	} else {
+		/* zaptel timing - called in 125 of every 128 interrupts = 1000Hz */
+		zt_receive(&ztd->span);
+		zt_transmit(&ztd->span);
+	}
+}
+#else
+/* use kernel system tick timer if PC architecture RTC is not available */
 static void ztdummy_timer(unsigned long param)
 {
     zt_receive(&ztd->span);
@@ -110,6 +147,7 @@
     timer.expires = jiffies + 1;
     add_timer(&timer);
 }
+#endif
 #else
 static void ztdummy_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
@@ -150,7 +188,11 @@
 
 int init_module(void)
 {
-#ifndef LINUX26
+#ifdef LINUX26
+#ifdef USE_RTC
+    int err;
+#endif
+#else
     int irq;
     spinlock_t mylock = SPIN_LOCK_UNLOCKED;
 	
@@ -180,10 +222,25 @@
     }
 
 #ifdef LINUX26
+#ifdef USE_RTC
+    atomic_set(&ztd->ticks, 0);
+    ztd->rtc_task.func = rtc_interrupt;
+    ztd->rtc_task.private_data = ztd;
+    err = rtc_register(&ztd->rtc_task);
+    if (err < 0) {
+	printk("ztdummy: Unable to register zaptel rtc driver\n");
+        zt_unregister(&ztd->span);
+	kfree(ztd);
+	return err;
+    }
+    rtc_control(&ztd->rtc_task, RTC_IRQP_SET, 1024);	/* 1024 Hz */
+    rtc_control(&ztd->rtc_task, RTC_PIE_ON, 0);
+#else
     init_timer(&timer);
     timer.function = ztdummy_timer;
     timer.expires = jiffies + 1;
     add_timer(&timer);
+#endif
 #else
     irq=s->irq;
     spin_lock_irq(&mylock);
@@ -214,7 +271,12 @@
 void cleanup_module(void)
 {
 #ifdef LINUX26
+#ifdef USE_RTC
+    rtc_control(&ztd->rtc_task, RTC_PIE_OFF, 0);
+    rtc_unregister(&ztd->rtc_task);
+#else
     del_timer(&timer);
+#endif
 #else
     free_irq(s->irq, ztd);  /* disable interrupts */
 #endif
Index: ztdummy.h
===================================================================
RCS file: /usr/cvsroot/zaptel/ztdummy.h,v
retrieving revision 1.2
diff -u -r1.2 ztdummy.h
--- ztdummy.h	24 Feb 2003 06:00:31 -0000	1.2
+++ ztdummy.h	21 May 2005 21:53:28 -0000
@@ -32,9 +32,16 @@
 struct ztdummy {
 	struct zt_span span;
 	struct zt_chan chan;
+#ifdef LINUX26
+#ifdef USE_RTC
+	atomic_t ticks;
+	rtc_task_t rtc_task;
+#endif
+#endif
 };
 
 
+#ifndef LINUX26
 /* Uhci definitions and structures - from file usb-uhci.h */
 #define TD_CTRL_IOC		(1 << 24)	/* Interrupt on Complete */
 #define USBSTS 2
@@ -141,3 +148,4 @@
 	struct pci_pool *desc_pool;
 	long last_error_time;          // last error output in uhci_interrupt()
 } uhci_t, *puhci_t;
+#endif

--===============1765981715==--

---------------------------------------
Received: (at 317297-close) by bugs.debian.org; 16 Jul 2005 21:53:09 +0000
>From katie at ftp-master.debian.org Sat Jul 16 14:53:09 2005
Return-path: <katie at ftp-master.debian.org>
Received: from newraff.debian.org [208.185.25.31] (mail)
	by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
	id 1Dtuaq-000815-00; Sat, 16 Jul 2005 14:53:08 -0700
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1DtuVj-0002qI-00; Sat, 16 Jul 2005 17:47:51 -0400
From: Mark Purcell <msp at debian.org>
To: 317297-close at bugs.debian.org
X-Katie: $Revision: 1.56 $
Subject: Bug#317297: fixed in zaptel 1:1.0.9-4
Message-Id: <E1DtuVj-0002qI-00 at newraff.debian.org>
Sender: Archive Administrator <katie at ftp-master.debian.org>
Date: Sat, 16 Jul 2005 17:47:51 -0400
Delivered-To: 317297-close at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02

Source: zaptel
Source-Version: 1:1.0.9-4

We believe that the bug you reported is fixed in the latest version of
zaptel, which is due to be installed in the Debian FTP archive:

libtonezone-dev_1.0.9-4_i386.deb
  to pool/main/z/zaptel/libtonezone-dev_1.0.9-4_i386.deb
libtonezone1_1.0.9-4_i386.deb
  to pool/main/z/zaptel/libtonezone1_1.0.9-4_i386.deb
zaptel-source_1.0.9-4_all.deb
  to pool/main/z/zaptel/zaptel-source_1.0.9-4_all.deb
zaptel_1.0.9-4.diff.gz
  to pool/main/z/zaptel/zaptel_1.0.9-4.diff.gz
zaptel_1.0.9-4.dsc
  to pool/main/z/zaptel/zaptel_1.0.9-4.dsc
zaptel_1.0.9-4_i386.deb
  to pool/main/z/zaptel/zaptel_1.0.9-4_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 317297 at bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mark Purcell <msp at debian.org> (supplier of updated zaptel package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster at debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 17 Jul 2005 07:11:27 +1000
Source: zaptel
Binary: libtonezone1 zaptel-source zaptel libtonezone-dev
Architecture: source all i386
Version: 1:1.0.9-4
Distribution: unstable
Urgency: low
Maintainer: Debian VoIP Team <pkg-voip-maintainers at lists.alioth.debian.org>
Changed-By: Mark Purcell <msp at debian.org>
Description: 
 libtonezone-dev - tonezone library (development)
 libtonezone1 - tonezone library (runtime)
 zaptel     - zapata telephony utilities
 zaptel-source - Zapata telephony interface (source code for kernel driver)
Closes: 317297 318575
Changes: 
 zaptel (1:1.0.9-4) unstable; urgency=low
 .
   Santiago Ruano Rincon:
   * Man pages are builded from sgml's using docbook-utils
     Deleted the *.8 files
   * Closes: #317297: Applied a patch to improve the ztdummy
     accuracy on kernel 2.6
 .
   Mark Purcell:
   * Reinstate debian/zaptel.install
     - Closes: #318575: this package does not install ztcfg, ztmonitor,
     ztspeed, zttest, zttool.
Files: 
 eee5926bd9f00744341d9b3ec0625185 906 comm optional zaptel_1.0.9-4.dsc
 b82977a5f101cc103c160ac5227b9b7f 91378 comm optional zaptel_1.0.9-4.diff.gz
 4c19537fef3bcc871766e400f66bb2a9 272266 comm optional zaptel-source_1.0.9-4_all.deb
 df923d3cdb954513d2cd59053c6eb94f 40594 comm optional zaptel_1.0.9-4_i386.deb
 09c8f599c8bc6885dabd961753e3540a 13244 libs optional libtonezone1_1.0.9-4_i386.deb
 1954c667aeab815efad167e86e3a0ea4 14224 libdevel optional libtonezone-dev_1.0.9-4_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC2XtYoCzanz0IthIRAvY/AKCAzal+FGQfMzOILPwwdxWqD1ttEgCdGpk6
Q8GBrRJFynzQpH1JXM2Shhg=
=r30P
-----END PGP SIGNATURE-----




More information about the Pkg-voip-maintainers mailing list