summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctc4xxp
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2008-12-04 20:57:28 +0000
committerShaun Ruffell <sruffell@digium.com>2008-12-04 20:57:28 +0000
commitb1ad92237d14ac55675bc3fcde5e9e480de1cfa7 (patch)
tree9f70eccaeb549c1d7e67ea9df52645113ac4f071 /drivers/dahdi/wctc4xxp
parent3dbbba4a65492552c23214121b684e7dfc51d837 (diff)
Fix an erroneous warning and ensure that the sample size is set correctly when
decoding G723 packets. Issue: DAHDI-198 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5434 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctc4xxp')
-rw-r--r--drivers/dahdi/wctc4xxp/base.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c
index 1428ebf..efb3aba 100644
--- a/drivers/dahdi/wctc4xxp/base.c
+++ b/drivers/dahdi/wctc4xxp/base.c
@@ -1521,6 +1521,9 @@ do_channel_allocate(struct dahdi_transcoder_channel *dtc)
/* Mark this channel as built */
dahdi_tc_set_built(dtc);
dtc->built_fmts = dtc->dstfmt | dtc->srcfmt;
+ DTE_DEBUG(DTE_DEBUG_CHANNEL_SETUP,
+ "Channel %p has dstfmt=%x and srcfmt=%x\n", dtc, dtc->dstfmt,
+ dtc->srcfmt);
/* Mark the channel complement (other half of encoder/decoder pair) as built */
res = wctc4xxp_mark_channel_complement_built(wc, dtc);
up(&wc->chansem);
@@ -1756,6 +1759,8 @@ wctc4xxp_write(struct file *file, const char __user *frame, size_t count, loff_t
return -EINVAL;
}
cpvt->timestamp = G723_SAMPLES;
+ } else if (DAHDI_FORMAT_G723_1 == dtc->dstfmt) {
+ cpvt->timestamp = G723_SAMPLES;
} else {
/* Same for ulaw and alaw */
cpvt->timestamp = G729_SAMPLES;
@@ -1819,7 +1824,6 @@ do_rx_response_packet(struct wcdte *wc, struct tcb *cmd)
list_del_init(&pos->node);
pos->flags &= ~(__WAIT_FOR_RESPONSE);
pos->response = cmd;
- WARN_ON(pos->response);
WARN_ON(!(pos->flags & TX_COMPLETE));
complete(&pos->complete);
break;