All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Witzel <witzel.thomas@domain.hid>
To: xenomai@xenomai.org
Subject: Re: [Xenomai-help] RTDM/ALSA hybrid driver ?
Date: Tue, 31 Oct 2006 21:45:41 -0500	[thread overview]
Message-ID: <200610312145.42032.witzel.thomas@domain.hid> (raw)
In-Reply-To: <453FEE9F.9080209@domain.hid>

On Wednesday 25 October 2006 19:09, you wrote:
> > Fairly hard. I'm controlling a physics experiment with this (being short
> > the money for a function generator that will do exactly what I need).
> > This is going to be a nasty hack (given the time constraints to get this
> > accomplished).
>
> What order or dimension do those time constraints have? I.e. how long
> will the piece of output pattern be you can write ahead-of-time into the
> hardware?
Oh I was talking about the time constraints to get this implemented. I spent 
some more time on building the hardware interface between sound card output 
and experiment and I'm now back at the software.
The time constraint is that I'd like to playback a sound sample within 500us 
(or better if possible) of a trigger. The sample is short enough to fit in 
one period/buffer of the sound driver, so no "reloading" of the buffer is 
required.
> Well, understanding how the hardware and the original driver work will
> likely be unavoidable ;). Furthermore, be warned about interferences by
> other PCI users. Shutting them down or switching off DMA where feasible
> may be required.
I have a forked driver now, which actually still plays sound over the ALSA 
interface. I think the key routine to modify is snd_pcm_trigger, which 
basically starts,pauses,resumes or stops playback. The problem is that the 
routine is called from the layer above (somewhere in ALSA) already within a 
spin_lock, so I can't really wait directly in this routine. 
My idea would be that it would be best if the trigger routine for the START 
command would just activate a realtime thread that waits for the external 
event and then does what the trigger start would have done. 
> Jan


      parent reply	other threads:[~2006-11-01  2:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-25 20:10 [Xenomai-help] RTDM/ALSA hybrid driver ? Thomas Witzel
2006-10-25 20:34 ` Jan Kiszka
2006-10-26  3:13   ` Romain Lenglet
2006-11-01  5:18     ` Thomas Witzel
2006-11-01  6:58       ` Romain Lenglet
2006-11-01 12:45         ` Thomas Witzel
2006-11-01 13:28           ` Wolfgang Grandegger
     [not found] ` <200610251640.22737.witzel.thomas@domain.hid>
     [not found]   ` <453FEE9F.9080209@domain.hid>
2006-11-01  2:45     ` Thomas Witzel [this message]

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=200610312145.42032.witzel.thomas@domain.hid \
    --to=witzel.thomas@domain.hid \
    --cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.