[alsa-devel] PCM2902: click/pop sound when it should be silent.

Theodor van Nahl theo_dev at van-nahl.org
Wed Oct 11 19:20:43 CEST 2017


Hello,

I do have a Behringer U-PHORIA UMC22 USB soundcard which uses the 
PCM2902
soundchip. I am using that device with pulseaudio on top and the trouble 
occurs
when I do not use the device.


Problem
=======

In various intervals, but only when I don't play audio, I do hear a pop 
or
click sound comparable to the sound a power amp does when connecting or
disconnecting the power.


My Analysis
===========

I did watch the usb port using wireshark and the following frame has 
been the
last frame before that sound:

Frame 3470: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on 
interface 0
USB URB
     [Source: host]
     [Destination: 2.4.0]
     URB id: 0xffff9522ee93f9c0
     URB type: URB_SUBMIT ('S')
     URB transfer type: URB_CONTROL (0x02)
     Endpoint: 0x00, Direction: OUT
     Device: 4
     URB bus id: 2
     Device setup request: relevant (0)
     Data: present (0)
     URB sec: 1507602131
     URB usec: 34054
     URB status: Operation now in progress (-EINPROGRESS) (-115)
     URB length [bytes]: 0
     Data length [bytes]: 0
     [Response in: 3471]
     Interval: 0
     Start frame: 0
     Copy of Transfer Flags: 0x00000000
     Number of ISO descriptors: 0
URB setup
     bmRequestType: 0x01
         0... .... = Direction: Host-to-device
         .00. .... = Type: Standard (0x0)
         ...0 0001 = Recipient: Interface (0x01)
     bRequest: SET INTERFACE (11)
     bAlternateSetting: 0
     wInterface: 1
     wLength: 0

 From what I understand from the PCM2902 Manual [0] on page 22 is that 
the
streaming interface gets deactivated (zero bandwith setting) by this 
frame.
If I read the documentation of the PCM2902 correctly that step is not
nesessary, the chip suspends itself when no data comes in (p. 26).

Reading *linux/sound/usb/endpoint.c* I am convinced that the frame above 
and
its counter part are send by this code and send everytime a first 
endpoint
(pulseaudio, aplay, …) connects and the last endpoint disconnected. Due 
to that
I do believe that this is a bug in the driver used for the pcm2902 chip.


References
==========

That bug is not unheard of as you can see in [1] and [2] but the 
workarounds
provided in those links I cannot confirm to work.


I hope that my analysis is as conclusive for you as they sound to me. 
 From this
point I am unsure where to head next and was hoping for help here. So my
followup questions are:

  * What do you believe where and "why there" this should be fixed?

  * Why is the frame above beeing send to the device? The soundcard does 
seem to
    have power after that frame.

  * Isn't it possible to never set the pcm2902 into "zero bandwith mode"?


Greetings,
Theodor


[0]: http://www.ti.com/product/pcm2902
[1]: 
https://ubuntuforums.org/showthread.php?t=2292143&p=13345100#post13345100
[2]: 
https://www.reddit.com/r/linux/comments/3idb1h/clicky_noise_before_and_after_every_sound/


More information about the Alsa-devel mailing list