From patchwork Fri Jan 27 16:01:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 13118912 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id DA3E1C38142 for ; Fri, 27 Jan 2023 16:03:20 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1C16684D; Fri, 27 Jan 2023 17:02:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1C16684D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1674835398; bh=DloRz2y0bMEvM06on3C1wHyCZSZhB9corbwgfoBAQFw=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=Vp6SKXPHwgYb0E4D93YGJ0fbHZbsutHWHscf4NgPZDr89gMICc8kj/ebtTjDSbKpZ TiqjGYNp4mU38HHjEQ+Q+DKBImumGh3dkyLIgeZd5P0+jklUa0KnQGUeF8Dyz9lIDN MzpDl11OgdjUDi7Vm9oT5k1Z44QCjT9fy8o2JK2g= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AECC5F804F3; Fri, 27 Jan 2023 17:02:27 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D9BB0F8053A; Fri, 27 Jan 2023 17:02:26 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on20631.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e89::631]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id ECBBDF80224 for ; Fri, 27 Jan 2023 17:02:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ECBBDF80224 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=WX9mSArn ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eDBhVDsfVBfFXyQ4YndsXWkTGIp7O6BvH43jHc/YgrgrgJq2OX+Vo6J6CfQcHsAi6HkVy73pfDwY2aeeIJJv9MyfcObthd88YZ0fA5IdelO/dBQMKWIlIHaCADtXgf9A2/h/pypEGAy13RWd1afMEqKb22sqoX3wFwIWV+ooPS8a5OMk2j6VWZYesEsiprTlrPBVrKEbUef83dvKqUHj9iHQSkCd8UIJjuCDjr95sJ1zhPUkmy5CPRSn4y+p8J8HBbNhl/zv6h9n4fxjpGC0YPJuSIIHDqUHU5UfDN1RctNk4coRHWxUkK/9AvHH+HZog6eO3a4MhIJkR6dsTc/ToQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5aKmvnOZr7+ZbKfC741aJVN4sW9FPDgnJEvlymWjFz8=; b=Oe2Oh0Fc+ZR118HVUHudiVzG0sUJ4ACmI6I2hsXD7JDZWWH6VCv2ZpPU8TvUgUnE+iXaLX5yOFMNZVZpeQ3CQx+KNlc/aghzA7H7Tk8EugcGy011eFcqddfheH24xN/qURnpPgCqEgnjMjI0piAzD/+xj3dV8ufE+XYWdz/h1liPlBNbFSVqPho/bpPgBPQwzFZ2uHHS736krGggZPcFLzGZYdwGCN0+FSYdf9I0SzHhzQivQZMeHcIP8EypT608+6ZJviGca2ZM3G8HY/yU4CN8moabgsVI1rarUGhD0JF9XaNjvDMfRJOz8vchSk+wwvme22KL5nL+zhKto7LHxQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5aKmvnOZr7+ZbKfC741aJVN4sW9FPDgnJEvlymWjFz8=; b=WX9mSArnq8oY+6KPpY6mLjqp1wKviwQ7kMyczaBF5X4sqVQQI370AJsmK8QM3FNPa+4K2naMhT7HLx7dB47IoSZ39W1Q9BIjp/34B8+IRbUZPsHZ1VnvS2cCRmigVKDPHGPCsboQngShfyuaDYi4SunDEkmWx96I35UF5x13dDI= Received: from MW4PR03CA0166.namprd03.prod.outlook.com (2603:10b6:303:8d::21) by CH3PR12MB8074.namprd12.prod.outlook.com (2603:10b6:610:12b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.22; Fri, 27 Jan 2023 16:02:12 +0000 Received: from CO1PEPF00001A5F.namprd05.prod.outlook.com (2603:10b6:303:8d:cafe::82) by MW4PR03CA0166.outlook.office365.com (2603:10b6:303:8d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.25 via Frontend Transport; Fri, 27 Jan 2023 16:02:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1PEPF00001A5F.mail.protection.outlook.com (10.167.241.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6043.10 via Frontend Transport; Fri, 27 Jan 2023 16:02:12 +0000 Received: from AUS-LX-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 27 Jan 2023 10:02:11 -0600 From: Mario Limonciello To: Jaroslav Kysela , Mukunda Vijendar , Saba Kareem Syed , Subject: [PATCH 1/6] ASoC: amd: yc: Adjust the gain for PDM DMIC Date: Fri, 27 Jan 2023 10:01:28 -0600 Message-ID: <20230127160134.2658-2-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230127160134.2658-1-mario.limonciello@amd.com> References: <20230127160134.2658-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF00001A5F:EE_|CH3PR12MB8074:EE_ X-MS-Office365-Filtering-Correlation-Id: b7f7a0b2-3758-4f37-9ce0-08db007fda24 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +CN5ENAAd9PHWnVnQPeNPo/pEIUc1XIeJuWnEhxcwCryFjfDPRQeJJLytLlpQ5SH/aF7lJt4vjUna6xX7z6aXanPQnGNsgk93A6j0rAFGcW3jjr4DibHSRp9G/M5jN5Z/ztWQVmkseQun2PNLjc2rVTmZPWjpjAxcwFJJLSerm6FDEayiBX64T9/sQzz8xgNcZQWk6WKSxuaOd9Kp47nFJJDYI5vTZHX50lUfPdcy54+/eGQ9b6NmwBAKdvPvGJEVKs5MuH931ysb+kbc/nH2oG7vBrnPsU7DC2+gofpODfmJP0YgsPtTpZztvMV81Gkb5RHP6nHG2u6X4zIRTXyge7SnmxE1a0TkWg7GFEFSbaEJMFz1Kuw85hgh0+Ng92Y/6x2+ig8sq6Hww1KApHn8n36GrkNg1NSC26Wn202Jb2h2XY351oAK5QGn0AVwD9reYwyeC1U/HNXMFw5D6CDJ77XVXKYlVgSUQUbe0DBGO86sSG38Q6nT9vpN+Zw+ZEchErJ31tswhuPLnU6M8quOqlBJjXHo4ylFXDBb1PcjidJh62yfsvTL1oycnz8yCbPuCFo9CYhX1jcNw9Nk0LK9gNcHnuTLhco0ZERm4/v9IHBE1m1gbbwvEGNBuUhtzGU97Uu7uj6pLhoUNJo59RO7LHj7HRlHKdJs8iVcyIcNlSCPHgOKJqBvFHf/lF3ixWbvtx2D3WnhFo1cLcFxYkhftzrcOY3GMcOf+DJmsOXBT0= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(346002)(39860400002)(396003)(136003)(376002)(451199018)(46966006)(36840700001)(40470700004)(1076003)(44832011)(2906002)(5660300002)(4744005)(41300700001)(36860700001)(426003)(47076005)(6666004)(26005)(8936002)(336012)(186003)(478600001)(2616005)(16526019)(70206006)(70586007)(83380400001)(356005)(36756003)(40460700003)(82740400003)(86362001)(81166007)(316002)(4326008)(40480700001)(7696005)(8676002)(82310400005)(110136005)(54906003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jan 2023 16:02:12.2173 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b7f7a0b2-3758-4f37-9ce0-08db007fda24 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF00001A5F.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8074 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: alsa-devel@alsa-project.org, Pananchikkal Renjith , Takashi Iwai , Liam Girdwood , Mark Brown , Mario Limonciello , Mark Pearson Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" A number of users for Lenovo Rembrandt based laptops are reporting that the microphone is too quiet relative to Windows with a dual boot. Increase the PDM gain to overcome this problem. Signed-off-by: Mario Limonciello --- sound/soc/amd/yc/acp6x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/amd/yc/acp6x.h b/sound/soc/amd/yc/acp6x.h index 74b596e6807ad..846ca10e24d3f 100644 --- a/sound/soc/amd/yc/acp6x.h +++ b/sound/soc/amd/yc/acp6x.h @@ -31,7 +31,7 @@ #define ACP_ERROR_STAT 29 #define PDM_DECIMATION_FACTOR 2 #define ACP_PDM_CLK_FREQ_MASK 7 -#define ACP_WOV_MISC_CTRL_MASK 0x10 +#define ACP_WOV_MISC_CTRL_MASK 0x18 #define ACP_PDM_ENABLE 1 #define ACP_PDM_DISABLE 0 #define ACP_PDM_DMA_EN_STATUS 2 From patchwork Fri Jan 27 16:01:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 13118915 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 58710C61DA3 for ; Fri, 27 Jan 2023 16:04:19 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6274DE7B; Fri, 27 Jan 2023 17:03:27 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6274DE7B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1674835457; bh=9eQJCtdV2ve4spHd2hRYLyKQtjlya5noi8LV2jRhzOA=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=gAyiwR+31ATxy6IUeNsLybFDNC+MxQgz1SwrmPFiMLT99nr0pIf6D0XG4XiHBwJTf MOZdOTy+dUElQunsTlafFeuBrEnFmZxeRaEJJWC82MwQUNi0aHSMZXIs3lXK5YSdPA PCHuTbJEPVR0SUeNbzbtEaCwxS5rewdh8dFvmtuM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3BCA8F80549; Fri, 27 Jan 2023 17:02:37 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F0866F80551; Fri, 27 Jan 2023 17:02:35 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2061b.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e83::61b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id ABFF6F8007C for ; Fri, 27 Jan 2023 17:02:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ABFF6F8007C Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=yNugh+Q0 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lop66OF2MAxhTvnObTyeujo54VGsS2Pjh4cQz8O/8FTlaTy2Bi1/q9VDmbJePk5FT13rQdGXkawwCOTCrNuiFp5jGliLaHa7ObPeivJBDwl9qyx/4qLutYWE895y8csuN8DNK8gTb5I8ljvRF0wXzrFI1go/noED0jPz1gHPqNBtJ/rQSCCIq54zSQexGe+Hk9b9gT2r9SgRMmhCtLrNe8t+d1vsmHrA3TGmOIwDxWIgksYZTTKaG3eH+fSPbWm3vpjG8ULFPJr/ukT5EwdXSlY590oAzJnVkTag0CJR0gyCp28PPoh5rFJiY6J8RDW/rk3mIV866A61hmwdhQZU5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tV1DJFhQHc3Sk0Mp1OHbmTkDJQRA51X7839sOaF5sG8=; b=I+0oS2+9TZab4PX4BHcfx68dOlt5tz1Lz3kmAfhmF6NQrCmmzDZ7Z4XB0sKRfMGWK5eirviUWvvrLZsrG7p3i778Dnc/VCJrutelMBoMQW+3rHtL0BeUEctH846bZEeOdgg3ePrJh8dCXckT/FWCHIiqcvoXHdlachhleL1twqZJSVZPSSSCANXV/A1Fzpdi7SiEZcPW8zxx1XUQDvY5OPojmg1j1KtDQ/DeGrj5hwDVKFyh5wbz/47iizRYa4laZ9Z9qpI7Y05oFyQQcCCUm3bbteHmANg8BNL0zBdJ6KtH7yOT2xpsR9obNe8U2dWKqKfLPbZ2e5XbNgiHxejGKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tV1DJFhQHc3Sk0Mp1OHbmTkDJQRA51X7839sOaF5sG8=; b=yNugh+Q0NmVAnV2pia4dC2wqQiKKlUAe8AYGfmYu2LrGovtPBNrgdKDiYkm+uvkGfd7J124Fn3c7I8w229dhAxX9jaJjYJzNV34CEBI7gFHflbEguuU62hyl68wZDa9HNIJn4JMaGaKrVJSlqOFNKI8mzyDmV5eLmoa+uxfx8Xc= Received: from MW4PR03CA0174.namprd03.prod.outlook.com (2603:10b6:303:8d::29) by MN0PR12MB6343.namprd12.prod.outlook.com (2603:10b6:208:3c0::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.22; Fri, 27 Jan 2023 16:02:14 +0000 Received: from CO1PEPF00001A5F.namprd05.prod.outlook.com (2603:10b6:303:8d:cafe::78) by MW4PR03CA0174.outlook.office365.com (2603:10b6:303:8d::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.25 via Frontend Transport; Fri, 27 Jan 2023 16:02:14 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1PEPF00001A5F.mail.protection.outlook.com (10.167.241.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6043.10 via Frontend Transport; Fri, 27 Jan 2023 16:02:13 +0000 Received: from AUS-LX-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 27 Jan 2023 10:02:12 -0600 From: Mario Limonciello To: Jaroslav Kysela , Mukunda Vijendar , Saba Kareem Syed , Subject: [PATCH 2/6] ASoC: amd: yc: Add a module parameter to influence pdm_gain Date: Fri, 27 Jan 2023 10:01:29 -0600 Message-ID: <20230127160134.2658-3-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230127160134.2658-1-mario.limonciello@amd.com> References: <20230127160134.2658-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF00001A5F:EE_|MN0PR12MB6343:EE_ X-MS-Office365-Filtering-Correlation-Id: bf5a7630-2f56-4d9c-b9b5-08db007fdb23 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jg/NiHWa9bLqbLSoVGppd3MVWmSHvcg2vIeHohqgN/4JMn6JubaLjJGyKtZK0ByX61Z2b9qMWvPkGPjNrEQN3qisJxdL888RMs9Vs8rBZuj0qkuNpMkABWp0x8wEfqJLvHsqDPbASNo4jVIBPqhoZmOWWm9ihr0+gFQlonn9xrvrqHbV8rpyNfZMDofPJeLt3nnl8qC0zjrqQBb3nANqX5kpU5C3xHt3KqI9YEPsC9cdpb2vRL/U796Td78o3Y5SVbMctJBxT4IBlKw0QXmwV+Wm0ylVC/AEVL7rWJX8nkOJ+HhYfB/STBfogugMT3X6l4c93ex5kdukcVvCxD05V0qtPbm5dfGlJbfKqiPxYG89bX4pSj+TDsuL/xMM//1ARej5ZCJbTWlmXT8USp/Gc/tRMYJ+nAdBk+sUkI1PSJBOXqUemEoMRqT6Ox6p1qhNkSvgnUxbIybAs4KjngGjMTjTnQroofRiKnNMOeFRJf16LePniXzPQiNmsu7Bz7YZGtG/AM02078T5JczvyagmhD16Ny0VO9GP7XVhA5ARfixY3aoM2bVp8lR5Xw+aT5mx4fd6QL5Iv63E01YkFNLNoQNJk9AmSlWXDVxE8DZas/sP8kam65VVRw1kAEmIWtqpJ+Q/iiuG3ZETpL4S75THV+wTJifiD5OPvAOT4R/yalNI89LCeggkvrojSh+KlaxJp52zlDr9FzqI7AWSlXCnTuvK15NPUcHvo83xtm7OdA= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(396003)(136003)(39860400002)(376002)(346002)(451199018)(36840700001)(46966006)(40470700004)(70206006)(5660300002)(8936002)(44832011)(2906002)(6666004)(41300700001)(4326008)(70586007)(8676002)(82310400005)(54906003)(316002)(110136005)(186003)(16526019)(26005)(36756003)(2616005)(1076003)(7696005)(478600001)(40460700003)(81166007)(47076005)(426003)(83380400001)(36860700001)(336012)(82740400003)(86362001)(40480700001)(356005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jan 2023 16:02:13.8892 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bf5a7630-2f56-4d9c-b9b5-08db007fdb23 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF00001A5F.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6343 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: alsa-devel@alsa-project.org, Pananchikkal Renjith , Takashi Iwai , Liam Girdwood , Mark Brown , Mario Limonciello , Mark Pearson Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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(-) diff --git a/sound/soc/amd/yc/acp6x-pdm-dma.c b/sound/soc/amd/yc/acp6x-pdm-dma.c index acecd6a4ec4b1..3d6a765c5011c 100644 --- a/sound/soc/amd/yc/acp6x-pdm-dma.c +++ b/sound/soc/amd/yc/acp6x-pdm-dma.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -18,6 +19,10 @@ #define DRV_NAME "acp_yc_pdm_dma" +static int pdm_gain = 3; +module_param(pdm_gain, int, 0644); +MODULE_PARM_DESC(pdm_gain, "Gain control (0-3)"); + static const struct snd_pcm_hardware acp6x_pdm_hardware_capture = { .info = SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | @@ -55,7 +60,7 @@ static void acp6x_enable_pdm_clock(void __iomem *acp_base) acp6x_writel(pdm_clk_enable, acp_base + ACP_WOV_CLK_CTRL); 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); acp6x_writel(pdm_ctrl, acp_base + ACP_WOV_MISC_CTRL); } diff --git a/sound/soc/amd/yc/acp6x.h b/sound/soc/amd/yc/acp6x.h index 846ca10e24d3f..036207568c048 100644 --- a/sound/soc/amd/yc/acp6x.h +++ b/sound/soc/amd/yc/acp6x.h @@ -31,7 +31,7 @@ #define ACP_ERROR_STAT 29 #define PDM_DECIMATION_FACTOR 2 #define ACP_PDM_CLK_FREQ_MASK 7 -#define ACP_WOV_MISC_CTRL_MASK 0x18 +#define ACP_WOV_GAIN_CONTROL GENMASK(4, 3) #define ACP_PDM_ENABLE 1 #define ACP_PDM_DISABLE 0 #define ACP_PDM_DMA_EN_STATUS 2 From patchwork Fri Jan 27 16:01:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 13118918 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 92F7AC54EAA for ; Fri, 27 Jan 2023 16:05:10 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2F282E94; Fri, 27 Jan 2023 17:04:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2F282E94 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1674835508; bh=XTU7PWPdZemAoAS2RVaHCh1sbBfbaKW90TZSL+67l6k=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=tCeZ9xCP+fdhEdgFouZpZhBYortVPYmhF5ntALV4pB+I+vt8mcHCb6kL3WVaNxI9l pj+lqPepyS6Y3m7BaILYYoY/FiA2iY+UlSzsQdX+QxhYLXzLJmtuG8A1FIAnSCRA/u TBnLCDV4M7LuanQwzSNNUfhGVrtCjEJ1F4gyZBNY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 823C4F8007C; Fri, 27 Jan 2023 17:02:43 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id BE042F80567; Fri, 27 Jan 2023 17:02:39 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2060.outbound.protection.outlook.com [40.107.92.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 60FC1F80272 for ; Fri, 27 Jan 2023 17:02:19 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 60FC1F80272 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=SPsjgFbd ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nOZ2TlMg2xc5jxtutiau0q0bqe9MTfIJGU2bcVKam83fMneI/gSGp/t6ZxO5Go5my0OGAankzeMRw1Fb1qGv0Q0wUNH6zqL9yUtEg6Jp4+R/oflTba4qoNaCYggBti2C46t0PSMK0OpkISbuxIDIz34WIYbQh2QSCwnXgFQzIbadHS2cRXzdv5yg5ZNAmRUMwPEFDPbKcAIT3mcGjKyy5gQ1Hk7CoMz7rBMmPPlRoHim5oyKlUQyK3Ioc/wuiWf47P8YJAKgc4ksqJCEb8xT+B/AGm+rmXfX46H2Y2dHNtqBRUooS1R0aUhVOUtW5vILu5Ta+/MDKbEb8UVR3c3ZKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jtTA9PwUwiy3U/Dloa2J49BaxS2dkptgUr+JvrRziMg=; b=E9iihzRjVwi5jP0kYwc2/fiAtiAErGsd8sdAxbR2KFDpwdQ/5vTN78fBcD+vNa64V/47PBRV2UhDaWz3Ez5HGEz5m6u5aPxx8S+NxaY6CJCsCl4NF7dzksG4K3epi0gOP0+Qs9S+L+niRH4TNpD+03w0rau0BdmRZ6bK9paToXwR/rVEDjkJdeIQd40/GZTAU8A7KbwO25puZmg5rzM2XDFyHREzKSlfkl4R20jvKaBSlueYgLN4zGzSwKvYk8Zs10y3uwDDKuX1CO+RygO0GfWrfdmRrI/8wer6vhyYHs0e01UTbfT4i1o/mWimpSDeLgu2g9KjvnLf9ng6/16pWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jtTA9PwUwiy3U/Dloa2J49BaxS2dkptgUr+JvrRziMg=; b=SPsjgFbdlI5SO9gCQVx2dnfheOhV9s23ugH1Cc8seZuA0FUWzQsSdDs3poiRmh44mTnEq9KGMyahWJPSLTlGy+E1D3c/cGDtXQyReIIR/9U4pdKo/nEoVjANKDiWhpNL1enabY9K38nzRKnk3wHa9dRJKulMZAViKCiCqIhNtm8= Received: from MW4PR03CA0154.namprd03.prod.outlook.com (2603:10b6:303:8d::9) by PH0PR12MB5402.namprd12.prod.outlook.com (2603:10b6:510:ef::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.25; Fri, 27 Jan 2023 16:02:16 +0000 Received: from CO1PEPF00001A5F.namprd05.prod.outlook.com (2603:10b6:303:8d:cafe::6d) by MW4PR03CA0154.outlook.office365.com (2603:10b6:303:8d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.22 via Frontend Transport; Fri, 27 Jan 2023 16:02:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1PEPF00001A5F.mail.protection.outlook.com (10.167.241.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6043.10 via Frontend Transport; Fri, 27 Jan 2023 16:02:15 +0000 Received: from AUS-LX-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 27 Jan 2023 10:02:13 -0600 From: Mario Limonciello To: Jaroslav Kysela , Mukunda Vijendar , Saba Kareem Syed , Subject: [PATCH 3/6] ASoC: amd: renoir: Adjust the gain for PDM DMIC Date: Fri, 27 Jan 2023 10:01:30 -0600 Message-ID: <20230127160134.2658-4-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230127160134.2658-1-mario.limonciello@amd.com> References: <20230127160134.2658-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF00001A5F:EE_|PH0PR12MB5402:EE_ X-MS-Office365-Filtering-Correlation-Id: 2ab78940-40c5-457c-25a6-08db007fdc12 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pbGz8Zo5rEYAbgHDFxylx8/egTLa37DtdO9cDrEWSmp94OBlx0KAunloB57is9Y4DEvdEs7KwI1Vbp7KgtusSyCe7Y4JLYE8KtQzvqQGD5bQBpCvPVmUZ152PVyHs1PVrqeQNb5RK5EE6QFW764f6XTlJS3583S37ZPT5L54kakxyAEvHw8p7noJuTH+sxMjdcUMvjNHKFuTq7SrwTnl5BW4asnOlYtkb//sJJv5qQh1+BOTJUPwphmSOlzaEFLQ7IsRM0oD0lx6MXlKcLr2MLQDjpRtG0Heh+k33D83rnf3L5y8yodu+pIjtlKNxNL2Ixu6koOydw7ObKs8rsqzv3tmoZJHmuc4DiaUgP/gZyWZpNcvyeGmVqD2m253LnmAjPIpSigYFat6B0+CHXcd97KwdNzwYiFg35Uc7wwmV5xTJhAO36pT3gIqoCFmpb0xEbJYBkGApnKgTcBD3O/wkoDAouiVoGUbHqW+zMwputmK66f8ZDfE+X3mx+IMRoKJltrrB3+8A+ATT1xb/Jual1d4DlnGAqs+l9fXwK+RJL+WWaU8wadaFrbV0iBKQHPBVuwhhbFNua88EFEz/AimDAcZyWCadv9fyjfwkW5kaW9rQduULgHu98NbpdZUwq/HFdgOdk/SyHPLny2QmROf65rADihAHS6CN1jnPfmun26Egeetx+CiBQii6dfRajrR3f431FfXmcsyA0mu6oJGDvh2TpdJoh707c2g8ubrp9k= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(346002)(39860400002)(136003)(376002)(396003)(451199018)(36840700001)(46966006)(40470700004)(4744005)(44832011)(478600001)(7696005)(36860700001)(40460700003)(2906002)(40480700001)(336012)(82310400005)(26005)(426003)(83380400001)(86362001)(186003)(16526019)(2616005)(6666004)(5660300002)(1076003)(47076005)(70586007)(41300700001)(8676002)(4326008)(70206006)(356005)(316002)(81166007)(8936002)(110136005)(36756003)(82740400003)(54906003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jan 2023 16:02:15.4518 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2ab78940-40c5-457c-25a6-08db007fdc12 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF00001A5F.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5402 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: alsa-devel@alsa-project.org, Pananchikkal Renjith , Takashi Iwai , Liam Girdwood , Mark Brown , Mario Limonciello , Mark Pearson Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" A similar issue that was reported on Rembrandt based laptops with low DMIC volume is also being reported for Barcelo based laptops that use renoir acp3x. Increase the PDM gain to overcome this problem. Signed-off-by: Mario Limonciello --- sound/soc/amd/renoir/rn_acp3x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/amd/renoir/rn_acp3x.h b/sound/soc/amd/renoir/rn_acp3x.h index ca586603d7203..c174f84650d24 100644 --- a/sound/soc/amd/renoir/rn_acp3x.h +++ b/sound/soc/amd/renoir/rn_acp3x.h @@ -34,7 +34,7 @@ #define ACP_ERROR_STAT 29 #define PDM_DECIMATION_FACTOR 0x2 #define ACP_PDM_CLK_FREQ_MASK 0x07 -#define ACP_WOV_MISC_CTRL_MASK 0x10 +#define ACP_WOV_MISC_CTRL_MASK 0x18 #define ACP_PDM_ENABLE 0x01 #define ACP_PDM_DISABLE 0x00 #define ACP_PDM_DMA_EN_STATUS 0x02 From patchwork Fri Jan 27 16:01:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 13118914 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 240D0C54EAA for ; Fri, 27 Jan 2023 16:04:11 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id ED12193A; Fri, 27 Jan 2023 17:03:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ED12193A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1674835449; bh=bnv2+Y5FPs9j4EMja6sKtZoMgQ63puCGBJDGYxrXWg0=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=dj3akSID18nGgyYyRwWVTuL78WCNo469y2LQVUg8lRsR9ki5dawu/S4jNRrs4IS9t pI7BztzFpv5x9obT2ksKWg+qj/YgAh9uhL9B4biUQU3SUl79k6srZ7d5Rx6FlTQbAs KUpXjlQgnci8W2293Ro8Pvp+gfsTetJBGdZnebJw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3D356F80544; Fri, 27 Jan 2023 17:02:35 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 655B7F80548; Fri, 27 Jan 2023 17:02:33 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2078.outbound.protection.outlook.com [40.107.223.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 71368F80431 for ; Fri, 27 Jan 2023 17:02:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 71368F80431 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=08bA5TIc ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FyXhilHyBMEK+PMlePu0c2y/5rtMWqT3TXDBCPQ+jsAesGFlAfQfMy/QEnMXGN7xxI701mY/ZlW3gh6UZtvJzsRwP8YiaPxy7EWi4kDiA0vz2VhidFPorpTZ4hEv9AjqFCEBrhqUdwhTC5XVd4DWEKPa2oox2PPYApFeimKEZYUcFA04mBDLiY95mugO6pU5kco2Lch7BiVJiioI/ETddDsnGtbqANOpnG7vpF6htxZ+Lq+YIUvr1IQS6q8te3OSLYWXbO6UfFXm4yjSatDJtI+ZUDI/dI6CYRU9yFyxtVFLcFZchzD+L/u5Y1ICkXnlJLBQWZm38BbRz2jp5jS8Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9ee4fX0leAMmk7Ip4HBtExrw5NQnPEsGXZ8xp7vWklk=; b=N6q5X04M0rDpOFJgdle+MQM1rfsnEZlgv9wwGQwCLBVCqrYS2aUSHN3nV55EKXQW/eH7ljpsQrCvbzyzQ2U8ELIdxl/ofEewThPNzl3ETBID56P7udDelyq6zou1fHcXWqJFQTItW/h6x8GyBh45y0Hb0iIeQZZKic0mguxHo6YgaEhs4B+08m3T74GIny68CyXJkKXThQClJuor/YGEyBAn2wZxppE8utbhpidYDH985yobZzIOYXCTwDVYd+yigvJE3aSPTd7+vvbjFXp3eh4KMT3nGMWSXvAfHRU9840n9Hhu6b1Od9uiKYlxx9U7zx8nMMgMhozJE2si91GeIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9ee4fX0leAMmk7Ip4HBtExrw5NQnPEsGXZ8xp7vWklk=; b=08bA5TIcUEY/mLJaY57IoP+kfm+dYL5gEV+k0Als/WVD/zHIneQEZJpHCQhimjkXR3qNOMBRJYA0MH9cFc69kZ3UhfZSsOzd7YlD8h8x3xs9l3813F7NjfO95mnJKAB9dWF6JVt4pyLzTe8yzngbOm7oh4CxNSKSpzxjZK8Hy9M= Received: from MW4PR03CA0154.namprd03.prod.outlook.com (2603:10b6:303:8d::9) by DS7PR12MB8201.namprd12.prod.outlook.com (2603:10b6:8:e1::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Fri, 27 Jan 2023 16:02:17 +0000 Received: from CO1PEPF00001A5F.namprd05.prod.outlook.com (2603:10b6:303:8d:cafe::91) by MW4PR03CA0154.outlook.office365.com (2603:10b6:303:8d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.22 via Frontend Transport; Fri, 27 Jan 2023 16:02:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1PEPF00001A5F.mail.protection.outlook.com (10.167.241.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6043.10 via Frontend Transport; Fri, 27 Jan 2023 16:02:17 +0000 Received: from AUS-LX-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 27 Jan 2023 10:02:14 -0600 From: Mario Limonciello To: Jaroslav Kysela , Mukunda Vijendar , Saba Kareem Syed , Subject: [PATCH 4/6] ASoC: amd: renoir: Add a module parameter to influence pdm_gain Date: Fri, 27 Jan 2023 10:01:31 -0600 Message-ID: <20230127160134.2658-5-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230127160134.2658-1-mario.limonciello@amd.com> References: <20230127160134.2658-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF00001A5F:EE_|DS7PR12MB8201:EE_ X-MS-Office365-Filtering-Correlation-Id: a0763530-192e-47e5-1b17-08db007fdd0a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yZdCy9UDx83dpl6QH3U1YZDqnYHixQ8ZXh419/r8BPSkUMBElm29NXbfWd4mUljCeebakN7tDwKz43CNwmcgkfzZZXmb7YVkKo+idngBYJ3r1lOjbqG75gRcCRE1gG+f6mxcQ+V4P03QX6tEF+rduMMjFL6i14BPRf8LBTPY3HtylbIv99d/N6DYL8S1X3qQf0PNwKYr4LlF1nOuOfOYboeBeFCvWyB2sJczCDUWsrZSSemhxfxe3zNcBDV4/Xb9rf6lrihDw+tFCE1tgUnxRgVm7c7M9TBQ2YCg8S5641EJ0cl6kLFdl3luTKAdKYg658+BznVdan7Jv2DdocGJDmIaCMIALg1MSi/xBxvJ+PCIlCJP8Bg3QboMfLKqjfdqUO1QPXw5oE11slS+enqU0o+YRkqGKwNLn61Z6SPMJcqKVvFZL3NR4ufAbLH298I7NQzavoTUo2Urez3fWXyYX6Dz+CiQLyhHv7p+bk+nkyE0uBoxyHEOC2W9HXHmQuR7HcLgBjd4NNT9Y5M0PfLGmzou8GR318b9idymUavCnnQk99kqPxSTRNcqCdgd2C9tFp0UPtlkGkUT1l811DewOb2FfEZ63mf18g6NjCLsXTclYfkhvggvbdLMIihwP/w3sRpyHHJ6/mj9vY/T0PjbB9Dw4pk+VYGYTBYTElbucQRl1VenYZyLu2ssjQgzv5FuxSidr0jEWsuFzsyzLZ4GXqV8hkQK66Tk0EAzLxJ56sk= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(136003)(376002)(346002)(396003)(39860400002)(451199018)(46966006)(36840700001)(40470700004)(26005)(36860700001)(356005)(83380400001)(478600001)(54906003)(8676002)(2616005)(70586007)(47076005)(70206006)(1076003)(110136005)(426003)(36756003)(7696005)(41300700001)(2906002)(82740400003)(81166007)(5660300002)(86362001)(186003)(40480700001)(316002)(6666004)(336012)(40460700003)(44832011)(8936002)(82310400005)(4326008)(16526019)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jan 2023 16:02:17.0768 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a0763530-192e-47e5-1b17-08db007fdd0a X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF00001A5F.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB8201 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: alsa-devel@alsa-project.org, Pananchikkal Renjith , Takashi Iwai , Liam Girdwood , Mark Brown , Mario Limonciello , Mark Pearson Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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/renoir/acp3x-pdm-dma.c | 7 ++++++- sound/soc/amd/renoir/rn_acp3x.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sound/soc/amd/renoir/acp3x-pdm-dma.c b/sound/soc/amd/renoir/acp3x-pdm-dma.c index 7203c6488df0e..74b70bc4b52fd 100644 --- a/sound/soc/amd/renoir/acp3x-pdm-dma.c +++ b/sound/soc/amd/renoir/acp3x-pdm-dma.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -17,6 +18,10 @@ #define DRV_NAME "acp_rn_pdm_dma" +static int pdm_gain = 3; +module_param(pdm_gain, int, 0644); +MODULE_PARM_DESC(pdm_gain, "Gain control (0-3)"); + static const struct snd_pcm_hardware acp_pdm_hardware_capture = { .info = SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | @@ -80,7 +85,7 @@ static void enable_pdm_clock(void __iomem *acp_base) rn_writel(pdm_clk_enable, acp_base + ACP_WOV_CLK_CTRL); pdm_ctrl = rn_readl(acp_base + ACP_WOV_MISC_CTRL); - pdm_ctrl |= ACP_WOV_MISC_CTRL_MASK; + pdm_ctrl |= FIELD_PREP(ACP_WOV_GAIN_CONTROL, pdm_gain); rn_writel(pdm_ctrl, acp_base + ACP_WOV_MISC_CTRL); } diff --git a/sound/soc/amd/renoir/rn_acp3x.h b/sound/soc/amd/renoir/rn_acp3x.h index c174f84650d24..7d0f4e6a2834d 100644 --- a/sound/soc/amd/renoir/rn_acp3x.h +++ b/sound/soc/amd/renoir/rn_acp3x.h @@ -34,7 +34,7 @@ #define ACP_ERROR_STAT 29 #define PDM_DECIMATION_FACTOR 0x2 #define ACP_PDM_CLK_FREQ_MASK 0x07 -#define ACP_WOV_MISC_CTRL_MASK 0x18 +#define ACP_WOV_GAIN_CONTROL GENMASK(4, 3) #define ACP_PDM_ENABLE 0x01 #define ACP_PDM_DISABLE 0x00 #define ACP_PDM_DMA_EN_STATUS 0x02 From patchwork Fri Jan 27 16:01:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 13118917 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BECA3C54EAA for ; Fri, 27 Jan 2023 16:04:48 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B79E4E81; Fri, 27 Jan 2023 17:03:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B79E4E81 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1674835486; bh=gneaJEkqB4aHYWjxuQig8OCrMZyrRQNKP51dZ/hhJaE=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=TP2kkQuqVh5VB4Tux/sHFLxd/sD3ocoo9IlOa2MrbCnbYppJ1gBB90xPyWO1Wg8vy 14Hr/tPJKz0qmT9fnZ+9Veki6l6KFbmR2QIi8//1yE8i95I9yGCgLWRg58ksKEy5Qc EvCKEGZM8lgqTNck7JxyYZVp/nNerAYQIghZIUpk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9DA47F80563; Fri, 27 Jan 2023 17:02:39 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 442BFF80557; Fri, 27 Jan 2023 17:02:38 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2079.outbound.protection.outlook.com [40.107.93.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B73DAF8028B for ; Fri, 27 Jan 2023 17:02:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B73DAF8028B Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=YgOjhGtq ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oS86atTSDIuU0myHWzGCUgM+N6BKIvA+5acveQV7DVPkbO6VuBhTBUSc8Y5DireUAMOPPf1KB9Wxa4aEkwMnLe2WA9m9ZTP5XXT+bvGMuiwzjqKsU0M3v9cEoJ5tuYN+RbPv42KpkgUX8SV3x/KhYHH9lZii8jhYbP5sv+tO7PeHCDrgaNYT4ETTbt9opdaxVe1nE0FosYuxA17xCIn+ZoABgcCgGvcfNUe3YJG+RnoOB1eV0U0LAQcm0S0CpNmqOnOL69Uyj23DsmjacVDUmBIxNxI7cgcKj/1iK20mHfWwRe8rCVFHcaqFT6t8TggLzSbcffhHdEm6G4KYih2yVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7myppTcR7oW5npvdU5XwvzSX65cR7yfxVbtsMstF1lM=; b=Fyr6xFrrqUBroqwc1q67OTBGyvyZvxi7OkOtHDyQ4hTPwUmEmIvG3vKo6ZP66VGnCc9D27eONeO6EOVSAFamQiCQ3+gYsFoBsdEkNP0k3eVFm1CKkkg7ucXMPyZ++R17/xAaLy+QRKLrtKjUk48inA5Syn+k5W434S2T0kA2SzT+qrRM1RIX8bj2H9yPGy/786Z6MlHq0lbKK1Yd+VbRtJ1XW+IiAhaPLLqD8KXOu03HXe5ibkmyGhUmgdLziX6EaV8+Sw3PvCUzJ0BO/sCturfosUQo7rvRZylsv9rfWVHjxQFmpuberIPfM4D52cjwNgY4oG99vlGlQBSca4oplQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7myppTcR7oW5npvdU5XwvzSX65cR7yfxVbtsMstF1lM=; b=YgOjhGtqqEV9fCujtbCnRMNEGhzsDzNSPPib86qyvRUUK9oJy8v3QgVMM9A8DHH+wAghoQnjPuDTjaSM7Kdd3W/QIGyHfdcyw34m3aGDVKGlOL77ji93BwUUEgIZVMmCbsLWhnVQI1Eqobdm3V9I1XOug8JoZFks7jJQDZXJxiQ= Received: from MW4PR03CA0176.namprd03.prod.outlook.com (2603:10b6:303:8d::31) by DM4PR12MB7623.namprd12.prod.outlook.com (2603:10b6:8:108::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.22; Fri, 27 Jan 2023 16:02:18 +0000 Received: from CO1PEPF00001A5F.namprd05.prod.outlook.com (2603:10b6:303:8d:cafe::d4) by MW4PR03CA0176.outlook.office365.com (2603:10b6:303:8d::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.25 via Frontend Transport; Fri, 27 Jan 2023 16:02:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1PEPF00001A5F.mail.protection.outlook.com (10.167.241.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6043.10 via Frontend Transport; Fri, 27 Jan 2023 16:02:17 +0000 Received: from AUS-LX-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 27 Jan 2023 10:02:15 -0600 From: Mario Limonciello To: Jaroslav Kysela , Mukunda Vijendar , Saba Kareem Syed , Subject: [PATCH 5/6] ASoC: amd: ps: Adjust the gain for PDM DMIC Date: Fri, 27 Jan 2023 10:01:32 -0600 Message-ID: <20230127160134.2658-6-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230127160134.2658-1-mario.limonciello@amd.com> References: <20230127160134.2658-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF00001A5F:EE_|DM4PR12MB7623:EE_ X-MS-Office365-Filtering-Correlation-Id: 96515621-b8fb-4344-dbff-08db007fdd6b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bxxWCbbkJZP7TY2sS8z+3HGAMEw9AsVv6WQlVCs7fMh2SFWSmCWrwWCRrdRsIRoyo70pLu9i87eoFLSV+g93gsNgTWabn0c2D6cPA5t8uyy+XQuZS29kxmrb0hlxRdEUj2Xg4yHCGTl8/2jpx4YrEir4vf5C14xDyrrb7RZVURDhDc1y05Cwus1xj/Q+CrIQ9SHKiGlFSn8rSPzgmCx5tKtWovlZz8JNqkfqSDRmJ+1z/C6Jya7OpqNLLx3MQ76SCKX8wIfzZBq2h0WduemkdeveeD5Yi1QYGfYNitDkDirac9jKbd75sOvA2T2Nfih15OKN0KoBjbEEpQEv6hqv0InpRgIKFyGGi8mF6/l01xavpQlIevV6lgtDlNFoS4XYAc+go1BpnnOqtmjwwo+RrU69YWHRkWrjy/dECMBv7WKHsnpc4nbhBFeJnAO297c2C/1YybxjT+m++qazPCibP0KPMwGM+f6w/Ys+/YuO0PoUjQ1xlbxTsSyvaQrUE3Ay0GX8iMOzwyhg6JgLlL1lnJhhSaBmeT7aFLdSOtFSU7lT1mf5YGOa5RmAK7jTqL+9Ms/1n1P2I970XYdA6aex7cRHKplEQ84B2TdO8nGCpHD8eLDdCpjS6+rN6XGb74adKeUp1xrpR9AO7lFKCEO53xcy3/KHFsMioEfDOlzw1ZiCSXrzpKYI8N9mG3H/RSRP23vZlvG6suvk6ZUQa1gKawhy1cGB1cJI82+11CtHfzc= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(396003)(39860400002)(136003)(376002)(346002)(451199018)(36840700001)(46966006)(40470700004)(7696005)(186003)(16526019)(26005)(478600001)(47076005)(336012)(2616005)(82310400005)(426003)(83380400001)(6666004)(316002)(54906003)(41300700001)(8676002)(81166007)(356005)(1076003)(70206006)(82740400003)(110136005)(8936002)(4744005)(40460700003)(44832011)(86362001)(4326008)(5660300002)(70586007)(36756003)(40480700001)(36860700001)(2906002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jan 2023 16:02:17.7174 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 96515621-b8fb-4344-dbff-08db007fdd6b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF00001A5F.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7623 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: alsa-devel@alsa-project.org, Pananchikkal Renjith , Takashi Iwai , Liam Girdwood , Mark Brown , Mario Limonciello , Mark Pearson Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" No issues have been reported yet for DMIC audio level on ps platforms, but as problems were found both on YC (Rembrandt) and Renoir based designs it's very likely they happen on ps too. Increase the PDM gain to solve this problem. Signed-off-by: Mario Limonciello --- sound/soc/amd/ps/acp63.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/amd/ps/acp63.h b/sound/soc/amd/ps/acp63.h index 5e7f9c1c1b0e8..bae8288d8231c 100644 --- a/sound/soc/amd/ps/acp63.h +++ b/sound/soc/amd/ps/acp63.h @@ -30,7 +30,7 @@ #define ACP_ERROR_STAT 29 #define PDM_DECIMATION_FACTOR 2 #define ACP_PDM_CLK_FREQ_MASK 7 -#define ACP_WOV_MISC_CTRL_MASK 0x10 +#define ACP_WOV_MISC_CTRL_MASK 0x18 #define ACP_PDM_ENABLE 1 #define ACP_PDM_DISABLE 0 #define ACP_PDM_DMA_EN_STATUS 2 From patchwork Fri Jan 27 16:01:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 13118916 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B2BBAC54EAA for ; Fri, 27 Jan 2023 16:04:33 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8A21BE86; Fri, 27 Jan 2023 17:03:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8A21BE86 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1674835471; bh=c5Q+HM4/WoXp8AgP72wvsZf4/S/4+eVVL0NBVXHPlJc=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=IAmBMMk3oak5FX0B0dqxbZDJtNiqi0KKxeV+J63ejWASPEg1/2sLbCUhwQu0dKrYE Xfodj3eMLI5x2G4vS++E4TuFwjX7rSGxdmvhPHgBnmgfdgFkTE2MOJjgXR1HyJe52j b8L6Kk3t1iqGkdi76lWXf1P+iyBeuA3sfDFSExpA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 10AF6F80558; Fri, 27 Jan 2023 17:02:39 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9A6C1F80557; Fri, 27 Jan 2023 17:02:37 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2041.outbound.protection.outlook.com [40.107.243.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4649EF804C2 for ; Fri, 27 Jan 2023 17:02:22 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4649EF804C2 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=WYv5cL2k ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XbrLjjJdhcoFIzPdQTWF853Z4zXQZPhgOLooMV/00aLvJcYg9s+dHp7cSSS4dPgO27BX7PNa/OM7/ENV2C/9TBdB4w1gKFYLu4NOvenIrOBRRRcJdl0skED02AbGndwToghfst+YdChOs0525TZ49rnNhrkF6gjG7DEE7yuAiHWGlMRkYFmmqynvW027XTw9t5zIFi+BlcfpXQkA/G5Tu7+eskCRT9mNNPOAbHF3uZKbJJaJyI12Py5sFdfHWv3b5DGswW5M44BfqMcDCN3tadVHwvuMNv7hR1l0OGqf1mXM8vzgRYAD/ZdJ/CBUtmlJCaBGqvIUFg1Lp6ZW8eOHgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AjWg9XdNTQmSTSdudgNpCMwzZTc0xdNddsChchAD1yQ=; b=g8GVT73AUtjWNRPKvX2//Ov3lYW3sCcl+FnfkZ1RsCZpgbNBwQUOo9XiWPsdYAWsrVWd2z6MwY4zxAQAbWpOOcIaNofMOetcmS3tiNQ1L35LjJFICnRm50+ikcFcxaS6Ftl9o3XQ46h3XXJf70H9PVbKPSW12j1W1ujhVr976C+Dgr+1TI3d1XNpPB/8o78K9ni7Idz6EJJa3ChFSJylgmkFwWWsf34KD9ZG5QMc4PHev+1JCD0ZmaBCzlfEp/TPiJV3xvdfgg+4nrz4tWCEh1C93TtG461otyoCSYDWHVd7BrCznDB0aVz++sAtZCLftbmeuauHfzbRdYf4CQdy0w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AjWg9XdNTQmSTSdudgNpCMwzZTc0xdNddsChchAD1yQ=; b=WYv5cL2k0+W+dDxsr1O+n6C9MMivSAK4l4hjBEQsVlZlIYKiwTYljQMRT6BiFK0p/a+T/vTWBqgiCDOgwsRUs2RsaPDdL6kjYYjOIy0DlAnlvs1dxgw8M6XYbm4pdyfeN95wN0jWxVKpFXahElFRiSeoY3xMxDwRYry1n/qT4ag= Received: from MW4PR03CA0174.namprd03.prod.outlook.com (2603:10b6:303:8d::29) by SA0PR12MB4432.namprd12.prod.outlook.com (2603:10b6:806:98::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.22; Fri, 27 Jan 2023 16:02:19 +0000 Received: from CO1PEPF00001A5F.namprd05.prod.outlook.com (2603:10b6:303:8d:cafe::60) by MW4PR03CA0174.outlook.office365.com (2603:10b6:303:8d::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.25 via Frontend Transport; Fri, 27 Jan 2023 16:02:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1PEPF00001A5F.mail.protection.outlook.com (10.167.241.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6043.10 via Frontend Transport; Fri, 27 Jan 2023 16:02:18 +0000 Received: from AUS-LX-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 27 Jan 2023 10:02:16 -0600 From: Mario Limonciello To: Jaroslav Kysela , Mukunda Vijendar , Saba Kareem Syed , Subject: [PATCH 6/6] ASoC: amd: ps: Add a module parameter to influence pdm_gain Date: Fri, 27 Jan 2023 10:01:33 -0600 Message-ID: <20230127160134.2658-7-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230127160134.2658-1-mario.limonciello@amd.com> References: <20230127160134.2658-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF00001A5F:EE_|SA0PR12MB4432:EE_ X-MS-Office365-Filtering-Correlation-Id: 43709aa8-bafb-4966-61b2-08db007fddd2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sRsQ+LZWN8sD+NO0MEAxd70koH9IVlaK5PuoFYn08zcjBNjg/i4PcgZcSVCZFWtiMe4AalhJ+5OoGijKJD+OERSI8Pousa6ruKHNrXil80CyBKWhlHCaILBEOH8KCpNo0EGOsgqa0un9H3ExiDr2VfYME2iY4du0gZcNd3QQYdeUJHeyDG6eRzYWa9nEsV/7kkqFqWsYZEVl8eklqL+EyOEFNw2U2I8d/LBQOkt+iQ+rBMpbn2FlBHMU4UO164LTpIMLBNTNkLo/9oan/8WvzR1w1s+ARGLCasVLczvyUyfnoxa5pGQmpZJ1BTeEGlQuekMG6a9C+96w3y5n+sDvnCiGMhQt3z5n5ne1rY4WJ5EHPPvXvZBddzkWhd84vithoLW47A01f/w814w1I2VIjfoVz+90642tjjiT5JSwPHzUpjGTA4HVzy6kNfNjIZ1lAZOZyAI+cufUz2+HIsEgd6feDZaVj3Lvd3Pz1uc+zd7hm4Bk11y23TP8BVfA9mrvt9JLWD8pnCVPpaD7rO+FMcSPWXlFrQrk9qxIE3oIRl4tvxz+CwBAj5kHx1MdAArpok4Wc/hspDSPbIw3+d0E/T9sBQw7zqSiSdIkVumHFvRNWMNOQb5EN6c53NV1aujLXgbNzSWwCfpBlkTunrOJeFKmYQA5GtrnIdrb20Pj5sYhZJxeWIRCTYEVHVK5pPCqD7stulBVK5QAEXHlZRIGgiAo+kSviqOhiiVxgJtzzVw= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(346002)(376002)(136003)(396003)(451199018)(46966006)(36840700001)(40470700004)(47076005)(8676002)(36756003)(40460700003)(7696005)(54906003)(40480700001)(356005)(336012)(16526019)(110136005)(81166007)(36860700001)(26005)(2616005)(83380400001)(86362001)(82310400005)(426003)(186003)(44832011)(6666004)(478600001)(316002)(1076003)(70586007)(41300700001)(82740400003)(8936002)(70206006)(5660300002)(4326008)(2906002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jan 2023 16:02:18.2955 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 43709aa8-bafb-4966-61b2-08db007fddd2 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF00001A5F.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4432 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: alsa-devel@alsa-project.org, Pananchikkal Renjith , Takashi Iwai , Liam Girdwood , Mark Brown , Mario Limonciello , Mark Pearson Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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/ps/acp63.h | 2 +- sound/soc/amd/ps/ps-pdm-dma.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sound/soc/amd/ps/acp63.h b/sound/soc/amd/ps/acp63.h index bae8288d8231c..bed4d51e226a5 100644 --- a/sound/soc/amd/ps/acp63.h +++ b/sound/soc/amd/ps/acp63.h @@ -30,7 +30,7 @@ #define ACP_ERROR_STAT 29 #define PDM_DECIMATION_FACTOR 2 #define ACP_PDM_CLK_FREQ_MASK 7 -#define ACP_WOV_MISC_CTRL_MASK 0x18 +#define ACP_WOV_GAIN_CONTROL GENMASK(4, 3) #define ACP_PDM_ENABLE 1 #define ACP_PDM_DISABLE 0 #define ACP_PDM_DMA_EN_STATUS 2 diff --git a/sound/soc/amd/ps/ps-pdm-dma.c b/sound/soc/amd/ps/ps-pdm-dma.c index eea71a9d2ef1a..1e773c5496c5f 100644 --- a/sound/soc/amd/ps/ps-pdm-dma.c +++ b/sound/soc/amd/ps/ps-pdm-dma.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -18,6 +19,10 @@ #define DRV_NAME "acp_ps_pdm_dma" +static int pdm_gain = 3; +module_param(pdm_gain, int, 0644); +MODULE_PARM_DESC(pdm_gain, "Gain control (0-3)"); + static const struct snd_pcm_hardware acp63_pdm_hardware_capture = { .info = SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | @@ -55,7 +60,7 @@ static void acp63_enable_pdm_clock(void __iomem *acp_base) acp63_writel(pdm_clk_enable, acp_base + ACP_WOV_CLK_CTRL); pdm_ctrl = acp63_readl(acp_base + ACP_WOV_MISC_CTRL); - pdm_ctrl |= ACP_WOV_MISC_CTRL_MASK; + pdm_ctrl |= FIELD_PREP(ACP_WOV_GAIN_CONTROL, pdm_gain); acp63_writel(pdm_ctrl, acp_base + ACP_WOV_MISC_CTRL); }