1 year ago

#318043

test-img

BikerBri

How can I determine which Linux process is sending an incorrect URB to a USB audio mixer device?

I'm working with a C-Media CM-6632a USB audio controller. It's working well except for an intermittent mixer problem causing either muted or distorted audio output. After this happens, alsamixer is no longer able to control the device's levels and a USB reset of the device is required. My debugging efforts so far have led me to the conclusion that there is erroneous USB data being sent to the mixer device but I don't know where these bad URBs are originating from.

Using usbmon, I've discovered that there are URBs being sent to the mixer which I cannot account for. This sometimes occurs periodicly (every 30 seconds) and sometimes randomly. The suspicious URBs have significantly different content than the correct URBs that are sent by alsamixer. I believe that I see a correlation between the unexpected USB packets and failure of the mixer.

I'm at a loss for how to debug this. I don't know which process is sending the unexpected packets, whether they are from the ALSA driver, or from something else. Is there a way to determine where the mystery URBs are originating from?

Here is an example of a proper alsamixer URB which is sent when a channel level is changed (as shown by usbmon):

ffff8fad66a34900 3370509077 S Co:3:005:0 s 21 01 0201 0d00 0002 2 = 00ff ffff8fad66a34900 3370509851 C Co:3:005:0 0 2 >

Here are two examples of bursts of mystery URBs being sent to the mixer device: This was part of a perodic (30 second period) burst of URBs sent to the mixer device prior to a failure.

ffff98157b09ec00 513991239 S Co:3:003:0 s 01 0b 0000 0005 0000 0 ffff98157b09ec00 513991540 C Co:3:003:0 0 0 ffff9815cfe6fe40 513991880 S Co:3:003:0 s 01 0b 0000 0004 0000 0 ffff9815cfe6fe40 513992129 C Co:3:003:0 0 0 ffff9815cfe6fc00 513992436 S Co:3:003:0 s 01 0b 0000 0001 0000 0 ffff9815cfe6fc00 513992740 C Co:3:003:0 0 0

This was a single burst of URBs sent to the mixer device prior to a failure on a different occasion.

ff8fad489bc3c0 1469441724 S Ci:3:005:0 s a1 01 0200 0700 0006 6 < ffff8fad489bc3c0 1469442056 C Ci:3:005:0 0 6 = 083f0600 0000 ffff8fad489bc3c0 1469442127 S Ci:3:005:0 s a1 01 0200 0800 0006 6 < ffff8fad489bc3c0 1469442490 C Ci:3:005:0 0 6 = 02030000 0000 ffff8fad489bc3c0 1469442520 S Ci:3:005:0 s a1 01 0200 0900 0006 6 < ffff8fad489bc3c0 1469442874 C Ci:3:005:0 0 6 = 02030000 0000 ffff8fad489bc3c0 1469442900 S Ci:3:005:0 s a1 01 0200 0400 0006 6 < ffff8fad489bc3c0 1469443241 C Ci:3:005:0 0 6 = 02030000 0000 ffff8fad9fd873c0 1469443351 S Ci:3:005:0 s a1 01 0200 0500 0006 6 < ffff8fad9fd873c0 1469443712 C Ci:3:005:0 0 6 = 02030000 0000 ffff8fad9fd873c0 1469443747 S Ci:3:005:0 s a1 01 0200 0600 0006 6 < ffff8fad9fd873c0 1469444116 C Ci:3:005:0 0 6 = 02030000 0000

Thank you!

linux

debugging

usb

alsa

mixer

0 Answers

Your Answer

Accepted video resources