Re: [SOLVED] Crackles in audio, drifting intermittent noise etc.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday, November 28, 2016 11:55:19 PM EST Fernando Lopez-Lezcano wrote:
> On 11/01/2016 11:45 PM, termtech wrote:
> > On Tuesday, November 1, 2016 2:36:21 PM EDT Chris Caudle wrote:
> ...
> 
> > Yesterday I read somewhere, and was reminded, that audio
> > 
> >  processing is a 'serial' task that may not benefit well from
> >  n-core CPUs and therefore one should choose a CPU with the
> >  highest possible clock and try to run with fewer cores.
> 
> At least on Linux this is not necessarily true. It all depends on the
> software you run and what it can do. If it is single threaded yes,
> higher clock speed would help. If not, multiple cores can help. I
> usually use all cores for the stuff I do.
> 
> > I must mention something that adds mud, but clears it up more:
> > 
> > When I try the on-board sound, or an old spare PCI SoundBlaster Live!,
> > 
> >  the sound is actually OK ;-)
> 
> Ah... something related to the pci bus then?
> 
> Looking at the waveform it looks like the glitches happen every 256
> samples (more or less). And the glitch itself seems to be around (more
> or less) 8 samples wide at its widest. Then it gets narrower and
> narrower towards the end, then it is just one sample wide and finally it
> disappears...
> 
> Very weird...
> 
> > I've yet to verify that statement for this replacement PC, but it's true
> > for> 
> >  the unit it replaced. That test did not bode well for this Delta1010
> >  card.
> 
> What motherboard does the pc have?

It's an ASUS P7P55LX and I've updated the BIOS to the latest.

> On linux the output of dmidecode would have that information. Does it
> have more than one PCI slot? I presume you tried on all of them if it
> has more than one, right?

Correct. This one has a few, while the cheaper original replacement 
 PC only had one. Both exhibited the problem.

> > For that reason I may chalk this up to just a weird combination
> > 
> >  of this older PCI sound card (PCI rev 2.0 or 2.1 I think) and this
> >  new-fangled MB and CPU.
> 
> That could very well be the problem. I have had problems with PCI RME
> soundcards not being happy with a newer faster motherboard and processor
> (they worked fine in older hardware). Progress, I guess. Never managed
> to fix it or really diagnose it, sorry.
> 
> Now as to why the problem stops when you disable two cpus? Wow. How
> about disabling just one? I can only think of some hardware interrupt
> routing problem as a possible cause. But a problem that comes and goes?
> 
> In Linux if you can see this (as root):
> cat /sys/devices/system/cpu/cpu1/online
> 
> You could disable just one cpu while the system is running (you should
> have four):
> For example, running as root this will disable your last cpu:
> 
> echo 0 > cat /sys/devices/system/cpu/cpu3/online
> 
> This should re-enable it:
> 
> echo 1 > cat /sys/devices/system/cpu/cpu3/online

THANK YOU! 	IT WORKS!		AWESOME! 
Now I don't have to reboot to change cores!

The command as given did not work, though.
I used something similar to a command Ralf gave me:
	echo 1| sudo tee /sys/devices/system/cpu/cpu3/online
I'm just in a hurry and rusty on my Unix command syntax ;-)

The results: 
There is no 'online' flag for core-0, which I guess makes sense.
There always must be at least one core running, I suppose.

Fascinating! ANY one or two of the cores are OK, 
 yet ANY three or all four of them causes the noises.

I love how I can change it ad hoc. I'm fooling with the settings 
 while Jack is running and I'm listening to my test tone for 
 30 minutes now on core-0 and core-3, and it's fine.

> (not that this would be a fix, just curious)
> You could also see which cpu is handling the soundcard interrupts if you
> check out this:
> 
> cat /proc/interrupts

cat /proc/interrupts
           CPU0       CPU3       
  0:         86          0   IO-APIC   2-edge      timer
  1:        996       4902   IO-APIC   1-edge      i8042
  8:          1          0   IO-APIC   8-edge      rtc0
  9:          0          0   IO-APIC   9-fasteoi   acpi
 16:         29          0   IO-APIC  16-fasteoi   ehci_hcd:usb1
 17:     157179    2086259   IO-APIC  17-fasteoi   snd_ice1712
 23:       2454       4075   IO-APIC  23-fasteoi   ehci_hcd:usb2
 24:    9623332          0  HPET-MSI   2-edge      hpet2
 25:         10    1390859  HPET-MSI   3-edge      hpet3
 26:          9     114668  HPET-MSI   4-edge    
 27:          9      56553  HPET-MSI   5-edge    
 29:        450      11519   PCI-MSI 1048576-edge      enp2s0
 30:       8421      16342   PCI-MSI 512000-edge      0000:00:1f.2
 31:     393689      28980   PCI-MSI 524288-edge      nvkm
NMI:        861        809   Non-maskable interrupts
LOC:         20         24   Local timer interrupts
SPU:          0          0   Spurious interrupts
PMI:        861        809   Performance monitoring interrupts
IWI:          1          0   IRQ work interrupts
RTR:         10          2   APIC ICR read retries
RES:     804163     498891   Rescheduling interrupts
CAL:     159206     103077   Function call interrupts
TLB:       3291       3930   TLB shootdowns
TRM:          0          0   Thermal event interrupts
THR:          0          0   Threshold APIC interrupts
DFR:          0          0   Deferred Error APIC interrupts
MCE:          0          0   Machine check exceptions
MCP:         27         34   Machine check polls
ERR:          0
MIS:          0
PIN:          0          0   Posted-interrupt notification event
PIW:          0          0   Posted-interrupt wakeup event

Here's the card after 5 minutes (of perfect sound):
           CPU0       CPU3       
 17:     157179    2107520   IO-APIC  17-fasteoi   snd_ice1712

--------------------------

Here's the card on three cores:
           CPU0       CPU2       CPU3
 17:     157179      66130    2132276   IO-APIC  17-fasteoi   snd_ice1712

And after 5 minutes (of pops, glitches and drifting):
           CPU0       CPU2       CPU3
 17:     157179      75079    2177916   IO-APIC  17-fasteoi   snd_ice1712

NOTE: I already tried CPU interrupt affinity tools! I forget how exactly ATM.
But I made damn sure it was working by examining the interupt list and 
 it was 'all zeros' for the other THREE cores after several minutes. I tried 
 tying them specifically to each core, including core-0, and it did NOT work,
 the noises were still there.

> Each column is one cpu, each row is one interrupt source. The one
> corresponding to your soundcard should be incrementing...
> 
> > Maybe there's hope that a driver tweak could help?
> > The Windows driver hasn't been updated in four years.
> > Maybe it and the Linux driver share the same problem - needing an update?
> 
> Are you running a reasonably recent kernel? "uname -r" would tell you
> what you are booting. If both Win* and Linux have the same problem that
> would seem to point to hardware. Not good news.

4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 x86_64 
x86_64 GNU/Linux

> > But then, this MB and the other one are from around 2009/2010 or so.
> > If not then it's likely just this hardware combo.
> > Heck it could still be /this/ specific unit.
> > It would be nice to get some verification from similar users...
> > 
> > It's just so weird. A brutal stupid ironic introduction to n-core CPUs.
> > Happy I can play keys now though. Persistence pays. No new card!
> > And at least my *guitar* doesn't need a freakin' CPU, just my brain :-)
> :
> :-(
> 
> Good luck!
> -- Fernando

Thanks. I hope someone might make a driver fix or something.
At best, a simple configuration file tweak (go Linux!).
I've debugged and contributed to sound drivers before, but whew that's 
 major and this might involve PCI or CPU drivers or who knows what, 
 I've no time for it right now :-(

Tim.


_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user



[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux