diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2002-06-29 18:08:17 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2002-06-29 18:08:17 +0000 |
commit | f11777d1a323daf29ff336e6a5aed84d8198b360 (patch) | |
tree | 03a59b028fa364727024fcf8d493d843afd4e91b /wcfxsusb.c | |
parent | b40acbadfeec861fee8c403d9fc019f2ec73ccbd (diff) |
Version 0.2.0 from FTP
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@89 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wcfxsusb.c')
-rwxr-xr-x | wcfxsusb.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -527,7 +527,7 @@ static int wcusb_async_write(struct wc_usb_pvt *p, unsigned char index, unsigned __u16 ind = index; memset(urb, 0, sizeof(urb_t)); - + p->dr.requesttype = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE; p->dr.request = REQUEST_NORMAL; p->dr.value = 0; @@ -948,9 +948,9 @@ static void wcusb_do_io(struct wc_usb_pvt *p, struct urb *out, struct urb *in) switch (p->sample) { case STREAM_NORMAL: for (x = 0; x < ZT_CHUNKSIZE; x++) { - p->chan.readchunk[x] = ZT_LIN2MU(ichunk[x]); + p->chan.readchunk[x] = ZT_LIN2MU(le16_to_cpu(ichunk[x])); } - + break; case STREAM_DTMF: for (x = 0; x < ZT_CHUNKSIZE; x++) { @@ -960,12 +960,14 @@ static void wcusb_do_io(struct wc_usb_pvt *p, struct urb *out, struct urb *in) } /* Work with Zaptel now */ + /* XXX Might be able to optimize this some XXX */ + zt_ec_chunk(&p->chan, p->chan.readchunk, p->chan.writechunk); zt_receive(&p->span); zt_transmit(&p->span); /* Fill in transmission info */ for (x = 0; x < ZT_CHUNKSIZE; x++) { - ochunk[x] = ZT_MULAW(p->chan.writechunk[x]); + ochunk[x] = ZT_MULAW(cpu_to_le16(p->chan.writechunk[x])); } /* Transmit the pending outgoing urb */ @@ -1147,7 +1149,7 @@ static int InitPrivate(struct wc_usb_pvt *p) p->datawrite[x].urb.iso_frame_desc[0].offset = 0; p->datawrite[x].urb.transfer_buffer = p->writechunk + ZT_CHUNKSIZE * x; p->datawrite[x].urb.transfer_buffer_length = ZT_CHUNKSIZE * 2; - + } |