[SOLVED] How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
Moderators: MattKingUSA, khz
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
I'm stupid but what I would do first is record the pops and then analyse the recorded sound so that I might identify a probable origin.
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
Firefox automatically connects to system outputs. That's the problem. I want to control jack connections with my own jack patchbay.merlyn wrote: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.
-
- 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?
The Firefox JACK code was written by zam :
http://www.zamaudio.com/?p=1580
In another thread it was found that alsa_in worked without glitches using the minimum of options.
viewtopic.php?f=27&t=19610&start=15
So you could try
http://www.zamaudio.com/?p=1580
In another thread it was found that alsa_in worked without glitches using the minimum of options.
viewtopic.php?f=27&t=19610&start=15
So you could try
Code: Select all
alsa_in -j cloop -d cloop
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
I think the problem is too much jitter coming from ALSA loopback because softwares like mpv and firefox and vivaldi feed sound signals into ALSA loopback instead of hardware capture devices. Softwares have to compete each other for CPU resource. Also, xruns between ALSA loopback and alsa_in/zita-a2j cannot be detected by either alsa_in or zita-a2j.merlyn wrote:The Firefox JACK code was written by zam :
http://www.zamaudio.com/?p=1580
In another thread it was found that alsa_in worked without glitches using the minimum of options.
viewtopic.php?f=27&t=19610&start=15
So you could tryCode: Select all
alsa_in -j cloop -d cloop
-
- 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?
After you type alsa_in it outputs 'delay = xxxx'. If the delay changes there is a glitch. To stop the delay changing leave out the options specifying the size of the buffer used for re-sampling.
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
I get no delay from alsa_in after configuring realtime cpu scheduling for rtaudio cgroup. What happens if I don't specify "-p" and "-n" for alsa_in?merlyn wrote:After you type alsa_in it outputs 'delay = xxxx'. If the delay changes there is a glitch. To stop the delay changing leave out the options specifying the size of the buffer used for re-sampling.
Code: Select all
alsa_in -j cloop -d cloop -c 2 -p 2048 -n 3 -q 1
(Is it 256 frames per period and 3 periods per buffer? "-p" can be bytes or frames per period.)
It seems that alsa_in is better than zita-a2j at handling alsa loopback.
However, I still haven't managed to eliminate pops.
Last edited by crocket on Sun Apr 28, 2019 2:01 pm, edited 1 time in total.
-
- 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 mean the output in the terminal. Here's my output:
So if you see 'delay = xxxx' in your terminal and it changes then that's the cause of the glitches and it was fixed on my system by using only -j and -d.
Code: Select all
alsa_in -j photon -d hw:2
selected sample format: 24bit - real
delay = 2968
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
Delay doesn't change randomly over time whether or not I specify "-p" and "-n". What are the values of "-p" and "-n" if I don't specify them?merlyn wrote:I mean the output in the terminal. Here's my output:So if you see 'delay = xxxx' in your terminal and it changes then that's the cause of the glitches and it was fixed on my system by using only -j and -d.Code: Select all
alsa_in -j photon -d hw:2 selected sample format: 24bit - real delay = 2968
Why do I hear pops even if delay doesn't change?
-
- 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 don't know but bigger than 2048.crocket wrote:What are the values of "-p" and "-n" if I don't specify them?
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
I just read alsa_in.c. The default period_size is 1024. The default number of periods is 2.merlyn wrote:I don't know but bigger than 2048.crocket wrote:What are the values of "-p" and "-n" if I don't specify them?
Even with "-p 1024 -n 2", I can still hear glitches in audio. Glitches occur even if delay doesn't change.
-
- 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?
That's strange because the delay is much bigger when I leave options off compared to specifying a 1024 buffer.crocket wrote:The default period_size is 1024. The default number of periods is 2.
-
- 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?
What delay do you get? On the other thread low delays e.g. 144 weren't working.crocket wrote:Glitches occur even if delay doesn't change
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
merlyn wrote:What delay do you get? On the other thread low delays e.g. 144 weren't working.crocket wrote:Glitches occur even if delay doesn't change
Code: Select all
~> alsa_in -j cloop -d cloop -p 256 -n 3
selected sample format: 32bit
delay = 1195
delay = 769
delay = 770
-
- 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?
Code: Select all
~> alsa_in -j cloop -d cloop -p 256 -n 3
selected sample format: 32bit
delay = 1195
delay = 769
delay = 770
Re: How can I eliminate pop sounds from alsa_in and zita-a2j working on ALSA loopback?
The delay stabilizes after 770. It is ok for delay to change for the first few seconds.merlyn wrote:That means your delay is changing. On my output I get a delay value and it stays there. Just leave out -p and -n.Code: Select all
~> alsa_in -j cloop -d cloop -p 256 -n 3 selected sample format: 32bit delay = 1195 delay = 769 delay = 770
Not specifying -p and -n is the same as "-p 1024 -n 2". I confirmed by reading delay.