Skip to contentSkip to conversation

How to route pcm stream for UAC2 virtual sound card for lowest latency?

USB UAC2 Xuebing Wang 2 participants 2 messages Mar 10, 2015

lore
Share & tools
lore
#0 lore raw

Hi Community,

I am developing a commercial product based on Freescale iMX6SL + UAC2.

I can get UAC2 working for below command. 'hw:1,0' is the virtual sound card. 'hw:0,0' is the physical sound card. export RATE=44100; arecord -D hw:1,0 -c 2 -r $RATE -f S16_LE | aplay -c 2 -r $RATE -f S16_LE &

Any suggestions on what is the best way to get PCM stream from UAC2 virtual sound card and feed to the physical sound card, for the lowest latency purpose?

Thanks.

Signature · 1 line
Xuebing
#1 lore raw
Quoted 7 lines · Xuebing Wang

I am developing a commercial product based on Freescale iMX6SL + UAC2.

I can get UAC2 working for below command. 'hw:1,0' is the virtual sound card. 'hw:0,0' is the physical sound card. export RATE=44100; arecord -D hw:1,0 -c 2 -r $RATE -f S16_LE | aplay -c 2 -r $RATE -f S16_LE &

Any suggestions on what is the best way to get PCM stream from UAC2 virtual sound card and feed to the physical sound card?

This will not work unless the clocks of the virtual sound card (i.e., the USB bus clock) and the clock of the actual sound device are synchronized.

Otherwise, you have to write your own UAC2 driver.

Regards,
Clemens