From patchwork Mon Feb 5 01:38:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bo liu X-Patchwork-Id: 196614 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp626036dyb; Sun, 4 Feb 2024 18:17:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGE9G7eg890EC33GevDOVPAt+q27lHTiKdqxjG1LKAZzUPUU8+rpbFHEh6T7jLEtb0XsJeV X-Received: by 2002:a17:90a:e7c8:b0:296:396f:664e with SMTP id kb8-20020a17090ae7c800b00296396f664emr6636221pjb.19.1707099456890; Sun, 04 Feb 2024 18:17:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707099456; cv=pass; d=google.com; s=arc-20160816; b=0sbz513ulBsTO4Tb0jRHmQe/UKkOIuu2QXl/wC2nO7WbmCKgSEmYGPK9GfZ77LWDni MNxCigTMcQ+Dd7pIf50/MuAIeYUpC5E+TI2MMKXrA0zB4eCriWerxKHerI0etw3HlCzE qiN1n1sxVJNtmL3CtC/sTCM1hdPZBpyW3WIjFzViTdrJlWSiklfFITdDvHbCnd9t3EHh cSlB+fc4WOxBelsXQvKoTISYgUV1601U1xfPEg/zsHc6tlJCxsbWOSbJLkHsGAXOHKUl 3HQMomp18meD2/JWaYZBCAbuHeoDN6wa+NG2sb3oR2Pm12sAVLA4+hL6tn7+f9H7Tm20 a7jw== 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=fQb/bw+ja+aQIN0cnb9bhKj3Puaez43f+qh3+AAPPX8=; fh=HtrK32tTOEe/oRl77cw0f3IfiuF8meNQzgf7iAwzXis=; b=SbtWwPXTQi0eoGHNQoofj/2Q7gwCv57okqfGUeBDm0I1gZhxtCx3ky0BJB+vfKch4m LkAoQwRkbndv30qfTnavpwmqiglnhpYnTORy6ZHlCl06rNGZu6f+7ZTDyEdkzw6Ppksc pPCY/PASOG5ZdNXMYNLbc77RY0JDVEHQcmwyYo6KCLFiwEJh0ubGb2HyR9cvbnkrXReX e8b5I1kb9DD06M4D7fwQ/5KLHVL13gqv1aQLdgDVqqXrz7eH2lI8PqX/yr09asHHfpIf 1G+Xd8TFIYNQ5XvUEWYHp1lI5+bED4ol86lkeSY95hlhIhzcx5By5ISXrvAAlyMyD8IO ZXuw==; 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-51986-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51986-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=senarytech.com X-Forwarded-Encrypted: i=1; AJvYcCWrTKSKGD9aF0kBnbFm4g31eqmz9My4pxbNsGoQ0JQArAdDjubgdBsDc9SK8fk0v9Ze5O/anPCzm8CtmDkxZlkESYmHGQ== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id io9-20020a17090b410900b00296673e52fbsi3022327pjb.3.2024.02.04.18.17.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 18:17:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51986-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; 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-51986-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51986-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E9C5EB21917 for ; Mon, 5 Feb 2024 02:17:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DE3619455; Mon, 5 Feb 2024 02:17:24 +0000 (UTC) Received: from mail-m17220.xmail.ntesmail.com (mail-m17220.xmail.ntesmail.com [45.195.17.220]) (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 7238C8F49; Mon, 5 Feb 2024 02:17:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.195.17.220 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707099443; cv=none; b=hGEckK9odSdatSTmuPDFndb/aeR+n7uMwWioM/BjMHbz7MO7o1He/sOa44YSlQfJXCHPck0csdW2mCqpyJcwh4BxIaoSIlbZ8Cp2OjbNde5WR0lCNz/wN8tzD3kKspZ7mDw4/HAYMbjfpSg7h0U59lNt6wXfOuuWmpzE8Pe2kWo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707099443; c=relaxed/simple; bh=ooej1WUzjhcOCoPGj+R0vq6AQhsg2NTgBZGX2jSGTOw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=rLsXfPMvjJJsqTnHbdH5FMItBvFbhqfY6ZyXB7rTQz7/cupXX8c3w4kwe0236Fl1A1PUu+hmY1Dvo5VFYKLWHDaH0q/x9Mxr1JDqP4wsTvCfiWRBS6dZx8IRnS9EasEHryZAAfbOsP3ymk16A45zgXrTDMPFnKusbUwnsYXVlDA= 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=45.195.17.220 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 A70DD900119; Mon, 5 Feb 2024 09:38:05 +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 V2] ALSA: hda/conexant: Add quirk for SWS JS201D Date: Mon, 5 Feb 2024 09:38:02 +0800 Message-Id: <20240205013802.51907-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 tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVlDQ0tDVh9JSR0dGElKS0tDQlUTARMWGhIXJBQOD1 lXWRgSC1lBWU1KVUpDSFVKT0hVTENZV1kWGg8SFR0UWUFZT0tIVUpNT0lMTlVKS0tVSkJLS1kG X-HM-Tid: 0a8d76ea575d03a9kunma70dd900119 X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6NBA6Fww*FzMKIT0sODRNAh05 KBgaCxRVSlVKTEtMS0JMS0NNSUpCVTMWGhIXVRkUVRcSDjsIHhUaCQIPHhgTVRgUFkVZV1kSC1lB WU1KVUpDSFVKT0hVTENZV1kIAVlBSElPTjcG X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790023520142708902 X-GMAIL-MSGID: 1790023520142708902 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..e8209178d87b 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[] = { @@ -1069,6 +1085,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = { SND_PCI_QUIRK(0x103c, 0x8457, "HP Z2 G4 mini", CXT_FIXUP_HP_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x103c, 0x8458, "HP Z2 G4 mini premium", CXT_FIXUP_HP_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN), + SND_PCI_QUIRK(0x14f1, 0x0265, "SWS JS201D", CXT_PINCFG_SWS_JS201D), SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT_FIXUP_OLPC_XO), SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410), SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410), @@ -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" }, {} };