Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5593845rwp; Mon, 17 Jul 2023 06:43:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlHfKvml+2QWsr2FD6GOsGNPo3qCnJkuxsWfq5P2bhsr77VUZ4dpdcg1mL5uANcAKtWGHP7U X-Received: by 2002:a17:90a:cf14:b0:262:f8eb:ea5 with SMTP id h20-20020a17090acf1400b00262f8eb0ea5mr8708432pju.22.1689601425722; Mon, 17 Jul 2023 06:43:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689601425; cv=none; d=google.com; s=arc-20160816; b=F8fI8zYusA508PGVEoGi27D4/MorG1YNyZXarfes05IEX+jcJ2DtAzGLeLBRmUuKOF xCrqKdCKc4cDXHCY0b1YZ1lCkFptbpcIOdmHdleOue2uQpdeDS1K6vGU6LEzZfraFxMi 8LKRMl4+W+omSxS5foHKiKmivoswAcPkkBz+UEhoCeb6Xx7BgeWsaf3AvvdO/7B4IpXr 8WorsvCkF1VnOVIWTxUKWDswbaglsgCjAI7PJ0POJcLMKmV5dQiUBTULBvZFPdnzRDkf OEmpuO1sx3aFh03upI0AP8kVJl5WAuvqlTtWCMLoZZFPctq1RQB0ifLWUr3iwYD42fS3 t13w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=nmMNFV73wNm/2ZjsT4mSlg2YLZJ1Hz1dydlb4bhlksM=; fh=k//qFrWbaMYPTZYeXrfNChaWTbF1NBNtddyC5eDFaA4=; b=T34/ebZcVUHZDdLUMcnLpbXS+UtwmBne4Aq1d/3Wu/YjertnfHHC4T9/rR98V2IwJk w7RIQTom0nbdOR5hOMKE8DC3I1bvKo5yj6skmEuXwrbiGbyqxQS7ql3N34XYObbVGUpq ZorkLw4Bj5JyqpY/cbRAc5Oi7RTKDO6BDawDroXn6jRTUIMlLcX71Y2XQIJiE0wLS9Se VVRgiX5QPqaXKSS4U9bI836zFthRzlMoEME+05n09iYx/Hly2yzhtos2LXo3OCZ2TPWI /hzY5Jp8xn0VdtsTs02OoNpxizBAGU0N/4Lg+7DX6cYS50yjIEBjYtHtHiUqGNrylIIw 9QLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=aYxUplsb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lp11-20020a17090b4a8b00b0026333ca2944si5967780pjb.17.2023.07.17.06.43.33; Mon, 17 Jul 2023 06:43:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=aYxUplsb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229962AbjGQMtY (ORCPT + 99 others); Mon, 17 Jul 2023 08:49:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjGQMtW (ORCPT ); Mon, 17 Jul 2023 08:49:22 -0400 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2259FB1 for ; Mon, 17 Jul 2023 05:49:21 -0700 (PDT) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 36HA8gZw025271; Mon, 17 Jul 2023 07:48:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= PODMain02222019; bh=nmMNFV73wNm/2ZjsT4mSlg2YLZJ1Hz1dydlb4bhlksM=; b= aYxUplsb3f2Ejh0CJaBzLuAHRPoVJcA2J8QizG8hNrHqipTTD/PcUFNYyB1dV/uD DUJTx8yZy6fl2d9l8IYN7CUaI1Raef1qB7xjzTGjcA+TYnZDruM6NNatxISlPYLN xkgqiAPGlEIPI9kHRTwIi0MboUtr8pQjcyZQtV3YTWJnnsImjPQvRiLDWuqX+SL8 d9BVMK803MMJnwHtU/lYcppI64J1GQGBsPNYNTxR1CKc658lwJcqIzL3g6mmqWZB 0xwY4GHE1clglKQC52v3MxaZB/LZfBjReFhs7iF6tUNRZsgc0IpMweKVrhlkaLZ/ QQdRl7OSmM67wEzCbFeOEw== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3rus62t1ej-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 Jul 2023 07:48:31 -0500 (CDT) Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Mon, 17 Jul 2023 13:48:29 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.30 via Frontend Transport; Mon, 17 Jul 2023 13:48:29 +0100 Received: from [198.90.251.45] (EDIN6T9W333.ad.cirrus.com [198.90.251.45]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 6902C458; Mon, 17 Jul 2023 12:48:29 +0000 (UTC) Message-ID: <6a5d7b94-4762-5e71-dc39-c9f10ee98c6f@opensource.cirrus.com> Date: Mon, 17 Jul 2023 13:48:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 0/2] Fix CSC3551 speaker sound problem for machines without a valid ACPI _DSD To: Takashi Iwai , David Xu CC: 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 , , , References: <87zg3waunl.wl-tiwai@suse.de> From: Stuart Henderson In-Reply-To: <87zg3waunl.wl-tiwai@suse.de> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: PfznXB3bkg-U3D8PeACQKqOyT2PUsCYN X-Proofpoint-ORIG-GUID: PfznXB3bkg-U3D8PeACQKqOyT2PUsCYN X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/07/2023 13:49, Takashi Iwai wrote: > On Thu, 13 Jul 2023 18:29:53 +0200, > David Xu wrote: >> >> 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. > Thanks for the patches. > > I've seen the lots of pains with CS35L41 codec stuff on the recent > machines. But, first of all, it still needs to be agreed by Cirrus > people whether this approach is acceptable. Judging from the current > situation, such workaround appears inevitable, but we need a > consensus. > > So, Cirrus people, please check this. > > > Also, some ideas about the current patch set: > > - Do we need yet another listing and check of each ID in another > place? The existing entry in the SSID quirk table is already unique > enough to identify which configuration is taken, I suppose. > > - The quirk entries can be gathered in patch_realtek.c, and the hw_cfg > and other items are overwritten in cs35l41_no_acpi_dsd() when no > _DSD is found. In that way, we can avoid fixing two places for each > update. > > - The workaround is a workaround, and it's fundamentally dangerous. > We should warn it in a kernel message. > > > Takashi Hi David, Takashi, We're looking into supporting some of these older devices at the moment, and have a patch chain in development at the moment. The approach we've taken is a lot closer to the one taken by the github Luke links through to elsewhere in this chain, which we think might be a cleaner approach.  We do have concerns about the current approach of identifying the SPI device though, as we've seen "spi1" become "spi2" as additional devices become supported in the kernel and more SPI controllers come into use.  We'll look into this more and hopefully get a patch chain up in the coming weeks. This patch chain looks like it might also be missing support for different boost configurations. I wouldn't recommend this patch be merged. Thanks, Stu