[Asterisk-cvs] zaptel wct4xxp.c,1.48,1.49
markster at lists.digium.com
markster at lists.digium.com
Tue Jul 20 23:54:13 CDT 2004
Update of /usr/cvsroot/zaptel
In directory localhost.localdomain:/tmp/cvs-serv21686
Modified Files:
wct4xxp.c
Log Message:
Center T1 channels on TDM bus when running fully T12 mode
Index: wct4xxp.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wct4xxp.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- wct4xxp.c 12 Jul 2004 13:17:28 -0000 1.48
+++ wct4xxp.c 21 Jul 2004 03:40:14 -0000 1.49
@@ -620,10 +620,17 @@
t4_framer_out(wc, unit, 0x3f, unit << 1); /* SIC2: No FFS, no center receive eliastic buffer, phase */
t4_framer_out(wc, unit, 0x40, 0x04); /* SIC3: Edges for capture */
t4_framer_out(wc, unit, 0x45, 0x00); /* CMR2: We provide sync and clock for tx and rx. */
- t4_framer_out(wc, unit, 0x22, 0x00); /* XC0: Normal operation of Sa-bits */
- t4_framer_out(wc, unit, 0x23, 0x04); /* XC1: 0 offset */
- t4_framer_out(wc, unit, 0x24, 0x04); /* RC0: Just shy of 1023 */
- t4_framer_out(wc, unit, 0x25, 0x04); /* RC1: The rest of RC0 */
+ if (!wc->t1e1) {
+ t4_framer_out(wc, unit, 0x22, 0x03); /* XC0: Normal operation of Sa-bits */
+ t4_framer_out(wc, unit, 0x23, 0x84); /* XC1: 0 offset */
+ t4_framer_out(wc, unit, 0x24, 0x03); /* RC0: Just shy of 1023 */
+ t4_framer_out(wc, unit, 0x25, 0x84); /* RC1: The rest of RC0 */
+ } else {
+ t4_framer_out(wc, unit, 0x22, 0x00); /* XC0: Normal operation of Sa-bits */
+ t4_framer_out(wc, unit, 0x23, 0x04); /* XC1: 0 offset */
+ t4_framer_out(wc, unit, 0x24, 0x04); /* RC0: Just shy of 1023 */
+ t4_framer_out(wc, unit, 0x25, 0x04); /* RC1: The rest of RC0 */
+ }
/* Configure ports */
t4_framer_out(wc, unit, 0x80, 0x00); /* PC1: SPYR/SPYX input on RPA/XPA */
@@ -909,6 +916,9 @@
int dbl = 0;
int x,y,z;
unsigned int tmp;
+ int offset;
+ if (!wc->t1e1)
+ offset = 4;
if (irq & 1) {
/* First part */
readchunk = wc->readchunk;
@@ -930,7 +940,7 @@
for (x=0;x<ZT_CHUNKSIZE;x++) {
for (z=0;z<24;z++) {
/* All T1/E1 channels */
- tmp = readchunk[z+1];
+ tmp = readchunk[z+1+offset];
wc->spans[3].chans[z].readchunk[x] = tmp & 0xff;
wc->spans[2].chans[z].readchunk[x] = (tmp & 0xff00) >> 8;
wc->spans[1].chans[z].readchunk[x] = (tmp & 0xff0000) >> 16;
@@ -983,6 +993,9 @@
volatile unsigned int *writechunk;
int x,y,z;
unsigned int tmp;
+ int offset;
+ if (!wc->t1e1)
+ offset = 4;
if (irq & 1) {
/* First part */
writechunk = wc->writechunk + 1;
@@ -1002,7 +1015,7 @@
(wc->spans[2].chans[z].writechunk[x] << 8) |
(wc->spans[1].chans[z].writechunk[x] << 16) |
(wc->spans[0].chans[z].writechunk[x] << 24);
- writechunk[z] = tmp;
+ writechunk[z+offset] = tmp;
}
if (wc->t1e1) {
for (z=24;z<31;z++) {
More information about the svn-commits
mailing list