From patchwork Fri Jul 14 18:56:08 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: 120416 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp2416541vqm; Fri, 14 Jul 2023 03:56:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlGhfEl6ndKo/LW8UfIKd6aBeCTLVL7nQ7hn16BqYpx9unFF5z30QaFt71w6OgEwZyfEbxEV X-Received: by 2002:a05:6a20:2594:b0:132:7ae5:46da with SMTP id k20-20020a056a20259400b001327ae546damr4694652pzd.53.1689332204466; Fri, 14 Jul 2023 03:56:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689332204; cv=none; d=google.com; s=arc-20160816; b=kuNEbMVNLlPKw4n/eGGddHMGP1umHgu5JIsObEv4JMB2d1z3tJ6gJZzaA6f8gv1jH3 i8NHUvLqQPt5nLco43nNlNQMluq22stYkB43Gt4TuqeU1I+9khYItTo/bFId1l1bOo9K fUipdY4978qbfA/vSRkDTe0o/OQG9rzd7Rg84q7vY/4fJObtPcZQ5q54DjKvZfXfyWah NzPpxaJnCaRlxVyah/iQiMSEmSfr8+tdZb8DdWI1pQBXns3SZ+XuuPcIewnlVmnV/WEh Hs7EESfXWyCYZYTIJn3gYHW4RPuZ6eY+spFO2GicHQwGbohtC0wten56orO5CrddIjki WjUw== 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=BDa1klv7tlfef/4uZTkHMc7Hm7ifysjHxnI3LxlnhSI=; fh=iLu8mJV3L09dzJN6VXkKj+SRT/C9p8fR4gJYErWu4bc=; b=fLOrf+R/YW6P5AfAFtz5L9us76nReOxFxyV2Qzjs/8oyi5YQ+0+222Su4HLTRwwkuC MVboHsx+w/HOcmYl3PFzJqSHwPAkzDuH7fURnDrhSh/YCZYwFGytG4OarnIrcGXY6mbU LV3eeAnTR5br/St8tz/q5QiOW51H+pbXZlp+E7pyQEWcS1MejlzSbzHqvjQ56Z0pVwBD BPYuVc6SMIaJclNf0y9CBPe034M8ebw1tV4u9oEbu7vMEvKMj1zTwbG/UFICchoL9GGa lDeLPLS3sBgKnljUuhiNfJzcB145p6s9xp8gar/w0ogdlYxr4DistV9T/2kXdOTiQ5bV BrQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="MLl67x2/"; 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 z66-20020a633345000000b0055ded4169a5si1265404pgz.576.2023.07.14.03.56.31; Fri, 14 Jul 2023 03:56:44 -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="MLl67x2/"; 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 S236268AbjGNKzi (ORCPT + 99 others); Fri, 14 Jul 2023 06:55:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236278AbjGNKza (ORCPT ); Fri, 14 Jul 2023 06:55:30 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C928B35B1; Fri, 14 Jul 2023 03:55:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689332126; x=1720868126; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PBebvDAwGl69rhzohAaS7jNgIdCEGCL7ad9NEzcoAGA=; b=MLl67x2/qF2X/Hj59SLZAD1EeYJSgQGbHeDirpwCUOKoD/5nsaTmIUwP ruSk2pQGD4gXTseLxB2IZnYGOwysqJcWmrZaS2zysm7phobfwLyrQmAwz V+Q6kFHEbIVfp2yPh4Wz/fElgkFI1jlYCug8YeB6VBP2seMbWWVxdT9Gy 2MNGGSMk3qBUXXc83HHu3eiPdVXvB6f4Zvuiz0ftm2XMXBk7uDKr7S0Ux koaTkqkhLMrL+DPlEdAzLjlnghGp4UI0Kh+pLKvGhhzDHyrtwDLc9YvgX QScoHRFb93+9vRBThAf0+zW2/rj1NdVca1Rit+DrJoGQd7IGLBQtHGDUW A==; X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="364321188" X-IronPort-AV: E=Sophos;i="6.01,205,1684825200"; d="scan'208";a="364321188" 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:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="722365503" X-IronPort-AV: E=Sophos;i="6.01,205,1684825200"; d="scan'208";a="722365503" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by orsmga002.jf.intel.com with ESMTP; 14 Jul 2023 03:55:23 -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 , Hans de Goede , =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= , Andy Shevchenko Subject: [PATCH v2 08/15] ASoC: Intel: Skylake: Use global PCI match macro Date: Fri, 14 Jul 2023 20:56:08 +0200 Message-Id: <20230714185615.370597-9-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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771393205540960483 X-GMAIL-MSGID: 1771393205540960483 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 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);