From patchwork Mon Jul 17 11:45:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= X-Patchwork-Id: 121246 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1071322vqt; Mon, 17 Jul 2023 05:15:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlGyv8s4Mt1ZXgkuvMEyxYkqkszvZ6WdAxCLtHHWm9Xv9WOY2l81PxB7ks//W+G4Q6pIIu/b X-Received: by 2002:a17:906:225c:b0:994:5407:9ac9 with SMTP id 28-20020a170906225c00b0099454079ac9mr10639824ejr.5.1689596150191; Mon, 17 Jul 2023 05:15:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689596150; cv=none; d=google.com; s=arc-20160816; b=UZ/xZGtGud0T/M5bP5yxVsg4qUOsBffZj1LfDdGqlId4UQtVBBhxWkgWn1Sn/gwti3 wP0z6FS0jSyBHw2d2A9tz7tECCoLVKsfbRQITjaJJwK5Nvm8IcNW/zSLTQJ/XFYAQP78 ImLpfRwU+y4I5yMNor/ezlaC+J86En3sSG98jec0Qft8oLIk+806QBXiTYBdO7GmUa6U 9uGNH4vnYwYPvOYx1eP739V1I6ZyDF/iQXLts7MeDL+yfYw6V6Du3l1a/JLFnJMtl9wX TJmTo1G48rPbRujruNM+1Cpy9hgxob1PmUB8o/Y7hnx+VrwPPJ4lGWo+llq82jms3g24 7LCw== 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=BZmI1OcIV8h1FRzqPL+l7JR8+ImshKSyedhwe9AZI9E=; fh=WYMxSBIzRoGpjokqDjpNyzs/ox+ow6sUuRoGJdpn/uA=; b=m0MgbaaGwLsD9qsk0vzGQmEMhqIr6XsxSbktinS+esUFrc6SNuSTv5bvyQXjGOIxBB Z94iAst39opW2YoWjYwmUoh+N5fDxVmR3pNiIv8byNr5BH4k8RGdreU8iq1Yh/x1o9R1 gW1o6TLMhAMYS4cvt/R3ftbIlhuYrLO3MSL4ojmxiln9xweM4HP2hh5FzbI2T4LyWzo0 UxEoGsIfYZCpaHz9AoYkcF6XngyI+mZA0ILIWZZgFP2yn7zRAlZKACM9ntvmShCUxoSK 7t29A913Z6FtCj2lHZ6eK41exgD2S1MPzbajxv1fXqYpEsHYrwzymNeMzxmVtryg25jG WNGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=a+lNWBOY; 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 a18-20020a17090680d200b0098f564f636esi13723923ejx.132.2023.07.17.05.15.26; Mon, 17 Jul 2023 05:15:50 -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=a+lNWBOY; 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 S230063AbjGQLrs (ORCPT + 99 others); Mon, 17 Jul 2023 07:47:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229811AbjGQLrr (ORCPT ); Mon, 17 Jul 2023 07:47:47 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 854941723; Mon, 17 Jul 2023 04:47:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689594430; x=1721130430; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=j//TrXXHNXrhUqDD9T+gen6H5BoDir0XYkENmSPZ2rY=; b=a+lNWBOYmY7JY+LQa5YSu0fFmNYgpaQbIDK8mETV1LrHzZc+gdtA+mA9 tOzI6ExQRMeRkRs3RUGmmBEhATtkPVfTaiKGibwjQkWfiEkSM5Tvu4VMO 4Vx4DfkrnF4TawSC6ysqm1C/nJIiokgjy3ZZHVRF32TPO68ij2GXGPhW1 gtvqhS07zCt8g47Jy+cfRIp04fQ6Ag0JX/SQbtaGYsmGp5EFAO8OMvvpQ 8a6LdIJOP2mMSRmvYlEvhynROOAZ/qq6dgmw1QpwoNNuF3nAo37kIITNi fgkMtiflm2FyopplH3kOVg02n6EPWvL5XQasD7/ZGNlgKCWTR05p9OapR Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10773"; a="363372887" X-IronPort-AV: E=Sophos;i="6.01,211,1684825200"; d="scan'208";a="363372887" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2023 04:45:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10773"; a="969856519" X-IronPort-AV: E=Sophos;i="6.01,211,1684825200"; d="scan'208";a="969856519" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by fmsmga006.fm.intel.com with ESMTP; 17 Jul 2023 04:45:44 -0700 From: =?utf-8?q?Amadeusz_S=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 , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Hans de Goede , =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= , Andy Shevchenko Subject: [PATCH v4 08/15] ASoC: Intel: Skylake: Use global PCI match macro Date: Mon, 17 Jul 2023 13:45:04 +0200 Message-Id: <20230717114511.484999-9-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230717114511.484999-1-amadeuszx.slawinski@linux.intel.com> References: <20230717114511.484999-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771669972672953639 X-GMAIL-MSGID: 1771669972672953639 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. IS_CFL() macro is dropped as it is unused. Acked-by: Mark Brown Reviewed-by: Andy Shevchenko Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński --- include/sound/hda_codec.h | 3 --- sound/soc/intel/skylake/skl-pcm.c | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/sound/hda_codec.h b/include/sound/hda_codec.h index bbb7805e85d8..5497dc9c396a 100644 --- a/include/sound/hda_codec.h +++ b/include/sound/hda_codec.h @@ -18,9 +18,6 @@ #include #include -#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98) -#define IS_CFL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa348) - /* * Structures */ diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c index a4209d88b0c6..ac3dc8c63c26 100644 --- a/sound/soc/intel/skylake/skl-pcm.c +++ b/sound/soc/intel/skylake/skl-pcm.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include "skl.h" @@ -152,7 +153,7 @@ int skl_pcm_host_dma_prepare(struct device *dev, struct skl_pipe_params *params) * The recommended SDxFMT programming sequence for BXT * platforms is to couple the stream before writing the format */ - if (IS_BXT(skl->pci)) { + if (HDA_CONTROLLER_IS_APL(skl->pci)) { snd_hdac_ext_stream_decouple(bus, stream, false); err = snd_hdac_stream_setup(hdac_stream(stream)); snd_hdac_ext_stream_decouple(bus, stream, true);