From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0ABFC43603 for ; Wed, 18 Dec 2019 06:33:36 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5B5EF20717 for ; Wed, 18 Dec 2019 06:33:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="RtpY+mzL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B5EF20717 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DFE851667; Wed, 18 Dec 2019 07:32:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DFE851667 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1576650814; bh=d7hF+1nWJalV7zA18Rv5X2dXmgdQSmsimnIcmEpivv4=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RtpY+mzL9+7009N/YZqsQatVtezXjsiL5uV6lx9RgfEswG47rVNGc628qjuyV9P/T Ur6q/MSlnerRUZMv4Q6IIkUCyxDWjMk4HIXJrjMFxb+sXZhSqysiDT1vOmpuMEFsnW xlWv3sMQ0W9IxmA5FjDy+1p04NN72uaBDHHtsiwQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1B62FF8014C; Wed, 18 Dec 2019 07:32:27 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 69C71F80258; Wed, 18 Dec 2019 07:32:25 +0100 (CET) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 6B2F2F8014C for ; Wed, 18 Dec 2019 07:32:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6B2F2F8014C X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 5CA85B211; Wed, 18 Dec 2019 06:32:20 +0000 (UTC) Date: Wed, 18 Dec 2019 07:32:20 +0100 Message-ID: From: Takashi Iwai To: Pierre-Louis Bossart In-Reply-To: <0131b134-46dc-991f-230b-fe843f43f078@linux.intel.com> References: <20191126141423.21523-1-pierre-louis.bossart@linux.intel.com> <0131b134-46dc-991f-230b-fe843f43f078@linux.intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: alsa-devel@alsa-project.org, broonie@kernel.org Subject: Re: [alsa-devel] [PATCH] ASoC: SOF: Intel: add PCI ID for CometLake-S X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Wed, 18 Dec 2019 01:50:42 +0100, Pierre-Louis Bossart wrote: > > > >> diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c > >> index bbeffd932de7..0b39ea6117cf 100644 > >> --- a/sound/soc/sof/sof-pci-dev.c > >> +++ b/sound/soc/sof/sof-pci-dev.c > >> @@ -417,6 +417,10 @@ static const struct pci_device_id sof_pci_ids[] = { > >> { PCI_DEVICE(0x8086, 0x06c8), > >> .driver_data = (unsigned long)&cml_desc}, > >> #endif > >> +#if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_S) > >> + { PCI_DEVICE(0x8086, 0xa3f0), > >> + .driver_data = (unsigned long)&cml_desc}, > >> +#endif > >> #if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) > >> { PCI_DEVICE(0x8086, 0xa0c8), > >> .driver_data = (unsigned long)&tgl_desc}, > > Sorry Takashi, I was checking why this patch wasn't merged and only > realized now that I missed your feedback (likely an effect of the > Thanksgiving holiday). > > > I guess the change in ifdef for cml_desc definition is still missing. > > Not sure what change you are referring to? Take a look at the definition of cml_desc. It's wrapped with #if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_LP) || \ IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_H) but this wasn't updated for the new COMETLAKE_S. > > But, I wonder whether it'd be simpler to have Kconfigs only per > > sof_dev_desc? That is, have CONFIG_SND_SOC_SOF_COMETLAKE, and all CML > > model PCI entries are enabled by that as long as they use the same > > cml_desc definition. > > it's difficult to have a classification that's complete and accurate, > some PCH versions are reused in products that use a different family > name. For example you will find the same PCI ID for CNL and WHL, and > in others the -H, -U and -Y skews are not identical. Even Intel folks > get lost at times, myself included. > > For now we prefer having one Kconfig per PCI ID, and we try to provide > a name for the Kconfig that is the most accurate without being > cryptic. One of the reasons for having different Kconfigs is that we > have multiple versions of the audio IP, and the ability to narrow the > selection to a single device helps make sure the code is in the right > place/module and dependencies are correct. > > > Also, can we reduce even the ifdef around sof_dev_desc definitions by > > __maybe_unused atttribute? > > Sorry, I am not following your suggestion. I would really like to keep > the ifdefs for now, and while it can be seen as overkill to have > descriptors that are identical in some cases the past experience shows > it's useful when we have to add quirks for specific 'hardware > recommended programming sequences'. What I suggested was simple, just dropping ifdef by something like diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c index bbeffd932de7..297632a54f1b 100644 --- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c @@ -36,8 +36,7 @@ MODULE_PARM_DESC(sof_pci_debug, "SOF PCI debug options (0x0 all off)"); #define SOF_PCI_DISABLE_PM_RUNTIME BIT(0) -#if IS_ENABLED(CONFIG_SND_SOC_SOF_APOLLOLAKE) -static const struct sof_dev_desc bxt_desc = { +static const struct sof_dev_desc __maybe_unused bxt_desc = { .machines = snd_soc_acpi_intel_bxt_machines, .resindex_lpe_base = 0, .resindex_pcicfg_base = -1, @@ -52,10 +51,8 @@ static const struct sof_dev_desc bxt_desc = { .ops = &sof_apl_ops, .arch_ops = &sof_xtensa_arch_ops }; -#endif -#if IS_ENABLED(CONFIG_SND_SOC_SOF_GEMINILAKE) -static const struct sof_dev_desc glk_desc = { +static const struct sof_dev_desc __maybe_unused glk_desc = { .machines = snd_soc_acpi_intel_glk_machines, .resindex_lpe_base = 0, .resindex_pcicfg_base = -1, @@ -70,10 +67,8 @@ static const struct sof_dev_desc glk_desc = { .ops = &sof_apl_ops, .arch_ops = &sof_xtensa_arch_ops }; -#endif ..... Then the issue I pointed above can be solved as well. thanks, Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel