Digital Crackle with USB Audio Interfaces

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

User avatar
erlkönig
Established Member
Posts: 210
Joined: Tue May 31, 2022 8:58 am
Has thanked: 42 times
Been thanked: 48 times

Re: Digital Crackle with USB Audio Interfaces

Post by erlkönig »

Weird...
Did you have a look in the logs, if there are some messages concerning audio?
A shot in the dark: have you set samplerate/depth for all components by hand, just to make sure there's no resampling/dithering/oversampling, just to pass the zero and ones, as they come from the source?

Currently working with
https://www.honeysuckers.rocks/?lang=en
Fiddling with sequencers does not evolve into music necessarily and Mac users have smelly feet and guzzle little children.

User avatar
Impostor
Established Member
Posts: 1392
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 148 times
Been thanked: 366 times

Re: Digital Crackle with USB Audio Interfaces

Post by Impostor »

mnemonic wrote: Sun Mar 17, 2024 1:50 pm

And like this zoomed in:
Screenshot from 2024-03-17 14-34-28.png

Still a zero sample every 1/8th millisecond. Do you have (usb) devices which are polled with 8kHz frequency maybe? Gaming mouse, or wifi or bluetooth stuff?

mnemonic
Established Member
Posts: 17
Joined: Sun Apr 11, 2021 4:16 pm

Re: Digital Crackle with USB Audio Interfaces

Post by mnemonic »

Hi @Impostor

Impostor wrote: Sun Mar 17, 2024 2:47 pm

Do you have (usb) devices which are polled with 8kHz frequency maybe? Gaming mouse, or wifi or bluetooth stuff?

Hmmm, polling frequency? Don't know to be honest :oops:

But that made me check the USB devices again. Above all, I am still surprised that everything works perfectly with the old laptop. It's only the new laptop that has the problems.

The main difference between the two laptops is that the audio interfaces on the old laptop go to Bus 001 via the USB 2.0 hub

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 8087:0aaa Intel Corp. Bluetooth 9460/9560 Jefferson Peak (JfP)
Bus 001 Device 009: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 001 Device 012: ID 03f0:3d4a HP, Inc HP Link-5 transceiver
Bus 001 Device 013: ID 07fd:0005 Mark of the Unicorn 828ES
Bus 001 Device 014: ID 1235:8201 Focusrite-Novation Scarlett 18i20 USB
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 005: ID 0bda:0411 Realtek Semiconductor Corp. Hub

while on the new laptop they go via the USB 2.0 hub on Bus 003:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 029: ID 0bda:0411 Realtek Semiconductor Corp. Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 004: ID 8087:0033 Intel Corp. AX211 Bluetooth
Bus 003 Device 054: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 003 Device 057: ID 03f0:3d4a HP, Inc HP Link-5 transceiver
Bus 003 Device 058: ID 07fd:0005 Mark of the Unicorn 828ES
Bus 003 Device 059: ID 1235:8201 Focusrite-Novation Scarlett 18i20 USB
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

But even if I connect the audio interface directly to the USB port on the new laptop, the digital crackling occurs.

Bluetooth is activated in the BIOS of both systems (but deactivated in the OS). The wireless mouse and keyboard are also connected to both laptops via the same port on the docking station...

mnemonic
Established Member
Posts: 17
Joined: Sun Apr 11, 2021 4:16 pm

Re: Digital Crackle with USB Audio Interfaces

Post by mnemonic »

Moin @erlkönig

erlkönig wrote: Sun Mar 17, 2024 2:09 pm

Did you have a look in the logs, if there are some messages concerning audio?

Not really yet. I just searched for "USB" and "audio" and couldn't really identify anything.

The audio stream has now been running again for over three hours without any digital crackling. Sometimes it crackles constantly and then it doesn't crackle at all for ages.

erlkönig wrote: Sun Mar 17, 2024 2:09 pm

A shot in the dark: have you set samplerate/depth for all components by hand, just to make sure there's no resampling/dithering/oversampling, just to pass the zero and ones, as they come from the source?

Not sure what you mean, but the 18i20 is currently 44,1 KHz:

Code: Select all

pactl list short sinks
2	alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI3__sink	module-alsa-card.c	s24-32le 2ch 48000Hz	SUSPENDED
3	alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI2__sink	module-alsa-card.c	s24-32le 2ch 48000Hz	SUSPENDED
4	alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI1__sink	module-alsa-card.c	s24-32le 2ch 48000Hz	SUSPENDED
5	alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Headphones__sink	module-alsa-card.c	s32le 2ch 48000Hz	SUSPENDED
11	alsa_output.usb-DisplayLink_USB-C_Triple-4K_Dock_DGWC00110039681-02.analog-stereo	module-alsa-card.c	s16le 2ch 48000Hz	SUSPENDED
12	alsa_output.usb-Focusrite_Scarlett_18i20_USB_03003575-00.multichannel-output	module-alsa-card.c	s32le 10ch 44100Hz	SUSPENDED
14	alsa_output.usb-MOTU_828ES_0001f2fffe014ea9-00.multichannel-output	module-alsa-card.c	s24le 24ch 48000Hz	SUSPENDED
15	jack_out	module-jack-sink.c	float32le 2ch 48000Hz	RUNNING

I will try to follow your advice to take pulse and jack out of the equation first - that will take some time, I guess...

User avatar
sjzstudio
Established Member
Posts: 166
Joined: Fri Apr 10, 2020 11:24 pm
Has thanked: 19 times
Been thanked: 28 times

Re: Digital Crackle with USB Audio Interfaces

Post by sjzstudio »

I have encountered this same problem. It is random and has occurred on three PCs. It has also included RME UFX+ and Behringer uphoria 202HD. With the new AvLinux version, it has happened more often on the latest AMD-based PC. I don't know if it is related to the USB bus somehow. I ended up getting a PCIe USB3 card that RME recommends https://www.sonnetstore.com/products/a ... cie-4-port. We'll see if that makes a difference here.

This may have been heard at times when listening to Sptify desktop audio. And also using Mixbus 32C. I use Mixbus through ALSA. Restarting the audio engine might help. At the weekend, at the beginning of the session, I came across this again. But the problem disappeared and the rest of the day went smoothly.

Could this be caused by very fast DSP spikes, which are not visible in e.g. the Mixbus dsp indicator?

A.O.S.
Established Member
Posts: 12
Joined: Sun Jan 28, 2024 7:58 pm
Location: Germany
Has thanked: 5 times
Been thanked: 4 times

Re: Digital Crackle with USB Audio Interfaces

Post by A.O.S. »

I think, this could be an issue with the energy saving system which includes thermal control systems.

You should switch off everything that is related to energy saving. In UEFI/BIOS and Linux itself. I think the two primary causes could be in the PCI-E subsystem and slight thermal throttling of the CPU. In my experience these are the most common troublemaker when it comes to realtime applications.

Sadly a lot of modern Laptops are equipped with a undersized cooling solution where most of the thermal control is happening via throttling. Especially with modern CPUs which are trying aggressively to reach as high clock speeds as possible.

mnemonic
Established Member
Posts: 17
Joined: Sun Apr 11, 2021 4:16 pm

Re: Digital Crackle with USB Audio Interfaces

Post by mnemonic »

Hi @A.O.S. ,

thank you for the suggestions!

A.O.S. wrote: Mon Mar 18, 2024 3:59 pm

I think, this could be an issue with the energy saving system which includes thermal control systems.

You should switch off everything that is related to energy saving. In UEFI/BIOS and Linux itself. I think the two primary causes could be in the PCI-E subsystem and slight thermal throttling of the CPU. In my experience these are the most common troublemaker when it comes to realtime applications.

Sadly a lot of modern Laptops are equipped with a undersized cooling solution where most of the thermal control is happening via throttling. Especially with modern CPUs which are trying aggressively to reach as high clock speeds as possible.

I changed a few settings in the BIOS regarding power management and fan activity - I'm not sure if this had any effect on audio stability.

The digital crackling is so random that I can't tell which setting changed what....

But at the moment it seems only the MOTU 828es is still having problems. The Focusrite Scarlett 18i20 and also my Sennheiser BTD 600 Bluetooth-via-USB headphones work perfectly.

Since the MOTU is actually my everyday audio interface for listening to music and watching YT videos, I'll keep trying to solve the puzzle...

tseaver
Established Member
Posts: 408
Joined: Mon Mar 13, 2017 6:07 am
Has thanked: 12 times
Been thanked: 102 times

Re: Digital Crackle with USB Audio Interfaces

Post by tseaver »

@mnemonic

But at the moment it seems only the MOTU 828es is still having problems. The Focusrite Scarlett 18i20 and also my Sennheiser BTD 600 Bluetooth-via-USB headphones work perfectly.

Very interesting result. If I were to troubleshoot this, I would try taking the various bits out of the chain, e.g.:

  • Do things work (better) on the MOTU if you are listening on a hard-wired pair of headphones? Having both USB and Bluetooth in the audio signal path sounds like a recipe for unpredictable behavior.
Ubuntu, Mixbus32C; acoustic blues / country / jazz
mnemonic
Established Member
Posts: 17
Joined: Sun Apr 11, 2021 4:16 pm

Re: Digital Crackle with USB Audio Interfaces

Post by mnemonic »

Hi @tseaver ,

tseaver wrote: Sun Mar 24, 2024 2:36 am

Very interesting result. If I were to troubleshoot this, I would try taking the various bits out of the chain, e.g.:

  • Do things work (better) on the MOTU if you are listening on a hard-wired pair of headphones? Having both USB and Bluetooth in the audio signal path sounds like a recipe for unpredictable behavior.

I'm not sure if I understand you correctly, or perhaps I have expressed myself in a somewhat misleading way.

My observation was that I can currently select the audio output device via PulseAudio (828es and 18i20 both either directly or via Jack2, or the BTD-600 USB headphones directly) and only the 828es is still causing problems, both directly via the driver and via Jack2.

The sound source is always an audio stream on the laptop, either from a test tone generator, YT video or music via QuodLibet.
The headphones only ever run directly via PulseAudio, as I don't get them to work via Jack2.

I'm currently on my old laptop (without the 18i20 connected), where the 828es also works perfectly - as long as I use it via Jack2. Although there are no audible digital crackles via the PulseAudio driver, the MOTU mixer shows activity on channels where there shouldn't be any, From Computer 3, 4, 5, 7 & 8:

Screenshot from 2024-03-26 13-38-44.png
Screenshot from 2024-03-26 13-38-44.png (108.56 KiB) Viewed 423 times

If I use the 828es via Jack2 there is only audio activity on the first and second channel (TB Dock L & R) - as expected:

Screenshot from 2024-03-26 13-51-49.png
Screenshot from 2024-03-26 13-51-49.png (177.28 KiB) Viewed 423 times
Screenshot from 2024-03-26 13-41-39.png
Screenshot from 2024-03-26 13-41-39.png (34.71 KiB) Viewed 423 times

I hope that's a bit clearer now!

On my new laptop I get audible digital crackles with the 828es whether I use PulseAudio or Jack. Next I will try 828es on my new laptop via ALSA with test tone generator in Reaper...

mnemonic
Established Member
Posts: 17
Joined: Sun Apr 11, 2021 4:16 pm

Re: Digital Crackle with USB Audio Interfaces

Post by mnemonic »

Hi all,

now it's official - I've made all the adjustments to optimize the audio performance and the Focusrite Scarlett 18i20 audio interface works flawlessly with Sample Rate at 48000, 512 Buffer Size and Periods/Buffer of 3, both via the Thunderbolt 3 docking station and via the USB ports A and C directly on the laptop with PulseAudio, Jack and pure ALSA (via Reaper). It just works.

But unfortunately not the MOTU 828es. And it seems to have gotten worse the more performance optimizations I've made. But this cannot be proven empirically, as the digital crackling occurs very irregularly.

But now I am sure that it is due to the 828es. The only thing that puzzles me is that I have been able to get the 828es to work with the motu-avb-usb @Drumfix driver on my HP ZBook Studio G5, HP Z840 Workstation and HP Pavillion Consumer PC. Only on the HP ZBook Studio G10 it won't work.

I will have another look at the MOTU threads here in the forum, as I now strongly suspect that it is a driver and/or firmware problem. I have already installed the experimental firmware from @AudioNarwhal on my 828es and tried various driver and kernel patches. Maybe I will be able to understand a bit better what the patches are trying to fix and especially how they are trying to do it. At least for me it now seems clear that the 828es has problems with the synchronization of the USB stream.

I will report back here with my findings as soon as I have them and would like to thank you for your support.

buonamorte.records
Established Member
Posts: 100
Joined: Tue Apr 07, 2020 4:31 am
Has thanked: 11 times
Been thanked: 11 times

Re: Digital Crackle with USB Audio Interfaces

Post by buonamorte.records »

Hi, my motu 828es works very well now with 1.4.5 firmware without kernel patch. But my ultralite avb doesn't. I can't understand why...

buonamorte.records
Established Member
Posts: 100
Joined: Tue Apr 07, 2020 4:31 am
Has thanked: 11 times
Been thanked: 11 times

Re: Digital Crackle with USB Audio Interfaces

Post by buonamorte.records »

Ah, the channel count must be 24x24

User avatar
bluebell
Established Member
Posts: 1927
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 113 times
Been thanked: 122 times

Re: Digital Crackle with USB Audio Interfaces

Post by bluebell »

buonamorte.records wrote: Wed Apr 10, 2024 12:26 pm

Ah, the channel count must be 24x24

Do you have that many interrupts with your UltraLite AVB, too? I have nearly 16000 Interrupts per second using over 10% CPU of one core of my Core i7.

It works fine even with a jackd buflen of 256 with smaller Qtractor projects but I think 16000 per second are a big number.

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

Post Reply