diff options
Diffstat (limited to 'xpp/init_card_6_26')
-rwxr-xr-x | xpp/init_card_6_26 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xpp/init_card_6_26 b/xpp/init_card_6_26 index 2193a66..0da1f61 100755 --- a/xpp/init_card_6_26 +++ b/xpp/init_card_6_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; |