Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp2394325rwp; Fri, 14 Jul 2023 05:41:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlFlkbeP2HHysUjYqbk5Rwy4aO3hVlqae0cNd70glgnDS3C/3eCnxwxXDQgQ9B5GhSGEBz7b X-Received: by 2002:a05:6a00:1827:b0:684:aa3e:7bf3 with SMTP id y39-20020a056a00182700b00684aa3e7bf3mr1357017pfa.31.1689338487055; Fri, 14 Jul 2023 05:41:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689338487; cv=none; d=google.com; s=arc-20160816; b=ArTiRIqWDcruYgb/R2s2DgkELsIsH0La3Ly08gUZZPM1p6KZ3hVMWSkS8UHYHaoB3D UCxQkas1a1HTyXWc3pXtGvV6TqM3CPy5F71YIiwpAN+HzX0tYKaqGRcYz9X02bqic8+i LMetjdBBKcVpjf1syWuE98cL1hbTJA87dwznV1oCey1tswBnEEUij16Uj9dlX9fMUCH3 Bh8Puu9HpLYpFsnCn+SiVr78kbfk1ZT3KXStK2W9qW6uXNXfOK88UPJnGCyf9K8+Oe0J LdOWj4yNl21TOP8PbAxI3C/bp6IcFf/lvUylQBA1ukfCZU2O1i4cyJ4nSS1NfLQWGCJJ G/1w== 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=cCdH+/AjA1SxTylxd/5atjunb5c8BtTAYZ6pQfhwMdbbRKQ7ftyWVT0F7NykhyT7Nw FXPOBnebyfb+lSOcgWnNnvByyXc6mCbpboCkZNTOxdzlON72YrziniFmB4VRSCmpzMq7 s/ar4X+xnL6JlRxFOpSqrs98VGn8mMtORsVQEz4CP+jTm3GNiz+wdnUzk9J6ToqSIs6y lU1dcIE091CbHcSaiY4lE1HkjBRngo6DdpByoPPqAFzy9UVqGKi3poGwjZUGmSJmgxhF SSX5EuX5vCXXeHn8OISPOUOIjpZB6aYEaKNX8FENLUMlZ0jdKEb1x+pcf4Lt/96BbNvj lugw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MeSD8x2i; 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 t2-20020a63d242000000b0055acbe61853si6823581pgi.430.2023.07.14.05.41.14; Fri, 14 Jul 2023 05:41:27 -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=MeSD8x2i; 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 S235869AbjGNMYT (ORCPT + 99 others); Fri, 14 Jul 2023 08:24:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235383AbjGNMYH (ORCPT ); Fri, 14 Jul 2023 08:24:07 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11D1B2722; Fri, 14 Jul 2023 05:23:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689337440; x=1720873440; 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=MeSD8x2irAZrK3NlDp64bUfPFiyxCKa4lcBhcWO8+gfbDTnuCu2IeoBk 5Mcd5VtCNL5XcXhpPgFD+5GKQtrnB7y3lcyzQ65gjZtYPL21t9V7mcRGQ pCZc6xPKyH+UNbZxCIcMKXB64Mlx+HOPzku9yAeTP3+eChD34HUp9s7/3 GaYlCeJHO1AR5SUt5P1nF06ePE9h3yKV2syHLev/xbLYuJKAEEmv0Y2xI /Mf2TFeblUTR7oy7OsbJKSH0xgNb5ZEhPNtdzxmHwHbLymrXwoLHNNEeh hKZo1BcObps9stcNdLEBZdwlT53V8LLCNa1bwEBMx6Z/4KaR2wg0gi6wr g==; X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="429225832" X-IronPort-AV: E=Sophos;i="6.01,205,1684825200"; d="scan'208";a="429225832" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2023 05:23:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="1053034896" X-IronPort-AV: E=Sophos;i="6.01,205,1684825200"; d="scan'208";a="1053034896" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by fmsmga005.fm.intel.com with ESMTP; 14 Jul 2023 05:23:56 -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 v3 06/15] ALSA: hda: Use global PCI match macro Date: Fri, 14 Jul 2023 22:24:48 +0200 Message-Id: <20230714202457.423866-7-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230714202457.423866-1-amadeuszx.slawinski@linux.intel.com> References: <20230714202457.423866-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=-0.1 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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