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=-7.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 5AF8DC433E0 for ; Mon, 22 Jun 2020 14:27:29 +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 E034220720 for ; Mon, 22 Jun 2020 14:27:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="RUZQKvXR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E034220720 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 6DFFF16DB; Mon, 22 Jun 2020 16:26:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6DFFF16DB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1592836047; bh=QqsOHJGUY7QGQ4iNZKM6qaFXPndQw4OWgRqxzwl0/LM=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RUZQKvXRSI7OR9bdpUH5z928Hzk274OXbOfyvOks/prqgcybTYpDwirs7cYx3IUWO rd59c3d3+PIxdQ8Gb14ij4leqbx5dyYr1fzAJvJpUoc2tITpeDnKmdIqAYLNCdrIsO wGpkbn0E0MUzcBnaYMycVMwAfZpd0w4dtY97s+Sc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 02473F8010D; Mon, 22 Jun 2020 16:26:37 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 42B9AF8015B; Mon, 22 Jun 2020 16:26:23 +0200 (CEST) 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 4B2B1F8010D for ; Mon, 22 Jun 2020 16:26:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4B2B1F8010D X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B2E2EC1A5; Mon, 22 Jun 2020 14:26:14 +0000 (UTC) Date: Mon, 22 Jun 2020 15:52:31 +0200 Message-ID: From: Takashi Iwai To: Jaroslav Kysela Subject: Re: [PATCH] ASoC: amd: add logic to check dmic hardware runtime In-Reply-To: <46604924-3293-062e-db29-2647ecbc0701@perex.cz> References: <1592654687-24574-1-git-send-email-Vijendar.Mukunda@amd.com> <46604924-3293-062e-db29-2647ecbc0701@perex.cz> 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") Content-Type: text/plain; charset=US-ASCII Cc: Alexander.Deucher@amd.com, hui.wang@canonical.com, alsa-devel@alsa-project.org, Virendra-Pratap.Arya@amd.com, Vijendar Mukunda 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Mon, 22 Jun 2020 15:27:25 +0200, Jaroslav Kysela wrote: > > Dne 20. 06. 20 v 14:04 Vijendar Mukunda napsal(a): > > Add logic to check DMIC hardware exists or not on > > the platform at runtime. > > > > Add module param for overriding DMIC hardware check > > at runtime. > > > > Signed-off-by: Vijendar Mukunda > > --- > > sound/soc/amd/renoir/rn-pci-acp3x.c | 29 +++++++++++++++++++++++++++++ > > sound/soc/amd/renoir/rn_acp3x.h | 7 +++++++ > > 2 files changed, 36 insertions(+) > > > > diff --git a/sound/soc/amd/renoir/rn-pci-acp3x.c b/sound/soc/amd/renoir/rn-pci-acp3x.c > > index 859ed67..ef6eeba 100644 > > --- a/sound/soc/amd/renoir/rn-pci-acp3x.c > > +++ b/sound/soc/amd/renoir/rn-pci-acp3x.c > > @@ -5,6 +5,7 @@ > > //Copyright 2020 Advanced Micro Devices, Inc. > > #include > > +#include > > #include > > #include > > #include > > @@ -18,6 +19,16 @@ static int acp_power_gating; > > module_param(acp_power_gating, int, 0644); > > MODULE_PARM_DESC(acp_power_gating, "Enable acp power gating"); > > +/** > > + * dmic_acpi_check = 0 - Skips DMIC device creation and returns probe failure > > + * = 1 - Assumes that platform has DMIC support and skips ACPI > > + * method check > > + * = 2 - Checks ACPI method to know DMIC hardware status runtime > > + */ > > +static int dmic_acpi_check = ACP_DMIC_AUTO; > > I would prefer to have 0 = auto, 1 = force, 2 = skip to put the > dmic_acpi_check variable to BSS. Otherwise the patch looks > good. Thanks. It's "bint" module parameter type is used for this kind of flag, which implies: -1 = auto, whatever the default 0 = disable 1 = enable Then user can pass dmic_acpi_check=1 or dmic_acpi_check=true (or on) to explicitly enable the flag. Takashi