Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp2307464rwp; Fri, 14 Jul 2023 04:19:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlHZYxcGoZCyxXCHE6P4a4NeT5vrTm/Y+yADexD1WvD/4E0aDojmCntFFgvz/PiHLKTlsm2E X-Received: by 2002:aa7:c250:0:b0:51e:2305:931 with SMTP id y16-20020aa7c250000000b0051e23050931mr4152635edo.22.1689333558566; Fri, 14 Jul 2023 04:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689333558; cv=none; d=google.com; s=arc-20160816; b=Aw+FFkA1HnokwrNGp2KtbRS8RDuRRgkkEJN9rLLZyG+1EB0d2gntOX1uh3zj48C99q NhIxSNGCvPvH7nkgExDOczcsEHzWP9r0H760iWwBizeFej6frV/hArpAdL7kkXDtJq5d nUhiYc9AXLiNUzEARj4210mnL0+OzEg6xxss+sw0sLtiQQmjRmTxJ9boheQjxkSDDUvJ CQa12hgB5brHbbtlZWkw/clz4CK1zvEgpX/JzVJEOsgCVC7h/FIgfrVFufioGLcKPJZZ gLocfPQWX5IRr+SFQZAPQx4GUNOztG35Jh0fMmcnIaWT8UZZXW14/L+ZINWNQnv7V6G2 l8oQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vbEoOyPt4D4SfVWLcCWzIkqIEzZJ9lUqznLYKXeDTOo=; fh=iLu8mJV3L09dzJN6VXkKj+SRT/C9p8fR4gJYErWu4bc=; b=NFgi+xF4svaxTWA093g4E+SfhLoKtsrmV3wcqRFR8YdwJiuVxpPysNaE6YDKhqv4yx 1GqdPH3j2FGVZ93oP6ohR8uPr63RtV5uwCpd+zCfYHAKqfYsUw1uAbCb11oWyqf000KU srupW6v9nC2IK7IE3y4zDHzAz7T6FpdBvocKOvKmBLZziJfft7IXcS7FFqBevSM87Whq 09Yhv1qevLqOOuavUj6Dg+VnFZ15mftyZ2d1y9VxtZPNTAVVwwN3AE47D0rBm6eztYu5 yVM2QwmLD5kkAFxccg5NHtXPegTlHClfVU9098oE3Lnf5uXam/pDkKyBzNOmuhApjwYA gIvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="i5Y2Wy/R"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v10-20020aa7d9ca000000b0051e16ff03f5si2237200eds.319.2023.07.14.04.18.52; Fri, 14 Jul 2023 04:19:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="i5Y2Wy/R"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236323AbjGNKzy (ORCPT + 99 others); Fri, 14 Jul 2023 06:55:54 -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: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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ławiński --- 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 -#define CONTROLLER_IN_GPU(pci) (((pci)->vendor == 0x8086) && \ - (((pci)->device == 0x0a0c) || \ - ((pci)->device == 0x0c0c) || \ - ((pci)->device == 0x0d0c) || \ - ((pci)->device == 0x160c) || \ - ((pci)->device == 0x490d) || \ - ((pci)->device == 0x4f90) || \ - ((pci)->device == 0x4f91) || \ - ((pci)->device == 0x4f92))) - -#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98) - static const char * const driver_short_names[] = { [AZX_DRIVER_ICH] = "HDA Intel", [AZX_DRIVER_PCH] = "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); /* reduce dma latency to avoid noise */ - if (IS_BXT(pci)) + if (HDA_CONTROLLER_IS_APL(pci)) bxt_reduce_dma_latency(chip); if (bus->mlcap != NULL) @@ -2175,7 +2163,7 @@ static int azx_probe(struct pci_dev *pci, #endif /* CONFIG_SND_HDA_PATCH_LOADER */ #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_HDA_I915\n"); #endif @@ -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) } /* HSW/BDW controllers need this power */ - if (CONTROLLER_IN_GPU(pci)) + if (HDA_CONTROLLER_IN_GPU(pci)) hda->need_i915_power = true; } -- 2.34.1