Page 4 of 4

Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?

Posted: Wed May 15, 2019 2:13 am
by crocket
merlyn wrote:Just to get this straight:

You start JACK on the RPi. The RPi is the master and takes input over the network from your desktop using netone.

To use headphones on your desktop you need alsa_in. So clicks and pops through the speakers are nothing to do with alsa_in.

Are the clicks and pops you refer to only in the headphones?
ALSA loopback captures audio from alsa applications. alsa_in reads audio from ALSA loopback.
alsa_out routes audio from alsa_in to headphones.

Both speakers and headphones get pops from alsa_in.

Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?

Posted: Wed May 15, 2019 7:53 am
by Jack Winter
Did you try the builtin clients instead of alsa_in/out? On JACK1 the -A parameter and on JACK2 the audioadapter client? No idea if they would work better, but maybe worth a try.

Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?

Posted: Mon May 20, 2019 5:35 am
by crocket
Jack Winter wrote:Did you try the builtin clients instead of alsa_in/out? On JACK1 the -A parameter and on JACK2 the audioadapter client? No idea if they would work better, but maybe worth a try.
audioadapter is not better than alsa_in and alsa_out.

Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?

Posted: Mon May 20, 2019 4:15 pm
by merlyn
I use the ALSA JACK plugin.

https://alsa.opensrc.org/Jack_(plugin)

I didn't set it up myself -- it's an option in Cadence, the JACK frontend I use.

Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?

Posted: Mon May 20, 2019 9:15 pm
by crocket
merlyn wrote:I use the ALSA JACK plugin.

https://alsa.opensrc.org/Jack_(plugin)

I didn't set it up myself -- it's an option in Cadence, the JACK frontend I use.
With that, my jack patchbay loses the ability to route the sound from ALSA.

Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?

Posted: Tue May 21, 2019 11:39 am
by merlyn
You could try making the desktop the master and the RPi the slave, then use alsa_out to connect to the DAC on the RPi.

Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?

Posted: Wed May 22, 2019 6:17 am
by crocket
merlyn wrote:You could try making the desktop the master and the RPi the slave, then use alsa_out to connect to the DAC on the RPi.
The fact that web browsers don't support jack doesn't change even if I swap the master and the slave.
Web browsers should support JACK. Firefox abandoned JACK for years.

Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?

Posted: Wed May 22, 2019 1:51 pm
by crocket
I discovered that mpv has no problem with zita-a2j, but vivaldi sometimes produces pops.
I suspect that vivaldi doesn't properly prioritize video and audio, but it is far easier for mpv to do so.
Web browsers are not optimized for real-time video and audio.
That's why web browsers send occasional pops to zita-a2j and alsa_in.
But, the pops are not loud. It is usually quiet pops from web browsers.

I can still see xruns from zita-a2j and alsa_in while the CPU load is 100% although it shouldn't produce xruns because of cgroup realtime settings.

Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?

Posted: Sun Aug 04, 2019 11:24 am
by crocket
[SOLUTION 1]

I realized that I could just connect my desktop computer's line out to a line-in of a USB audio interface plugged into Raspberry Pi 3 B+.
line-in would be just another JACK client on Raspberry Pi 3 B+.

This way, jack runs only on Raspberry Pi 3 B+, and my desktop computer can happily use ALSA.

There would be no need for a bridge between ALSA and JACK which produces pops and crackles. Raspberry Pi 3 B+ runs only mpv which supports JACK.

I'm considering buying Behringer U-Control UCA202 as the USB audio interface.

[SOLUTION 2]

If every audio application that I use on my desktop computer supported JACK, I could eliminate the bridge between ALSA and JACK which produces pops and crackles. But, that's not possible since dosbox doesn't support JACK. Firefox supports JACK, but it does not support JACK satisfactorily.