From patchwork Thu Jul 13 16:29:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Xu X-Patchwork-Id: 13314802 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 0E3B1EB64DA for ; Sun, 16 Jul 2023 12:59: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 2AEF9DEF; Sun, 16 Jul 2023 14:58:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2AEF9DEF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1689512349; bh=f5NAB0Z2MAtPZgH92MiJRFhDkvys5HwOQXTBYJq5PCI=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=h7mus1aexw9vkQIDE7IKhCV2Mn4nJFCLfufqYQUN+8HbVbtJUd83yLLp3GCZqn7xx BvNaZGX7iweBB8fGcHdvWKCoVNSMKE1pbDRS3Ho5LimpII3KigePKA7aMDYipFqgzA 9kaNQqbMXw71x54aD2qrirbhBURyvMiQNR/aMSlY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 138D3F80558; Sun, 16 Jul 2023 14:57:34 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 6B920F80558; Sun, 16 Jul 2023 14:57:34 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 29312F8024E; Thu, 13 Jul 2023 18:30:35 +0200 (CEST) Received: from AUS01-SY4-obe.outbound.protection.outlook.com (mail-sy4aus01olkn2081d.outbound.protection.outlook.com [IPv6:2a01:111:f403:7005::81d]) (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 E1F94F80093 for ; Thu, 13 Jul 2023 18:30:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E1F94F80093 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=hotmail.com header.i=@hotmail.com header.a=rsa-sha256 header.s=selector1 header.b=khjG2+dK ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hSP/R7XFwiYF5+rnCVjcbVpBbJ/1ZtCCJRxvEN/emEAv08IukTruaUDwhtsEF/X3C9K99eevt2xifAAFzJihf/Lu1/xT9lvEn1IyrD4sMMB+hvDbo9KtrY2rAfd+TjcUghHo6L1KEfQC12hrBQeJYdVUlEmkGsCqVQw8IFWkhpMSPK7oollmxqbwsq8NOOjvLLQIB7qlr5+DW73zs1eiwj3B2nVJGZb3ZKr3mm8Z4O8erRz/EKZK7xd0PO/IETVNasFYvYXyURdPvLEEf0cOFK63o1/enJSZCIZDl716MK8v4QXdpM9VJ57Rus2lXBOM5czjHB4G+CeeBTw0YqL55A== 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=udnj4KGq0hvuoHFrJcjXcvzGpQ5sPs2WDhhoXmrsn6I=; b=YhaM2MCUgxaPLwI2N/NMpClTNGX8sjfxzeRhPgf+zbmTSiPajqBWOeSB31CM8uXmnp3ljV/mEBmAKjH/R1WCgKPjWVMMEcCN1vwe172fcze99kMI8s++hIpylrT2ghuHr33yJ5Lv4AqlLIHtZdiz4uZTj2VGlt9rj9Wzcwn5i+o3MhuCAqOj3fkXHBXEK2mi3QDXPqtapAkhID3JOtCVAXYdUQHYMYW+rXzv3XKytTwoKmg2P86nzURkKq+ftpqcpyI2jFdnQUrygp0ekGdc6sGDf1CLb4LgtrZcKXah0Xxq24iPVqKks93jvpPpfBfR380k+zTjcCBgjRKFjcaVmQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=udnj4KGq0hvuoHFrJcjXcvzGpQ5sPs2WDhhoXmrsn6I=; b=khjG2+dKNwIoHFzZqfxhCHBw3uEWrDMxtySpxy5SHlcm2gaIHyQ1PVoYwPSJm68SgJoqKgkCjfFEgCKK3cZHRxI3F8t96TWpm2BzkM/taJ4q/Wp0JQPIXgSdsgBC4sl9MY2PR+dwdFXcHI7MzU27caopJvA4DxSk6VUQurx+qf5Tk/EANyFTfDZ+LM/5KRdf9iSQpkSnhwbSQ2FRP00L1sSGf8q+21AHfH9bUnxbqpsw2feNkiUKF829Bd9+VeqlHpAWXfkhW5CU6IxaD6chVQ7iVRTG88PgslZUDgeOQBDczBSlZbsy5Rq4q6Fo5S8xKW29UI9O+7NS7dR8Nd/45A== Received: from SY4P282MB1835.AUSP282.PROD.OUTLOOK.COM (2603:10c6:10:c2::7) by SY6P282MB3254.AUSP282.PROD.OUTLOOK.COM (2603:10c6:10:165::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.26; Thu, 13 Jul 2023 16:30:15 +0000 Received: from SY4P282MB1835.AUSP282.PROD.OUTLOOK.COM ([fe80::8302:9e75:933d:b45]) by SY4P282MB1835.AUSP282.PROD.OUTLOOK.COM ([fe80::8302:9e75:933d:b45%6]) with mapi id 15.20.6588.024; Thu, 13 Jul 2023 16:30:15 +0000 From: David Xu To: James Schulman , David Rhodes , Richard Fitzgerald , Jaroslav Kysela , Takashi Iwai , "Luke D. Jones" , Stefan Binding , Andy Chi , Tim Crawford , Philipp Jungkamp , =?utf-8?q?Kacper_Michaj=C5=82ow?= , Matthew Anderson , Yuchi Yang , Yang Yingliang Cc: alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, David Xu Subject: [PATCH 0/2] Fix CSC3551 speaker sound problem for machines without a valid ACPI _DSD Date: Fri, 14 Jul 2023 00:29:53 +0800 Message-ID: X-Mailer: git-send-email 2.41.0 X-TMN: [q04a7gUqcyIyKasYkzgD7JGXlTyUytGr] X-ClientProxiedBy: TYCP286CA0125.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b6::7) To SY4P282MB1835.AUSP282.PROD.OUTLOOK.COM (2603:10c6:10:c2::7) X-Microsoft-Original-Message-ID: <20230713162955.34842-1-xuwd1@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SY4P282MB1835:EE_|SY6P282MB3254:EE_ X-MS-Office365-Filtering-Correlation-Id: 0c5bba92-e046-4bae-49b8-08db83be7026 X-MS-Exchange-SLBlob-MailProps: mWtqiNqNgRvS2YkSb0IYGmo/igQ2hN6eB+cfQWuXQFt0NyZqyhGJWJQi4uNIOOq3QmSLl+f9rnYiQnF3yM860f7kjKsG38DdUzlQBnNiSmdOQYCR63+I1C2qglzp9vdPmHrunuowzpjJ7WrX+MnMs21LuYS7LfGt7TEWrWMqiKXp902xv0+xji4b8nD64u/3ZN9oP0r03u3Lsqla55X+D0F0JicALPTg/7hdlSBeF1lS9ZbGg7oGixZOltf8hP6ZDhBEgBTXW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TcnoHWs6pDnvkPYdPCbPpcCrv3IBfPbBPaV5h+yLD/IhzIk9SCxMji5Dxj0LHLPme5YWBKOE0kcfCCn5yuWjAykN4rIb/4B2ZTxtwZ1D0pJlxsobm9xIBGbArTEtGWtioM1irgXZpRrxvzYHnTcEXt0KAjGEA55t37vx0qkfMi0FsaO6M/AHbgHmAwUKF7kDxqrqdpemCahh+UOjGBUUUhmyEHgLmxvnhAOIM1gLfK8wQ6FZtRCKDUo/mX3YS7+zhVdDSsR6JOqfHqxuUbWa5JdXvH3bq0ju4Vg+sMUaSp8lAO6Uts5ypbOHzYjSDcTJ7EWZBHuHKry/cb8zjbZgdofzpIaQ== X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-746f3.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 0c5bba92-e046-4bae-49b8-08db83be7026 X-MS-Exchange-CrossTenant-AuthSource: SY4P282MB1835.AUSP282.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 16:30:15.4676 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SY6P282MB3254 X-MailFrom: xuwd1@hotmail.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: 25YMXSKY3GV4ZEPGRBBAU5RAALYIYNL2 X-Message-ID-Hash: 25YMXSKY3GV4ZEPGRBBAU5RAALYIYNL2 X-Mailman-Approved-At: Sun, 16 Jul 2023 12:57:29 +0000 X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: As the comments added in commit 4d4c4bff4f8ed79d95e05 ("ALSA: hda: cs35l41: Clarify support for CSC3551 without _DSD Properties"), CSC3551 requires a valid _DSD to work and the current implementation just fails when no _DSD can be found for CSC3551. However it is a fact that many OEMs hardcoded the configurations needed by CSC3551 into their proprietary software for various 2022 and later laptop models, and this makes the Linux installations on these models cannot make any speaker sound. Meanwhile, at this point of time, we see no hope that these OEMs would ever fix this problem via a BIOS update. To address the problem, this patch series contains two patches: Patch 1 for cs35l41 hda driver: a fixup mechanism is introduced that when the driver found there is no valid _DSD that contains the configurations, a fixup function would try to find a fixup entry that contains a proper cs35l41 configuration from a pre-defined fixup table by matching the CSC3551 ACPI _SUB id. If found, the fixup function would apply the cs35l41 configurations retrived from the entry. In this patch the fixup table only contains some entries for three Lenovo laptop models: namely 16IAH7, 16IAX7 and 16ARHA7. However as is known, several other laptop models from ASUS and HP also suffer from this no valid _DSD problem and could have it addressed with this fixup mechanism when proper fixup entries are inserted. Patch 2 for realtek hda driver: add quirks for Lenovo 16IAH7, 16IAX7 and 16ARHA7 so that cs35l41 playback hook could be registered. Please note that for these quirks to work patch 1 has to be applied. David Xu (2): ALSA: hda: cs35l41: Add fixups for machines without a valid ACPI _DSD ALSA: hda/realtek: Add quirks for Lenovo 16IAH7, 16IAX7 and 16ARHA7 sound/pci/hda/cs35l41_hda.c | 160 ++++++++++++++++++++++++++++++++++ sound/pci/hda/patch_realtek.c | 5 ++ 2 files changed, 165 insertions(+)