diff options
author | Shaun Ruffell <sruffell@digium.com> | 2008-08-19 20:14:06 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2008-08-19 20:14:06 +0000 |
commit | dfaff26c68032ba4837575ec48ea11ebf8f44b96 (patch) | |
tree | a13d24508abaa9a7aa4c08ce04f85aa25506a6f5 /drivers/dahdi/wctc4xxp | |
parent | 6d91df78df4200f1bd932bfb0d8d717b32c42492 (diff) |
Couple of fixes for the transcoder:
- In dahdi_transcode.c, Embed the identifiation number, assigned sequentially
when the transcoders are registered, in the transcoder structure. This allows
DAHDI_TC_GETINFO to work as expected even though the transcoders are rotated
on the list in order to spread the load.
- In wctc4xxp, fix bug where all transcoders are named tc400b0.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4791 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctc4xxp')
-rw-r--r-- | drivers/dahdi/wctc4xxp/base.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c index 6995973..2e1e376 100644 --- a/drivers/dahdi/wctc4xxp/base.c +++ b/drivers/dahdi/wctc4xxp/base.c @@ -441,7 +441,6 @@ struct wcdte { char board_name[40]; const char *variety; int pos; - int cards; struct list_head node; spinlock_t reglock; wait_queue_head_t waitq; @@ -1744,6 +1743,10 @@ wctc4xxp_write(struct file *file, const char __user *frame, size_t count, loff_t "%d bytes.\n", count, G723_5K_BYTES); return -EINVAL; } + cpvt->timestamp = G723_SAMPLES; + } else { + /* Same for ulaw and alaw */ + cpvt->timestamp = G729_SAMPLES; } if (!(cmd = wctc4xxp_create_rtp_cmd(wc, dtc, count))) { @@ -2854,7 +2857,7 @@ wctc4xxp_watchdog(unsigned long data) } /** - * Insert an struct wcdte on the global list in sorted order + * Insert an struct wcdte on the global list in sorted order * */ static int __devinit @@ -2867,13 +2870,17 @@ wctc4xxp_add_to_device_list(struct wcdte *wc) list_for_each_entry(cur, &wctc4xxp_list, node) { if (cur->pos != pos) { /* Add the new entry before the one here */ - list_add_tail(&wc->node, &wctc4xxp_list); + list_add_tail(&wc->node, &cur->node); break; } else { ++pos; } } + /* If we didn't already add the new entry to the list, add it now */ + if (list_empty(&wc->node)) { + list_add_tail(&wc->node, &wctc4xxp_list); + } spin_unlock(&wctc4xxp_list_lock); return pos; } @@ -3237,13 +3244,6 @@ static struct pci_driver wctc4xxp_driver = { int __init wctc4xxp_init(void) { int res; -# ifndef CONFIG_WCDTE_NETWORK_IF - if (debug & (DTE_DEBUG_NETWORK_IF|DTE_DEBUG_NETWORK_EARLY)) { - printk(KERN_WARNING "%s: The Network interface was not compiled into the driver.\n", THIS_MODULE->name); - debug &= ~(DTE_DEBUG_NETWORK_IF|DTE_DEBUG_NETWORK_EARLY); - } -# endif - # if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) cmd_cache = kmem_cache_create(THIS_MODULE->name, sizeof(struct tcb), 0, SLAB_HWCACHE_ALIGN, NULL, NULL); |