Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87308C54EAA for ; Fri, 27 Jan 2023 16:42:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234981AbjA0QmC (ORCPT ); Fri, 27 Jan 2023 11:42:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233775AbjA0Ql6 (ORCPT ); Fri, 27 Jan 2023 11:41:58 -0500 Received: from mail1.perex.cz (mail1.perex.cz [77.48.224.245]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0E697CC89 for ; Fri, 27 Jan 2023 08:41:56 -0800 (PST) Received: from mail1.perex.cz (localhost [127.0.0.1]) by smtp1.perex.cz (Perex's E-mail Delivery System) with ESMTP id 664B911E4; Fri, 27 Jan 2023 17:41:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.perex.cz 664B911E4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perex.cz; s=default; t=1674837714; bh=72VCcJJxXXJ2bRu6xheDpCpxeIDPr4x7r7Bh9fqdkxo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=qsE7WeDhAIYITdqIx4QhUbq4ukEd81gGTxkWg1gHEcz+MM2p8mXAQfT8rrss4d7h9 il6oXy/w1cphUQ2yixydix3aek4tCPlzUOzZcVYBqmDVH1MupuJH8ydK42YwtKOcmH VHRs/5VZvRdjtNQ0qJtzKkbmKhBKAP/TLElU0uOw= Received: from [192.168.100.98] (unknown [192.168.100.98]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: perex) by mail1.perex.cz (Perex's E-mail Delivery System) with ESMTPSA; Fri, 27 Jan 2023 17:41:44 +0100 (CET) Message-ID: Date: Fri, 27 Jan 2023 17:41:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH 2/6] ASoC: amd: yc: Add a module parameter to influence pdm_gain Content-Language: en-US To: "Limonciello, Mario" , "Mukunda, Vijendar" , "Saba Kareem, Syed" , "linux-kernel@vger.kernel.org" Cc: "Pananchikkal, Renjith" , Mark Pearson , Liam Girdwood , Mark Brown , Takashi Iwai , "alsa-devel@alsa-project.org" References: <20230127160134.2658-1-mario.limonciello@amd.com> <20230127160134.2658-3-mario.limonciello@amd.com> <2e9f4301-0211-04f5-5b38-caf2be9f4fd1@perex.cz> From: Jaroslav Kysela In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27. 01. 23 17:25, Limonciello, Mario wrote: > [AMD Official Use Only - General] > > > >> -----Original Message----- >> From: Jaroslav Kysela >> Sent: Friday, January 27, 2023 10:23 >> To: Limonciello, Mario ; Mukunda, Vijendar >> ; Saba Kareem, Syed >> ; linux-kernel@vger.kernel.org >> Cc: Pananchikkal, Renjith ; Mark Pearson >> ; Liam Girdwood ; Mark >> Brown ; Takashi Iwai ; alsa- >> devel@alsa-project.org >> Subject: Re: [PATCH 2/6] ASoC: amd: yc: Add a module parameter to >> influence pdm_gain >> >> On 27. 01. 23 17:01, Mario Limonciello wrote: >>> In case of regressions for any users that the new pdm_gain value is >>> too high and for additional debugging, introduce a module parameter >>> that would let them configure it. >>> >>> Signed-off-by: Mario Limonciello >>> --- >>> sound/soc/amd/yc/acp6x-pdm-dma.c | 7 ++++++- >>> sound/soc/amd/yc/acp6x.h | 2 +- >>> 2 files changed, 7 insertions(+), 2 deletions(-) >> >> ... >> >>> pdm_ctrl = acp6x_readl(acp_base + ACP_WOV_MISC_CTRL); >>> - pdm_ctrl |= ACP_WOV_MISC_CTRL_MASK; >>> + pdm_ctrl |= FIELD_PREP(ACP_WOV_GAIN_CONTROL, pdm_gain); >> >> The bits should be zeroed (AND - &) before OR to make sure that the correct >> value is written to the register. More related patches are affected. > > I had consider this, but the hardware default at reset is 0x0. Do you think it's > still necessary for posterity? You're using 0644 permissions for the module parameter, so the value can be changed by root using sysfs anytime (between SNDRV_PCM_TRIGGER calls). Jaroslav -- Jaroslav Kysela Linux Sound Maintainer; ALSA Project; Red Hat, Inc.