Skip to content
Commit 1dc6e729 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: das16: fix DMA size for short transfers



Currently this driver alwasy programs the DMA transfer to be the allocated
size of the DMA buffer. When the async command 'stop_src' is TRIG_COUNT its
possible (likely) for the last transfer to be less than the buffer size.

Introduce a helper function, das16_ai_setup_dma(), to calculate the actual
size of the DMA transfer based on the number of samples remaining and the
number of unread samples.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 42c44682
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment