PCM/ALSA loopback (codec-->DMA_RX-->DMA_TX-->codec)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux