On 27/01/16 21:28, Spencer E. Olson wrote:
These patches implement a proposal to very slightly extend the interpretation of cmd->stop_arg when cmd->stop_src == TRIG_NONE. Normally, for output subdevices, when the user specifies cmd->stop_src == TRIG_NONE, the device should continuously output data that must also be continually fed by the user via either a mmap/comedi_mark_buffer_written or an write(...) operation. The intent of this proposal is to also allow a user to have a specific buffer repeated as-is indefinitely. This is accomplished by the user specifying the length of the fixed buffer via cmd->stop_arg > 0. It should be noted that cmd->stop_arg in this case must also be <= the size of the available dma buffer. The prior behavior is maintained when cmd->stop_arg == 0, which is also enforced by the *_cmdtest functions for many, if not all output devices. All devices which do not implement this new behavior should simply continue to enforce cmd->stop_arg == 0 in *_cmdtest functions. These patches implement the extended interpretation of cmd->stop_arg >0 for when cmd->stop_src==TRIG_NONE for National Instruments m/e-series devices only that are based on the ni_mio_common driver. Currently, these changes only apply to analog output and cdio output devices. This patches also implement suggestions made by Ian Abbot, namely: (1) all patches were run through checkpatch.pl and fixed accordingly to comply with coding standards, (2) all block comments were changed to comply with comments beginning on the line after the /* delimiter, (3) dev_warn use in drivers/mite.c as used during debugging was changed to dev_dbg, and (4) mite.c logic statements were made simpler and more robust following Ian's suggestions. ** ** v2 changes ** ** (5) Prior PATCH 2/3 (staging: comedi: ni_mio_comon: adds finite regeneration to AO output) was split into 4 patches (current PATCHES [2-5]/6) that keep the changes a bit more atomic. Spencer E. Olson (6): staging: comedi: mite: enable continuous regeneration of finite samples staging: comedi: ni_mio_common: Cleans up/clarifies ni_ao_reset staging: comedi: ni_mio_common: make more bits in ao_cmd1 reg be stateful staging: comedi: ni_mio_common: Cleans up/clarifies ni_ao_cmd staging: comedi: ni_mio_common: adds finite regeneration to AO output staging: comedi: ni_mio_common: add finite regeneration to dio output drivers/staging/comedi/drivers/mite.c | 72 +++- drivers/staging/comedi/drivers/mite.h | 3 + drivers/staging/comedi/drivers/ni_mio_common.c | 573 ++++++++++++++++++------- 3 files changed, 479 insertions(+), 169 deletions(-)
Thanks! Reviewed-by: Ian Abbott <abbotti@xxxxxxxxx> -- -=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@xxxxxxxxx> )=- -=( Web: http://www.mev.co.uk/ )=- _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel