[SOLVED] How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?

Optimize your system for ultimate performance.

Moderators: khz, MattKingUSA

crocket
Established Member
Posts: 60
Joined: Fri Mar 29, 2019 11:56 am

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

Postby crocket » Wed May 15, 2019 2:13 am

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.

Jack Winter
Established Member
Posts: 376
Joined: Sun May 28, 2017 3:52 pm

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

Postby Jack Winter » Wed May 15, 2019 7:53 am

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.
Reaper/KDE/Archlinux. i7-2600k/16GB + i7-4700HQ/16GB, RME Multiface/Babyface, Behringer X32, WA273-EQ, 2 x WA-412, ADL-600, Tegeler TRC, etc 8) For REAPER on Linux information: https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux

crocket
Established Member
Posts: 60
Joined: Fri Mar 29, 2019 11:56 am

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

Postby crocket » Mon May 20, 2019 5:35 am

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.

merlyn
Established Member
Posts: 482
Joined: Thu Oct 11, 2018 4:13 pm

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

Postby merlyn » Mon May 20, 2019 4:15 pm

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.

crocket
Established Member
Posts: 60
Joined: Fri Mar 29, 2019 11:56 am

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

Postby crocket » Mon May 20, 2019 9:15 pm

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.

merlyn
Established Member
Posts: 482
Joined: Thu Oct 11, 2018 4:13 pm

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

Postby merlyn » Tue May 21, 2019 11:39 am

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.

crocket
Established Member
Posts: 60
Joined: Fri Mar 29, 2019 11:56 am

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

Postby crocket » Wed May 22, 2019 6:17 am

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.

crocket
Established Member
Posts: 60
Joined: Fri Mar 29, 2019 11:56 am

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

Postby crocket » Wed May 22, 2019 1:51 pm

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.

crocket
Established Member
Posts: 60
Joined: Fri Mar 29, 2019 11:56 am

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

Postby crocket » Sun Aug 04, 2019 11:24 am

[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.


Return to “System Tuning and Configuration”

Who is online

Users browsing this forum: No registered users and 2 guests