linux-stable/sound
Takashi Iwai 6392dcd1d0 ALSA: usb-audio: Register card at the last interface
The USB-audio driver matches per interface, and as default, it
registers the card instance at the very first instance.  This can be a
problem for the devices that have multiple interfaces to be probed, as
the udev rule isn't applied properly for the later appearing
interfaces.  Although we introduced the delayed_register option and
the quirks for covering those shortcomings, it's nothing but a
workaround for specific devices.

This patch is an another attempt to fix the problem in a more generic
way.  Now the driver checks the whole USB device descriptor at the
very first time when an interface is attached to a sound card.  It
looks at each matching interface in the descriptor and remembers the
last matching one.  The snd_card_register() is invoked only when this
last interface is probed.

After this change, the quirks for the delayed registration become
superfluous, hence they are removed along with the patch.  OTOH, the
delayed_register option is still kept, as it might be useful for some
corner cases (e.g. a special driver overtakes the interface probe from
the standard driver, and the last interface probe may miss).

Link: https://lore.kernel.org/r/20220904161247.16461-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-09-06 11:04:56 +02:00
..
ac97 ALSA: ac97: Replace sprintf() with sysfs_emit() 2022-08-02 16:03:41 +02:00
aoa ALSA: aoa: Replace sprintf() with sysfs_emit() 2022-08-02 16:03:42 +02:00
arm ASoC: pxa: ac97: use normal MMIO accessors 2022-05-07 22:55:49 +02:00
atmel
core Merge branch 'for-linus' into for-next 2022-09-06 11:04:15 +02:00
drivers Merge branch 'for-linus' into for-next 2022-09-06 11:04:15 +02:00
firewire ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes 2022-04-25 08:03:49 +02:00
hda Merge branch 'topic/memalloc-cleanup' into for-next 2022-08-24 08:04:56 +02:00
i2c
isa ALSA: wavefront: remove redundant assignment to pointer end 2022-07-04 14:29:27 +02:00
mips
oss
parisc
pci Merge branch 'for-linus' into for-next 2022-09-06 11:04:15 +02:00
pcmcia ALSA: pdaudiocf: Drop superfluous GFP setup 2022-08-24 08:00:26 +02:00
ppc
sh
soc Merge branch 'topic/memalloc-cleanup' into for-next 2022-08-24 08:04:56 +02:00
sparc
spi sound:spi: remove reference to AVR32 in Atmel AT73C213 DAC driver 2022-08-03 11:11:26 +02:00
synth
usb ALSA: usb-audio: Register card at the last interface 2022-09-06 11:04:56 +02:00
virtio
x86 ALSA: x86: intel_hdmi_audio: use pm_runtime_resume_and_get() 2022-06-17 10:46:38 +02:00
xen xen/sndfront: use xenbus_setup_ring() and xenbus_teardown_ring() 2022-05-19 14:22:08 +02:00
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c