From nobody Mon Feb 9 10:27:47 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3ACB8EB64DC for ; Fri, 14 Jul 2023 10:55:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236325AbjGNKz5 (ORCPT ); Fri, 14 Jul 2023 06:55:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235985AbjGNKzY (ORCPT ); Fri, 14 Jul 2023 06:55:24 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E34D535A5; Fri, 14 Jul 2023 03:55:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689332120; x=1720868120; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=M7s2WR/9r+GNRVVyX1shgcdusyU+2/x/3kFITCcHbVw=; b=i5Y2Wy/RzGR7NGquL97CYPr5ZXj6uxK0nWI8mBT6JUEpGELDpITz8RFX HcjaKJZYNWPUOy440noaUA2n4Sf8eXJ3XHVApt6DvN46USsxshJcsJhUh PzImczZUFLJwPQZuTTava+hfICW1pZcvUc/bl11cS7TKQoTLDCB18Va08 OoOgtHygGDAPNVLqTLzFSeiDCiIaW+Z+McLj1EpA1S1GGPkXzBBa3T79k nfHxI81sXzCFMayYRUm3gPPfbFEPTcu7dEZqZYJ2OJWF7ZjOpx99jGY9B +LPDNkL9RBCfLwzc8u6LgcrYxXJbVIAEujPe64OcX39vjtVo7nucPSF2u Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="364321171" X-IronPort-AV: E=Sophos;i="6.01,205,1684825200"; d="scan'208";a="364321171" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2023 03:55:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="722365482" X-IronPort-AV: E=Sophos;i="6.01,205,1684825200"; d="scan'208";a="722365482" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by orsmga002.jf.intel.com with ESMTP; 14 Jul 2023 03:55:17 -0700 From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= To: Bjorn Helgaas , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Cezary Rojewski , Pierre-Louis Bossart , Kai Vehmanen , Andy Shevchenko , Hans de Goede , =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= , Andy Shevchenko Subject: [PATCH v2 06/15] ALSA: hda: Use global PCI match macro Date: Fri, 14 Jul 2023 20:56:06 +0200 Message-Id: <20230714185615.370597-7-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230714185615.370597-1-amadeuszx.slawinski@linux.intel.com> References: <20230714185615.370597-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of using local macro to match PCI device, use global one. As Apollolake is Broxton-P successor that made it to the market, be precise and use APL shortcut. Reviewed-by: Andy Shevchenko Signed-off-by: Amadeusz S=C5=82awi=C5=84ski --- sound/pci/hda/hda_intel.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 8f0cebb83302..5e59dcc35665 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -330,18 +330,6 @@ enum { #define needs_eld_notify_link(chip) false #endif =20 -#define CONTROLLER_IN_GPU(pci) (((pci)->vendor =3D=3D 0x8086) && \ - (((pci)->device =3D=3D 0x0a0c) || \ - ((pci)->device =3D=3D 0x0c0c) || \ - ((pci)->device =3D=3D 0x0d0c) || \ - ((pci)->device =3D=3D 0x160c) || \ - ((pci)->device =3D=3D 0x490d) || \ - ((pci)->device =3D=3D 0x4f90) || \ - ((pci)->device =3D=3D 0x4f91) || \ - ((pci)->device =3D=3D 0x4f92))) - -#define IS_BXT(pci) ((pci)->vendor =3D=3D 0x8086 && (pci)->device =3D=3D 0= x5a98) - static const char * const driver_short_names[] =3D { [AZX_DRIVER_ICH] =3D "HDA Intel", [AZX_DRIVER_PCH] =3D "HDA Intel PCH", @@ -573,7 +561,7 @@ static void hda_intel_init_chip(struct azx *chip, bool = full_reset) snd_hdac_set_codec_wakeup(bus, false); =20 /* reduce dma latency to avoid noise */ - if (IS_BXT(pci)) + if (HDA_CONTROLLER_IS_APL(pci)) bxt_reduce_dma_latency(chip); =20 if (bus->mlcap !=3D NULL) @@ -2175,7 +2163,7 @@ static int azx_probe(struct pci_dev *pci, #endif /* CONFIG_SND_HDA_PATCH_LOADER */ =20 #ifndef CONFIG_SND_HDA_I915 - if (CONTROLLER_IN_GPU(pci)) + if (HDA_CONTROLLER_IN_GPU(pci)) dev_err(card->dev, "Haswell/Broadwell HDMI/DP must build in CONFIG_SND_H= DA_I915\n"); #endif =20 @@ -2283,7 +2271,7 @@ static int azx_probe_continue(struct azx *chip) * for other chips, still continue probing as other * codecs can be on the same link. */ - if (CONTROLLER_IN_GPU(pci)) { + if (HDA_CONTROLLER_IN_GPU(pci)) { dev_err(chip->card->dev, "HSW/BDW HD-audio HDMI/DP requires binding with gfx driver\n"); goto out_free; @@ -2294,7 +2282,7 @@ static int azx_probe_continue(struct azx *chip) } =20 /* HSW/BDW controllers need this power */ - if (CONTROLLER_IN_GPU(pci)) + if (HDA_CONTROLLER_IN_GPU(pci)) hda->need_i915_power =3D true; } =20 --=20 2.34.1