From patchwork Sat May 25 13:28:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13674018 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DA3E5C25B7C for ; Sat, 25 May 2024 13:28:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=k534yk/+Ywbdfl0k6AWv1hY+ADg/0sBlaxdUv2GLu6I=; b=ea04rkVhzdU/yt tipdYpaBrw14zdzNgm341dM0BZ8cGISFUPE/3maCshBaIAn1tC6i6G8u8aiQyMgpAJxyq7dpx/8bN sX7wlMvMa+Ebj2jnEhbSp8XbNWqanm/2XevrO6x3E11PY4aS92rlc3GZemR2Y7Br4PQRMeA+259Ln g7ws9C5HMfvZN/g8QU5GqMWvjw7r6zEAi1aN1MK0/1nXe6KFaQHzDpzbb+eqBioes+LrveSB3bH69 pMqwzsL/xUB8S5vruKMYum27P2cRRWAR/+ohdoO5n6+fbDEioI9dXj70m/U/VcohFAnsSBWljD9G3 8OFU5xfK299wormaPO/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sArRj-0000000B4Cn-2hq8; Sat, 25 May 2024 13:28:27 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sArRV-0000000B473-3Lq0 for linux-arm-kernel@lists.infradead.org; Sat, 25 May 2024 13:28:15 +0000 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5785f7347cdso1608597a12.0 for ; Sat, 25 May 2024 06:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716643692; x=1717248492; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=BndYTHAhfTKZPUuhsQObxrH+e5h7zSrDvT6UBM9kSxU=; b=EQultOcyk1+zhyPa/LfGIhDos01OQTJdd89XVvfFpggBWQdVAbV6ubRPRLlVz5qoER PPVkwcaJXTkn6kMUTA+CeWotsT7wJdgQXZbAYxBsl9HT+3V5L5uDAKFd7ERKu4T4nT7M 2bT7lSXjiRm78atRDoBepzUFhEFY29Cci6wzQDCNgG7QreDHMVEhIsQldTNlrpmKBcfx yP3XExxqn0BjRRlwAOVNcBy59fxBEpXtlcXEMX0ZXTmj9JccdvnzI042cZS/EG/i1/ng ruKnvL+YycjIQFr1qewM5Jh9scHk1h18QIVP9R5QT/kg6fLJ9/S4nZRw0pKfbPEZOC4b k1bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716643692; x=1717248492; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BndYTHAhfTKZPUuhsQObxrH+e5h7zSrDvT6UBM9kSxU=; b=GfBr74Klaq5LiVX/tpsIj64Qp9lu987ro2LS4YNawXBwbsD2wlUK1T4YUQS3pDa/a+ 49NQ2w1HBWaG9r0l9upKcZF9HYtCKImtYPTWRmIHehWLQh4EQgAXFylRy/okUFU3qtOc qzplRC7iTOH8Tt/lH+hwRSsIuX1FeNON+sZlYXKVzur3uy8stG7i3MCZTRV9TeO4pseZ /rA1K0RIxKjVdf/Y/Ld/tE4LQAg1xw9KmLgYphN7BECQoeUHH4qS7F3bo4P17YlQ/qee SOGAiBZchSJ0BsMdcODVUFE08Ak6YDxPYzVZr1h3MA/FUh2GbaZGCrHTR7IVWbh6FwwL 2mDg== X-Forwarded-Encrypted: i=1; AJvYcCUnSKTjN3tjv56QBJiaokmy1yUVRNVdt8+pvb/nRTf7CMF5bzwwMGVdyM+AYHX5/yl5z16hBiv6AN6g3WL9svRpYX2HSkRwnCQlwwY2YqY/zVdIJ2k= X-Gm-Message-State: AOJu0Yx7FlJamdlMcIbI1KYChJR2K5nD2dHJ9AwRw2fZkiDDSiJGLXls 1b/Tgx95ZzKNUCrfD/1FnQwere7uOTfiLDTqZql0AxUvqGN1v0zW X-Google-Smtp-Source: AGHT+IGnZd7WsivKWQF4T7VRJoyzWWWhjF8m2C3S/hvrEcSGj7gVML/vaSsvg/m9ubAfv5dSHplv5A== X-Received: by 2002:a17:906:34c4:b0:a5d:1079:ae43 with SMTP id a640c23a62f3a-a62646cff2bmr303714966b.46.1716643691879; Sat, 25 May 2024 06:28:11 -0700 (PDT) Received: from hex.my.domain (83.8.128.191.ipv4.supernova.orange.pl. [83.8.128.191]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a626cda46e1sm251842566b.196.2024.05.25.06.28.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 May 2024 06:28:11 -0700 (PDT) From: Artur Weber Date: Sat, 25 May 2024 15:28:08 +0200 Subject: [PATCH v4 4/9] ASoC: samsung: midas_wm1811: Add headset mic bias supply support MIME-Version: 1.0 Message-Id: <20240525-midas-wm1811-gpio-jack-v4-4-f488e03bd8c7@gmail.com> References: <20240525-midas-wm1811-gpio-jack-v4-0-f488e03bd8c7@gmail.com> In-Reply-To: <20240525-midas-wm1811-gpio-jack-v4-0-f488e03bd8c7@gmail.com> To: Sylwester Nawrocki , Krzysztof Kozlowski Cc: Liam Girdwood , Mark Brown , Rob Herring , Conor Dooley , Jaroslav Kysela , Takashi Iwai , Alim Akhtar , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Artur Weber X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716643685; l=1496; i=aweber.kernel@gmail.com; s=20231030; h=from:subject:message-id; bh=SrwrcA8EO/kpCKyL39XjnsPTrNdBE58a73YIeAazdTE=; b=aOb+rU2suanKpvf9j7yJWCC8tRfhD79vM2VGE9vwAf3aAdab1HBw88AGPfMZzkzES4TSFtHuM 6DZtzJEPYveCOX4cpcoNbmRXsBVqaoVegYq+563CTSs9fB2kR85Cl6t X-Developer-Key: i=aweber.kernel@gmail.com; a=ed25519; pk=RhDBfWbJEHqDibXbhNEBAnc9FMkyznGxX/hwfhL8bv8= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240525_062813_935535_1C9732B0 X-CRM114-Status: GOOD ( 12.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Some devices use a headset mic bias supply (sometimes referred to as "ear mic bias") to enable/disable the headset mic. Add a REGULATOR_SUPPLY widget for this supply which gets the headset- mic-bias supply and is routed to the Headset Mic switch similar to how it's done for the other mic bias regulators. Signed-off-by: Artur Weber --- Changes in v4: - Completely changed to adapt to SND_SOC_DAPM_REGULATOR_SUPPLY switch Changes in v2: - Added this commit --- sound/soc/samsung/midas_wm1811.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/samsung/midas_wm1811.c b/sound/soc/samsung/midas_wm1811.c index 20b274734487..96cec8e9de98 100644 --- a/sound/soc/samsung/midas_wm1811.c +++ b/sound/soc/samsung/midas_wm1811.c @@ -237,6 +237,7 @@ static const struct snd_soc_dapm_widget midas_dapm_widgets[] = { SND_SOC_DAPM_HP("Headphone", NULL), SND_SOC_DAPM_MIC("Headset Mic", NULL), + SND_SOC_DAPM_REGULATOR_SUPPLY("headset-mic-bias", 0, 0), SND_SOC_DAPM_MIC("Main Mic", NULL), SND_SOC_DAPM_REGULATOR_SUPPLY("mic-bias", 0, 0), SND_SOC_DAPM_MIC("Sub Mic", NULL), @@ -248,6 +249,7 @@ static const struct snd_soc_dapm_route midas_dapm_routes[] = { /* Bind microphones with their respective regulator supplies */ {"Main Mic", NULL, "mic-bias"}, {"Sub Mic", NULL, "submic-bias"}, + {"Headset Mic", NULL, "headset-mic-bias"}, }; static int midas_set_bias_level(struct snd_soc_card *card,