[SOLVED] How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
Moderators: khz, MattKingUSA
[SOLVED] How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
jack 1.9.12
zita-alsa-pcmi-0.3.2
zita-resampler-1.6.2
zita-ajbridge-0.8.2
I want to bridge ALSA applications to jack. I tried alsa loopback with alsa_in and zita-a2j.
Both alsa_in and zita-a2j seem to produce pop sounds at least once every minute.
Sound Output ---(Optional) dmix---> hw:Loopback,0,0 ---> hw:Loopback,1,0 = pcm.cloop --- zita-a2j or alsa_in ---> jack/cloop ---> jack/system
jackd -P 90 -d alsa -d hw:SB,0 -p 256 -n 3
"alsa_in -j cloop -d cloop -c 2 -p 2048 -n 3 -q 0" or "zita-a2j -j cloop -d cloop -p 256 -n 3 -r 48000 -c 2"
jack_connect cloop:capture_1 system:playback_1
jack_connect cloop:capture_2 system:playback_2
"mpv --audio-device=alsa/hw:Loopback,0,0 /path/to/file" or "mpv --audio-device=alsa/dmix /path/to/file"
I also tested zita-j2a which doesn't produce pop sounds.
How can I eliminate pop sounds from alsa_in or zita-a2j?
UPDATE: My latest comment on this thread mentions a few solutions.
zita-alsa-pcmi-0.3.2
zita-resampler-1.6.2
zita-ajbridge-0.8.2
I want to bridge ALSA applications to jack. I tried alsa loopback with alsa_in and zita-a2j.
Both alsa_in and zita-a2j seem to produce pop sounds at least once every minute.
Sound Output ---(Optional) dmix---> hw:Loopback,0,0 ---> hw:Loopback,1,0 = pcm.cloop --- zita-a2j or alsa_in ---> jack/cloop ---> jack/system
jackd -P 90 -d alsa -d hw:SB,0 -p 256 -n 3
"alsa_in -j cloop -d cloop -c 2 -p 2048 -n 3 -q 0" or "zita-a2j -j cloop -d cloop -p 256 -n 3 -r 48000 -c 2"
jack_connect cloop:capture_1 system:playback_1
jack_connect cloop:capture_2 system:playback_2
"mpv --audio-device=alsa/hw:Loopback,0,0 /path/to/file" or "mpv --audio-device=alsa/dmix /path/to/file"
I also tested zita-j2a which doesn't produce pop sounds.
How can I eliminate pop sounds from alsa_in or zita-a2j?
UPDATE: My latest comment on this thread mentions a few solutions.
Last edited by crocket on Sun Aug 04, 2019 1:03 pm, edited 1 time in total.
- lilith
- Established Member
- Posts: 1042
- Joined: Fri May 27, 2016 11:41 pm
- Location: bLACK fOREST
- Contact:
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
Crackles or pops? Any difference when changing the sampling rate? I have similar problems with the alsa and zita bridges. Pulseaudio works fine instead. In my case it seems to be a bug in the alsa soundcard driver.
https://soundcloud.com/lilith_93
latest: https://soundcloud.com/lilith_93/days-of-terror
_____________________________
Debian 9 (XFCE) & KXStudio repos
latest: https://soundcloud.com/lilith_93/days-of-terror
_____________________________
Debian 9 (XFCE) & KXStudio repos
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
lilith wrote:Crackles or pops? Any difference when changing the sampling rate? I have similar problems with the alsa and zita bridges. Pulseaudio works fine instead. In my case it seems to be a bug in the alsa soundcard driver.
Pulseaudio also uses the alsa soundcard driver. All audio uses ALSA.
Then it should also produce errors with Pulseaudio if it was a bug in the alsa soundcard driver?
FZ - Does humor belongs in Music?
GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
- I don't care about the freedom of speech because I have nothing to say.
- lilith
- Established Member
- Posts: 1042
- Joined: Fri May 27, 2016 11:41 pm
- Location: bLACK fOREST
- Contact:
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
Good point. I will check tomorow what a guy from alsa and falkTX wrote me in IRC. I should still have the logs somewhere. Can also be a bridge problem.
https://soundcloud.com/lilith_93
latest: https://soundcloud.com/lilith_93/days-of-terror
_____________________________
Debian 9 (XFCE) & KXStudio repos
latest: https://soundcloud.com/lilith_93/days-of-terror
_____________________________
Debian 9 (XFCE) & KXStudio repos
-
- 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?
FWIW, I never got the alsa jack plugin nor the alsa loopback interface + alsa_in/out working perfectly, did spend quite a lot of time on it. The PA bridge seems to work fine though (except quite high latency).
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
For REAPER on Linux information: https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux

Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
Jack Winter wrote:FWIW, I never got the alsa jack plugin nor the alsa loopback interface + alsa_in/out working perfectly, did spend quite a lot of time on it. The PA bridge seems to work fine though (except quite high latency).
Ideally, all applications should expose jack ports and not mess with jack patchbay.
Is there a web browser that supports jack properly? Firefox supports jack half-assedly. It tries to be its own patchbay, and I can't turn firefox internal jack patchbay off. It also doesn't expose microphone to jack.
Chromium-based browsers are not going to support jack.
- lilith
- Established Member
- Posts: 1042
- Joined: Fri May 27, 2016 11:41 pm
- Location: bLACK fOREST
- Contact:
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
lilith wrote:Good point. I will check tomorow what a guy from alsa and falkTX wrote me in IRC. I should still have the logs somewhere. Can also be a bridge problem.
I found it. Problem is that the format (e.g. S32_LE) used by the alsa bridge is not supported by my interface driver while direct alsa can use a different format.
https://soundcloud.com/lilith_93
latest: https://soundcloud.com/lilith_93/days-of-terror
_____________________________
Debian 9 (XFCE) & KXStudio repos
latest: https://soundcloud.com/lilith_93/days-of-terror
_____________________________
Debian 9 (XFCE) & KXStudio repos
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
lilith wrote:I found it. Problem is that the format (e.g. S32_LE) used by the alsa bridge is not supported by my interface driver while direct alsa can use a different format.
What do you mean by direct alsa? Do you mean alsa loopback?
In my asoundrc, every device including alsa loopback conforms to S32_LE format.
Did you figure out how to fix the issue?
- lilith
- Established Member
- Posts: 1042
- Joined: Fri May 27, 2016 11:41 pm
- Location: bLACK fOREST
- Contact:
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
crocket wrote:lilith wrote:I found it. Problem is that the format (e.g. S32_LE) used by the alsa bridge is not supported by my interface driver while direct alsa can use a different format.
What do you mean by direct alsa? Do you mean alsa loopback?
In my asoundrc, every device including alsa loopback conforms to S32_LE format.
Did you figure out how to fix the issue?
Yes, when I use direct alsa, i.e. not using Jack but choosing Alsa directly in a DAW for instance the sound is good. As soon I use the bridge (e.g. firefox -> alsa loopback -> jack) I get crackles. When I use pulseaudio jack the sound is also good. I never found a solution for this and finally came to the conclusion that it's a problem of the interface (Zoom R8). What interface are you using and what Linux and kernel version?
https://soundcloud.com/lilith_93
latest: https://soundcloud.com/lilith_93/days-of-terror
_____________________________
Debian 9 (XFCE) & KXStudio repos
latest: https://soundcloud.com/lilith_93/days-of-terror
_____________________________
Debian 9 (XFCE) & KXStudio repos
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
lilith wrote:As soon I use the bridge (e.g. firefox -> alsa loopback -> jack) I get crackles. When I use pulseaudio jack the sound is also good. I never found a solution for this and finally came to the conclusion that it's a problem of the interface (Zoom R8). What interface are you using and what Linux and kernel version?
When I use jack locally, the interface is the onboard sound card called
Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA) (rev 40)
When I use netjack1, the master interface is HiFiBerry Amp2.
Both netjack1 and local jack experience crackles when alsa loopback is involved.
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
According to
the following devices support S32_LE
When only ALSA is used, S32_LE is supported properly. You mentioned that crackles happen because sound interfaces don't support S32_LE.
If I made everything conform to S16_LE format, would crackles go away?
aplay -D alsa-device --dump-hw-params /path/to/any_sound_file
the following devices support S32_LE
- The onboard soundcard of my desktop
- HiFiBerry Amp2
- ALSA loopback
- dmix based on ALSA loopback and any hardware sound interface
When only ALSA is used, S32_LE is supported properly. You mentioned that crackles happen because sound interfaces don't support S32_LE.
If I made everything conform to S16_LE format, would crackles go away?
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
lilith wrote:what Linux and kernel version?
Gentoo Linux
4.19.27-gentoo-r1 on my desktop computer
4.19.30-v8+ on raspberry pi 3 B+ which runs HiFiBerry Amp2
- lilith
- Established Member
- Posts: 1042
- Joined: Fri May 27, 2016 11:41 pm
- Location: bLACK fOREST
- Contact:
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
The S32_LE was just an example. I don't know which formal is used by the alsa bridge or by pure alsa. Can you make a test with an AVLinux stick? Sorry, I can't offer any solution. Maybe tramp or CrocoDuck knows what might be going on? Or you ask at the KXstudio channel on IRC or Discord.
https://soundcloud.com/lilith_93
latest: https://soundcloud.com/lilith_93/days-of-terror
_____________________________
Debian 9 (XFCE) & KXStudio repos
latest: https://soundcloud.com/lilith_93/days-of-terror
_____________________________
Debian 9 (XFCE) & KXStudio repos
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
lilith wrote:The S32_LE was just an example. I don't know which formal is used by the alsa bridge or by pure alsa. Can you make a test with an AVLinux stick? Sorry, I can't offer any solution. Maybe tramp or CrocoDuck knows what might be going on? Or you ask at the KXstudio channel on IRC or Discord.
It seems that I need to follow instructions on
- http://jackaudio.github.io/faq/linux_rt_config.html
- https://github.com/jackaudio/jackaudio.github.com/wiki/Cgroups
- http://proaudio.tuxfamily.org/wiki/index.php?title=DAW_Digital_Audio_Workstation#Instructions_for_3.x_Kernels
The latter 2 links talk about cgroup realtime scheduling. I haven't yet tested cgroup realtime scheduling. Tomorrow, I will test it.
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
crocket wrote:Firefox supports jack half-assedly. It tries to be its own patchbay, and I can't turn firefox internal jack patchbay off.
I use Firefox with JACK. I use Arch and the version of Firefox in the official Arch repos has been compiled with JACK support.
I use Catia to manage JACK connections and Firefox appears as a JACK client called 'Audio IPC Server'. It auto-connects to the system outputs. Other than that I'm not sure what you mean about Firefox being its own patchbay.
Return to “System Tuning and Configuration”
Who is online
Users browsing this forum: No registered users and 2 guests