diff options
-rwxr-xr-x | wcfxs.c | 13 | ||||
-rwxr-xr-x | wctdm.c | 13 |
2 files changed, 14 insertions, 12 deletions
@@ -64,7 +64,8 @@ static alpha indirect_regs[] = {25,"PULSE_Y",0x0000}, //{26,"RECV_DIGITAL_GAIN",0x4000}, // playback volume set lower {26,"RECV_DIGITAL_GAIN",0x2000}, // playback volume set lower -{27,"XMIT_DIGITAL_GAIN",0x4000}, +//{27,"XMIT_DIGITAL_GAIN",0x4000}, +{27,"XMIT_DIGITAL_GAIN",0x2000}, {28,"LOOP_CLOSE_TRES",0x1000}, {29,"RING_TRIP_TRES",0x3600}, {30,"COMMON_MIN_TRES",0x1000}, @@ -192,10 +193,10 @@ static inline void wcfxs_receiveprep(struct wcfxs *wc, unsigned char ints) int x; if (ints & 0x08) - /* Read is at interrupt address. Valid data is available at normal offset */ - readchunk = wc->readchunk; - else readchunk = wc->readchunk + ZT_CHUNKSIZE; + else + /* Read is not at interrupt address. Valid data is available at normal offset */ + readchunk = wc->readchunk; for (x=0;x<ZT_CHUNKSIZE;x++) { wc->chan.readchunk[x] = (readchunk[x] >> 24) & 0xff; } @@ -229,8 +230,8 @@ static void wcfxs_interrupt(int irq, void *dev_id, struct pt_regs *regs) wc->intcount++; if (!(wc->intcount % 10)) wcfxs_check_hook(wc); - wcfxs_transmitprep(wc, ints); - wcfxs_receiveprep(wc, ints); + if (ints & 3) wcfxs_transmitprep(wc, ints); + if (ints & 0xc) wcfxs_receiveprep(wc, ints); } } @@ -64,7 +64,8 @@ static alpha indirect_regs[] = {25,"PULSE_Y",0x0000}, //{26,"RECV_DIGITAL_GAIN",0x4000}, // playback volume set lower {26,"RECV_DIGITAL_GAIN",0x2000}, // playback volume set lower -{27,"XMIT_DIGITAL_GAIN",0x4000}, +//{27,"XMIT_DIGITAL_GAIN",0x4000}, +{27,"XMIT_DIGITAL_GAIN",0x2000}, {28,"LOOP_CLOSE_TRES",0x1000}, {29,"RING_TRIP_TRES",0x3600}, {30,"COMMON_MIN_TRES",0x1000}, @@ -192,10 +193,10 @@ static inline void wcfxs_receiveprep(struct wcfxs *wc, unsigned char ints) int x; if (ints & 0x08) - /* Read is at interrupt address. Valid data is available at normal offset */ - readchunk = wc->readchunk; - else readchunk = wc->readchunk + ZT_CHUNKSIZE; + else + /* Read is not at interrupt address. Valid data is available at normal offset */ + readchunk = wc->readchunk; for (x=0;x<ZT_CHUNKSIZE;x++) { wc->chan.readchunk[x] = (readchunk[x] >> 24) & 0xff; } @@ -229,8 +230,8 @@ static void wcfxs_interrupt(int irq, void *dev_id, struct pt_regs *regs) wc->intcount++; if (!(wc->intcount % 10)) wcfxs_check_hook(wc); - wcfxs_transmitprep(wc, ints); - wcfxs_receiveprep(wc, ints); + if (ints & 3) wcfxs_transmitprep(wc, ints); + if (ints & 0xc) wcfxs_receiveprep(wc, ints); } } |