1
0
Fork 0
alistair23-linux/sound/usb
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
..
6fire sound: 6fire: move to use usb_control_msg_send() and usb_control_msg_recv() 2020-09-25 16:33:59 +02:00
bcd2000 ALSA: bcd2000: More constifications 2020-01-05 16:14:49 +01:00
caiaq ALSA: Replace with fallthrough pseudo keyword in the remaining places 2020-07-09 19:10:43 +02:00
hiface sound: hiface: move to use usb_control_msg_send() 2020-09-25 16:33:59 +02:00
line6 sound: line6: move to use usb_control_msg_send() and usb_control_msg_recv() 2020-09-25 16:33:59 +02:00
misc ALSA: ua101: Replace tasklet with work 2020-09-09 18:33:15 +02:00
usx2y sound: usx2y: move to use usb_control_msg_send() 2020-09-25 16:33:59 +02:00
Kconfig sound: Fix Kconfig indentation 2019-10-07 03:53:03 +02:00
Makefile ALSA: usb-audio: Factor out the implicit feedback quirk code 2020-11-23 15:17:00 +01:00
card.c ALSA: usb-audio: Avoid unnecessary interface re-setup 2021-01-08 23:43:37 +01:00
card.h ALSA: usb-audio: Annotate the endpoint index in audioformat 2021-01-08 23:43:38 +01:00
clock.c ALSA: usb-audio: Fix UAC1 rate setup for secondary endpoints 2021-01-18 09:37:53 +01:00
clock.h ALSA: usb-audio: Constify audioformat pointer references 2020-11-23 15:15:36 +01:00
endpoint.c ALSA: usb-audio: Set sample rate for all sharing EPs on UAC1 2021-01-18 09:38:03 +01:00
endpoint.h ALSA: usb-audio: Avoid unnecessary interface re-setup 2021-01-08 23:43:37 +01:00
format.c ALSA: usb-audio: Fix potential out-of-bounds shift 2020-12-14 09:10:25 +01:00
format.h ALSA: usb: initial USB Audio Device Class 3.0 support 2018-03-21 11:46:33 +01:00
helper.c ALSA: usb-audio: Add snd_usb_get_host_interface() helper 2020-11-23 15:13:47 +01:00
helper.h ALSA: usb-audio: Add snd_usb_get_host_interface() helper 2020-11-23 15:13:47 +01:00
implicit.c ALSA: usb-audio: Avoid implicit feedback on Pioneer devices 2021-01-18 09:38:13 +01:00
implicit.h ALSA: usb-audio: Factor out the implicit feedback quirk code 2020-11-23 15:17:00 +01:00
media.c media: sound/usb: Use Media Controller API to share media resources 2019-04-22 11:21:06 -04:00
media.h media: sound/usb: Use Media Controller API to share media resources 2019-04-22 11:21:06 -04:00
midi.c ALSA: usb-audio: Fix UBSAN warnings for MIDI jacks 2020-12-23 18:46:54 +01:00
midi.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mixer.c ALSA: usb-audio: Drop keep_interface flag again 2020-11-23 15:13:37 +01:00
mixer.h ALSA: usb-audio: Fix OOB access of mixer element list 2020-06-24 14:24:29 +02:00
mixer_maps.c ALSA: usb-audio: Use ALC1220-VB-DT mapping for ASUS ROG Strix TRX40 mobo 2020-11-16 09:45:26 +01:00
mixer_quirks.c ALSA: usb-audio: Add mixer support for Pioneer DJ DJM-250MK2 2020-09-23 14:40:52 +02:00
mixer_quirks.h ALSA: usb-audio: Initialize Dell Dock playback volumes 2018-05-02 16:02:32 +02:00
mixer_s1810c.c ALSA: usb-audio: Fix some typos 2020-06-30 19:48:18 +02:00
mixer_s1810c.h ALSA: usb-audio: Add support for Presonus Studio 1810c 2020-02-15 09:46:16 +01:00
mixer_scarlett.c ALSA: usb-audio: More constifications 2020-01-05 16:14:34 +01:00
mixer_scarlett.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mixer_scarlett_gen2.c sound updates for 5.10 2020-10-15 11:07:44 -07:00
mixer_scarlett_gen2.h ALSA: usb-audio: Scarlett Gen 2 mixer interface 2019-07-28 17:47:48 +02:00
mixer_us16x08.c ALSA: usb-audio: US16x08: fix value count for level meters 2020-11-27 14:56:40 +01:00
mixer_us16x08.h ALSA: usb: Constify snd_kcontrol_new items 2020-01-03 09:24:34 +01:00
pcm.c ALSA: usb-audio: Fix hw constraints dependencies 2021-01-20 21:46:45 +01:00
pcm.h ALSA: usb-audio: Constify audioformat pointer references 2020-11-23 15:15:36 +01:00
power.c ALSA: usb-audio: More validations of descriptor units 2019-08-22 10:35:59 +02:00
power.h ALSA: usb-audio: Initial Power Domain support 2018-07-31 15:01:22 +02:00
proc.c ALSA: usb-audio: Show sync endpoint information in proc outputs 2020-11-23 15:16:45 +01:00
proc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
quirks-table.h ALSA: usb-audio: Annotate the endpoint index in audioformat 2021-01-08 23:43:38 +01:00
quirks.c ALSA: usb-audio: Fix UAC1 rate setup for secondary endpoints 2021-01-18 09:37:53 +01:00
quirks.h ALSA: usb-audio: Constify audioformat pointer references 2020-11-23 15:15:36 +01:00
stream.c Merge branch 'for-linus' into for-next 2020-12-14 09:05:29 +01:00
stream.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
usbaudio.h ALSA: usb-audio: Avoid unnecessary interface re-setup 2021-01-08 23:43:37 +01:00
validate.c ALSA: usb-audio: Fix endianess in descriptor validation 2020-02-01 09:06:11 +01:00