summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-08-20 19:31:57 +0000
committersruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-08-20 19:31:57 +0000
commit641e8ab0966ece7252a84e4f943b018991d8f936 (patch)
tree88929f4739025505824564248efc4a80a03c4c4e
parent40967a68abbb2c7c51443289f6eedf7b9e3d833a (diff)
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
-rw-r--r--kernel/wctc4xxp/base.c8
1 files 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;