]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: usb-audio: Refine string-descriptor-based quirk matching
authorRong Zhang <i@rong.moe>
Thu, 5 Mar 2026 17:46:39 +0000 (01:46 +0800)
committerTakashi Iwai <tiwai@suse.de>
Thu, 5 Mar 2026 19:49:10 +0000 (20:49 +0100)
commit9558a2cbec2eb034ae7d570ff56ad74f9a918177
tree8c2a4037201df236cf38f60accbd995ca7e403c3
parentb364a0d23cae157691cde2c0137998d66b45b703
ALSA: usb-audio: Refine string-descriptor-based quirk matching

Remove snd_usb_get_string() and use the manufacturer and product strings
stored in struct usb_device directly to match quirk table entries. Their
NULLity can be checked to determine if the device has no these strings.
This simplifies the code a lot.

Meanwhile, allow quirk table entries to match "no string" explicitly, and
add appropriate comments to show the expected usages of
DEVICE_STRING_FLG() and VENDOR_STRING_FLG(). These changes are tiny and
doesn't form another separate patch, so that back-and-forth changes can
be avoided.

Suggested-by: Terry Junge <linuxsound@cosmicgizmosystems.com>
Link: https://lore.kernel.org/r/b59da54a-9c80-4212-a337-c5ea98da52d1@cosmicgizmosystems.com
Signed-off-by: Rong Zhang <i@rong.moe>
Link: https://patch.msgid.link/20260305174711.1106324-1-i@rong.moe
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/quirks.c