Re: USB audio (AOAv2) retire_capture_urb messages

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

 



arv <arvindhandroidin <at> gmail.com> writes:

> 
> Hi All,
> 
> I am trying to playback audio from Android phone using USB AOAv2. (PCM
> audio, 16bit, 44.1 KHz, stereo) on a Wandboard Quad (i.MX6) board running
> Ubuntu 14.04.
> 
> The detection of phone is fine and playback via alsa commands/gstreamer is
> successful.
> But during playback, there are distortions in the sound. 
> 
> dmesg prints as follows,
> retire_capture_urb: x callbacks suppressed ----->[x is around 41 to 300]
> retire_capture_urb: x callbacks suppressed
> retire_capture_urb: x callbacks suppressed
> retire_capture_urb: x callbacks suppressed
> 
> arecord command prints underrun occurred.
> 
> So each time, retire_capture_urb is printed, there is a distortion.
> 
> I tried the same program on different machines.
> Following are the results,
> On Wandboard, the distortions happen each 40 seconds or so.
> On a Linux server PC running Ubuntu 14.04 the audio breaks are more frequent.
> On a Linux PC running Ubuntu 12.02 the audio breaks are less frequent.
> 
> Could anyone guide me on how retire_capture_urb be prevented or how can a
> smooth playback be achieved ? 
> 
> Should there be any special configurations done at USB driver ?
> 
> lsusb -v print is as follows, The synch type for the endpoint appears to be
> enumerated as Synchronous. Could the synch type be modified using libusb, is
> this the cause of underrun?
> 
> Bus 001 Device 004: ID 18d1:2d02 Google Inc.
> Device Descriptor:
>   bLength                18
>   bDescriptorType         1
>   bcdUSB               2.00
>   bDeviceClass            0 (Defined at Interface level)
>   bDeviceSubClass         0
>   bDeviceProtocol         0
>   bMaxPacketSize0        64
>   idVendor           0x18d1 Google Inc.
>   idProduct          0x2d02
>   bcdDevice           ff.ff
>   iManufacturer           1 motorola
>   iProduct                2 MotoG3-TE
>   iSerial                 3 ZY222WB7TT
>   bNumConfigurations      1
>   Configuration Descriptor:
>     bLength                 9
>     bDescriptorType         2
>     wTotalLength          110
>     bNumInterfaces          2
>     bConfigurationValue     1
>     iConfiguration          0
>     bmAttributes         0x80
>       (Bus Powered)
>     MaxPower              500mA
>     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                10
>         bDescriptorType        36
>         bDescriptorSubtype      1 (HEADER)
>         bcdADC               1.00
>         wTotalLength           40
>         bInCollection           2
>         baInterfaceNr( 0)       0
>         baInterfaceNr( 1)       1
>       AudioControl Interface Descriptor:
>         bLength                12
>         bDescriptorType        36
>         bDescriptorSubtype      2 (INPUT_TERMINAL)
>         bTerminalID             1
>         wTerminalType      0x0201 Microphone
>         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             3
>         wTerminalType      0x0101 USB Streaming
>         bAssocTerminal          2
>         bSourceID               2
>         iTerminal               0
>       AudioControl Interface Descriptor:
>         bLength                 9
>         bDescriptorType        36
>         bDescriptorSubtype      6 (FEATURE_UNIT)
>         bUnitID                 2
>         bSourceID               1
>         bControlSize            2
>         bmaControls( 0)      0x00
>         bmaControls( 0)      0x00
>         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                  1 frames
>         wFormatTag              1 PCM
>       AudioStreaming Interface Descriptor:
>         bLength                11
>         bDescriptorType        36
>         bDescriptorSubtype      2 (FORMAT_TYPE)
>         bFormatType             1 (FORMAT_TYPE_I)
>         bNrChannels             2
>         bSubframeSize           2
>         bBitResolution         16
>         bSamFreqType            1 Discrete
>         tSamFreq[ 0]        44100
>       Endpoint Descriptor:
>         bLength                 9
>         bDescriptorType         5
>         bEndpointAddress     0x81  EP 1 IN
>         bmAttributes           13
>           Transfer Type            Isochronous
>           Synch Type               Synchronous
>           Usage Type               Data
>         wMaxPacketSize     0x0100  1x 256 bytes
>         bInterval               4
>         bRefresh                0
>         bSynchAddress           0
>         AudioControl Endpoint Descriptor:
>           bLength                 7
>           bDescriptorType        37
>           bDescriptorSubtype      1 (EP_GENERAL)
>           bmAttributes         0x01
>             Sampling Frequency
>           bLockDelayUnits         1 Milliseconds
>           wLockDelay              1 Milliseconds
> Device Qualifier (for other device speed):
>   bLength                10
>   bDescriptorType         6
>   bcdUSB               2.00
>   bDeviceClass            0 (Defined at Interface level)
>   bDeviceSubClass         0
>   bDeviceProtocol         0
>   bMaxPacketSize0        64
>   bNumConfigurations      1
> Device Status:     0x0000
>   (Bus Powered)
> 
> Thanks for the help..
> 
> 

Hi All,

 Adding to the previous message, 

I execute the following commands 
arecord -f cd -v -D plug:hw:3 | aplay -f cd -v -D plug:hw:0
and the prints are as follows, 

Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo:hw:0
Plug PCM: Hardware PCM card 3 'MotoG3-TE' device 0 subdevice 0
Its setup is:
  stream       : CAPTURE
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 22050
  period_size  : 5513
  period_time  : 125011
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 5513
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 22050
  silence_threshold: 0
  silence_size : 0
  boundary     : 1445068800
  appl_ptr     : 0
  hw_ptr       : 0
Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Plug PCM: Hardware PCM card 0 'imx6-wandboard-sgtl5000' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 16384
  period_size  : 4096
  period_time  : 92879
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 4096
  period_event : 0
  start_threshold  : 16384
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 1073741824
  appl_ptr     : 0
  hw_ptr       : 0


underrun!!! (at least 0.967 ms long)
Status:
  state       : XRUN
  trigger_time: 3093.357585367
  tstamp      : 3093.367235700
  delay       : 0
  avail       : 16384
  avail_max   : 16384
underrun!!! (at least 0.863 ms long)
Status:
  state       : XRUN
  trigger_time: 3189.419589045
  tstamp      : 3189.428212045
  delay       : 0
  avail       : 16384
  avail_max   : 16384

hw:0 buffer is less than hw:3 buffer. is it why underrun happens? I couldn't
increase it beyond 16384...

Thanks for the help.






------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are 
> consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
> J-Flow, sFlow and other flows. Make informed decisions using capacity planning
> reports.http://sdm.link/zohodev2dev
> 





------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user



[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux