Page 1 of 2

Mbox1 Clicks and Pops (USB AUDIO)

Posted: Sat Feb 15, 2014 2:03 pm
by bazsound
Recently a patch came out that got the mbox 1 working in full duplex mode. I had also been having white noise issues but this turned out to be a firmware issue and has now been fixed.

anyway id ont think its the patch since playback has been working before the patch came out.

for those interested, if you want capture to work with the mbox then go here http://www.zamaudio.com/?p=953

Basically during playback even with high latencies and the dsp load being very low i get pops and clicks every now and then, and occasionally the audio stutters just a little.

Im running kx studio 12.04 with kernel 3.5 low latency (as the alsa driver patch doesnt compile on higher kernel versions)

ive been through many threads, setting irq prioritys. enabled the threadirq option in grub with no effect, tried different ports. unpluged stuff.

Nothing seems to make a difference. After much searching the only other thing i can think of is trying a RT kernel instead of lowlatency, but finding it difficult on where and how to install it in current distro as the information is either old or not very complete or just untested.

any ideas on tracking the problem down, t he only other thing i noticed is the USB port that my mbox is connected to is sharing irq 23 with my internal sound card.

Re: Mbox1 Clicks and Pops (USB AUDIO)

Posted: Sat Feb 15, 2014 3:12 pm
by Eino
Different kernels are handled, differently depending on the age, and architecture of the computer.
For example if you have a 5 year old computer, and your replacing XP. Kernel: 3.7.10 will do the job of matching the hardware the best. If you have gcc: 4.7.2 you may need to upgrade to gcc: 4.8.2. which modifies the kernel, for better handling,of the IRQ's
But I can not give you much advice without knowing, the age, and architecture of your computer.
The above may not work for you.

Re: Mbox1 Clicks and Pops (USB AUDIO)

Posted: Sat Feb 15, 2014 3:45 pm
by bazsound
Hi, thanks for the reply.

My machine is fairly old probably coming up on 6 years old and when i bought the parts they had already been out for a few years.

its an AMD Athlon 64 bit CPU (am2 socket)

kernel 3.7 i think is too new to work with the patch, so far kernels 3.5 and bellow work with the patch (until the patch is accepted into upstream)

Unless theres a way to get the patch to play nice with newer kernels. basically with newer kernels compiling the alsa driver patch fails so currently im using 3.5. I do have 3.8 installed aswell which gives the same popping and clicking as 3.5. I'll try 3.6 and see if that kernel will work with the driver patch.

Re: Mbox1 Clicks and Pops (USB AUDIO)

Posted: Sat Feb 15, 2014 6:13 pm
by Eino
Here is the system I use the most.
System: Host: antiX1 Kernel: 3.7.10-antix.7-amd64-smp x86_64 (64 bit)
Desktop: IceWM 1.3.7 Distro: antiX-13.2_x64-music Luddite 12 January 2014
CPU: Single core AMD Athlon 64 3400+ (-UP-) cache: 512 KB flags: (lm nx sse sse2 sse3) clocked at 1000.00 MHz
Graphics: Card: NVIDIA C51 [GeForce 6150 LE] X.Org: 1.12.4 driver: nvidia Resolution: 1024x768@75.0hz
Audio: Card: Creative Labs SB Audigy driver: snd_emu10k1 Sound: ALSA ver: k3.7.10-antix.7-amd64-smp

The kernel that antiX uses is a modified kernel with gcc: 4.8.2.
We may have similar systems. .
I do not use the on-board sound, which may make a difference.

Re: Mbox1 Clicks and Pops (USB AUDIO)

Posted: Sat Feb 15, 2014 10:28 pm
by bazsound
AMD Athlon(tm) 64 X2 Dual Core Processor 3600+
2000.000mhz
cache size : 256 KB
cpu cores : 2
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtsc
p lm 3dnowext 3dnow rep_good nopl extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy

Nvidia nforce 401 6100 onboard gpu (256mb shared ram)

I have onboard sound which i have been using for audio with good results,

Howver i had been given an mbox a while back but only worked for playback. Now theres a patch that gets capture working.

The pops and clicks during playback ive read on a few places being caused by the data stream being interupted, and that in some cases a realtime kernel rather than a lowlatency (which im using at the moment can sometimes fix the problem)

Ive tracked down some easy to follow instructions on building a kernel and patching it, though it is old (3.2) however i did have 3.2 a while back and it worked fine

Re: Mbox1 Clicks and Pops (USB AUDIO)

Posted: Sun Feb 16, 2014 1:08 pm
by bazsound
Tried compiling kernel 3.2 with no luck, after almost half an hour running make, it errored out.

Installed kernel 3.2 lowlatency as there is a known bug that effects asynchronus devices and causes clicks and pops when oin ehci usb ports, no joy there. Still get clicks and pops during playback.

Installing kernel 3.11 to see if i still have the issues, though i wont be able to compile the patched alsa driver with 3.11 kernel headers (just doesnt work)

bazsound@bazsound-MS-7309:~$ cat /proc/interrupts
CPU0 CPU1
0: 125 3 IO-APIC-edge timer
1: 0 2 IO-APIC-edge i8042
7: 1 0 IO-APIC-edge
8: 0 1 IO-APIC-edge rtc0
9: 0 0 IO-APIC-fasteoi acpi
12: 0 4 IO-APIC-edge i8042
14: 2 1077 IO-APIC-edge pata_amd
15: 0 0 IO-APIC-edge pata_amd
21: 9354 7402 IO-APIC-fasteoi sata_nv
22: 48783 4464 IO-APIC-fasteoi ehci_hcd:usb1
23: 468782 6496 IO-APIC-fasteoi ohci_hcd:usb2
43: 0 0 PCI-MSI-edge eth0
NMI: 14 18 Non-maskable interrupts
LOC: 241810 267308 Local timer interrupts
SPU: 0 0 Spurious interrupts
PMI: 14 18 Performance monitoring interrupts
IWI: 0 0 IRQ work interrupts
RES: 375564 317370 Rescheduling interrupts
CAL: 198 237 Function call interrupts
TLB: 1692 1794 TLB shootdowns
TRM: 0 0 Thermal event interrupts
THR: 0 0 Threshold APIC interrupts
MCE: 0 0 Machine check exceptions
MCP: 2 2 Machine check polls
ERR: 1
MIS: 0

there dont seem to be any irq conflicts anymore so its not that. USB ports both have there own IRQ, though if im using the propriety nvidia driver USB 2 shares with nvidia.

Re: Mbox1 Clicks and Pops (USB AUDIO)

Posted: Sun Feb 16, 2014 2:30 pm
by Eino
Must be the nature of USB 2, on our machines.
Mine shares it with eth0, but I have eth0 disabled, because I use the wireless.
I'm still trying my best to help you figure this problem out.

Re: Mbox1 Clicks and Pops (USB AUDIO)

Posted: Sun Feb 16, 2014 2:45 pm
by Eino
Here is a kernel that I have used before, but I wanted my kernel from Debian stable, for my project.
I almost forgot this one.
http://liquorix.net/

Re: Mbox1 Clicks and Pops (USB AUDIO)

Posted: Sun Feb 16, 2014 10:28 pm
by Eino
I just added the-liquorix-kernel to my system. It did make an improvement on latency.
Now I need to put it in the distro for testing.

Host: antiX1 Kernel: 3.7.0-10.dmz.1-liquorix-amd64 x86_64 (64 bit)
Desktop: IceWM 1.3.7 Distro: antiX-13.2_x64-music Luddite 12 January

Re: Mbox1 Clicks and Pops (USB AUDIO)

Posted: Mon Feb 17, 2014 9:05 am
by bazsound
Eino wrote:I just added the-liquorix-kernel to my system. It did make an improvement on latency.
Now I need to put it in the distro for testing.

Host: antiX1 Kernel: 3.7.0-10.dmz.1-liquorix-amd64 x86_64 (64 bit)
Desktop: IceWM 1.3.7 Distro: antiX-13.2_x64-music Luddite 12 January
Ill give that a try.

Ive exhausted every other option i think. so tryhing an actuall realtime kernel instead of lowlatency seems to be the only option now, which is a shame since development of RT has stopped.

Re: Mbox1 Clicks and Pops (USB AUDIO)

Posted: Mon Feb 17, 2014 6:36 pm
by bazsound
falkTX wrote:
bazsound wrote:which is a shame since development of RT has stopped.
Where did you get that info from?
from a couple of sites when looking for an RT kernel stated that devlopment had ceased due to lack of funding or something.

From what i can find the most recent kernel i can find with the RT patch is kernel 3.2 anything later is lowlatency.

Re: Mbox1 Clicks and Pops (USB AUDIO)

Posted: Tue Feb 18, 2014 8:56 am
by bazsound
falkTX wrote:
bazsound wrote:from a couple of sites when looking for an RT kernel stated that devlopment had ceased due to lack of funding or something.

From what i can find the most recent kernel i can find with the RT patch is kernel 3.2 anything later is lowlatency.
You're confusing the Ubuntu/Debian or distros providing RT kernels, and the actual RT kernel development.

the latest rt kernel right now is 3.12, although 3.10-rt is recommended instead.
Oh right, so where i can i find these RT kernels. 3.5 would be ideal since the mbox alsa driver patch will compile in kernels upto 3.5

Re: Mbox1 Clicks and Pops (USB AUDIO)

Posted: Fri Feb 28, 2014 10:09 am
by bazsound
I didnt have much luck successuflly compiling a kernel, tried a few different instructions, the last one failed at the patch compained at not being able to find the patch (no such file) even though i copied and pasted the commands into a terminal

But i did find this

http://carlocapocasa.com/ubuntu-12-04-u ... ic-making/

Deb packages for kernel 3.4

lets hope this works. But it does mention that nvidia drivers are not compatible with the patched kernel.

Re: Mbox1 Clicks and Pops (USB AUDIO)

Posted: Fri Feb 28, 2014 10:25 am
by bazsound
RT kernel made no change to the clicks im getting during playback..

Re: Mbox1 Clicks and Pops (USB AUDIO)

Posted: Sun Mar 02, 2014 10:37 am
by bazsound
Going to try a different distro (av linux) if i still have problems i might have to resign to the fact that my machine may be the problem.

It works flawlessly on windows on another machine. I havnt tried it on windows since i refuse to polute my machine with that rubbish.

Maybe i should try giving it a dedicated USB port by adding a pci USB card.