All of lore.kernel.org
 help / color / mirror / Atom feed
From: Norbert van Bolhuis <nvbolhuis@aimvalley.nl>
To: alsa-user@lists.sourceforge.net, alsa-devel@alsa-project.org
Subject: PCM/ALSA loopback (codec-->DMA_RX-->DMA_TX-->codec)
Date: Thu, 17 Jul 2008 12:58:02 +0200	[thread overview]
Message-ID: <487F25BA.6070902@aimvalley.nl> (raw)

to be able to easily check our entire analog audio in/out cicuits
(with a sweep generator feeding mic in and measuring the signal from
audio out) I'd like to know whether there's any low level loopback
available in ALSA core (or ALSA lib).

The closer to HW the better it is.

This is what our analog/digital audio path look like:

mic in -> analog in circuitry -> CODEC -> analog out circuitry -> out
                                   | |
                                   v ^
                                   | |
                                  -----
                                   CPU
                                  -----
                                  kernel
                                alsa core
                                ---------
                                 alsa lib
                              aplay/arecord


The problem is there's no loopback/echo nor sidetone possible with
the CODEC we use.
Also the DMA between CPU and CODEC cannot be looped (no DMA_RX-->DMA_TX
possible).

I know it's possible to loop digital audio in user-space with
arecord -D hw:0,0 .. | aplay -D hw:0,0 ..
This will probably give latencies of 10-100ms (depending upon CPU,
DMA priority, SW load, period_size, etc...). These are too high for the
sweep generator.

Is it possible to loopback a PCM in stream to a PCM out stream somehow
in ALSA core/lib ?

How does the latency ALSA lib example program do this ?


-- 
This message has been scanned for viruses and is believed to be clean

                 reply	other threads:[~2008-07-17 10:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=487F25BA.6070902@aimvalley.nl \
    --to=nvbolhuis@aimvalley.nl \
    --cc=alsa-devel@alsa-project.org \
    --cc=alsa-user@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.