Message ID | 20230628205135.517241-5-amadeuszx.slawinski@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp8916220vqr; Wed, 28 Jun 2023 06:14:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ60hFnkx+oYV9hhiM/mZn9PUQmy9AuZWdCjey6Jz2SAAHxrrMXzxiBhd1IIDc6Q9PkqyU5R X-Received: by 2002:a17:902:dace:b0:1b3:c7c1:8ded with SMTP id q14-20020a170902dace00b001b3c7c18dedmr10014114plx.27.1687958052683; Wed, 28 Jun 2023 06:14:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687958052; cv=none; d=google.com; s=arc-20160816; b=tJECwCRhpP32PLd0YL5mFP/WAAyLnHvjwznyixenNngRGU26GBRObw2vgr82uiw7+o E3g5erHGUKmnc9qlL7LfMiazmz3iY2oRJLtH88yf/POSGZlTOcPMIlOPsKe45pihH75z 2orF1IayThOBkhHDeNKUMVocEX10RIPx8C42NXRsVkqw8lU/cR2AzZDAcfYW/Q7JIg6z oNH63xUln7M6YAlxW4IS2lMN2c0pIa6NOoALKpz1vf6AqqTRDqBp/PULabU/ZFj7+/P0 dLjrdxE7Q9RvyS3+C/xUSftIqClSorumdq4Z+FW1yztH0LStOZAECOS+UqDncXeJ0tbf elLw== 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=P+woPP6atjcaYzPazg2HUQ78on9J+fxADojkWdC+WpQ=; fh=4hmkLMGNpQ+PocmVypGauCnPZxjmrElQ8gsuUAuM8xE=; b=CIPwL1+qMCaPwf4CSLOHuIlztS8d1mzBZcHglSjjCJZOIO+kwVu6ztk5QvzE1iFJmi lLXJh7qjqj084Qh9UaP0OgcC9d8s145qIX8Dwq9jV3prAvBnJcA0yxsdavfEAfvKbnW7 /+cDlHck+SiDnFeOsYJUbPjtXik78/GnPTBevawnJNwt3VrQ8hcd0E+4uxGTZALZfgji dGDh1gePciPzEjL52VyaEt8ySoPhXhR8Rsww/hcUzntcuU5B6GM53wKm5qumgkuSF4+T 8RBu3UthoYdwYo7q7ZhaVhIKjsNlOJJFb1VFujFnKPz78C/r82PcrHyq7gYbzTnzBwuc ZdTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=awxw0KYC; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n3-20020a6546c3000000b0055a9b4f5f5dsi7246049pgr.30.2023.06.28.06.13.59; Wed, 28 Jun 2023 06:14:12 -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=awxw0KYC; 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 S231620AbjF1Mu7 (ORCPT <rfc822;adanhawthorn@gmail.com> + 99 others); Wed, 28 Jun 2023 08:50:59 -0400 Received: from mga14.intel.com ([192.55.52.115]:59116 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230413AbjF1Mum (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 28 Jun 2023 08:50:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687956642; x=1719492642; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qw8SQWQmPr/qqJ342TGeRW3bHoN4vBc/1sq6ZWaCaDQ=; b=awxw0KYCqUqc1KDqJJuNX+BqRcuqZU6tkRfWsADd6ieQKfURM0yhjIqF FzqlT848Slkmf66fLOw7Lf2nYsA5XuTHKWY1kAgkvY3MhKdujNX6ik+1R AZrpRtFKk8hMpctWEcwwzszE+AnTw/9DjHNw5etSjD2pjxhRnfiAXW9c/ vR5n4raPTHo3Is++xdWIwAMvwBhiCDYeKpZDbuwXw7MsVzyrPzV3MMkDI haF8lSBwkBfuExbli5QPfA1zyt2WErdaYmcVeBIR7VPZ7udbMvs35R2jU b83y3VaFC0nJdRha/3Q+VstfwTyjlLV2hElf0ew0JJzlpdmfH9UD5D8B5 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10754"; a="361875581" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361875581" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2023 05:50:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10754"; a="891035097" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="891035097" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by orsmga005.jf.intel.com with ESMTP; 28 Jun 2023 05:50:28 -0700 From: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= <amadeuszx.slawinski@linux.intel.com> To: Bjorn Helgaas <bhelgaas@google.com>, Mark Brown <broonie@kernel.org>, Takashi Iwai <tiwai@suse.com> Cc: alsa-devel@alsa-project.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Cezary Rojewski <cezary.rojewski@intel.com>, Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>, Kai Vehmanen <kai.vehmanen@linux.intel.com>, Andy Shevchenko <andriy.shevchenko@intel.com>, =?utf-8?q?Amadeusz_S=C5=82aw?= =?utf-8?q?i=C5=84ski?= <amadeuszx.slawinski@linux.intel.com> Subject: [RFC PATCH 4/8] ALSA: hda/i915: Update PCI IDs Date: Wed, 28 Jun 2023 22:51:31 +0200 Message-Id: <20230628205135.517241-5-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230628205135.517241-1-amadeuszx.slawinski@linux.intel.com> References: <20230628205135.517241-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769952302787679931?= X-GMAIL-MSGID: =?utf-8?q?1769952302787679931?= |
Series |
PCI: Define Intel PCI IDs and use them in drivers
|
|
Commit Message
Amadeusz Sławiński
June 28, 2023, 8:51 p.m. UTC
Use PCI device IDs from pci_ids.h header
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
sound/hda/hdac_i915.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Comments
On Wed, Jun 28, 2023 at 10:51:31PM +0200, Amadeusz Sławiński wrote: > Use PCI device IDs from pci_ids.h header Missing period at the end. ... > -#define IS_HSW_CONTROLLER(pci) (((pci)->device == 0x0a0c) || \ > - ((pci)->device == 0x0c0c) || \ > - ((pci)->device == 0x0d0c) || \ > - ((pci)->device == 0x160c)) > +#define IS_HSW_CONTROLLER(pci) (((pci)->device == PCI_DEVICE_ID_INTEL_HDA_HSW_0) || \ > + ((pci)->device == PCI_DEVICE_ID_INTEL_HDA_HSW_2) || \ > + ((pci)->device == PCI_DEVICE_ID_INTEL_HDA_HSW_3) || \ > + ((pci)->device == PCI_DEVICE_ID_INTEL_HDA_BDW)) The very same macro under different name appeared in the previous patch. Am I correct? Perhaps go further and first move it somewhere to be available for both?
On Wed, Jun 28, 2023 at 05:42:54PM +0300, Andy Shevchenko wrote: > On Wed, Jun 28, 2023 at 10:51:31PM +0200, Amadeusz Sławiński wrote: ... > > -#define IS_HSW_CONTROLLER(pci) (((pci)->device == 0x0a0c) || \ > > - ((pci)->device == 0x0c0c) || \ > > - ((pci)->device == 0x0d0c) || \ > > - ((pci)->device == 0x160c)) > > +#define IS_HSW_CONTROLLER(pci) (((pci)->device == PCI_DEVICE_ID_INTEL_HDA_HSW_0) || \ > > + ((pci)->device == PCI_DEVICE_ID_INTEL_HDA_HSW_2) || \ > > + ((pci)->device == PCI_DEVICE_ID_INTEL_HDA_HSW_3) || \ > > + ((pci)->device == PCI_DEVICE_ID_INTEL_HDA_BDW)) > > The very same macro under different name appeared in the previous patch. > Am I correct? Perhaps go further and first move it somewhere to be available > for both? Ah, this one is a subset of that one, nevertheless the proposal stays.
diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c index 161a9711cd63..e9342e74b739 100644 --- a/sound/hda/hdac_i915.c +++ b/sound/hda/hdac_i915.c @@ -11,10 +11,10 @@ #include <sound/hda_i915.h> #include <sound/hda_register.h> -#define IS_HSW_CONTROLLER(pci) (((pci)->device == 0x0a0c) || \ - ((pci)->device == 0x0c0c) || \ - ((pci)->device == 0x0d0c) || \ - ((pci)->device == 0x160c)) +#define IS_HSW_CONTROLLER(pci) (((pci)->device == PCI_DEVICE_ID_INTEL_HDA_HSW_0) || \ + ((pci)->device == PCI_DEVICE_ID_INTEL_HDA_HSW_2) || \ + ((pci)->device == PCI_DEVICE_ID_INTEL_HDA_HSW_3) || \ + ((pci)->device == PCI_DEVICE_ID_INTEL_HDA_BDW)) /** * snd_hdac_i915_set_bclk - Reprogram BCLK for HSW/BDW