summaryrefslogtreecommitdiff
path: root/xpp/init_card_7_26
diff options
context:
space:
mode:
Diffstat (limited to 'xpp/init_card_7_26')
-rwxr-xr-xxpp/init_card_7_269
1 files changed, 7 insertions, 2 deletions
diff --git a/xpp/init_card_7_26 b/xpp/init_card_7_26
index 83ed3a0..255d50e 100755
--- a/xpp/init_card_7_26
+++ b/xpp/init_card_7_26
@@ -199,9 +199,14 @@ sub setup_fifo {
# my $fifonum = 0x80 | ($portnum << 3) | ($chan << 1) | ($direction); # # MSB first
my $fifonum = ($portnum << 3) | ($chan << 1) | ($direction); # # MSB first
my $r_slot = ($portnum << 3) | ($chan << 1) | ($direction);
- # receive data from STIO2, transmit to STIO1
+
+ # channel order workaround, swap odd and even portnums in $r_slot for PCM (chan 0, 1) only
+ if ("$chan" == 0 || "$chan" == 1) {
+ $r_slot = $r_slot ^ 0x08;
+ }
+
my $short_portnum = $portnum & 0x03;
- my $a_sl_cfg = (0x80 | ($short_portnum << 3) | ($chan << 1) | ($direction));
+ my $a_sl_cfg = (0x80 | ($short_portnum << 3) | ($chan << 1) | ($direction)); # receive data from STIO2, transmit to STIO1
#logit "setup_fifo($fifonum)";
xhfc_selfifo $fifonum;