Re: Correct location for ADC/DAC drivers



On Sun 6 May 2007 12:01, Robert Schwebel pondered:
On Sun, May 06, 2007 at 02:19:59PM +0200, Bodo Eggert wrote:
Since you ask for random thoughts:

IO of data streams from or to a DAC/ADC is essentially what soundcards
do. I'm wondering if these cards are similar enough to use alsa, and if
using that interface would ease or hinder programming the driver.

I had a short look at ALSA and it looks like it is a little bit too
focussed towards "normal" audio. For example, if follows an asynchronous
model in the sense that an application can read/write to a buffer at any
time, taken that the ringbuffer doesn't overflow. That's not enough for
example for control applications; you need the option for real
synchronous operation there.

Yes - there are too many applications which require tight/sync connection with
the data - control loops, software radios, machine control, etc - all have
much different needs than audio, hwmon, or touchscreen.

IMHO we need an API which offers

- kernel ring buffers (to make it sure no data gets lost)
- generic data types (streaming plain ADC values is just the simplest
case; we also have for example streaming FPGA data containing
preprocessed data sets)
- optional timestamping for each sample
- zero-copy from hardware into userspace memory, with DMA support

I am assuming that the driver takes care of all DMA/coherency issues that
might pop up? (and handles all interrupts)?

- application notification every N samples (N >= 1)

v4l2 may also be worth a look; but in the end I suppose they are all
specialized sub-cases of what we'd need for fast DAQ.

I would guess that something like v4l might be the best bet - the driver
provides a few mmapped buffers that you can read/write into, and some
mechanism to sync in/out of the buffers.

I was actually looking at UIO, but thought that since we really desire the
kernel ring buffers, that a think model might be better.?

http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/gregkh-01-driver/uio-documentation.patch

-Robin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: WDM streaming driver and user mode interaction
    ... On Windows that's the default way of doing streaming. ... >> AVStream ... >>> Actually I am refering to the article WDM streaming driver and user ... >>> to be able to send video frames or video streams ...
    (microsoft.public.development.device.drivers)
  • [PATCH 1/6] iw_cxgb3: Streaming -> RDMA mode transition fixes.
    ... our current scheme to transition the connection from ... streaming to rdma mode is broken on the passive side. ... and driver now support a new transition scheme for the passive side: ... driver posts last streaming message via TX_DATA message (MPA start ...
    (Linux-Kernel)
  • Re: ? How to - Stream audio and/or video via windows media player
    ... To do the true streaming, and real control of the streaming, you'll need a ... It'll only install on a server OS such as Win 2003 ... You should only need to pass the audio clip url to the control that is ... If the file is on another site, you shouldn't need a streaming media server ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Vista-Cannot view stream on full screen
    ... So all three of you having this problem have the exact same Intel Graphics ... Media Accelerator and the exact same driver version. ... I'm having the same problem when streaming, work fine if a play a file ... Windows Media Player 11.0.6000.6344 ...
    (microsoft.public.windowsmedia.player)
  • Re: Writing files in kernel Mode
    ... Currently We are on the camera device, where in the video streaming is ... done at device and the streamed video data is transferred through usb to PC. ... Here, we have used isousb streamed sample driver files, where we build the ... I tried to use tthe file.open, but it seems using files in kernel mode is ...
    (microsoft.public.development.device.drivers)

Loading