From patchwork Tue Dec 10 09:10:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: potturu venkata prasad X-Patchwork-Id: 13901047 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2064.outbound.protection.outlook.com [40.107.94.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9DFD81B14FA; Tue, 10 Dec 2024 09:10:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733821837; cv=fail; b=crt29kvP5OSlFBtHgIe3XaLgFBDV6rsXwpgafUW67NGm7kIHfO8wC5+LO2vjIXWl9sUO/Kjpoqw/D6mPHx78ecbJXxThlFe99rcamjJfeG0BV4LEqiQ9hGlq6Bkw1BSnpRIjTiIhQbKytSDQgMahLlDugKi9mR1p3kQvj9O+NHM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733821837; c=relaxed/simple; bh=tSD/racOr4Ptiew00UVe7o0KFX0pRtuy2BV8JmTuPBo=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=nvBkcTCNdrHzaOBCgZmVJFcxwZVy8BVEi/MuGc+cm6MrFudC4yYaorOtyAlNuR/OINRLA99nA6flDPj0MNjXmTjVivE6i8oGcX++MpkKLfDzjoQSu2yuJvUBdwyRK7tGSx7wrfE0wIMcuV6NOhN3JWYySRssgNa/U0NOR3mfwtk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=vejiAXMT; arc=fail smtp.client-ip=40.107.94.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="vejiAXMT" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VUzUB/TsRBRJszi3BLB5xKmRb1whBofiP0Xl7c+/o3raxFahQ6BU/GuG9WDmkg1iEsDUYd6jTAWwtggNaB5TMe7sTjVa5DzSW7bb+rdXMh/dQ5f4KfLb59phUvXyMkUPIMIlFKAVLKwfh6/TsPVQfTLRaLCdQxQ8FF2Q9Xioc96n5lEmNmN8v7QuAZWgqmFGWXgfVUnzGzQhX2peR8UoDSXmYCu9z0+EK6sdt7M2d54tcLbv0TYauV02vpqS6R92SeJGVGHOUk6ssHNqBZcdv3LZj9LAJaGPlI8SfOT3+F2QIr7zeZjcPMWTlAH13CpKuduzuEBuTTBenN7WkSSx/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Dtrbk0o8U/On/f50cCUZV62/zHnxt1mGIaP+8TgXlZo=; b=vbA7oXAsXYoebm/JpdePHrnky1E4wECaBoZ9DZdcEUNmZNoWMda3VEnHfz7aYtKhr9FoNC6XUFC+PNbZrxCEJcT5ofA4F89StUvQqJMwx4dFEit7ksyISoTvmLfXSWethHd/KkrQ9eKWcriTUth2Ak4wVfSqjyWhEVi6WXzN5a8pumAWqfNvHH8oSUzMyvrY/3Xo4sgqRPXtQSnYVEf9+sZYOinJXPcL4cmxqTaYburcgct7KSnPRHZRosue7cyqWMLxvNFlrE17EW4j/4NXQSTQKldlM7EPNGON7g4/zKvfViEtaQybtrLVwUqrqDMkNp25Dhwoo4kTMhaOFI17gA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org 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 (0) 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=Dtrbk0o8U/On/f50cCUZV62/zHnxt1mGIaP+8TgXlZo=; b=vejiAXMT1iSCXY4rFUzhcjQWcnh5ujBrg2QW9UKxCZYQu3aSE5k9i7XWVdJp/az06vj8uuskacLIqfwYn+QHhVi4oozaGIO1xsPI+pnuzMrGpOJU3WDyA7gePEsKbqplkjknWzXRjErw8ornGKQxIbgioA4TJGfRMEsLJR3l3eA= Received: from MW4PR04CA0133.namprd04.prod.outlook.com (2603:10b6:303:84::18) by CY5PR12MB6177.namprd12.prod.outlook.com (2603:10b6:930:26::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.11; Tue, 10 Dec 2024 09:10:32 +0000 Received: from CO1PEPF000044F7.namprd21.prod.outlook.com (2603:10b6:303:84:cafe::d0) by MW4PR04CA0133.outlook.office365.com (2603:10b6:303:84::18) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8230.20 via Frontend Transport; Tue, 10 Dec 2024 09:10:31 +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 CO1PEPF000044F7.mail.protection.outlook.com (10.167.241.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8272.0 via Frontend Transport; Tue, 10 Dec 2024 09:10:31 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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.2507.39; Tue, 10 Dec 2024 03:10:30 -0600 Received: from prasad-lnx-mach.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Tue, 10 Dec 2024 03:10:26 -0600 From: Venkata Prasad Potturu To: , CC: , , , , , Venkata Prasad Potturu , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , end.to.start , Jiawei Wang , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , "open list" Subject: [PATCH v2] ASoC: amd: yc: Fix the wrong return value Date: Tue, 10 Dec 2024 14:40:25 +0530 Message-ID: <20241210091026.996860-1-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: venkataprasad.potturu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044F7:EE_|CY5PR12MB6177:EE_ X-MS-Office365-Filtering-Correlation-Id: bfae834c-6f8e-433c-0b78-08dd18fa7f9c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: 5j9iraV02Cinz6Ghg04uWBF5Fm63/31Z4hDQvOED6mWYCazISg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XeoIUnldK7AKIcDJouKdYYMmx3JaMu4KxI1EPERq4talHu2VPQXAY9AFgy8IrglRr+kj3T2GPaZpAkIQ58w8pb8sY19D0Ucqwk9/Ax/a9/iT4f4N3bJT0knQdBwMYVUJBRtVPrRBpZlDIiLchIuaAzlbUEI1oyFpWIhUrz8AwFzZxYo1RccQ5ZmRjqqzCKsTB3cArXKwcyS13giS7trBzkc2wNGNO19h4J9R3U+ZhwCQZOidmWJtlFHQQLZlN3r+TDr9Z6Nn0eKZaLN+0ZeON3JXGvfj17pAEbpG9CWRAAUYXB820g== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(1800799024)(36860700013)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2024 09:10:31.6583 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bfae834c-6f8e-433c-0b78-08dd18fa7f9c 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: CO1PEPF000044F7.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6177 With the current implementation, when ACP driver fails to read ACPI _WOV entry then the DMI overrides code won't invoke, may cause regressions for some BIOS versions. Add a condition check to jump to check the DMI entries incase of ACP driver fail to read ACPI _WOV method. Fixes: 4095cf872084 (ASoC: amd: yc: Fix for enabling DMIC on acp6x via _DSD entry) Signed-off-by: Venkata Prasad Potturu --- Changes since v1: - removed redundant "&& wov_en" check sound/soc/amd/yc/acp6x-mach.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c index e38c5885dadf..ecf57a6cb7c3 100644 --- a/sound/soc/amd/yc/acp6x-mach.c +++ b/sound/soc/amd/yc/acp6x-mach.c @@ -578,14 +578,19 @@ static int acp6x_probe(struct platform_device *pdev) handle = ACPI_HANDLE(pdev->dev.parent); ret = acpi_evaluate_integer(handle, "_WOV", NULL, &dmic_status); - if (!ACPI_FAILURE(ret)) + if (!ACPI_FAILURE(ret)) { wov_en = dmic_status; + if (!wov_en) + return -ENODEV; + } else { + /* Incase of ACPI method read failure then jump to check_dmi_entry */ + goto check_dmi_entry; + } - if (is_dmic_enable && wov_en) + if (is_dmic_enable) platform_set_drvdata(pdev, &acp6x_card); - else - return 0; +check_dmi_entry: /* check for any DMI overrides */ dmi_id = dmi_first_match(yc_acp_quirk_table); if (dmi_id)