[PATCH 0/3] continuous regeneration of finite samples

Spencer E. Olson olsonse at umich.edu
Tue Jan 12 08:17:32 UTC 2016


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.


Spencer E. Olson (3):
  staging: comedi: mite: enable continuous regeneration of finite
    samples
  staging: comedi: ni_mio_comon: adds finite regeneration to AO output
  staging: comedi: ni_mio_comon: 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(-)

-- 
1.9.1



More information about the devel mailing list