Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3622011pxb; Mon, 24 Jan 2022 13:43:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGDUfhlWtwE4+H3WaXEgg6G4l3Ra1xjlgp2+wNTZuDpK4fc0P782KUGzvgTPO33a8+swkB X-Received: by 2002:a05:6a00:1acb:b0:4c8:f0b7:38df with SMTP id f11-20020a056a001acb00b004c8f0b738dfmr7531463pfv.84.1643060613536; Mon, 24 Jan 2022 13:43:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643060613; cv=none; d=google.com; s=arc-20160816; b=WbmYiQwdAwMZ+ub11rw4+Q3qpChk1x2lC5m986t3f38axXB09TH9Ti7GBVKEK6XG49 J2rIuCe/zu4nEfw1ZZ5yhkgvebMe8dMt2xuQMl+F0/lwJfCzny8HehnCXLJdi0WdZ2iS aQf+Ax5su5+3wTOCKU9iQtxiPgXwHRMmxAhWPwfROgUyiE9X6dYxHc5Tzw4nyqsFANEx lsc6ypBPJtoG07vMFTKsNy5Y0ZKIqRud8RAbGHnVjU+x8BeVB9g5eeXq2IHuR3BZN2zk iPj7YBxptBFPUXYHv6Ot9LcH2szgT4utBu1GztvBUxeZ8GlOv8f+lVFSQNfpN/N/Y6Gi sCLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=I1EuY1qIjmU4DH9d6sr6106AEcr5wLDVZHF3V8qMRc0=; b=UF8tAjJ+6AVhxAY5VsMCPHsp0UZQNXID1xoiI4vgV0dL+agoBFJvqTjWtwK9Czcgpn tmqvVKfcpB9Iqs7onL+vJ4/8rXbj7ukYsB+leBeGasA/KYX4KGNjR5gXw+H6RjKVI1k7 zOOesGPHoqa2oC7bB0JIR1gBbdLZS7LfKlauG7kVafmRPGR2hNUWxppEDaDuUh/aZiM1 LN77X6q0Yjvu/jnpRjGIMaMqZNg0vpr4wpCkDvbDSB/tv6W5T8KGxz8e5nZlvk8E+cTy QRv+uaisEnprV6a3ESs1u9/KKV6xrgtwR4EK9V6poMnmmWjbS20jIPcpSmc7gbCsQJti sRdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n3bEMADC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k72si10710453pfd.254.2022.01.24.13.43.15; Mon, 24 Jan 2022 13:43:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n3bEMADC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1451462AbiAXVW7 (ORCPT + 99 others); Mon, 24 Jan 2022 16:22:59 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:50276 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351838AbiAXUxW (ORCPT ); Mon, 24 Jan 2022 15:53:22 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5414AB8105C; Mon, 24 Jan 2022 20:53:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0CFAC36AE7; Mon, 24 Jan 2022 20:53:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643057598; bh=MXPVVBYHEXHFo4yE+Xal95RCl5qOtXe7FpJ1wCoXn6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n3bEMADCtMjWy1Es7+2sAUryCsTybdAgQJ2C6bEgr4q1nCle61AgLMNEr2W+5/Ato hDX05m603y4/sCGE3bBO+sf+eI+YvZIItxMuWWRfmvSf+Z2jLzcoz9y0yn/QRyqOrc X7sXB4gLiuH9w2rPIe5fvr01Np//fB++8GUVn6sE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 5.16 0008/1039] ALSA: core: Fix SSID quirk lookup for subvendor=0 Date: Mon, 24 Jan 2022 19:29:57 +0100 Message-Id: <20220124184125.421745210@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Takashi Iwai commit 5576c4f24c56722a2d9fb9c447d896e5b312078b upstream. 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: BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215495 Link: https://lore.kernel.org/r/20220116082838.19382-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/core/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/core/misc.c +++ b/sound/core/misc.c @@ -112,7 +112,7 @@ snd_pci_quirk_lookup_id(u16 vendor, u16 { 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 ||