patch-2.4.21 linux-2.4.21/drivers/isdn/hisax/st5481_usb.c
Next file: linux-2.4.21/drivers/isdn/hysdn/hysdn_boot.c
Previous file: linux-2.4.21/drivers/isdn/hisax/st5481_init.c
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
2003-06-13 07:51:34.000000000 -0700
- Orig file:
linux-2.4.20/drivers/isdn/hisax/st5481_usb.c
- Orig date:
2002-11-28 15:53:13.000000000 -0800
diff -urN linux-2.4.20/drivers/isdn/hisax/st5481_usb.c linux-2.4.21/drivers/isdn/hisax/st5481_usb.c
@@ -484,16 +484,18 @@
ptr = urb->transfer_buffer;
while (len > 0) {
if (in->mode == L1_MODE_TRANS) {
- memcpy(in->rcvbuf, ptr, len);
+ /* swap rx bytes to get hearable audio */
+ register unsigned char *dest = in->rcvbuf;
status = len;
- len = 0;
+ for (; len; len--)
+ *dest++ = isdnhdlc_bit_rev_tab[*ptr++];
} else {
- status = hdlc_decode(&in->hdlc_state, ptr, len, &count,
- in->rcvbuf, in->bufsize);
+ status = isdnhdlc_decode(&in->hdlc_state, ptr, len, &count,
+ in->rcvbuf, in->bufsize);
ptr += count;
len -= count;
}
-
+
if (status > 0) {
// Good frame received
DBG(4,"count=%d",status);
@@ -622,8 +624,8 @@
if (in->mode != L1_MODE_NULL) {
if (in->mode != L1_MODE_TRANS)
- hdlc_rcv_init(&in->hdlc_state,
- in->mode == L1_MODE_HDLC_56K);
+ isdnhdlc_rcv_init(&in->hdlc_state,
+ in->mode == L1_MODE_HDLC_56K);
st5481_usb_pipe_reset(in->adapter, in->ep, NULL, NULL);
st5481_usb_device_ctrl_msg(in->adapter, in->counter,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)