linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Robert Schwebel <r.schwebel@pengutronix.de>
To: Bodo Eggert <7eggert@gmx.de>
Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org,
	Robin Getz <rgetz@blackfin.uclinux.org>
Subject: Re: Correct location for ADC/DAC drivers
Date: Sun, 6 May 2007 18:01:04 +0200	[thread overview]
Message-ID: <20070506160104.GV22585@pengutronix.de> (raw)
In-Reply-To: <E1Hkfia-0000cJ-18@be1.lrz>

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.

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
- 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.

Robert
-- 
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hannoversche Str. 2, 31134 Hildesheim, Germany
   Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9

  parent reply	other threads:[~2007-05-06 16:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8fZXU-3EI-11@gated-at.bofh.it>
     [not found] ` <8haHG-6zd-19@gated-at.bofh.it>
     [not found]   ` <8hd2U-1Ca-39@gated-at.bofh.it>
     [not found]     ` <8heii-3GM-37@gated-at.bofh.it>
2007-05-06 12:19       ` Correct location for ADC/DAC drivers Bodo Eggert
2007-05-06 13:20         ` Paul Sokolovsky
2007-05-06 16:01         ` Robert Schwebel [this message]
2007-05-06 19:33           ` Robin Getz
2007-05-06 20:20         ` Guennadi Liakhovetski
2007-05-01 12:35 Stefan Roese
2007-05-01 21:03 ` Guennadi Liakhovetski
2007-05-02 10:25   ` Stefan Roese
2007-05-02 13:35     ` Robert Schwebel
2007-05-02 19:11       ` Russell King
2007-05-04  6:11         ` Stefan Roese
2007-05-04  7:44           ` Russell King
2007-05-04  8:24 ` Robert Schwebel
2007-05-04  8:54   ` Stefan Roese
2007-05-04 18:21     ` Robin Getz
2007-05-04 20:52       ` Robert Schwebel
2007-05-04 22:16         ` Robin Getz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070506160104.GV22585@pengutronix.de \
    --to=r.schwebel@pengutronix.de \
    --cc=7eggert@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=rgetz@blackfin.uclinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).