diff options
Diffstat (limited to 'wcfxs.c')
-rwxr-xr-x | wcfxs.c | 33 |
1 files changed, 17 insertions, 16 deletions
@@ -201,14 +201,14 @@ static inline void wcfxs_transmitprep(struct wcfxs *wc, unsigned char ints) for (x=0;x<ZT_CHUNKSIZE;x++) { /* Send a sample, as a 32-bit word */ writechunk[x] = 0; - if (wc->cardflag & (1 << 0)) - writechunk[x] |= (wc->chans[0].writechunk[x] << 24); - if (wc->cardflag & (1 << 1)) - writechunk[x] |= (wc->chans[1].writechunk[x] << 16); - if (wc->cardflag & (1 << 2)) - writechunk[x] |= (wc->chans[2].writechunk[x] << 8); if (wc->cardflag & (1 << 3)) - writechunk[x] |= (wc->chans[3].writechunk[x]); + writechunk[x] |= (wc->chans[3].writechunk[x] << 24); + if (wc->cardflag & (1 << 2)) + writechunk[x] |= (wc->chans[2].writechunk[x] << 16); + if (wc->cardflag & (1 << 1)) + writechunk[x] |= (wc->chans[1].writechunk[x] << 8); + if (wc->cardflag & (1 << 0)) + writechunk[x] |= (wc->chans[0].writechunk[x]); } @@ -225,14 +225,14 @@ static inline void wcfxs_receiveprep(struct wcfxs *wc, unsigned char ints) /* Read is at interrupt address. Valid data is available at normal offset */ readchunk = wc->readchunk; for (x=0;x<ZT_CHUNKSIZE;x++) { - if (wc->cardflag & (1 << 0)) - wc->chans[0].readchunk[x] = (readchunk[x] >> 24) & 0xff; - if (wc->cardflag & (1 << 1)) - wc->chans[1].readchunk[x] = (readchunk[x] >> 16) & 0xff; - if (wc->cardflag & (1 << 2)) - wc->chans[2].readchunk[x] = (readchunk[x] >> 8) & 0xff; if (wc->cardflag & (1 << 3)) - wc->chans[3].readchunk[x] = (readchunk[x]) & 0xff; + wc->chans[3].readchunk[x] = (readchunk[x] >> 24) & 0xff; + if (wc->cardflag & (1 << 2)) + wc->chans[2].readchunk[x] = (readchunk[x] >> 16) & 0xff; + if (wc->cardflag & (1 << 1)) + wc->chans[1].readchunk[x] = (readchunk[x] >> 8) & 0xff; + if (wc->cardflag & (1 << 0)) + wc->chans[0].readchunk[x] = (readchunk[x]) & 0xff; } /* XXX We're wasting 8 taps. We should get closer :( */ for (x=0;x<wc->cards;x++) { @@ -764,9 +764,9 @@ static int wcfxs_init_proslic(struct wcfxs *wc, int card) wcfxs_setreg(wc, card, 1, 0x28); // U-Law 8-bit interface - wcfxs_setreg(wc, card, 2, card * 8); // Tx Start count low byte 0 + wcfxs_setreg(wc, card, 2, (3-card) * 8); // Tx Start count low byte 0 wcfxs_setreg(wc, card, 3, 0); // Tx Start count high byte 0 - wcfxs_setreg(wc, card, 4, card * 8); // Rx Start count low byte 0 + wcfxs_setreg(wc, card, 4, (3-card) * 8); // Rx Start count low byte 0 wcfxs_setreg(wc, card, 5, 0); // Rx Start count high byte 0 wcfxs_setreg(wc, card, 18, 0xff); // clear all interrupt wcfxs_setreg(wc, card, 19, 0xff); @@ -1283,6 +1283,7 @@ static void __devexit wcfxs_remove_one(struct pci_dev *pdev) static struct pci_device_id wcfxs_pci_tbl[] __devinitdata = { { 0xe159, 0x0001, 0xa159, PCI_ANY_ID, 0, 0, (unsigned long) &wcfxs }, { 0xe159, 0x0001, 0xe159, PCI_ANY_ID, 0, 0, (unsigned long) &wcfxs }, + { 0xe159, 0x0001, 0xb100, PCI_ANY_ID, 0, 0, (unsigned long) &wcfxs }, }; static struct pci_driver wcfxs_driver = { |