* [PATCH] ALSA: core: Fix SSID quirk lookup for subvendor=0
@ 2022-01-15 9:09 Takashi Iwai
2022-01-16 8:21 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Takashi Iwai @ 2022-01-15 9:09 UTC (permalink / raw)
To: alsa-devel
Some weird devices set the codec SSID vendor ID 0, and
snd_pci_quirk_lookup_id() loop aborts at the point although it should
still try matching with the SSID device ID. This resulted in a
missing quirk for some old Macs.
Fix the loop termination condition to check both subvendor and
subdevice.
Fixes: 73355ddd8775 ("ALSA: hda: Code refactoring snd_hda_pick_fixup()")
Cc: <stable@vger.kernel.org>
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215495
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/core/misc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/core/misc.c b/sound/core/misc.c
index 3579dd7a161f..a512c849a9e5 100644
--- a/sound/core/misc.c
+++ b/sound/core/misc.c
@@ -112,7 +112,7 @@ snd_pci_quirk_lookup_id(u16 vendor, u16 device,
{
const struct snd_pci_quirk *q;
- for (q = list; q->subvendor; q++) {
+ for (q = list; q->subvendor && q->subdevice; q++) {
if (q->subvendor != vendor)
continue;
if (!q->subdevice ||
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: core: Fix SSID quirk lookup for subvendor=0
2022-01-15 9:09 [PATCH] ALSA: core: Fix SSID quirk lookup for subvendor=0 Takashi Iwai
@ 2022-01-16 8:21 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2022-01-16 8:21 UTC (permalink / raw)
To: alsa-devel
On Sat, 15 Jan 2022 10:09:29 +0100,
Takashi Iwai wrote:
>
> Some weird devices set the codec SSID vendor ID 0, and
> snd_pci_quirk_lookup_id() loop aborts at the point although it should
> still try matching with the SSID device ID. This resulted in a
> missing quirk for some old Macs.
>
> Fix the loop termination condition to check both subvendor and
> subdevice.
>
> Fixes: 73355ddd8775 ("ALSA: hda: Code refactoring snd_hda_pick_fixup()")
> Cc: <stable@vger.kernel.org>
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215495
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
> sound/core/misc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/core/misc.c b/sound/core/misc.c
> index 3579dd7a161f..a512c849a9e5 100644
> --- a/sound/core/misc.c
> +++ b/sound/core/misc.c
> @@ -112,7 +112,7 @@ snd_pci_quirk_lookup_id(u16 vendor, u16 device,
> {
> const struct snd_pci_quirk *q;
>
> - for (q = list; q->subvendor; q++) {
> + for (q = list; q->subvendor && q->subdevice; q++) {
Doh, a wrong version was sent out. It must be OR instead.
Will resubmit v2.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-16 8:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-15 9:09 [PATCH] ALSA: core: Fix SSID quirk lookup for subvendor=0 Takashi Iwai
2022-01-16 8:21 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.