Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1112226lqb; Sat, 25 May 2024 06:29:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXrHN71hVXmaIRZXjnYu2MyKZPoxuZsoyujbKOCAZfriR6QSATAA9301I6BNqT2WUL/O0U8Hmm4peNK+S+ItfES+3uPQ6uq1g7kS+5ixg== X-Google-Smtp-Source: AGHT+IGrzfKk/9aITanvOLTSdEaeDiD8XhWVpCuIHXTzw9Nwsfji9HJrkeSZcJFIpOPh8H3lYslH X-Received: by 2002:ac8:584a:0:b0:43a:d7a9:386 with SMTP id d75a77b69052e-43fafb19bdbmr100078511cf.17.1716643750580; Sat, 25 May 2024 06:29:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716643750; cv=pass; d=google.com; s=arc-20160816; b=OYSUX7g+M1r42g9HH5vDdTvgZmsf3EaBCYBw8wnns/VTDoutceXV/lR1QhRXbe+WGY jtOcv463ZnVKU/avaS/CZEpcopAVZMWSOB7T9BtG0MtJNzlv2PbIT5b4JrMnE5lgWZms QcACisfwC18IdmnKIt4cIYWxX524hJNLX2vs1QrT9qLdCmGeSBH9Mz9OQkVpS8LgceuQ nEQqjKaPzF1Fkdp6EtWW3y3FG+fE6QqnhSgwPddJzdqHNHoz5nW/p31i+OFEe4AKzVDK aSLXujB0PbCu5JvjCHOQEXeHAlVeXIXPpYTdmCf17yGhJsmJvLj/7a1nvpfTT9FQTZ37 mqqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=BndYTHAhfTKZPUuhsQObxrH+e5h7zSrDvT6UBM9kSxU=; fh=6CNR1D6JtJDp6kf9SO60GRrQgyw54nNWKbD9bBA0aHY=; b=ssjC8hjvCVId1s/xYSqfOWdtGrU2QLKwHTkMESeDFFybhP373guXQX/vhDNjHEeycD 0zgOZKBe/V6qXxQDj5mX1inKEvi9ntWTUWkBsnTP9IGe+l8Z43wN1SuRHx1Wi3qmn8eI RCzc1nElvPJKnPR3AZjRjVktWXiFT4b8VxjeKjmAHMz+UBxrTpjNuj18w8xfII3czNJR JgA7HjLuKGDMkZlbkW5PwgAyZl8ekMLRQzJJ+sQT1fXsFIfbnj8N/UJUCdnpbJsG29IS JKJYi/V83jzsPDnm+CNTpiJMqMOMeDJ2Q1QCcQP8IUcvVDUQ128oBI2V49PCeiaMtlrr MWRg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Fnz+uVOl; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-189359-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189359-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43fb17bd60dsi40711261cf.139.2024.05.25.06.29.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 May 2024 06:29:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189359-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Fnz+uVOl; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-189359-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189359-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 0B6D61C20BAA for ; Sat, 25 May 2024 13:29:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2764B65BBB; Sat, 25 May 2024 13:28:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Fnz+uVOl" Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9405C57CBB; Sat, 25 May 2024 13:28:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716643695; cv=none; b=AJWgkH2ogg+C30ZmPctHVNZa4U8oj5gmiH8CmUEuJWLCQYaaKEELjkuPWM3xBODUouuNlt0qfLyNXr9BUS/a8BDvSArR6SUO/2x1PkDkYI/oQsO+2pOCk93ofRafwJsDzp4pfNUsXQxC1O2CZNFi80O2xqsc8VMEaTPb3irJKy8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716643695; c=relaxed/simple; bh=SrwrcA8EO/kpCKyL39XjnsPTrNdBE58a73YIeAazdTE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Q2ozANAmJXcUPq4uGjkn2+PphU4aRSTcljdkJvMqqW5hgsCo+5Vd0mLmXpKdyawcfXwOR4WLTE0GBeAbvwsh3Z86n11KQywDMfB74XSYjBDhFQKL0BGst3AkgBeGeutH1UbpMwsE98P0Ydyb+GFkxytWOmILwN4ghXVod4gRLMU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Fnz+uVOl; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a5a5cce2ce6so1245053966b.3; 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=vger.kernel.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=Fnz+uVOlu/QH2r9MLwhqCNOzzNtxCR2dAmDlQHgLiV8SiKvDZZWKJIoQUlv+YhgqyA 1pZuFgVZa0yNmDu7LOG2G8uMx4snnEWUuY/oCeK5i3tkaXLtKhH9Q3v0gxdIcLt9AAqm WKtcEWsQhEs0tGKHanBAkmnUmzkUWYglVlpmVedx3ZG1148ZC2AG6wDsYQ/eVYAsp0Lc LCIZPBOC653bmuVVjkA5dExlXCel2eUmkVNL1NFQmNE+m3fg9Iu2VA5HQnE9FvXedjbC O1U40AKSuKiYhLQV1VptVCy8iYWkzjVdv6LfjOmakAiJFV6Nz8AA1/bPGkFrxqrMzE+m XjUQ== 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=LdWiD25TF7lQzK+OB8kSIPj1DZvWsHxfqswEky8858/RTr6Q1A6XoAkLeRwy2dd3uW yuy/MVkmBLuT6tBGMPwBq0GzwVnNn31d+I0n8haGso6b2fQTKqBGqdZe2YmuPrZb7YxX 7jf1dzABK5AkYrJokWlcGpe9jCG1mpPp7BNATnH7swNEbCzy9EIwCC4NMsRUhJaJ961F 53H8G0SHF0lfAwTh+09vpy/wGPoq3Vu7y0Haphzt/SV2zoeEZvpd8bKsBUAzGoledJkE D4w7IkLqDcHvMTNpIyDs5wQYGKIgfxyPCnyjGL/nmLqeVFhzA6m42b3jn1KXsiiINR/9 Qidg== X-Forwarded-Encrypted: i=1; AJvYcCW2wzMZ3V0oi5XEPnrIpsWyPjkZERExAwN8ydzH96ir02ALGg+BOvy628yqT1iTjewIhlAl/+9HszBr+a7aq0erTjyffL9eMQtM+1ihacNQo8Gk1NWkPi+xRT3JoOCFB/mUwhY1GfNn6NfhTBHIxyLSxWqLX/+OTEXgDgvNjNKfOa+USOnm56CzX26A3iBpkrZNTNuucdoVLjN9F7Eslj557HIFqQS1dJI= X-Gm-Message-State: AOJu0YzUFx8slT1ERJ8YVolzH8/Bu1D4Bn/Ju9p3d9tFEpRtfA5tN02J SBc7AGn2F9L9x+w50dKs3dNcL4XFKNIGS4wLrLdhoYAAUvaTbjcY 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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= 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, -- 2.45.1