adv_pci1710: Bug fixes: For AI commands, keep track of current channel when
authorIan Abbott <abbotti@mev.co.uk>
Mon, 18 Jan 2010 19:23:46 +0000 (19:23 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Mon, 18 Jan 2010 19:23:46 +0000 (19:23 +0000)
moving block of data from FIFO.  Setting up of internal channel list should
fill in the whole list, not just the first repeated segment.

comedi/drivers/adv_pci1710.c

index cd3229c0a2ced5b5f701691d3ac1535f8c3c388f..6139e2683883f806a8ca5b06f36d712cca46d225 100644 (file)
@@ -698,6 +698,7 @@ static int move_block_from_fifo(comedi_device * dev, comedi_subdevice * s,
                        devpriv->ai_act_scan++;
                }
        }
+       s->async->cur_chan = j;
        DPRINTK("adv_pci1710 EDBG: END: move_block_from_fifo(...)\n");
        return 0;
 }
@@ -1188,6 +1189,13 @@ static void setup_channel_list(comedi_device * dev, comedi_subdevice * s,
                DPRINTK("GS: %2d. [%4x]=%4x %4x\n", i, chanprog, range,
                        devpriv->act_chanlist[i]);
        }
+#ifdef PCI171x_PARANOIDCHECK
+       /* remember channels for repeated segments of channel list */
+       for ( ; i < n_chan; i++) {
+               devpriv->act_chanlist[i] =
+                       (CR_CHAN(chanlist[i]) << 12) & 0xf000;
+       }
+#endif
 
        devpriv->ai_et_MuxVal =
                CR_CHAN(chanlist[0]) | (CR_CHAN(chanlist[seglen - 1]) << 8);