For the s626 driver, there is a bug in the handling of asynchronous
commands on the AI subdevice when the stop source is `TRIG_NONE`. The
command should run continuously until cancelled, but the interrupt
handler stops the command running after the first scan.
Avoid the problem by setting `devpriv->ai_sample_count = 1` for the
`TRIG_NONE` stop source case in `s626_ai_cmd()`. This works because the
interrupt handler does not decrement `devpriv->ai_sample_count` if
`devpriv->ai_continous` is true, so the test for
`devpriv->ai_sample_count` being decremented to 0 (or less) will be
false and so it will not stop the acquisition in this case.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
case TRIG_NONE:
// continous aquisition
devpriv->ai_continous = 1;
- devpriv->ai_sample_count = 0;
+ devpriv->ai_sample_count = 1;
break;
}