Modify

Opened 5 years ago

Last modified 18 months ago

#13392 new defect

USB audio broken in trunk

Reported by: dm1@… Owned by: developers
Priority: normal Milestone:
Component: packages Version: Trunk
Keywords: usb audio Cc:

Description

Some of USB DAC can't be used in trunk, but they work in "Attitude Adjustment".

I have 2 USB sound cards. If I will plug one which is detected as "USB-Audio - Generic USB Audio Device" - everything works fine.

But the other one "USB-Audio - USB Audio DAC", worked for me in summer 2012 trunk. I didn't udated trunk files untill December 2012. But since I had updated it this USB Audio device stopped to work. If I'll try to wright something to it by cat or madplay I get this:

[134381.400000] Unable to change format on ep #2: already in use

Interesting that after plugging in this DAC "/proc/bus/usb/" disappears:

cat /proc/bus/usb/devices
cat: can't open '/proc/bus/usb/devices': No such file or directory

Some other outputs:

Working USB Audio:

root@DAN:~# cat /proc/asound/devices
  0: [ 0]   : control
 16: [ 0- 0]: digital audio playback
 24: [ 0- 0]: digital audio capture
 33:        : timer
root@DAN:~# cat /proc/asound/cards
 0 [Device         ]: USB-Audio - Generic USB Audio Device
                      Generic USB Audio Device at usb-ehci-platform-1.4, full speed

root@DAN:~# cat /proc/asound/card0/usbbus
001/008

Not working USB Audio:

root@DAN:~# cat /proc/asound/devices
  0: [ 0]   : control
 16: [ 0- 0]: digital audio playback
 33:        : timer

root@DAN:~# cat /proc/asound/cards
 0 [DAC            ]: USB-Audio - USB Audio DAC
                      Burr-Brown from TI USB Audio DAC at usb-ehci-platform-1.2, full speed

root@DAN:~# cat /proc/asound/DAC/usbbus
001/009

Attachments (0)

Change History (15)

comment:1 Changed 5 years ago by dm1@…

Forgot to mention that all this happens on TP-Link devices. I have MR3220 and MR3020, both of them are working with this DAC on "Attitude Adjustment", but not in trunk.

comment:2 Changed 5 years ago by dm1@…

As I can see this USB audio kills whole USB stack. If I will plug a for ex. a 3G modem after this sound card - it will not be recognized by the router.

Looks like this bug is even worse.

cat /proc/bus/usb/devices
cat: can't open '/proc/bus/usb/devices': No such file or directory

comment:3 Changed 5 years ago by dm1@…

In this situation I'm suggesting to change bug priority to high.

comment:4 Changed 4 years ago by dm1@…

Seems that bug is fixed now.

comment:5 Changed 4 years ago by bittorf@…

the problem is still there:
i'am affected with an 'TP-LINK TL-WDR4300' on r39114

Hardware: Alesis M1 Active 320 USB
= 08bb:29b0 = Texas Instruments PCM2900B Audio CODEC:

i can play, but if i stop and want to play again, i see
this message in klog:

Unable to change format on ep #2: already in use

and this is the cmdline i use:

root@box:~ wget --quiet -O - "$url" | madplay -v -
MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al.
audio: /dev/dsp: Device or resource busy

on the other side i have no problems on the same router with

Hardware: PE-5819-919 auvisio ext. USB-Soundkarte "Virtual 7.1"
= 0d8c:000c = C-Media Electronics, Inc. Audio Adapter

i'am using these symbols:

CONFIG_PACKAGE_madplay=y
CONFIG_PACKAGE_kmod-sound-core=y
CONFIG_PACKAGE_kmod-usb-audio=y

at least this seems not OpenWrt-specific...

when the problem occurs, i can do

rmmod snd_usb_audio
modprobe snd_usb_audio

and it's working again...

comment:6 Changed 4 years ago by dm1@…

At last someone else found this bug. It was so weird for me that I'm the only bug reporter for this issue. I'm using AA for a long time now and need to test how things are going with sound in trunk.

comment:7 Changed 2 years ago by dm1.simf@…

This bug still remains in all OpenWRT releases after AA.

I'm not qualified enough to fix it, but I want bug to be gone. I'm tired of using AA only. I have the hardware on which this bug is easy reproducible every time. Maybe some one can fix it with my help?

How can it be that almost no one cares, that OpenWRT is not supporting Texas Instruments PCM2702 Audio now, but did this before?

comment:8 Changed 2 years ago by bittorf@…

@dm1.simf

is the same with a vanilla kernel on your laptop?
maybe the support was removed in kernel?

I'am using 3 different soundcards and all are working.

comment:9 Changed 2 years ago by dm1.simf@…

Thanks for the advice.

On Linux Mint 17.2 with 3.16 kernel these soundcards are working without any problem.

Then I've booted x86 OpenWRT CC on the same PC that works with Linux Mint, and had the same bug. After quitting madplay all next attempts to play something ended up with error

Unable to change format on ep #2: already in use

So seems that this is only OpenWRT related bug.

comment:10 Changed 2 years ago by bittorf@…

this does not help here.
please compare with a linux distro on recent kernel, e.g. 4.1 or 4.4.

comment:11 Changed 2 years ago by dm1.simf@…

Okay, I'll do that.

But Barrier Breaker is using kernel version 3.10, which is older than Mint one, but it already has this bug and Mint on the same hardware doesn't. Aren't my conclusions obvious or I'm really missing something?

comment:12 Changed 2 years ago by jow

Hm either mint applies kernel patches which fix your usb issues or openwrt applies patches which break your usb support or maybe it is just a matter of certain usb quirks and workarounds which must be enabled in the kernel config.

Can you provide the usb ids of the broken audio dongle here?

comment:13 Changed 2 years ago by dm1.simf@…

From /sys/kernel/debug/usb/devices

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#=  3 Spd=12   MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=08bb ProdID=2704 Rev= 1.00
S:  Manufacturer=Burr-Brown from TI
S:  Product=USB Audio DAC
C:* #Ifs= 3 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I:  If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I:* If#= 1 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E:  Ad=02(O) Atr=09(Isoc) MxPS= 192 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E:  Ad=02(O) Atr=09(Isoc) MxPS=  96 Ivl=1ms
I:* If#= 2 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=(none)
E:  Ad=85(I) Atr=03(Int.) MxPS=   1 Ivl=10ms

comment:14 Changed 2 years ago by dm1.simf@…

Tested in Ubuntu 15.10 with Linux kernel 4.2, works as well.

/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
    |__ Port 2: Dev 7, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 2: Dev 8, If 0, Class=Audio, Driver=snd-usb-audio, 12M
        |__ Port 2: Dev 8, If 1, Class=Audio, Driver=snd-usb-audio, 12M
        |__ Port 2: Dev 8, If 2, Class=Human Interface Device, Driver=usbhid, 12M
Bus 001 Device 008: ID 08bb:2704 Texas Instruments Audio Codec
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x08bb Texas Instruments
  idProduct          0x2704 Audio Codec
  bcdDevice            1.00
  iManufacturer           1 Burr-Brown from TI              
  iProduct                2 USB Audio DAC   
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          190
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol      0 
      iInterface              0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength           40
        bInCollection           1
        baInterfaceNr( 0)       1
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0 
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             2
        wTerminalType      0x0301 Speaker
        bAssocTerminal          0
        bSourceID               3
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 3
        bSourceID               1
        bControlSize            1
        bmaControls( 0)      0x01
          Mute Control
        bmaControls( 1)      0x02
          Volume Control
        bmaControls( 2)      0x02
          Volume Control
        iFeature                0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           1
        bDelay                  0 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            3 Discrete
        tSamFreq[ 0]        32000
        tSamFreq[ 1]        44100
        tSamFreq[ 2]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            9
          Transfer Type            Isochronous
          Synch Type               Adaptive
          Usage Type               Data
        wMaxPacketSize     0x00c0  1x 192 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bLockDelayUnits         2 Decoded PCM samples
          wLockDelay            512 Decoded PCM samples
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           1
        bDelay                  0 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             1
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            3 Discrete
        tSamFreq[ 0]        32000
        tSamFreq[ 1]        44100
        tSamFreq[ 2]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            9
          Transfer Type            Isochronous
          Synch Type               Adaptive
          Usage Type               Data
        wMaxPacketSize     0x0060  1x 96 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bLockDelayUnits         2 Decoded PCM samples
          wLockDelay            512 Decoded PCM samples
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      36
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              10
Device Status:     0x0000
  (Bus Powered)

comment:15 Changed 18 months ago by li_zard

I have the same bug with 15.05 on WT3020 router with USB DAC PCM2704 .

When play audio stream with madplay, Ctrl+C them, and try to play again:

audio: /dev/dsp: Device or resource busy.

I'm trying:

rmmod snd_usb_audio
modprobe snd_usb_audio

But no luck, only reboot helps

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.