[svn-commits] mattf: branch 1.4 r4300 - in /branches/1.4: build_tools/ kernel/ kernel/xpp/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri May 16 16:35:07 CDT 2008
Author: mattf
Date: Fri May 16 16:35:06 2008
New Revision: 4300
URL: http://svn.digium.com/view/zaptel?view=rev&rev=4300
Log:
Changed all code instances of ZAPTEL to DAHDI
Modified:
branches/1.4/build_tools/make_version_h
branches/1.4/kernel/xpp/xbus-pcm.c
branches/1.4/kernel/xpp/xbus-pcm.h
branches/1.4/kernel/xpp/xpp_zap.c
branches/1.4/kernel/zaptel-base.c
branches/1.4/kernel/zaptel.h
branches/1.4/kernel/zconfig.h
branches/1.4/kernel/ztdummy.c
Modified: branches/1.4/build_tools/make_version_h
URL: http://svn.digium.com/view/zaptel/branches/1.4/build_tools/make_version_h?view=diff&rev=4300&r1=4299&r2=4300
==============================================================================
--- branches/1.4/build_tools/make_version_h (original)
+++ branches/1.4/build_tools/make_version_h Fri May 16 16:35:06 2008
@@ -4,6 +4,6 @@
* version.h
* Automatically generated
*/
-#define ZAPTEL_VERSION "${ZAPTELVERSION}"
+#define DAHDI_VERSION "${DAHDIVERSION}"
END
Modified: branches/1.4/kernel/xpp/xbus-pcm.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/xpp/xbus-pcm.c?view=diff&rev=4300&r1=4299&r2=4300
==============================================================================
--- branches/1.4/kernel/xpp/xbus-pcm.c (original)
+++ branches/1.4/kernel/xpp/xbus-pcm.c Fri May 16 16:35:06 2008
@@ -76,7 +76,7 @@
#define SYNC_ADJ_QUICK 1000
#define SYNC_ADJ_SLOW 10000
-#ifdef ZAPTEL_SYNC_TICK
+#ifdef DAHDI_SYNC_TICK
static unsigned int zaptel_tick_count = 0;
#endif
@@ -431,7 +431,7 @@
xpp_ticker_step(&global_ticks_series, &now);
}
-#ifdef ZAPTEL_SYNC_TICK
+#ifdef DAHDI_SYNC_TICK
int zaptel_sync_tick(struct zt_span *span, int is_master)
{
xpd_t *xpd = span->pvt;
@@ -454,7 +454,7 @@
xpd->xbus->busname);
}
if((rate_limit % 5003) == 0)
- XPD_NOTICE(xpd, "Zaptel master: ignore ZAPTEL sync\n");
+ XPD_NOTICE(xpd, "Zaptel master: ignore DAHDI sync\n");
rate_limit++;
goto noop;
}
@@ -464,7 +464,7 @@
if((rate_limit++ % 5003) == 0)
XBUS_DBG(SYNC, syncer,
- "Already a syncer, ignore ZAPTEL sync\n");
+ "Already a syncer, ignore DAHDI sync\n");
goto noop;
}
/* ignore duplicate calls from all our registered spans */
@@ -489,11 +489,11 @@
/*
* called from elect_syncer()
* if new_syncer is NULL, than we move all to SYNC_MODE_PLL
- * for ZAPTEL sync.
+ * for DAHDI sync.
*/
static void update_sync_master(xbus_t *new_syncer)
{
- const char *msg = (force_zaptel_sync) ? "ZAPTEL" : "NO-SYNC";
+ const char *msg = (force_zaptel_sync) ? "DAHDI" : "NO-SYNC";
int i;
unsigned long flags;
@@ -1131,17 +1131,17 @@
do_gettimeofday(&now);
len += sprintf(page + len, "# To modify sync source write into this file:\n");
- len += sprintf(page + len, "# ZAPTEL - Another zaptel device provide sync\n");
+ len += sprintf(page + len, "# DAHDI - Another zaptel device provide sync\n");
len += sprintf(page + len, "# SYNC=nn - XBUS-nn provide sync\n");
len += sprintf(page + len, "# QUERY=nn - Query XBUS-nn for sync information (DEBUG)\n");
if(!syncer) {
if(force_zaptel_sync)
- len += sprintf(page + len, "ZAPTEL\n");
+ len += sprintf(page + len, "DAHDI\n");
else
len += sprintf(page + len, "NO-SYNC\n");
} else
len += sprintf(page + len, "SYNC=%02d\n", syncer->num);
-#ifdef ZAPTEL_SYNC_TICK
+#ifdef DAHDI_SYNC_TICK
if(force_zaptel_sync) {
len += sprintf(page + len,
"Zaptel Reference Sync (%d registered spans):\n",
@@ -1185,8 +1185,8 @@
if(copy_from_user(buf, buffer, count))
return -EFAULT;
buf[count] = '\0';
- if(strncmp("ZAPTEL", buf, 6) == 0) {
- DBG(SYNC, "ZAPTEL\n");
+ if(strncmp("DAHDI", buf, 6) == 0) {
+ DBG(SYNC, "DAHDI\n");
force_zaptel_sync=1;
update_sync_master(NULL);
} else if(sscanf(buf, "SYNC=%d", &xbus_num) == 1) {
@@ -1254,10 +1254,10 @@
INFO("FEATURE: with XPP_EC_CHUNK\n");
else
INFO("FEATURE: without XPP_EC_CHUNK\n");
-#ifdef ZAPTEL_SYNC_TICK
- INFO("FEATURE: with sync_tick() from ZAPTEL\n");
+#ifdef DAHDI_SYNC_TICK
+ INFO("FEATURE: with sync_tick() from DAHDI\n");
#else
- INFO("FEATURE: without sync_tick() from ZAPTEL\n");
+ INFO("FEATURE: without sync_tick() from DAHDI\n");
#endif
xpp_ticker_init(&global_ticks_series);
xpp_ticker_init(&zaptel_ticker);
@@ -1289,7 +1289,7 @@
EXPORT_SYMBOL(got_new_syncer);
EXPORT_SYMBOL(elect_syncer);
EXPORT_SYMBOL(xpp_echocan);
-#ifdef ZAPTEL_SYNC_TICK
+#ifdef DAHDI_SYNC_TICK
EXPORT_SYMBOL(zaptel_sync_tick);
#endif
EXPORT_SYMBOL(__pcm_recompute);
Modified: branches/1.4/kernel/xpp/xbus-pcm.h
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/xpp/xbus-pcm.h?view=diff&rev=4300&r1=4299&r2=4300
==============================================================================
--- branches/1.4/kernel/xpp/xbus-pcm.h (original)
+++ branches/1.4/kernel/xpp/xbus-pcm.h Fri May 16 16:35:06 2008
@@ -113,7 +113,7 @@
void xbus_reset_counters(xbus_t *xbus);
void elect_syncer(const char *msg);
int xpp_echocan(struct zt_chan *chan, int len);
-#ifdef ZAPTEL_SYNC_TICK
+#ifdef DAHDI_SYNC_TICK
int zaptel_sync_tick(struct zt_span *span, int is_master);
#endif
Modified: branches/1.4/kernel/xpp/xpp_zap.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/xpp/xpp_zap.c?view=diff&rev=4300&r1=4299&r2=4300
==============================================================================
--- branches/1.4/kernel/xpp/xpp_zap.c (original)
+++ branches/1.4/kernel/xpp/xpp_zap.c Fri May 16 16:35:06 2008
@@ -828,7 +828,7 @@
return ret;
}
-#ifdef CONFIG_ZAPTEL_WATCHDOG
+#ifdef CONFIG_DAHDI_WATCHDOG
/*
* If the watchdog detects no received data, it will call the
* watchdog routine
@@ -952,12 +952,12 @@
*/
span->irq = 0;
#endif
-#ifdef ZAPTEL_SYNC_TICK
+#ifdef DAHDI_SYNC_TICK
span->sync_tick = zaptel_sync_tick;
#endif
if (xpp_ec)
span->echocan = xpp_echocan;
-#ifdef CONFIG_ZAPTEL_WATCHDOG
+#ifdef CONFIG_DAHDI_WATCHDOG
span->watchdog = xpp_watchdog;
#endif
Modified: branches/1.4/kernel/zaptel-base.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/zaptel-base.c?view=diff&rev=4300&r1=4299&r2=4300
==============================================================================
--- branches/1.4/kernel/zaptel-base.c (original)
+++ branches/1.4/kernel/zaptel-base.c Fri May 16 16:35:06 2008
@@ -87,7 +87,7 @@
/* Get helper arithmetic */
#include "arith.h"
-#if defined(CONFIG_ZAPTEL_MMX) || defined(ECHO_CAN_FP)
+#if defined(CONFIG_DAHDI_MMX) || defined(ECHO_CAN_FP)
#include <asm/i387.h>
#endif
@@ -316,7 +316,7 @@
static int zt_chan_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long data, int unit);
-#if defined(CONFIG_ZAPTEL_MMX) || defined(ECHO_CAN_FP)
+#if defined(CONFIG_DAHDI_MMX) || defined(ECHO_CAN_FP)
/* XXX kernel_fpu_begin() is NOT exported properly (in 2.4), so we have to make
a local version. Somebody fix this! XXX */
@@ -3998,7 +3998,7 @@
struct zt_versioninfo vi;
memset(&vi, 0, sizeof(vi));
- zap_copy_string(vi.version, ZAPTEL_VERSION, sizeof(vi.version));
+ zap_copy_string(vi.version, DAHDI_VERSION, sizeof(vi.version));
echo_can_identify(vi.echo_canceller, sizeof(vi.echo_canceller) - 1);
if (copy_to_user((struct zt_versioninfo *) data, &vi, sizeof(vi)))
return -EFAULT;
@@ -6296,7 +6296,7 @@
/* Perform echo cancellation on a chunk if necessary */
if (ss->ec) {
-#if defined(CONFIG_ZAPTEL_MMX) || defined(ECHO_CAN_FP)
+#if defined(CONFIG_DAHDI_MMX) || defined(ECHO_CAN_FP)
zt_kernel_fpu_begin();
#endif
if (ss->echostate & __ECHO_STATE_MUTE) {
@@ -6343,7 +6343,7 @@
rxchunk[x] = ZT_LIN2X((int) rxlins[x], ss);
#endif /* defined(ZT_EC_ARRAY_UPDATE) */
}
-#if defined(CONFIG_ZAPTEL_MMX) || defined(ECHO_CAN_FP)
+#if defined(CONFIG_DAHDI_MMX) || defined(ECHO_CAN_FP)
kernel_fpu_end();
#endif
}
@@ -7241,11 +7241,11 @@
__zt_getbuf_chunk(chan, buf);
if ((chan->flags & ZT_FLAG_AUDIO) || (chan->confmode)) {
-#ifdef CONFIG_ZAPTEL_MMX
+#ifdef CONFIG_DAHDI_MMX
zt_kernel_fpu_begin();
#endif
__zt_process_getaudio_chunk(chan, buf);
-#ifdef CONFIG_ZAPTEL_MMX
+#ifdef CONFIG_DAHDI_MMX
kernel_fpu_end();
#endif
}
@@ -7326,11 +7326,11 @@
buf = waste;
}
if ((chan->flags & ZT_FLAG_AUDIO) || (chan->confmode)) {
-#ifdef CONFIG_ZAPTEL_MMX
+#ifdef CONFIG_DAHDI_MMX
zt_kernel_fpu_begin();
#endif
__zt_process_putaudio_chunk(chan, buf);
-#ifdef CONFIG_ZAPTEL_MMX
+#ifdef CONFIG_DAHDI_MMX
kernel_fpu_end();
#endif
}
@@ -7429,7 +7429,7 @@
unsigned long flags, flagso;
#if 1
-#ifdef CONFIG_ZAPTEL_WATCHDOG
+#ifdef CONFIG_DAHDI_WATCHDOG
span->watchcounter--;
#endif
for (x=0;x<span->channels;x++) {
@@ -7537,7 +7537,7 @@
}
}
if (maxlinks) {
-#ifdef CONFIG_ZAPTEL_MMX
+#ifdef CONFIG_DAHDI_MMX
zt_kernel_fpu_begin();
#endif
/* process all the conf links */
@@ -7548,7 +7548,7 @@
ACSS(conf_sums[z], conf_sums[y]);
}
}
-#ifdef CONFIG_ZAPTEL_MMX
+#ifdef CONFIG_DAHDI_MMX
kernel_fpu_end();
#endif
}
@@ -7573,7 +7573,7 @@
spin_unlock_irqrestore(&chans[x]->lock, flags);
}
}
-#ifdef ZAPTEL_SYNC_TICK
+#ifdef DAHDI_SYNC_TICK
for (x=0;x<maxspans;x++) {
struct zt_span *s = spans[x];
@@ -7593,7 +7593,7 @@
MODULE_LICENSE("GPL");
#endif
#ifdef MODULE_VERSION
-MODULE_VERSION(ZAPTEL_VERSION);
+MODULE_VERSION(DAHDI_VERSION);
#endif
#ifdef LINUX26
@@ -7619,7 +7619,7 @@
fasync: NULL,
};
-#ifdef CONFIG_ZAPTEL_WATCHDOG
+#ifdef CONFIG_DAHDI_WATCHDOG
static struct timer_list watchdogtimer;
static void watchdog_check(unsigned long ignored)
@@ -7748,13 +7748,13 @@
#endif /* CONFIG_DEVFS_FS */
printk(KERN_INFO "Zapata Telephony Interface Registered on major %d\n", ZT_MAJOR);
- printk(KERN_INFO "Zaptel Version: %s\n", ZAPTEL_VERSION);
+ printk(KERN_INFO "Zaptel Version: %s\n", DAHDI_VERSION);
echo_can_init();
zt_conv_init();
fasthdlc_precalc();
rotate_sums();
rwlock_init(&chan_lock);
-#ifdef CONFIG_ZAPTEL_WATCHDOG
+#ifdef CONFIG_DAHDI_WATCHDOG
watchdog_init();
#endif
return res;
@@ -7790,7 +7790,7 @@
#endif /* CONFIG_ZAP_UDEV */
unregister_chrdev(ZT_MAJOR, "zaptel");
#endif
-#ifdef CONFIG_ZAPTEL_WATCHDOG
+#ifdef CONFIG_DAHDI_WATCHDOG
watchdog_cleanup();
#endif
Modified: branches/1.4/kernel/zaptel.h
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/zaptel.h?view=diff&rev=4300&r1=4299&r2=4300
==============================================================================
--- branches/1.4/kernel/zaptel.h (original)
+++ branches/1.4/kernel/zaptel.h Fri May 16 16:35:06 2008
@@ -25,8 +25,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifndef _LINUX_ZAPTEL_H
-#define _LINUX_ZAPTEL_H
+#ifndef _LINUX_DAHDI_H
+#define _LINUX_DAHDI_H
#ifdef __KERNEL__
#include "zconfig.h"
@@ -1634,7 +1634,7 @@
/* Opt: Enable maintenance modes */
int (*maint)(struct zt_span *span, int mode);
-#ifdef ZAPTEL_SYNC_TICK
+#ifdef DAHDI_SYNC_TICK
/* Opt: send sync to spans */
int (*sync_tick)(struct zt_span *span, int is_master);
#endif
@@ -1694,7 +1694,7 @@
/* If the watchdog detects no received data, it will call the
watchdog routine */
int (*watchdog)(struct zt_span *span, int cause);
-#ifdef CONFIG_ZAPTEL_WATCHDOG
+#ifdef CONFIG_DAHDI_WATCHDOG
int watchcounter;
int watchstate;
#endif
@@ -1842,7 +1842,7 @@
/* Echo cancel a receive and transmit chunk for a given channel. This
should be called by the low-level driver as close to the interface
as possible. ECHO CANCELLATION IS NO LONGER AUTOMATICALLY DONE
- AT THE ZAPTEL LEVEL. zt_ec_chunk will not echo cancel if it should
+ AT THE DAHDI LEVEL. zt_ec_chunk will not echo cancel if it should
not be doing so. rxchunk is modified in-place */
void zt_ec_chunk(struct zt_chan *chan, unsigned char *rxchunk, const unsigned char *txchunk);
@@ -2104,4 +2104,4 @@
*dst = '\0';
}
-#endif /* _LINUX_ZAPTEL_H */
+#endif /* _LINUX_DAHDI_H */
Modified: branches/1.4/kernel/zconfig.h
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/zconfig.h?view=diff&rev=4300&r1=4299&r2=4300
==============================================================================
--- branches/1.4/kernel/zconfig.h (original)
+++ branches/1.4/kernel/zconfig.h Fri May 16 16:35:06 2008
@@ -48,11 +48,11 @@
/*
* Define if you want MMX optimizations in zaptel
*
- * Note: CONFIG_ZAPTEL_MMX is generally incompatible with AMD
+ * Note: CONFIG_DAHDI_MMX is generally incompatible with AMD
* processors and can cause system instability!
*
*/
-/* #define CONFIG_ZAPTEL_MMX */
+/* #define CONFIG_DAHDI_MMX */
/** If defined: the user must define exactly one ECHO_CAN_ var: */
#ifndef ECHO_CAN_FROMENV
@@ -134,7 +134,7 @@
* Uncomment to enable "watchdog" to monitor if interfaces
* stop taking interrupts or otherwise misbehave
*/
-/* #define CONFIG_ZAPTEL_WATCHDOG */
+/* #define CONFIG_DAHDI_WATCHDOG */
/*
* Uncomment for Non-standard FXS groundstart start state (A=Low, B=Low)
@@ -187,7 +187,7 @@
* Enable sync_tick() calls. Allows low-level drivers to synchronize
* their internal clocks to the zaptel master clock.
*/
-#define ZAPTEL_SYNC_TICK
+#define DAHDI_SYNC_TICK
/*
* Skip processing PCM if low-level driver won't use it anyway
Modified: branches/1.4/kernel/ztdummy.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/ztdummy.c?view=diff&rev=4300&r1=4299&r2=4300
==============================================================================
--- branches/1.4/kernel/ztdummy.c (original)
+++ branches/1.4/kernel/ztdummy.c Fri May 16 16:35:06 2008
@@ -135,9 +135,9 @@
#endif
-#define ZAPTEL_RATE 1000 /* zaptel ticks per second */
-#define ZAPTEL_TIME (1000000 / ZAPTEL_RATE) /* zaptel tick time in us */
-#define ZAPTEL_TIME_NS (ZAPTEL_TIME * 1000) /* zaptel tick time in ns */
+#define DAHDI_RATE 1000 /* zaptel ticks per second */
+#define DAHDI_TIME (1000000 / DAHDI_RATE) /* zaptel tick time in us */
+#define DAHDI_TIME_NS (DAHDI_TIME * 1000) /* zaptel tick time in ns */
/* Different bits of the debug variable: */
#define DEBUG_GENERAL (1 << 0)
@@ -174,7 +174,7 @@
/* Is spinlock required here??? */
spin_lock_irqsave(&ztd->rtclock, flags);
- ztd->counter += ZAPTEL_TIME;
+ ztd->counter += DAHDI_TIME;
while (ztd->counter >= current_rate) {
ztd->counter -= current_rate;
/* Update of RTC IRQ rate isn't possible from interrupt handler :( */
@@ -201,7 +201,7 @@
* We should worry if overrun is 2 or more; then we really missed
* a tick */
overrun = hrtimer_forward(&zaptimer, htmr->expires,
- ktime_set(0, ZAPTEL_TIME_NS));
+ ktime_set(0, DAHDI_TIME_NS));
if(overrun > 1) {
if(printk_ratelimit())
printk(KERN_NOTICE "ztdummy: HRTimer missed %lu ticks\n",
@@ -226,7 +226,7 @@
timer.expires = jiffies + 1;
add_timer(&timer);
- ztd->counter += ZAPTEL_TIME;
+ ztd->counter += DAHDI_TIME;
while (ztd->counter >= HZ) {
ztd->counter -= HZ;
zt_receive(&ztd->span);
@@ -343,7 +343,7 @@
zaptimer.function = ztdummy_hr_int;
printk(KERN_DEBUG "ztdummy: Starting High Resolution Timer\n");
- hrtimer_start(&zaptimer, ktime_set(0, ZAPTEL_TIME_NS), HRTIMER_MODE_REL);
+ hrtimer_start(&zaptimer, ktime_set(0, DAHDI_TIME_NS), HRTIMER_MODE_REL);
printk(KERN_INFO "ztdummy: High Resolution Timer started, good to go\n");
#else
init_timer(&timer);
More information about the svn-commits
mailing list