[alsa-devel] Playback/Capture on a codec-to-codec link

Gabriele Zampieri gabbla.malist at gmail.com
Thu Jan 9 09:31:54 CET 2020


Dear all,

I'm working on a board that is equipped with a Bluetooth chip and a gsm
phone, both connected to the CPU (AM3352) on 2 different pcm. I wrote the
codecs and they are working (read as: I can play/record on both devices).
What I want to achieve now is to route those pcm together and still being
able to (at least) play audio on both. I tried alsaloop, but it eats too
much CPU (80% +) even in half duplex loop (BT capture => GSM playback), and
it was the only application running. In [1] I saw that I should be able to
route the codec together in kernel space (to avoid data copy between user
and kernel spaces). I did not tried that solution yet because it's not
really clear to me how to implement it, any suggestions/examples? If I
follow that solution, can I still use those PCM to playback my audio file
(I see that I can disconnect that link through a mixer control, so this
should be possible)?

Again any suggestion is really appreciated.

Best regards,
Gabriele

[1]:
https://www.kernel.org/doc/html/latest/sound/soc/dpcm.html#hostless-pcm-streams


More information about the Alsa-devel mailing list