Use comedi_buf_write_samples() to add the samples to the async buffer.
The number of bytes to add is determined automatically based on the
number of samples and the bytes_per_sample().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
devpriv->ai_bounce_buffer, samples);
if (devpriv->scan_delay < 1) {
devpriv->ai_bounce_buffer, samples);
if (devpriv->scan_delay < 1) {
- total = cfc_write_array_to_buffer(s,
- devpriv->ai_bounce_buffer,
- samples * sizeof(short));
+ total = comedi_buf_write_samples(s, devpriv->ai_bounce_buffer,
+ samples);
} else {
unsigned int pos = 0;
unsigned int to_read;
} else {
unsigned int pos = 0;
unsigned int to_read;
if (to_read > samples - pos)
to_read = samples - pos;
if (to_read > samples - pos)
to_read = samples - pos;
- total += cfc_write_array_to_buffer(s,
+ total += comedi_buf_write_samples(s,
devpriv->ai_bounce_buffer + pos,
devpriv->ai_bounce_buffer + pos,
- to_read * sizeof(short));
} else {
to_read = devpriv->chunk_num_samples -
devpriv->chunk_counter;
} else {
to_read = devpriv->chunk_num_samples -
devpriv->chunk_counter;