summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctc4xxp
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2008-08-20 19:31:45 +0000
committerShaun Ruffell <sruffell@digium.com>2008-08-20 19:31:45 +0000
commitc97ed60af4545c6d4e6099eea18fd5c429b4126c (patch)
treed02de7a569023976160c889ec5c501024c53e8ef /drivers/dahdi/wctc4xxp
parent5243c7d4956887e55de3e6c16bd3d26713936096 (diff)
Change to support both 5.3kbps and 6.3kbps bit rates when using the G723.1
codec. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4798 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctc4xxp')
-rw-r--r--drivers/dahdi/wctc4xxp/base.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c
index ed1b256..ac66c29 100644
--- a/drivers/dahdi/wctc4xxp/base.c
+++ b/drivers/dahdi/wctc4xxp/base.c
@@ -1677,13 +1677,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);
}
@@ -1736,11 +1736,11 @@ wctc4xxp_write(struct file *file, const char __user *frame, size_t count, loff_t
}
if (DAHDI_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;