06-27-2021, 04:40 AM
Just a small update to my previous post. I can confirm that module-loopback works fine and latency is much lower than ffmpeg.
Code:
# mix modem audio
amixer -c 0 cset "name=AIF2 Digital ADC Capture Switch" on
amixer -c 0 cset "name=AIF2 ADC Mixer AIF1 DA0 Capture Switch" on
# mute internal mic and speaker
amixer -c 0 cset "name=Mic1 Capture Switch" off
amixer -c 0 cset "name=Line Out Playback Switch" off
mod1=$(pactl load-module module-loopback source=$source_pine sink=$sink_usb latency_msec=20)
mod2=$(pactl load-module module-loopback source=$source_usb sink=$sink_pine latency_msec=20)
echo Press enter to stop
read l
pactl unload-module $mod1
pactl unload-module $mod2
amixer -c 0 cset "name=AIF2 Digital ADC Capture Switch" off
amixer -c 0 cset "name=AIF2 ADC Mixer AIF1 DA0 Capture Switch" off