From: Marcus Blomenkamp <Marcus.Blomenkamp@epost.de>
To: alsa-devel@lists.sourceforge.net
Subject: design suggestions for minimal-latency full-duplex io?
Date: Mon, 3 Feb 2003 16:48:48 +0100 [thread overview]
Message-ID: <200302031648.48890.Marcus.Blomenkamp@epost.de> (raw)
Hi there.
What is the best way to achieve minimal transport latency in an application
constanty capturing data from one interface and playing it through another.
The purpose of this app would be some kind of software loop-through
converter. My problem domain is that I have my PC connected to an amplifier
through SPDIF while the TV-card is connected to the soundcard only through
analog wires. However my sound chip CMI8738 does not suppport hardware
realtime monitoring from analog input to digital output. So my suggestion was
to concurrenly read data from the ADC input and write it to SPDIF output.
I initially wrote this as an OSS app but i'm slightly dissappointed about the
minimal IO latency I could reach with the common iterative read/write
mechanism. So I decided to try the ALSA way to reduce the throughput delay.
Is it possible to have both stream pointers working on the same physical
buffer? A slightly delayed start of playback should then give a nice IO
latency. Are there any other approaches viable? Ideally i'd like to get this
working while not depending on userspace scheduling heavily.
Any suggestions/constraints about the following ideas?
1. traditional blocking read/write in seperate threads
2. traditional non-blocking read/write in a single thread
3. asynchronous SIG_IO triggered read/write handling
4. mmap'ed buffer for read+write
Especially for the last candidate i'd appreciate any kind of pseudo-code since
i'm not yet quite familiar with ALSA and MMAP audio IO.
Regards, Marcus
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
next reply other threads:[~2003-02-03 15:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-03 15:48 Marcus Blomenkamp [this message]
2003-02-03 16:12 ` design suggestions for minimal-latency full-duplex io? Paul Davis
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=200302031648.48890.Marcus.Blomenkamp@epost.de \
--to=marcus.blomenkamp@epost.de \
--cc=alsa-devel@lists.sourceforge.net \
/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.