summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-05-16 21:39:47 +0000
committermattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-05-16 21:39:47 +0000
commitdd3fad8de5df2f25630d66154f209b6b7cbf4049 (patch)
treeed5c05bf8715f685b46da469d8d7c22cc0d8c0dc
parent5e00740361c43a489bff5d280a80fe7285ea9231 (diff)
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4301 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-xbuild_tools/make_version_h2
-rw-r--r--kernel/xpp/xbus-pcm.c30
-rw-r--r--kernel/xpp/xbus-pcm.h2
-rw-r--r--kernel/xpp/xpp_zap.c6
-rw-r--r--kernel/zaptel-base.c36
-rw-r--r--kernel/zaptel.h12
-rw-r--r--kernel/zconfig.h8
-rw-r--r--kernel/ztdummy.c14
8 files changed, 55 insertions, 55 deletions
diff --git a/build_tools/make_version_h b/build_tools/make_version_h
index a35dd8a..01d9c31 100755
--- a/build_tools/make_version_h
+++ b/build_tools/make_version_h
@@ -4,6 +4,6 @@ cat << END
* version.h
* Automatically generated
*/
-#define DAHDI_VERSION "${DAHDIVERSION}"
+#define ZAPTEL_VERSION "${ZAPTELVERSION}"
END
diff --git a/kernel/xpp/xbus-pcm.c b/kernel/xpp/xbus-pcm.c
index 2bbbf5f..6155f35 100644
--- a/kernel/xpp/xbus-pcm.c
+++ b/kernel/xpp/xbus-pcm.c
@@ -76,7 +76,7 @@ static struct xpp_ticker global_ticks_series;
#define SYNC_ADJ_QUICK 1000
#define SYNC_ADJ_SLOW 10000
-#ifdef DAHDI_SYNC_TICK
+#ifdef ZAPTEL_SYNC_TICK
static unsigned int zaptel_tick_count = 0;
#endif
@@ -431,7 +431,7 @@ static void global_tick(void)
xpp_ticker_step(&global_ticks_series, &now);
}
-#ifdef DAHDI_SYNC_TICK
+#ifdef ZAPTEL_SYNC_TICK
int zaptel_sync_tick(struct zt_span *span, int is_master)
{
xpd_t *xpd = span->pvt;
@@ -454,7 +454,7 @@ int zaptel_sync_tick(struct zt_span *span, int is_master)
xpd->xbus->busname);
}
if((rate_limit % 5003) == 0)
- XPD_NOTICE(xpd, "Zaptel master: ignore DAHDI sync\n");
+ XPD_NOTICE(xpd, "Zaptel master: ignore ZAPTEL sync\n");
rate_limit++;
goto noop;
}
@@ -464,7 +464,7 @@ int zaptel_sync_tick(struct zt_span *span, int is_master)
if((rate_limit++ % 5003) == 0)
XBUS_DBG(SYNC, syncer,
- "Already a syncer, ignore DAHDI sync\n");
+ "Already a syncer, ignore ZAPTEL sync\n");
goto noop;
}
/* ignore duplicate calls from all our registered spans */
@@ -489,11 +489,11 @@ noop:
/*
* called from elect_syncer()
* if new_syncer is NULL, than we move all to SYNC_MODE_PLL
- * for DAHDI sync.
+ * for ZAPTEL sync.
*/
static void update_sync_master(xbus_t *new_syncer)
{
- const char *msg = (force_zaptel_sync) ? "DAHDI" : "NO-SYNC";
+ const char *msg = (force_zaptel_sync) ? "ZAPTEL" : "NO-SYNC";
int i;
unsigned long flags;
@@ -1131,17 +1131,17 @@ static int proc_sync_read(char *page, char **start, off_t off, int count, int *e
do_gettimeofday(&now);
len += sprintf(page + len, "# To modify sync source write into this file:\n");
- len += sprintf(page + len, "# DAHDI - Another zaptel device provide sync\n");
+ len += sprintf(page + len, "# ZAPTEL - 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, "DAHDI\n");
+ len += sprintf(page + len, "ZAPTEL\n");
else
len += sprintf(page + len, "NO-SYNC\n");
} else
len += sprintf(page + len, "SYNC=%02d\n", syncer->num);
-#ifdef DAHDI_SYNC_TICK
+#ifdef ZAPTEL_SYNC_TICK
if(force_zaptel_sync) {
len += sprintf(page + len,
"Zaptel Reference Sync (%d registered spans):\n",
@@ -1185,8 +1185,8 @@ static int proc_sync_write(struct file *file, const char __user *buffer, unsigne
if(copy_from_user(buf, buffer, count))
return -EFAULT;
buf[count] = '\0';
- if(strncmp("DAHDI", buf, 6) == 0) {
- DBG(SYNC, "DAHDI\n");
+ if(strncmp("ZAPTEL", buf, 6) == 0) {
+ DBG(SYNC, "ZAPTEL\n");
force_zaptel_sync=1;
update_sync_master(NULL);
} else if(sscanf(buf, "SYNC=%d", &xbus_num) == 1) {
@@ -1254,10 +1254,10 @@ int xbus_pcm_init(struct proc_dir_entry *toplevel)
INFO("FEATURE: with XPP_EC_CHUNK\n");
else
INFO("FEATURE: without XPP_EC_CHUNK\n");
-#ifdef DAHDI_SYNC_TICK
- INFO("FEATURE: with sync_tick() from DAHDI\n");
+#ifdef ZAPTEL_SYNC_TICK
+ INFO("FEATURE: with sync_tick() from ZAPTEL\n");
#else
- INFO("FEATURE: without sync_tick() from DAHDI\n");
+ INFO("FEATURE: without sync_tick() from ZAPTEL\n");
#endif
xpp_ticker_init(&global_ticks_series);
xpp_ticker_init(&zaptel_ticker);
@@ -1289,7 +1289,7 @@ EXPORT_SYMBOL(xbus_request_sync);
EXPORT_SYMBOL(got_new_syncer);
EXPORT_SYMBOL(elect_syncer);
EXPORT_SYMBOL(xpp_echocan);
-#ifdef DAHDI_SYNC_TICK
+#ifdef ZAPTEL_SYNC_TICK
EXPORT_SYMBOL(zaptel_sync_tick);
#endif
EXPORT_SYMBOL(__pcm_recompute);
diff --git a/kernel/xpp/xbus-pcm.h b/kernel/xpp/xbus-pcm.h
index e1061ae..3265f68 100644
--- a/kernel/xpp/xbus-pcm.h
+++ b/kernel/xpp/xbus-pcm.h
@@ -113,7 +113,7 @@ int xbus_command_queue_tick(xbus_t *xbus);
void xbus_reset_counters(xbus_t *xbus);
void elect_syncer(const char *msg);
int xpp_echocan(struct zt_chan *chan, int len);
-#ifdef DAHDI_SYNC_TICK
+#ifdef ZAPTEL_SYNC_TICK
int zaptel_sync_tick(struct zt_span *span, int is_master);
#endif
diff --git a/kernel/xpp/xpp_zap.c b/kernel/xpp/xpp_zap.c
index 69c30f7..5ee7303 100644
--- a/kernel/xpp/xpp_zap.c
+++ b/kernel/xpp/xpp_zap.c
@@ -828,7 +828,7 @@ int xpp_maint(struct zt_span *span, int cmd)
return ret;
}
-#ifdef CONFIG_DAHDI_WATCHDOG
+#ifdef CONFIG_ZAPTEL_WATCHDOG
/*
* If the watchdog detects no received data, it will call the
* watchdog routine
@@ -952,12 +952,12 @@ static int zaptel_register_xpd(xpd_t *xpd)
*/
span->irq = 0;
#endif
-#ifdef DAHDI_SYNC_TICK
+#ifdef ZAPTEL_SYNC_TICK
span->sync_tick = zaptel_sync_tick;
#endif
if (xpp_ec)
span->echocan = xpp_echocan;
-#ifdef CONFIG_DAHDI_WATCHDOG
+#ifdef CONFIG_ZAPTEL_WATCHDOG
span->watchdog = xpp_watchdog;
#endif
diff --git a/kernel/zaptel-base.c b/kernel/zaptel-base.c
index 905b1af..2c6a22e 100644
--- a/kernel/zaptel-base.c
+++ b/kernel/zaptel-base.c
@@ -87,7 +87,7 @@
/* Get helper arithmetic */
#include "arith.h"
-#if defined(CONFIG_DAHDI_MMX) || defined(ECHO_CAN_FP)
+#if defined(CONFIG_ZAPTEL_MMX) || defined(ECHO_CAN_FP)
#include <asm/i387.h>
#endif
@@ -316,7 +316,7 @@ static struct zt_dialparams global_dialparams = {
static int zt_chan_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long data, int unit);
-#if defined(CONFIG_DAHDI_MMX) || defined(ECHO_CAN_FP)
+#if defined(CONFIG_ZAPTEL_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 @@ static int zt_ctl_ioctl(struct inode *inode, struct file *file, unsigned int cmd
struct zt_versioninfo vi;
memset(&vi, 0, sizeof(vi));
- zap_copy_string(vi.version, DAHDI_VERSION, sizeof(vi.version));
+ zap_copy_string(vi.version, ZAPTEL_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 @@ static inline void __zt_ec_chunk(struct zt_chan *ss, unsigned char *rxchunk, con
/* Perform echo cancellation on a chunk if necessary */
if (ss->ec) {
-#if defined(CONFIG_DAHDI_MMX) || defined(ECHO_CAN_FP)
+#if defined(CONFIG_ZAPTEL_MMX) || defined(ECHO_CAN_FP)
zt_kernel_fpu_begin();
#endif
if (ss->echostate & __ECHO_STATE_MUTE) {
@@ -6343,7 +6343,7 @@ static inline void __zt_ec_chunk(struct zt_chan *ss, unsigned char *rxchunk, con
rxchunk[x] = ZT_LIN2X((int) rxlins[x], ss);
#endif /* defined(ZT_EC_ARRAY_UPDATE) */
}
-#if defined(CONFIG_DAHDI_MMX) || defined(ECHO_CAN_FP)
+#if defined(CONFIG_ZAPTEL_MMX) || defined(ECHO_CAN_FP)
kernel_fpu_end();
#endif
}
@@ -7241,11 +7241,11 @@ static void __zt_transmit_chunk(struct zt_chan *chan, unsigned char *buf)
__zt_getbuf_chunk(chan, buf);
if ((chan->flags & ZT_FLAG_AUDIO) || (chan->confmode)) {
-#ifdef CONFIG_DAHDI_MMX
+#ifdef CONFIG_ZAPTEL_MMX
zt_kernel_fpu_begin();
#endif
__zt_process_getaudio_chunk(chan, buf);
-#ifdef CONFIG_DAHDI_MMX
+#ifdef CONFIG_ZAPTEL_MMX
kernel_fpu_end();
#endif
}
@@ -7326,11 +7326,11 @@ static void __zt_receive_chunk(struct zt_chan *chan, unsigned char *buf)
buf = waste;
}
if ((chan->flags & ZT_FLAG_AUDIO) || (chan->confmode)) {
-#ifdef CONFIG_DAHDI_MMX
+#ifdef CONFIG_ZAPTEL_MMX
zt_kernel_fpu_begin();
#endif
__zt_process_putaudio_chunk(chan, buf);
-#ifdef CONFIG_DAHDI_MMX
+#ifdef CONFIG_ZAPTEL_MMX
kernel_fpu_end();
#endif
}
@@ -7429,7 +7429,7 @@ int zt_receive(struct zt_span *span)
unsigned long flags, flagso;
#if 1
-#ifdef CONFIG_DAHDI_WATCHDOG
+#ifdef CONFIG_ZAPTEL_WATCHDOG
span->watchcounter--;
#endif
for (x=0;x<span->channels;x++) {
@@ -7537,7 +7537,7 @@ int zt_receive(struct zt_span *span)
}
}
if (maxlinks) {
-#ifdef CONFIG_DAHDI_MMX
+#ifdef CONFIG_ZAPTEL_MMX
zt_kernel_fpu_begin();
#endif
/* process all the conf links */
@@ -7548,7 +7548,7 @@ int zt_receive(struct zt_span *span)
ACSS(conf_sums[z], conf_sums[y]);
}
}
-#ifdef CONFIG_DAHDI_MMX
+#ifdef CONFIG_ZAPTEL_MMX
kernel_fpu_end();
#endif
}
@@ -7573,7 +7573,7 @@ int zt_receive(struct zt_span *span)
spin_unlock_irqrestore(&chans[x]->lock, flags);
}
}
-#ifdef DAHDI_SYNC_TICK
+#ifdef ZAPTEL_SYNC_TICK
for (x=0;x<maxspans;x++) {
struct zt_span *s = spans[x];
@@ -7593,7 +7593,7 @@ MODULE_DESCRIPTION("Zapata Telephony Interface");
MODULE_LICENSE("GPL");
#endif
#ifdef MODULE_VERSION
-MODULE_VERSION(DAHDI_VERSION);
+MODULE_VERSION(ZAPTEL_VERSION);
#endif
#ifdef LINUX26
@@ -7619,7 +7619,7 @@ static struct file_operations zt_fops = {
fasync: NULL,
};
-#ifdef CONFIG_DAHDI_WATCHDOG
+#ifdef CONFIG_ZAPTEL_WATCHDOG
static struct timer_list watchdogtimer;
static void watchdog_check(unsigned long ignored)
@@ -7748,13 +7748,13 @@ static int __init zt_init(void) {
#endif /* CONFIG_DEVFS_FS */
printk(KERN_INFO "Zapata Telephony Interface Registered on major %d\n", ZT_MAJOR);
- printk(KERN_INFO "Zaptel Version: %s\n", DAHDI_VERSION);
+ printk(KERN_INFO "Zaptel Version: %s\n", ZAPTEL_VERSION);
echo_can_init();
zt_conv_init();
fasthdlc_precalc();
rotate_sums();
rwlock_init(&chan_lock);
-#ifdef CONFIG_DAHDI_WATCHDOG
+#ifdef CONFIG_ZAPTEL_WATCHDOG
watchdog_init();
#endif
return res;
@@ -7790,7 +7790,7 @@ static void __exit zt_cleanup(void) {
#endif /* CONFIG_ZAP_UDEV */
unregister_chrdev(ZT_MAJOR, "zaptel");
#endif
-#ifdef CONFIG_DAHDI_WATCHDOG
+#ifdef CONFIG_ZAPTEL_WATCHDOG
watchdog_cleanup();
#endif
diff --git a/kernel/zaptel.h b/kernel/zaptel.h
index 04ae820..81f7946 100644
--- a/kernel/zaptel.h
+++ b/kernel/zaptel.h
@@ -25,8 +25,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifndef _LINUX_DAHDI_H
-#define _LINUX_DAHDI_H
+#ifndef _LINUX_ZAPTEL_H
+#define _LINUX_ZAPTEL_H
#ifdef __KERNEL__
#include "zconfig.h"
@@ -1634,7 +1634,7 @@ struct zt_span {
/* Opt: Enable maintenance modes */
int (*maint)(struct zt_span *span, int mode);
-#ifdef DAHDI_SYNC_TICK
+#ifdef ZAPTEL_SYNC_TICK
/* Opt: send sync to spans */
int (*sync_tick)(struct zt_span *span, int is_master);
#endif
@@ -1694,7 +1694,7 @@ struct zt_span {
/* If the watchdog detects no received data, it will call the
watchdog routine */
int (*watchdog)(struct zt_span *span, int cause);
-#ifdef CONFIG_DAHDI_WATCHDOG
+#ifdef CONFIG_ZAPTEL_WATCHDOG
int watchcounter;
int watchstate;
#endif
@@ -1842,7 +1842,7 @@ struct zt_tone *zt_mf_tone(const struct zt_chan *chan, char digit, int digitmode
/* 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 DAHDI LEVEL. zt_ec_chunk will not echo cancel if it should
+ AT THE ZAPTEL 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 @@ static inline void zap_copy_string(char *dst, const char *src, unsigned int size
*dst = '\0';
}
-#endif /* _LINUX_DAHDI_H */
+#endif /* _LINUX_ZAPTEL_H */
diff --git a/kernel/zconfig.h b/kernel/zconfig.h
index 2070355..35056e3 100644
--- a/kernel/zconfig.h
+++ b/kernel/zconfig.h
@@ -48,11 +48,11 @@
/*
* Define if you want MMX optimizations in zaptel
*
- * Note: CONFIG_DAHDI_MMX is generally incompatible with AMD
+ * Note: CONFIG_ZAPTEL_MMX is generally incompatible with AMD
* processors and can cause system instability!
*
*/
-/* #define CONFIG_DAHDI_MMX */
+/* #define CONFIG_ZAPTEL_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_DAHDI_WATCHDOG */
+/* #define CONFIG_ZAPTEL_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 DAHDI_SYNC_TICK
+#define ZAPTEL_SYNC_TICK
/*
* Skip processing PCM if low-level driver won't use it anyway
diff --git a/kernel/ztdummy.c b/kernel/ztdummy.c
index 82a5550..18f1e9f 100644
--- a/kernel/ztdummy.c
+++ b/kernel/ztdummy.c
@@ -135,9 +135,9 @@ extern uhci_t **uhci_devices;
#endif
-#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 */
+#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 */
/* Different bits of the debug variable: */
#define DEBUG_GENERAL (1 << 0)
@@ -174,7 +174,7 @@ static void ztdummy_rtc_interrupt(void *private_data)
/* Is spinlock required here??? */
spin_lock_irqsave(&ztd->rtclock, flags);
- ztd->counter += DAHDI_TIME;
+ ztd->counter += ZAPTEL_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 @@ static enum hrtimer_restart ztdummy_hr_int(struct hrtimer *htmr)
* We should worry if overrun is 2 or more; then we really missed
* a tick */
overrun = hrtimer_forward(&zaptimer, htmr->expires,
- ktime_set(0, DAHDI_TIME_NS));
+ ktime_set(0, ZAPTEL_TIME_NS));
if(overrun > 1) {
if(printk_ratelimit())
printk(KERN_NOTICE "ztdummy: HRTimer missed %lu ticks\n",
@@ -226,7 +226,7 @@ static void ztdummy_timer(unsigned long param)
timer.expires = jiffies + 1;
add_timer(&timer);
- ztd->counter += DAHDI_TIME;
+ ztd->counter += ZAPTEL_TIME;
while (ztd->counter >= HZ) {
ztd->counter -= HZ;
zt_receive(&ztd->span);
@@ -343,7 +343,7 @@ int init_module(void)
zaptimer.function = ztdummy_hr_int;
printk(KERN_DEBUG "ztdummy: Starting High Resolution Timer\n");
- hrtimer_start(&zaptimer, ktime_set(0, DAHDI_TIME_NS), HRTIMER_MODE_REL);
+ hrtimer_start(&zaptimer, ktime_set(0, ZAPTEL_TIME_NS), HRTIMER_MODE_REL);
printk(KERN_INFO "ztdummy: High Resolution Timer started, good to go\n");
#else
init_timer(&timer);