USB Sound pops at initial stream

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
steve303
Level 1
Level 1
Posts: 5
Joined: Mon Jun 21, 2021 12:03 pm

USB Sound pops at initial stream

Post by steve303 »

I've been having this problem on and off for a while and have researched various solutions with no resolution. Any initial sound output is preceded by a loud DC pop - almost as if the sound output is being switch on. This occurs whenever the sound output is changed from one application source to another ( *pop* system bell system bell *pop* jitsi *pop* chat application).

Here's the system details:

Code: Select all

CODENAME=ulyssa
EDITION="Cinnamon"
DESCRIPTION="Linux Mint 20.1 Ulyssa"
Kernel: 5.4.0-74-generic
 

Code: Select all

pactl list sinks
Sink #0
	State: SUSPENDED
	Name: alsa_output.usb-BEHRINGER_UMC202HD_192k-00.analog-stereo
	Description: UMC202HD 192k Analog Stereo
	Driver: module-alsa-card.c
	Sample Specification: s16le 2ch 48000Hz
	Channel Map: front-left,front-right
	Owner Module: 7
	Mute: no
	Volume: front-left: 20963 /  32% / -29.70 dB,   front-right: 20963 /  32% / -29.70 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor Source: alsa_output.usb-BEHRINGER_UMC202HD_192k-00.analog-stereo.monitor
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY 
	Properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "USB Audio"
		alsa.id = "USB Audio"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "2"
		alsa.card_name = "UMC202HD 192k"
		alsa.long_card_name = "BEHRINGER UMC202HD 192k at usb-0000:3c:00.0-1.2.3, high speed"
		alsa.driver_name = "snd_usb_audio"
		device.bus_path = "pci-0000:3c:00.0-usb-0:1.2.3:1.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1c.4/0000:04:00.0/0000:05:02.0/0000:3c:00.0/usb3/3-1/3-1.2/3-1.2.3/3-1.2.3:1.0/sound/card2"
		udev.id = "usb-BEHRINGER_UMC202HD_192k-00"
		device.bus = "usb"
		device.vendor.id = "1397"
		device.vendor.name = "BEHRINGER International GmbH"
		device.product.id = "0507"
		device.product.name = "UMC202HD 192k"
		device.serial = "BEHRINGER_UMC202HD_192k"
		device.string = "front:2"
		device.buffering.buffer_size = "17632"
		device.buffering.fragment_size = "4408"
		device.access_mode = "mmap"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		device.description = "UMC202HD 192k Analog Stereo"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-usb"
	Ports:
		analog-output: Analog Output (priority: 9900)
	Active Port: analog-output
	Formats:
		pcm
As you can see, the device goes into Suspend - which I thought was the issue.

I've tried setting the /proc power control:

Code: Select all

cat /sys/bus/usb/devices/usb3/power/control 
on


as well as creating UDEV rules for this:

Code: Select all

 cat /etc/udev/rules.d/70-usb-power.rules 
 ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1397", ATTR{idProduct}=="0507", TEST=="power/control", ATTR{power/control}="on"
I've tried removing the usb.core auto suspend in grub as well:

Code: Select all

cat /sys/module/usbcore/parameters/autosuspend
-1
as well as even setting the pulse audio variables to disable Idle suspend.
----------------------------------------------------------------------------------------

I kept thinking this is related to usb power suspension, but it may be related to some kind of stream lock - as it seems to occur regularly whenever the audio stream application source changes. At this point, I feel like I'm kinda at a loss, and would appreciate any insights into how I could resolve this annoying issue. Thanks in advance.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
all41
Level 19
Level 19
Posts: 9520
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: USB Sound pops at initial stream

Post by all41 »

steve303 wrote: Mon Jun 21, 2021 1:13 pm I've been having this problem on and off for a while and have researched various solutions with no resolution. Any initial sound output is preceded by a loud DC pop - almost as if the sound output is being switch on. This occurs whenever the sound output is changed from one application source to another ( *pop* system bell system bell *pop* jitsi *pop* chat application).

I kept thinking this is related to usb power suspension, but it may be related to some kind of stream lock - as it seems to occur regularly whenever the audio stream application source changes. At this point, I feel like I'm kinda at a loss, and would appreciate any insights into how I could resolve this annoying issue. Thanks in advance.
Hi steve303--welcome to the mint forums.
I've been having this problem on and off
Oh my--those once in a while issues are difficult.
methinks you have a better handle on the audio issue than I--but offering this:
Have a look at the alsa mixer settings in terminal:

Code: Select all

alsamixer
perhaps pulseaudio might be a solution:

Code: Select all

apt install pavucontrol
It's command line as well. Check the settings in those utilities

My sound output is coupled to an external surround system with subwoofers--and I remember having this
thump/click sound when starting .mp3--but not in several years and I don't remember the mitigation.
Before a computer shutdown I firstly power down the amps--which automatically disconnect the speakers before
poweroff so no thumps.
Forum member/moderator MrEen is the real sound authority here.
Unfortunately MrEen is hiatus for personal reasons--but you would do well to scan his posts,
you will gain insight and may even discover a solution.
Thumbs up for providing good info with your topic.
Cheers
Everything in life was difficult before it became easy.
steve303
Level 1
Level 1
Posts: 5
Joined: Mon Jun 21, 2021 12:03 pm

Re: USB Sound pops at initial stream

Post by steve303 »

Thanks. I was able to get the pulse sink device from going into suspend by removing the idle on suspend module in the pulse default.ca file. Unfortunately this didn't resolve the problem. I can faithfully reproduce the issue by changing audio output applications (eg. system to audacious or audacious to firefox or vice-versa). I noticed that monitoring the application streams in pavucontrol seems to suppress the popping. Finally, after some digging, I've found that when the popping does occurs the following appears at least once in system logs:

Code: Select all

kernel: [ 4143.952058] retire_capture_urb: XXXX callbacks suppressed
So I am a bit more confused, as I am not sure if this is a pulse issue affecting kernel usb module or a usb kernel issue affecting pulse. Based on the behaviour when pavucontrol is running, I am betting it is a pulse user space issue.
vimes666
Level 6
Level 6
Posts: 1228
Joined: Tue Jan 19, 2016 6:08 pm

Re: USB Sound pops at initial stream

Post by vimes666 »

(I realize this thread is 3 months old, but it may still help)
I had a similar problem. A (light) pop at the start of the audio and one 6 seconds after the audio stopped, followed by a very soft hum. I traced it back to the hdaudio being suspended.
I managed to fix it by setting the power control for hdaudio to 'on' in stead of 'auto' by doing

Code: Select all

sudo su

Code: Select all

echo "on" > /sys/bus/hdaudio/devices/hdaudioC0D0/power/control

Code: Select all

exit
Unfortunately the setting doesn't stick between boots. I did not find time for that part yet :)
If you think the issue is solved, edit your original post and add the word solved to the title.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: USB Sound pops at initial stream

Post by MrEen »

Code: Select all

sudo tee /etc/modprobe.d/snd-hda-intel.conf <<<'options snd-hda-intel power_save=0'
That's what was needed here. Becomes active after a reboot.
vimes666
Level 6
Level 6
Posts: 1228
Joined: Tue Jan 19, 2016 6:08 pm

Re: USB Sound pops at initial stream

Post by vimes666 »

@MrEen: Yes, I was looking for that one. Hda, I was looking for hdaudio, thats why I didnt find it. Thanks!
I hope it helps the topic starter too.
If you think the issue is solved, edit your original post and add the word solved to the title.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: USB Sound pops at initial stream

Post by MrEen »

You are welcome vimes666. :D
kc8oye
Level 1
Level 1
Posts: 29
Joined: Mon Nov 15, 2021 9:31 pm

Re: USB Sound pops at initial stream

Post by kc8oye »

I have this same issue!

I have just installed linux Mint 20.2 / cinnamon onto my Dell Inspiron 3670.. one of the questions I have... is that linux reports that I have an intel sound card which I don't.. it's a RealTek H.D card...

System: Kernel: 5.4.0-90-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 5.0.7
wm: muffin dm: LightDM Distro: Linux Mint 20.2 Uma base: Ubuntu 20.04 focal
Machine: Type: Desktop System: Dell product: Inspiron 3670 v: N/A serial: <filter> Chassis:
type: 3 serial: <filter>
Audio: Device-1: Intel Cannon Lake PCH cAVS vendor: Dell driver: snd_hda_intel v: kernel
bus ID: 00:1f.3 chip ID: 8086:a348

Below is my external interface for recording.
Device-2: Focusrite-Novation Scarlett 2i2 USB type: USB driver: snd-usb-audio
bus ID: 1-1:2 chip ID: 1235:8210
Sound Server: ALSA v: k5.4.0-90-generic
Locked

Return to “Sound”