From 641e8ab0966ece7252a84e4f943b018991d8f936 Mon Sep 17 00:00:00 2001 From: sruffell Date: Wed, 20 Aug 2008 19:31:57 +0000 Subject: Change to support both 5.3kbps and 6.3kbps bit rates when using the G723.1 codec. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4495 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- kernel/wctc4xxp/base.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/wctc4xxp/base.c b/kernel/wctc4xxp/base.c index 88336ce..712baea 100644 --- a/kernel/wctc4xxp/base.c +++ b/kernel/wctc4xxp/base.c @@ -1678,13 +1678,13 @@ wctc4xxp_read(struct file *file, char __user *frame, size_t count, loff_t *ppos) cpvt->last_dte_seqno = be16_to_cpu(packet->rtphdr.seqno); } else { rtp_eseq = ++cpvt->last_dte_seqno; - if ( packet->rtphdr.seqno != rtp_eseq ) + if ( be16_to_cpu(packet->rtphdr.seqno) != rtp_eseq ) DTE_DEBUG(DTE_DEBUG_GENERAL, "Bad seqno from DTE! [%04X][%d][%d][%d]\n", be16_to_cpu(packet->rtphdr.seqno), (be16_to_cpu(packet->udphdr.dest) - 0x5000), be16_to_cpu(packet->rtphdr.seqno), - cpvt->last_dte_seqno); + rtp_eseq); cpvt->last_dte_seqno = be16_to_cpu(packet->rtphdr.seqno); } @@ -1737,11 +1737,11 @@ wctc4xxp_write(struct file *file, const char __user *frame, size_t count, loff_t } if (ZT_FORMAT_G723_1 == dtc->srcfmt) { - if (G723_5K_BYTES != count) { + if ((G723_5K_BYTES != count) && (G723_6K_BYTES != count)) { DTE_DEBUG(DTE_DEBUG_GENERAL, "Trying to transcode packet into G723 format " \ "that is %Zu bytes instead of the expected " \ - "%d bytes.\n", count, G723_5K_BYTES); + "%d/%d bytes.\n", count, G723_5K_BYTES, G723_6K_BYTES); return -EINVAL; } cpvt->timestamp += G723_SAMPLES; -- cgit v1.2.3