[SOLVED] How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
Moderators: MattKingUSA, khz
[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: 1706
- Joined: Fri May 27, 2016 11:41 pm
- Location: bLACK fOREST
- Has thanked: 122 times
- Been thanked: 57 times
- 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.
- khz
- Established Member
- Posts: 1648
- Joined: Thu Apr 17, 2008 6:29 am
- Location: German
- Has thanked: 42 times
- Been thanked: 92 times
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
Pulseaudio also uses the alsa soundcard driver. All audio uses ALSA.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.
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: 1706
- Joined: Fri May 27, 2016 11:41 pm
- Location: bLACK fOREST
- Has thanked: 122 times
- Been thanked: 57 times
- 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.
-
- Established Member
- Posts: 381
- 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?
Ideally, all applications should expose jack ports and not mess with jack patchbay.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).
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: 1706
- Joined: Fri May 27, 2016 11:41 pm
- Location: bLACK fOREST
- Has thanked: 122 times
- Been thanked: 57 times
- Contact:
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
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.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.
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
What do you mean by direct alsa? Do you mean 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.
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: 1706
- Joined: Fri May 27, 2016 11:41 pm
- Location: bLACK fOREST
- Has thanked: 122 times
- Been thanked: 57 times
- Contact:
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
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?crocket wrote:What do you mean by direct alsa? Do you mean 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.
In my asoundrc, every device including alsa loopback conforms to S32_LE format.
Did you figure out how to fix the issue?
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
When I use jack locally, the interface is the onboard sound card calledlilith 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 netjack1, the master interface is HiFiBerry Amp2.Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA) (rev 40)
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
If I made everything conform to S16_LE format, would crackles go away?
the following devices support S32_LEaplay -D alsa-device --dump-hw-params /path/to/any_sound_file
- The onboard soundcard of my desktop
- HiFiBerry Amp2
- ALSA loopback
- dmix based on ALSA loopback and any hardware sound interface
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?
Gentoo Linuxlilith wrote:what Linux and kernel version?
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: 1706
- Joined: Fri May 27, 2016 11:41 pm
- Location: bLACK fOREST
- Has thanked: 122 times
- Been thanked: 57 times
- 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.
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
It seems that I need to follow instructions onlilith 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.
The latter 2 links talk about cgroup realtime scheduling. I haven't yet tested cgroup realtime scheduling. Tomorrow, I will test it.
-
- Established Member
- Posts: 1392
- Joined: Thu Oct 11, 2018 4:13 pm
- Has thanked: 168 times
- Been thanked: 247 times
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
I use Firefox with JACK. I use Arch and the version of Firefox in the official Arch repos has been compiled with JACK support.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 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.