Skip to content
  • Takashi Iwai's avatar
    ALSA: usb-audio: Fix hw constraints dependencies · 506c203c
    Takashi Iwai authored
    Since the recent refactoring, it's been reported that some USB-audio
    devices (typically webcams) are no longer detected properly by
    PulseAudio.  The debug session revealed that it's failing at probing
    by PA to try the sample rate 44.1kHz while the device has discrete
    sample rates other than 44.1kHz.  But the puzzle was that arecord
    works as is, and some other devices with the discrete rates work,
    either.
    
    After all, this turned out to be the lack of the dependencies in a few
    hw constraint rules: snd_pcm_hw_rule_add() has the (variable)
    arguments specifying the dependent parameters, and some functions
    didn't set the target parameter itself as the dependencies.  This
    resulted in an invalid parameter that could be generated only in a
    certain call pattern.  This bug itself has been present in the code,
    but it didn't trigger errors just because the rules were casually
    avoiding such a corner case.  After the recent refactoring and
    cleanup, however, the hw constra...
    506c203c