From patchwork Sun Feb 4 04:53:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bo liu X-Patchwork-Id: 196437 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp217111dyb; Sat, 3 Feb 2024 22:12:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZSBhvbBSYAWBa1qbyArb9r+fmGeERGBdl3Z8BjfRDg3dhcx6kITV4mRWW0GXabQj6yULi X-Received: by 2002:a05:620a:44c8:b0:785:51a7:3554 with SMTP id y8-20020a05620a44c800b0078551a73554mr9073978qkp.1.1707027161831; Sat, 03 Feb 2024 22:12:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707027161; cv=pass; d=google.com; s=arc-20160816; b=GSqpOupPyjf9P4ageA5RIsWn+Pxalh+mClKVC6M9z0qTX2af4Mol7rUM7C2iZe9Hws vTKKxS+KavZyOBvYwy1ncDz3+LBE0HakVT0OejPhXdvnq0GV1OW95QvYXGB9devhsPNp A5NGzZzxX1aNaH2exCEcR+Zza79jQuge44J40f5t2Xi3EOkg6ZJkkOztp19iJflYSIWj CN4IeuO+Sc+pq0vfLA5EAScfn+q5P6jhzjC9R1LFP5GaBxhy2/WtFMNRQJMNBGjME5jB uH5uM9jHgx9Lg3n/oX8J/7VzWpS/YfQFJOebESKioHIkKhvdU15NRjS/VOGj6FSmOKFi lH5g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=cEMIaoVIrvOKbeYMMwM6RMzPFrkutgTtre+cFa4bAuk=; fh=12XLHGpLSNyZ5lgHcqVgy9G/SuU9vS0/hhdhX+GBPVM=; b=vGYmxJmkCFKjkzySKfWQQFAblCbafb+2v3Q6MLB4FOzZ6Za67oLmFLAdZex04JfGzL 9HgWCIwz34We5Pna5s9/Qm8qJ68Wr4tT5ASlR2TRdYjT19SoyExQ/hXNFLmUYKFv8Bhx msZSn4rRkX4WipTz132o4emiC+YyS66xhRO8HEwjlrmd36cFGSTvyij+evX35hRC9RVP GdnrjKZWZiQCA3e5JGjtOVpUhfgNRT8sD/GBlRj+nQzvbAUdvBAn+B1TutGCypSJKR/P CapZ0wTs2S/+WxMoAd/nWZG/1zapkLUbpUpF1ubq3s6Ropv24ganGmPm7DuoBKygfSvN etjg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=senarytech.com dmarc=pass fromdomain=senarytech.com); spf=pass (google.com: domain of linux-kernel+bounces-51450-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51450-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=senarytech.com X-Forwarded-Encrypted: i=1; AJvYcCXKKdBfPHcUM+64Lg/+06fHm/ILuVS6QL9/OK6JRWztoL9K+LQX32H6zU+B4PDRV9hpXqS1Kzal2SqFMY85q6vj+HUagg== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v13-20020ae9e30d000000b00783fee83570si5605577qkf.137.2024.02.03.22.12.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 22:12:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51450-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=senarytech.com dmarc=pass fromdomain=senarytech.com); spf=pass (google.com: domain of linux-kernel+bounces-51450-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51450-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=senarytech.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9BE5E1C21734 for ; Sun, 4 Feb 2024 06:12:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AEDF979EE; Sun, 4 Feb 2024 06:12:27 +0000 (UTC) Received: from mail-m6017.netease.com (mail-m6017.netease.com [210.79.60.17]) (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 8240C6FA8; Sun, 4 Feb 2024 06:12:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.79.60.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707027146; cv=none; b=PNwVNs/t9L/nklrb3UCwxCTWQm0m54A+YPUZkXy+NTCISzLE3YMfnFgdtUvkOX9onq2Lm8kslZDH0lZlOxnY2CE+U8BsxfzbaqLBHQGoW5Q4uQLv3SxOb+GnzCAXB38blTTmvtkmLQ5HQ1+VTBzWuc14wgGUtMwoJiTe+iQ51X4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707027146; c=relaxed/simple; bh=L7VU0mrvuL1+eMtSkEdZOhT+A1UBXWPT4kmvv04CzjA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=LWYmxEt7MZTooh8WJF/WTPp4raO3OTKAHHPNNu2dn68gJGjSNyJnpvpO4Vm8z8MTiC6axzwqGH4kJ3N++kbNG147Z8rGtnHIYg9xmUslw29TpFZKKyoehs+yHwoLQrSF5MmJBFwxK6DV2HqTn7+htrnjKTg8pV73FIxjMM9dgzE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=senarytech.com; spf=pass smtp.mailfrom=senarytech.com; arc=none smtp.client-ip=210.79.60.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=senarytech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=senarytech.com Received: from book-ThinkStation-P328.. (unknown [61.183.143.78]) by smtp.qiye.163.com (Hmail) with ESMTPA id A04D6900172; Sun, 4 Feb 2024 12:53:51 +0800 (CST) From: bo liu To: perex@perex.cz, tiwai@suse.com Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, bo liu Subject: [PATCH] ALSA: hda/conexant: Add quirk for SWS JS201D Date: Sun, 4 Feb 2024 12:53:44 +0800 Message-Id: <20240204045344.48397-1-bo.liu@senarytech.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVlCHUpJVkNPQ0gZSE5LT0JLGFUTARMWGhIXJBQOD1 lXWRgSC1lBWU1KVUpDSFVKT0hVTENZV1kWGg8SFR0UWUFZT0tIVUpNT0lMTlVKS0tVSkJLS1kG X-HM-Tid: 0a8d7277361203a9kunma04d6900172 X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Ni46HTo*ITMISD8#Ii0vET4W IzkaCxxVSlVKTEtMS0lJT0hJSklDVTMWGhIXVRkUVRcSDjsIHhUaCQIPHhgTVRgUFkVZV1kSC1lB WU1KVUpDSFVKT0hVTENZV1kIAVlBSEtKTTcG X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789947713310745913 X-GMAIL-MSGID: 1789947713310745913 The SWS JS201D need a different pinconfig from windows driver. Add a quirk to use a specific pinconfig to SWS JS201D. Signed-off-by: bo liu --- sound/pci/hda/patch_conexant.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index e8819e8a9876..a0bb4d91502b 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -344,6 +344,7 @@ enum { CXT_FIXUP_HP_ZBOOK_MUTE_LED, CXT_FIXUP_HEADSET_MIC, CXT_FIXUP_HP_MIC_NO_PRESENCE, + CXT_PINCFG_SWS_JS201D, }; /* for hda_fixup_thinkpad_acpi() */ @@ -841,6 +842,17 @@ static const struct hda_pintbl cxt_pincfg_lemote[] = { {} }; +/* SuoWoSi/South-holding JS201D with sn6140 */ +static const struct hda_pintbl cxt_pincfg_sws_js201d[] = { + { 0x16, 0x03211040 }, /* hp out */ + { 0x17, 0x91170110 }, /* SPK/Class_D */ + { 0x18, 0x95a70130 }, /* Internal mic */ + { 0x19, 0x03a11020 }, /* Headset Mic */ + { 0x1a, 0x40f001f0 }, /* Not used */ + { 0x21, 0x40f001f0 }, /* Not used */ + {} +}; + static const struct hda_fixup cxt_fixups[] = { [CXT_PINCFG_LENOVO_X200] = { .type = HDA_FIXUP_PINS, @@ -996,6 +1008,10 @@ static const struct hda_fixup cxt_fixups[] = { .chained = true, .chain_id = CXT_FIXUP_HEADSET_MIC, }, + [CXT_PINCFG_SWS_JS201D] = { + .type = HDA_FIXUP_PINS, + .v.pins = cxt_pincfg_sws_js201d, + }, }; static const struct snd_pci_quirk cxt5045_fixups[] = { @@ -1091,6 +1107,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = { SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", CXT_FIXUP_THINKPAD_ACPI), SND_PCI_QUIRK(0x1c06, 0x2011, "Lemote A1004", CXT_PINCFG_LEMOTE_A1004), SND_PCI_QUIRK(0x1c06, 0x2012, "Lemote A1205", CXT_PINCFG_LEMOTE_A1205), + SND_PCI_QUIRK(0x14f1, 0x0265, "SWS JS201D", CXT_PINCFG_SWS_JS201D), {} }; @@ -1109,6 +1126,7 @@ static const struct hda_model_fixup cxt5066_fixup_models[] = { { .id = CXT_FIXUP_HP_ZBOOK_MUTE_LED, .name = "hp-zbook-mute-led" }, { .id = CXT_FIXUP_HP_MIC_NO_PRESENCE, .name = "hp-mic-fix" }, { .id = CXT_PINCFG_LENOVO_NOTEBOOK, .name = "lenovo-20149" }, + { .id = CXT_PINCFG_SWS_JS201D, .name = "sws-js201d" }, {} };