From patchwork Thu Nov 9 00:22:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "vitaly.torshyn@gmail.com" X-Patchwork-Id: 743101 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 7D6A2C4332F for ; Thu, 9 Nov 2023 12:17:52 +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 42842210; Thu, 9 Nov 2023 13:17:00 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 42842210 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1699532270; bh=uTD8VeE30Xvlabjd7KSSVPTJsfisy4xpIa7Fw1BOgdM=; h=From:Date:Subject:To:Cc:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=OwZKk+f6myBycltDVBLi5PUPpAdLr0LdIeoKbjq4F0eqCuroI+vAFJTXpyknT9BHQ QtSXFuiwUdGxSOBbIeQfxVMYdDcQJzCZPvhJ5Ge6JChJtxtX7fpXykcTx/A8iMiPwE bdQ7SHa1kA5HoL216EzNiFx2pEOrRfCnZMojAST4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 93066F800ED; Thu, 9 Nov 2023 13:16:52 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 57B45F80169; Thu, 9 Nov 2023 13:16:52 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1F0B1F8016D; Thu, 9 Nov 2023 01:23:20 +0100 (CET) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 527E1F80125 for ; Thu, 9 Nov 2023 01:23:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 527E1F80125 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=I7c2T5Bw Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-9dd3f4a0f5aso50223966b.1 for ; Wed, 08 Nov 2023 16:23:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699489389; x=1700094189; darn=alsa-project.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=qQ5OblFLCHUEhBZNXb4MuX1zkLNAE+gNXXxbwajZSUM=; b=I7c2T5Bw0ubqdDKHHANsSc7QBxeCWwnbdQNc2YRbWOxJ55GjgI+tIAsViK4a3vNJMX hri3q1iMQTvqFnzN/1hi2zIx/6OcZWXH++ug1fkZ1Y3OjzFtCCrKr2R13UPG3ESKJctS XJ8K7gYV1exTuSkwHSgrjj/RRufXowyHY30J59kMYXx8BLVAXv8stIioCQ+I+vhw1R54 3+IgfE7wfPpsiPihEGRjJFVR+Rom5xyANGkC663kIo5QoEDrWGqmz6irh2ansdCoyHmP XqRKDJJYds4IeFSKlC2RcbZLtLAEmNEQul55l/thF3utCawi/gBEZYWmtyQrV6G4hcEN bVbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699489389; x=1700094189; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=qQ5OblFLCHUEhBZNXb4MuX1zkLNAE+gNXXxbwajZSUM=; b=Feb3vN7Ry8cXxYjcIyeJKacznGL16SCBIeGAsQ8syhOlCMZahk0/zhTlhxlgPwKse2 Jht7fMVvbLDK+HOWNthkdJuIC5T13pus3I8P0tRhdM/pNGK+CKOJeE1ogGdowbPrtZc9 zWbTAVAClJadrFAsFS1XOmlmhuZTEFIurBoM3UA20KaZWlOjKGoAMIFKCkkgY+QKzAgc bGohLJAjehO19nesaE5+R4oTieEC/1wOHdTy/9kGEcR6op5fvTzvhi2Y9GaxxCY5O7gy y9BeKT3VKASvwxLRsh5KaRlWpRrzAOZfSOAxYeWegT/usTeMiI6J2jFAXdSs+HR/WJJN FIEA== X-Gm-Message-State: AOJu0YzFsueuHEzmNEsP7Lzxb808f/morDt7e29bvPqPSMRIUMO3cUGs EDnxxpsmNFPujlCVw0D2kLtz5FezCtqW8EU5wg== X-Google-Smtp-Source: AGHT+IEra6bOPI7RG1P5O4kUpDXuXISFAgwDA1lJ6bwWYzN4dmekuOmG/USduZpBSY+q+DC0bUULCpDrFuvCak/4p2U= X-Received: by 2002:a17:907:6088:b0:9dd:79ce:fc72 with SMTP id ht8-20020a170907608800b009dd79cefc72mr2950859ejc.71.1699489388892; Wed, 08 Nov 2023 16:23:08 -0800 (PST) MIME-Version: 1.0 From: "vitaly.torshyn@gmail.com" Date: Thu, 9 Nov 2023 02:22:57 +0200 Message-ID: Subject: [PATCH 1/1] ALSA: HDA: Asus UM5302LA: Added quirks for cs35L41/10431A83 on i2c bus To: tiwai@suse.de Cc: perex@perex.cz, alsa-devel@alsa-project.org X-MailFrom: vitaly.torshyn@gmail.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: TO4GSF22VKV2RAWZDTNWTALOWSHKE5IO X-Message-ID-Hash: TO4GSF22VKV2RAWZDTNWTALOWSHKE5IO X-Mailman-Approved-At: Thu, 09 Nov 2023 12:16:49 +0000 X-Content-Filtered-By: Mailman/MimeDel 3.3.8 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: Hi Takashi, Proposed patch fixes initialization of CSC3551 on the UM5302LA laptop. Patching DSDT table is not required since ASUS did added _DSD entry. Nothing new introduced but reused work started by Stefan B. Currently there is no official firmware available for 10431A83 on cirrus git unfortunately. For testing used 104317f3 (which is also seems on i2c bus): $ cd /lib/firmware/cirrus/ && \ for fw in $(find ./ -name '*104317f3*'); do newfw=$(echo $fw | sed 's/104317f3/10431a83/g'); echo echo "$fw -> $newfw"; ln -s $f $newfw; done With the patch applied to 6.6.0 and obviously symlinks to 104317F3 FW, speakers works and to my susrprise they sound quite good and loud without distortion. Probably confirmation from cirrus team is needed on firmware. Signed-off-by: Vitalii Torshyn --- sound/pci/hda/patch_realtek.c | 7 +++++++ 1 file changed, 7 insertions(+) + SND_PCI_QUIRK(0x1043, 0x1a83, "ASUS UM5302LA", ALC294_FIXUP_CS35L41_I2C_2), SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401), SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2), SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC245_FIXUP_CS35L41_SPI_2), >From 8c6432e79f5669a7ed48069db0a92edd69d2b095 Mon Sep 17 00:00:00 2001 From: Vitalii Torshyn Date: Thu, 9 Nov 2023 01:13:54 +0200 Subject: [PATCH 1/1] ALSA: HDA: Asus UM5302LA: Added quirks for cs35L41/10431A83 on i2c bus To: tiwai@suse.de Cc: perex@perex.cz,alsa-devel@alsa-project.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------alsa-hda-cs35l41-asus-um5302la-fix.patch" This is a multi-part message in MIME format. --------------alsa-hda-cs35l41-asus-um5302la-fix.patch Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit Hi Takashi, Proposed patch fixes initialization of CSC3551 on the UM5302LA laptop. Patching DSDT table is not required since ASUS did added _DSD entry. Nothing new introduced but reused work started by Stefan B. Currently there is no official firmware available for 10431A83 on cirrus git unfortunately. For testing used 104317f3 (which is also seems on i2c bus): $ cd /lib/firmware/cirrus/ && \ for fw in $(find ./ -name '*104317f3*'); do newfw=$(echo $fw | sed 's/104317f3/10431a83/g'); echo echo "$fw -> $newfw"; ln -s $f $newfw; done With the patch applied to 6.6.0 and obviously symlinks to 104317F3 FW, speakers works and to my susrprise they sound quite good and loud without distortion. Probably confirmation from cirrus team is needed on firmware. Signed-off-by: Vitalii Torshyn --- sound/pci/hda/patch_realtek.c | 7 +++++++ 1 file changed, 7 insertions(+) --------------alsa-hda-cs35l41-asus-um5302la-fix.patch Content-Type: text/x-patch; name="0001-Subject-PATCH-ALSA-HDA-Asus-UM5302LA-Added-quirks-fo.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0001-Subject-PATCH-ALSA-HDA-Asus-UM5302LA-Added-quirks-fo.patch" diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 58006c8bc..52956b58a 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -7444,6 +7444,7 @@ enum { ALC287_FIXUP_THINKPAD_I2S_SPK, ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD, ALC2XX_FIXUP_HEADSET_MIC, + ALC294_FIXUP_CS35L41_I2C_2 }; /* A special fixup for Lenovo C940 and Yoga Duet 7; @@ -9552,6 +9553,11 @@ static const struct hda_fixup alc269_fixups[] = { .type = HDA_FIXUP_FUNC, .v.func = alc_fixup_headset_mic, }, + [ALC294_FIXUP_CS35L41_I2C_2] = { + .type = HDA_FIXUP_FUNC, + .v.func = cs35l41_fixup_i2c_two, + }, + }; static const struct snd_pci_quirk alc269_fixup_tbl[] = { @@ -9937,6 +9943,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022", ALC289_FIXUP_ASUS_GA401), SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401), SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302", ALC287_FIXUP_CS35L41_I2C_2), + SND_PCI_QUIRK(0x1043, 0x1a83, "ASUS UM5302LA", ALC294_FIXUP_CS35L41_I2C_2), SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401), SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2), SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC245_FIXUP_CS35L41_SPI_2), --------------alsa-hda-cs35l41-asus-um5302la-fix.patch--