WSL2-Linux-Kernel/sound
Takashi Iwai 506c203cc3 ALSA: usb-audio: Fix hw constraints dependencies
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 constraints work "as expected", and the
problem surfaced now.

For fixing the problem above, this patch adds the missing dependent
parameters to each snd_pcm_hw_rule() call.

Fixes: bc4e94aa8e ("ALSA: usb-audio: Handle discrete rates properly in hw constraints")
BugLink: http://bugzilla.opensuse.org/show_bug.cgi?id=1181014
Link: https://lore.kernel.org/r/20210120204554.30177-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-01-20 21:46:45 +01:00
..
ac97
aoa
arm
atmel
core ALSA: seq: oss: Fix missing error check in snd_seq_oss_synth_make_info() 2021-01-15 10:35:17 +01:00
drivers ALSA: aloop: Constify ops structs 2020-11-21 09:30:35 +01:00
firewire ALSA: firewire-tascam: Fix integer overflow in midi_port_work() 2021-01-12 14:57:38 +01:00
hda Auxiliary Bus support tag for 5.11-rc1 2020-12-04 20:39:45 +00:00
i2c
isa ALSA: sb: Fix fall-through warnings for Clang 2020-11-21 09:29:26 +01:00
mips
oss
parisc
pci ALSA: hda: Balance runtime/system PM if direct-complete is disabled 2021-01-19 16:42:39 +01:00
pcmcia
ppc powerpc updates for 5.11 2020-12-17 13:34:25 -08:00
sh
soc ASoC: SOF: Intel: fix page fault at probe if i915 init fails 2021-01-13 16:33:40 +00:00
sparc ALSA: sparc: dbri: fix repeated word 'the' 2020-10-17 09:58:35 +02:00
spi
synth
usb ALSA: usb-audio: Fix hw constraints dependencies 2021-01-20 21:46:45 +01:00
x86
xen
Kconfig
Makefile
ac97_bus.c
last.c
sound_core.c