Problems with USB-Audio device, crackling

Hey guys,

I’ve got a huge problem with my Opensuse-Installation. I bought an USB-Audio Device, more specific the Audiolab M-DAC in January. At that time I was using openSUSE 12.2 with tumbleweed. After I plugged the device in, everything worked as expected.

After that, some update (kernel?) broke something and right now I am not able to listen to music anymore. There is a lot of crackling in my sound system. Also the USB-Device shows information regarding Buffer Problems and the Syslog is filled with stuff like this:


kernel:   220.499998] usb 2-1.2: new full-speed USB device number 7 using ehci_hcd
kernel:   220.590344] usb 2-1.2: New USB device found, idVendor=0451, idProduct=adac
kernel:   220.590352] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
kernel:   220.590357] usb 2-1.2: Product: Audiolab M-DAC
kernel:   220.590360] usb 2-1.2: Manufacturer: Lakewest Audio
kernel:   220.597906] input: Lakewest Audio Audiolab M-DAC as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/input/input20
kernel:   220.598287] hid-generic 0003:0451:ADAC.0008: input,hiddev0,hidraw2: USB HID v1.11 Device [Lakewest Audio Audiolab M-DAC] on usb-0000:00:1d.0-1.2/input0
kernel:   220.605310] ALSA clock.c:237 7:2:1: cannot get freq at ep 0x1
kernel:   220.616561] ALSA mixer.c:887 2:1: cannot get min/max values for control 2 (id 2)
mtp-probe: checking bus 2, device 7: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2"
mtp-probe: bus: 2, device: 7 was not an MTP device
kernel:   220.648922] ALSA mixer.c:2185 status interrupt: 00 02
kernel:   220.673550] ALSA clock.c:237 7:2:1: cannot get freq at ep 0x1
kernel:   220.676179] ALSA clock.c:237 7:2:1: cannot get freq at ep 0x1
kernel:   220.680897] ALSA mixer.c:2185 status interrupt: 00 02
kernel:   220.712904] ALSA mixer.c:2185 status interrupt: 00 02
kernel:   220.744889] ALSA mixer.c:2185 status interrupt: 00 02
kernel:   220.776852] ALSA mixer.c:2185 status interrupt: 00 02
kernel:   220.808804] ALSA mixer.c:2185 status interrupt: 00 02
kernel:   220.840819] ALSA mixer.c:2185 status interrupt: 00 02
kernel:   220.853170] ALSA clock.c:237 7:2:1: cannot get freq at ep 0x1
kernel:   220.856029] ALSA clock.c:237 7:2:1: cannot get freq at ep 0x1
kernel:   220.872715] ALSA mixer.c:2185 status interrupt: 00 02
kernel:   220.904749] ALSA mixer.c:2185 status interrupt: 00 02
kernel:   220.936752] ALSA mixer.c:2185 status interrupt: 00 02
kernel:   220.968744] ALSA mixer.c:2185 status interrupt: 00 02

Yesterday I reinstalled the whole system with openSUSE 12.3. Unfortunately the problem happened again.
This also happens if use aplay so I assume there is a problem with my ALSA-System.

I tried booting a Live-System (partedmagic) and the sound worked perfectly.

I’ve read and tried:

And here is the output of “alsa-info.sh” from git.alsa-project.org Git - alsa-driver.git/history - alsa/utils/alsa-info.sh:
http://www.alsa-project.org/db/?f=8d5e60dcfb23c95740c16520cea75849c3d31526

I would really appreciate some help.

Best regards,
juiced

I don’t see your USB device as a loaded module.

I note:



!!Loaded ALSA modules
!!-------------------

snd_hda_intel
thinkpad_acpi

should one not see a USB sound module loaded.

I see no reference in the dmesg either:


!!ALSA/HDA dmesg
!!--------------

   19.791102] intel ips 0000:00:1f.6: IPS driver initialized, MCP temp limit 90
   19.791554] snd_hda_intel 0000:00:1b.0: irq 45 for MSI/MSI-X
   19.808953] hda_codec: CX20585: BIOS auto-probing.
   19.808987] ALSA hda_auto_parser.c:318 autoconfig: line_outs=1 (0x1f/0x0/0x0/0x0/0x0) type:speaker
   19.808989] ALSA hda_auto_parser.c:322    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
   19.808992] ALSA hda_auto_parser.c:326    hp_outs=2 (0x19/0x1c/0x0/0x0/0x0)
   19.808993] ALSA hda_auto_parser.c:327    mono: mono_out=0x0
   19.808995] ALSA hda_auto_parser.c:331    inputs:
   19.808997] ALSA hda_auto_parser.c:335      Dock Mic=0x1a
   19.808999] ALSA hda_auto_parser.c:335      Mic=0x1b
   19.809001] ALSA hda_auto_parser.c:335      Internal Mic=0x23
   19.810146] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/input/input11
   19.810203] ALSA patch_conexant.c:4531 hda_codec: Enable sync_write for stable communication
   19.820406] cfg80211: World regulatory domain updated:
--
   19.820426] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
   19.825545] input: HDA Intel MID HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
   19.825640] input: HDA Intel MID Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
   19.825716] input: HDA Intel MID Dock Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input14
   19.825791] input: HDA Intel MID Dock Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input15
   19.825858] input: HDA Intel MID Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input16
   19.829330] iTCO_vendor_support: vendor-support=0

Was the USB device plugged in when you booted ? Was it plugged in when you ran that diagnostic script ?

I have a bose companion 5 usb speaker
In 12.3 it was detected with no sound but when I configured
it to be the default sound in yast it worked.
I am using pulseaudio

Erm, sorry. I attached the wrong output…
http://www.alsa-project.org/db/?f=a5445a9bcddcf43c1974d8e7bbd096706389c642

Pulseaudio shouldn’t make a difference here because the crackling even occurs if I use aplay, which is a native instrument from ALSA. Configuring the audio device didn’t help either. Also as i mentioned before, there is always some kind of sound, but with these clicking / crackling distortions.

PS: Thanks guys for your quick responses!

OK, thanks. I note


 1 [MDAC           ]: USB-Audio - Audiolab M-DAC
                      Lakewest Audio Audiolab M-DAC at usb-0000:00:1a.0-1.2, full speed

so its good to see the device is detected.


Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 74
  Mono: Playback 74 [100%] [0.00dB] [on]

That is at 100%. Does moving that lower change your USB volume levels ? If so, does it reduce the crackling ?


**!!-------Mixer controls for card 1 [MDAC]
**
**Card hw:1 'MDAC'/'Lakewest Audio Audiolab M-DAC at usb-0000:00:1a.0-1.2, full speed'
**  Mixer name	: 'USB Mixer'
  Components	: 'USB0451:adac'
  Controls      : 2
  Simple ctrls  : 1
**Simple mixer control 'PCM',0**
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 83
  Mono: Playback 62 [75%] -18.00dB] [on]

this looks nominal. I assume you tried lowering the volume from75% to a lower setting and it had no effect ?


!!ALSA/HDA dmesg
!!--------------

[26711.070825] hid-generic 0003:0451:ADAC.0005: input,hiddev0,hidraw2: USB HID v1.11 Device [Lakewest Audio Audiolab M-DAC] on usb-0000:00:1a.0-1.2/input0
[26711.093101] ALSA clock.c:237 7:2:1: cannot get freq at ep 0x1
[26711.104579] ALSA mixer.c:887 2:1: cannot get min/max values for control 2 (id 2)
[26711.105125] usbcore: registered new interface driver snd-usb-audio
[26711.120967] ALSA mixer.c:2185 status interrupt: 00 02

with MANY MANY such ‘ALSA mixer’ interrupt messages. Surely that is not normal. Do you get the same with the USB device plugged into a different USB port ?

Given it is interupt related, I suppose it is possible changing some timing might help ( ie read: ‘oldcpu is speculating wildly here’ ) …

For crackings sound some users try reducing the “crackling” in (some) multimedia apps at the expense of realtime performance, try bypassingPulseAudio’s scheduling mechanisms in favor of the traditional interrupt approach … but with your interrupt message errors, that could make this worse. Still you could try In /etc/pulse/default.pa, change this:


load-module module-udev-detect

…to this:


load-module module-udev-detect tsched=0

save and reboot.

Thats a real wild shot, because the dmesg errors suggest to me there could be a differnet problem …

Another wild speculative shot - in some cases, choppy sound in pulsaudio can result from wrong settings for the sample rate in /etc/pulse/daemon.conf . Try changing the line default-sample-rate = 44100 in /etc/pulse/daemon.conf by default-sample-rate = 48000 and restart the PulseAudio server.

Hey,

Raising the volume level i.e. with alsamixer doesn’t affect anything. That has been the case all the time, everything above 5% is the same level in the USB-DAC. Doesn’t bother me though…

Yes, same effect. Funny thing, today I tried booting the “openSUSE-12.2-KDE-LiveCD-x86_64” and everything worked but these interrupt messages appeared, too. The alsa-info script showed me this: http://www.alsa-project.org/db/?f=f977672447966941d02bfbeccb0ef9436017e4fe
Looks like I just never took a look at the syslog since everything worked as expected. :wink:

Didn’t try these things yet. Could do, but do you really think it’s pulse-related? I always thought pulseaudio comes after alsa. I already tried to disable the whole pulseaudio-system with no luck. Right now I somehow messed everything up in my opensuse-System. If I try to prefer the audiolab soundcard in phonon, there is just “Pulseaudio Sound Server”. Seems like I still don’t get the whole opensuse soundstuff… :expressionless:

Best regards

Hey guys,

I still have this serious issue with my stereo. It’s snowing outside now, so music is quite essential for surviving… :wink:

I started openSUSE-12.2-KDE-LiveCD-x86_64 and everthing worked as excepted, although I still got all the interrupt messages. alsa-info output is here: http://www.alsa-project.org/db/?f=3cd3a383112cbcf3a15680f4c8f052471749ced8

Steps to repoduce:
Connect USB-device, KDE-Settings, Multimedia, Phonon, Audio Playback -> Music, Audiolab M-DAC Analog Stereo -> Test

What i noticed in comparison to my working system (12.3):

Kernel: 3.4.6-2.10-desktop vs. 3.7.10-1.1-desktop

 ALSA Driver: 1.0.25 vs. k3.7.10-1.1-desktop (what happened to the versioning here?)
ALSA Utilities: 1.0.25 vs. 1.0.26

I don’t see any differences in the kernel messages. They are always like this:


generic-usb 0003:0451:ADAC.0001: input,hiddev0,hidraw0: USB HID v1.11 Device [Lakewest Audio Audiolab M-DAC] on usb-0000:00:1d.0-1.1/input0
ALSA clock.c:236 4:2:1: cannot get freq at ep 0x1
ALSA mixer.c:846 2:1: cannot get min/max values for control 2 (id 2)
usbcore: registered new interface driver snd-usb-audio
ALSA mixer.c:2130 status interrupt: 00 02
... lots of interrupt messages... 

I also tried playing a test sound like this:

pasuspender -- aplay -Dplughw:1 -v sample.wav

How and where can I try to change the timing settings? There is obviously something wrong with the device in terms of timing adjustment with the USB-Host…

/etc/pulse/default.pa:


load-module module-udev-detect tsched=0

Tried that. Didn’t work.

The heavily overpriced DAC should be able to handle many frequencies, it certainly does handle 44,1 and 48, tried that on windows…

I really hope somebody does have another idea.

Best regards

PS: I opened a bug report: https://bugzilla.novell.com/show_bug.cgi?id=812361

Really? Nobody…?

Sorry to read of your frustration.

But to be frank - This is most likely hardware specific, where its possible (and maybe not possible) that a specific configuration applicable to that USB device is needed. Who has the USB-Audio Device, more specific the Audiolab M-DAC so that they can play with this to come with ideas ??? I don’t.

I think the lack of user’s having that equipment, and the lack of manufacturer GNU/Linux support, likely explains the thin response.

I understand that, and I am aware of the fact that this equipment is not commonly used. Also it is quite likely that the manufacturer of the DAC didn’t care much about much compatibility.

But still, from one day to another, it stopped working. And since there was no change in the device, the reason has to be in the OS (likely in the kernel?).

My knowledge regarding this is really limited, that’s why I am not sure how to proceed. Do you think it is of any use if I tried different kernels to figure out which change did cause this, or is it almost impossible for me to get to that point? :wink:

Best regards

PS: I am going to send an email to the developer, but I am not expecting much help.

Here you can get the manual for the device. Officially they only support Mac and Windows… :-/

I also tried setting the buffer size:

Steps:

  1. Connect the USB-Device
  2. Play something:
aplay -Dplughw:1 -v sample.wav

Result: Lots of cracking. Without any given parameters, the used buffer size is “22050”.

  1. Play something with fixed buffer-size like:
aplay --buffer-size=8192 -Dplughw:1 -v sample.wav

Result: No problems.

Unfortunately, this is not always the case. Setting buffer sizes from 1024 over 8192 up to 22050 result in either perfect sound or lots of cracking. I couldn’t figure out what causes the problem… :frowning:

Any ideas?

You could try to run a live-CD of 12.2 and see if that helps, might give some answers at least.

Sorry, didn’t read through properly.

Hey. Yes, you might have missed some parts. :wink: Thanks anyway. This topic doesn’t get enough attention, not sure why. I don’t know what to do, seems like there is a serious issue with the communication between my laptop and the USB-Chip inside the external device. But I have no idea how this timing, etc… negotiation in the USB-protocol works, not to mention how to debug it… :wink:

Have you tried to disable the on-board sound-device and see if that makes a difference?
You could also have a look at the bus: cat /proc/interrupts, might be a problem if your sound-device is sharing IRQ with one or several other devices.

Also, if this seems likely to be a kernel/ALSA issue, there might have been an upgrade of the firmware(?) for your sound-device; perhaps you need to flash/upgrade the bios of the sound-device?

I just tried to use it on my home pc, OpenSUSE 12.3 (not up to date though…). Worked just fine… http://www.alsa-project.org/db/?f=323571f843dc37c6cebb9aa6db3a1e51f6d3e09a


machinewhichdrivesmecrazy~# cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3       
  0:        127          0          0          0   IO-APIC-edge      timer
  1:       6373       6454       6321       6449   IO-APIC-edge      i8042
  8:          1          0          0          0   IO-APIC-edge      rtc0
  9:      10990      10815      10888      11082   IO-APIC-fasteoi   acpi
 12:      34931      35284      35085      35010   IO-APIC-edge      i8042
 17:         22         17         19         14   IO-APIC-fasteoi 
 19:        237        233        246        256   IO-APIC-fasteoi   ehci_hcd:usb2, ips
 23:     261437     260851     260386     261500   IO-APIC-fasteoi   ehci_hcd:usb1
 40:     344557     344595     345039     344117   PCI-MSI-edge      ahci
 41:    1293473    1293765    1294219    1292738   PCI-MSI-edge      i915
 42:          6          5          8          6   PCI-MSI-edge      mei
 43:      64491      64537      64764      65118   PCI-MSI-edge      eth1
 44:      76243      77739      78507      79435   PCI-MSI-edge      iwlwifi
 45:        255        259        254        245   PCI-MSI-edge      snd_hda_intel
NMI:       2446       1241       2342       1114   Non-maskable interrupts
LOC:    4053846    2146656    3977138    2216674   Local timer interrupts
SPU:          0          0          0          0   Spurious interrupts
PMI:       2446       1241       2342       1114   Performance monitoring interrupts
IWI:          0          0          0          0   IRQ work interrupts
RTR:          0          0          0          0   APIC ICR read retries
RES:    1792981    1464861     127242      57194   Rescheduling interrupts
CAL:      13669       1128       1238        982   Function call interrupts
TLB:      75535      44555      49703      38483   TLB shootdowns
TRM:          0          0          0          0   Thermal event interrupts
THR:          0          0          0          0   Threshold APIC interrupts
MCE:          0          0          0          0   Machine check exceptions
MCP:        142        142        142        142   Machine check polls
ERR:          0
MIS:          0


itworks~# cat /proc/interrupts
            CPU0       CPU1
  0:        225          0   IO-APIC-edge      timer
  1:          3          0   IO-APIC-edge      i8042
  6:          3          0   IO-APIC-edge      floppy
  8:          1          0   IO-APIC-edge      rtc0
  9:          0          0   IO-APIC-fasteoi   acpi
 12:          4          0   IO-APIC-edge      i8042
 16:         16          0   IO-APIC-fasteoi   uhci_hcd:usb3, saa7146 (0)
 17:       8072          0   IO-APIC-fasteoi   uhci_hcd:usb4, uhci_hcd:usb6
 18:        199          0   IO-APIC-fasteoi   uhci_hcd:usb7
 20:      18049          0   IO-APIC-fasteoi   ata_piix, ata_piix, i801_smbus
 22:         27          0   IO-APIC-fasteoi   ehci_hcd:usb1
 23:          3          0   IO-APIC-fasteoi   ehci_hcd:usb2, uhci_hcd:usb5
 43:      11392          0   PCI-MSI-edge      radeon
 44:      26187          0   PCI-MSI-edge      eth0
 45:        398          0   PCI-MSI-edge      snd_hda_intel
 46:         72          0   PCI-MSI-edge      snd_hda_intel
NMI:         39         38   Non-maskable interrupts
LOC:      46807      46519   Local timer interrupts
SPU:          0          0   Spurious interrupts
PMI:         39         38   Performance monitoring interrupts
IWI:          0          0   IRQ work interrupts
RTR:          0          0   APIC ICR read retries
RES:      12982      13680   Rescheduling interrupts
CAL:        232        626   Function call interrupts
TLB:       1258       1388   TLB shootdowns
TRM:          0          0   Thermal event interrupts
THR:          0          0   Threshold APIC interrupts
MCE:          0          0   Machine check exceptions
MCP:          1          1   Machine check polls
ERR:          0
MIS:          0

Why are there two devices on the latter output?

I have to narrow it down a bit more, don’t know what’s going on right now.

PS: Firmware is patched, newest one… Also wrote a mail to the manufacturer, no answer yet.

Out of interest, I note that in the instructions for this DAC (Nice bit of kit) that crackling interference may occur:

“a bluetooth device, webcam, wireless devises may cause interference. Avoid sharing a USB outlet with M-Dac and other devices and where possible disable non-essential devices.”

I’m sure you’ve already done this but I thought it worth a mention!

Works on the home PC but crackles on the ThinkPad. Could it be interference from a wireless adapter/device on the ThinkPad?

PS. Ah I see someone else also thought the same while I was reading back and posting. It happens. :slight_smile:

Found the following which may be of some help:

http://www.pinkfishmedia.net/forum/showthread.php?t=127719

I’m no expert on DAC’s but am intrigued as to the cause of your problem.