From patchwork Sat Jan 25 07:00:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Walklin X-Patchwork-Id: 13950235 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 7C104C02182 for ; Sat, 25 Jan 2025 07:08:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HdIMwhJ8hC1QC8RbpwkAhUuLla40fvTl8JmybcX17Ek=; b=YLyTm2HjZyXM9Rn3RD7gzMU97j ycQ/akTupUnJqlVYWgJk4dCXWRoKYxM2yLYB+2HMcQl3fJRdqo1j4a/sjtDPW+mtSqInC0ErV+pxy TvChdMiWO3zZ6HDE5STeCCvnA794Md/CUgDCGoAfEwCG3usN+xucYtPbqQyVKZQ03ylc037YdYVmg Ckb1A+ejp5738GGi2z1NZ91lclIhaAgCVoIsZo9IvTW0bCXfPji7eEanu9d6YKlUYlUDoULGMl3MR 7/Tx4hrWYU95hK3QNgNFMz/wJbfYECqJO2LN32ziQdfZ6DXeHJymOdQUcqFnougGlpLltSCwJw3+e 4xDgGBCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tbaHL-0000000GBx1-362s; Sat, 25 Jan 2025 07:08:27 +0000 Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tbaEQ-0000000GBfk-3Rk1 for linux-arm-kernel@lists.infradead.org; Sat, 25 Jan 2025 07:05:28 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id E845711400EC; Sat, 25 Jan 2025 02:05:25 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Sat, 25 Jan 2025 02:05:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=testtoast.com; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1737788725; x= 1737875125; bh=HdIMwhJ8hC1QC8RbpwkAhUuLla40fvTl8JmybcX17Ek=; b=o UXtML8VTe1AS5ZbXENmEh9Y41Nq6nF1YxJs66muN1ddyCMh1NTQMnvRdhH+7QAFh rBh9zy3YEL4hSvLTdUL2b3QnM0dNfQKRJDP91KVIgoEqipBR+A2+hoNJ08Rw5JDC 3ST4FklzZQs9GiqUWPcKq2L/uJMwsCOQb85fzyaaFMG3iQadOGczi8SsTonvIYFk v5dDawqqRVtE6XgxRSs54rfvGbOay+BsWIT7z3nqkU+Ns3OUG3/UXJiysuQWrygx PF0aiWwcUiJ7iYTBpPCMbtCalb9D4V7TwsguNq1BS567jDnHs9OG25YD6jLEmgAO aq3PJim9M6Gyt4dNNHVAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1737788725; x=1737875125; bh=H dIMwhJ8hC1QC8RbpwkAhUuLla40fvTl8JmybcX17Ek=; b=hV8ZNZmaoob38TAJQ P5dsajXdf1E2E7xbXHtxU3O5VKmhVZ/HXjhWsWAULagmUI/cRzXYwOG1CNQQ0jEf KdfgzMkjEfhdMJwIepC97dJUY/i9L49qt9vxOhFdUDfmouu14AgLWNWC69Wb9m/f WYTmzyILS5xxKlSsKa4TcN5jq/wwR0j2DKGoBVtWB/OrlXWf6Zdj4QL0JURYRWHq RgJRK5/H1UWjyPrao5VNcPukTQUeyhMkq4t9SkpyYbDNqFC/4tj6JFpegL3lF3gy 7bSLDLvTGEdh7Q4+kmmiKMXzcpxEaWpED5fIug8cvo0ZDWoTZJBnrHzhLMUO4Rj0 JkB4Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejgedgieejhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddt necuhfhrohhmpefthigrnhcuhggrlhhklhhinhcuoehrhigrnhesthgvshhtthhorghsth drtghomheqnecuggftrfgrthhtvghrnhepffehieffgedtgfffjeetveegfeekleeileek veeuteffteetudffveegieeiheetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprhihrghnsehtvghsthhtohgrshhtrdgtohhmpdhnsggprhgt phhtthhopedufedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheplhhgihhrugifoh hougesghhmrghilhdrtghomhdprhgtphhtthhopegsrhhoohhnihgvsehkvghrnhgvlhdr ohhrghdprhgtphhtthhopehpvghrvgigsehpvghrvgigrdgtiidprhgtphhtthhopehtih ifrghisehsuhhsvgdrtghomhdprhgtphhtthhopeifvghnshestghsihgvrdhorhhgpdhr tghpthhtohepjhgvrhhnvghjrdhskhhrrggsvggtsehgmhgrihhlrdgtohhmpdhrtghpth htohepshgrmhhuvghlsehshhholhhlrghnugdrohhrghdprhgtphhtthhopehlihhnuhig qdhsohhunhgusehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugi dqrghrmhdqkhgvrhhnvghlsehlihhsthhsrdhinhhfrhgruggvrggurdhorhhg X-ME-Proxy: Feedback-ID: idc0145fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 25 Jan 2025 02:05:21 -0500 (EST) From: Ryan Walklin To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, Chris Morgan , Ryan Walklin Subject: [PATCH v2 1/5] ASoC: dt-bindings: sun4i-a10-codec: add hp-det-gpios Date: Sat, 25 Jan 2025 20:00:11 +1300 Message-ID: <20250125070458.13822-2-ryan@testtoast.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250125070458.13822-1-ryan@testtoast.com> References: <20250125070458.13822-1-ryan@testtoast.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250124_230526_918789_A27B1A99 X-CRM114-Status: GOOD ( 10.28 ) 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 From: Chris Morgan Devices integrating Allwinner SoCs may use line-out or headphone jacks with jack detection circuits attached to a GPIO. For example, a number of Anbernic devices featuring the H700 SoC use this mechanism to switch between a headphone jack and an internal speaker. Add extra routing endpoints to support this. Signed-off-by: Chris Morgan Signed-off-by: Ryan Walklin Reviewed-by: Rob Herring (Arm) --- Changelog v1..v2: - Remove vendor prefix from hp-det-gpios - Amend commit message --- .../bindings/sound/allwinner,sun4i-a10-codec.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-codec.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-codec.yaml index ccae64ce30719..b4eca702febc7 100644 --- a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-codec.yaml +++ b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-codec.yaml @@ -102,6 +102,10 @@ properties: maxItems: 1 description: GPIO to enable the external amplifier + hp-det-gpios: + maxItems: 1 + description: GPIO for headphone/line-out detection + required: - "#sound-dai-cells" - compatible @@ -251,8 +255,10 @@ allOf: allwinner,audio-routing: items: enum: + - Headphone - LINEOUT - Line Out + - Speaker dmas: items: From patchwork Sat Jan 25 07:00:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Walklin X-Patchwork-Id: 13950236 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 817C2C02182 for ; Sat, 25 Jan 2025 07:09:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vHn5rroylHzuQrtAoY3TXyS5Zv+3P1p2kiq3JFX8d1Q=; b=QfF+yGu9XasaPOMAB3ElBdBDtx woLR+gdZd78xPmE4My9FD4r7Wnev2uClPaQJYagirsFcHzULDs4gBuIvmtex5MEvc1wpyw1fNxaZx 2/CzmcRtY8vsJgIlXqSyqAgZiflMquBTokE7sF7Ol9K6R3QS67UteNQ4rs0mMapBDguJXU7OH+Y6X tNFksdd2Qg2H2E5peDzozOn4LKqWCKRKy+tEBVwvUC181Zf2PNqWgskUaiHHKItIZoPpSVx5VJiFr K02NhsR8L3bdWF8clbjf8YK1iZkatK7aQ9xNzefmJoEKZ9CJsJXRLWlaHvDTMCeMrKXEkhFiidlCK F7u8Ptzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tbaIc-0000000GC1t-1V0A; Sat, 25 Jan 2025 07:09:46 +0000 Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tbaEV-0000000GBgg-35hy for linux-arm-kernel@lists.infradead.org; Sat, 25 Jan 2025 07:05:32 +0000 Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id D338B11400E6; Sat, 25 Jan 2025 02:05:30 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Sat, 25 Jan 2025 02:05:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=testtoast.com; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1737788730; x= 1737875130; bh=vHn5rroylHzuQrtAoY3TXyS5Zv+3P1p2kiq3JFX8d1Q=; b=g 0izeiBcvSriI/RABTmoXVPr9G7V8F3p0wb1QvxZwYZZaKAgGYfIjxvJnrgoltrqE GGtjHMmZvjx4641+nekNM73TR4wfnr/GyJX7caaI+ebp80lNllWKQo4BR/LUihn3 xPCe4shmYGPdvvwHLycz+ymwTJf+qUwc5pCPIde3kY4wrLye3Stb0FwaGw3Sj7iZ iwIKWPFbjpObjoIL3W4z14flMduTslDpcZwZo2YgVRrflx/Ut+AFanKZlnCYy6sQ LcVqJ2Do/Wcv6TncS32kb6D8Pj+1/51rhWh6FF7gmPrwf6x2wkm3EOLw5VQjDxjZ uECqF+B4QTqm/gtnaskhQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1737788730; x=1737875130; bh=v Hn5rroylHzuQrtAoY3TXyS5Zv+3P1p2kiq3JFX8d1Q=; b=ErDzVATwQcnagJtxc StmGAA5CJEl55iGGGMM4M9zbSNuAt466EiI0QD6LUAroHxiAEkeHP5GZkBvZlk92 8WLMJHdJl3/xxWevKudh8NqCwnMWBy0012NVdN7B+QsfLIb1khI70ADThvHwqNJf 3a7pWOMs2DAJCUdSf/2yjimOSwmgFjtu1+M+tLSBN6bWlYYsDL7LRxZn1Kqc3ero TIpVR2WV7vb57Xd/BUeUDnncfXLF1eHFXaXKOIdMC2K4PMjeXbnwriMgMK5aymMk Etf8ds9dA6E1on25rNlkUfJECfbJTfNZZDPuqia97D0bitEgHC4w5e6zOiSf/Kii Cl7ig== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejgedgieejhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddt necuhfhrohhmpefthigrnhcuhggrlhhklhhinhcuoehrhigrnhesthgvshhtthhorghsth drtghomheqnecuggftrfgrthhtvghrnhepffehieffgedtgfffjeetveegfeekleeileek veeuteffteetudffveegieeiheetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprhihrghnsehtvghsthhtohgrshhtrdgtohhmpdhnsggprhgt phhtthhopedufedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheplhhgihhrugifoh hougesghhmrghilhdrtghomhdprhgtphhtthhopegsrhhoohhnihgvsehkvghrnhgvlhdr ohhrghdprhgtphhtthhopehpvghrvgigsehpvghrvgigrdgtiidprhgtphhtthhopehtih ifrghisehsuhhsvgdrtghomhdprhgtphhtthhopeifvghnshestghsihgvrdhorhhgpdhr tghpthhtohepjhgvrhhnvghjrdhskhhrrggsvggtsehgmhgrihhlrdgtohhmpdhrtghpth htohepshgrmhhuvghlsehshhholhhlrghnugdrohhrghdprhgtphhtthhopehlihhnuhig qdhsohhunhgusehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugi dqrghrmhdqkhgvrhhnvghlsehlihhsthhsrdhinhhfrhgruggvrggurdhorhhg X-ME-Proxy: Feedback-ID: idc0145fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 25 Jan 2025 02:05:26 -0500 (EST) From: Ryan Walklin To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, Chris Morgan , Ryan Walklin Subject: [PATCH v2 2/5] ASoC: sun4i-codec: correct dapm widgets and controls for h616 Date: Sat, 25 Jan 2025 20:00:12 +1300 Message-ID: <20250125070458.13822-3-ryan@testtoast.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250125070458.13822-1-ryan@testtoast.com> References: <20250125070458.13822-1-ryan@testtoast.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250124_230531_835539_8ED5C564 X-CRM114-Status: GOOD ( 14.45 ) 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 From: Chris Morgan The previous H616 support patch added a single LINEOUT DAPM pin switch to the card controls. As the codec in this SoC only has a single route, this seemed reasonable at the time, however is redundant given the existing DAPM codec widget definitions controlling the digital and analog sides of the codec. It is also insufficient to describe the scenario where separate components (muxes, jack detection etc) are used to modify the audio route external to the SoC. For example the Anbernic RG(##)XX series of devices uses a headphone jack detection switch, GPIO-controlled speaker amplifier and a passive external mux chip to route audio. The LINEOUT route remains defined as the final common endpoint for the codec's output, and is referenced by device trees. Remove the redundant LINEOUT card control, and add a Speaker pin switch control and Headphone DAPM widget to allow control of the above hardware. Signed-off-by: Chris Morgan Signed-off-by: Ryan Walklin --- Changelog v1..v2: - Separate DAPM changes into separate patch and add/elaborate rationale. --- sound/soc/sunxi/sun4i-codec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 886b3fa537d26..f24bbefeb3923 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -1916,10 +1916,11 @@ static const struct snd_soc_component_driver sun50i_h616_codec_codec = { }; static const struct snd_kcontrol_new sun50i_h616_card_controls[] = { - SOC_DAPM_PIN_SWITCH("LINEOUT"), + SOC_DAPM_PIN_SWITCH("Speaker"), }; static const struct snd_soc_dapm_widget sun50i_h616_codec_card_dapm_widgets[] = { + SND_SOC_DAPM_HP("Headphone", NULL), SND_SOC_DAPM_LINE("Line Out", NULL), SND_SOC_DAPM_SPK("Speaker", sun4i_codec_spk_event), }; From patchwork Sat Jan 25 07:00:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Walklin X-Patchwork-Id: 13950237 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 1C48BC02182 for ; Sat, 25 Jan 2025 07:11:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1IoEO+9R8j8Un9cYoSvY/uysWqLsZR32aOL15xQ72n4=; b=4xDcIhuFXvAWylHgN7DWwgvTg3 OG8C861KxNttAp8hSt6yODvFBe/anCKBVMqpKZN4CcX5p2xz9lQvPqprHkPeD03ehML3GhS/Btjv7 ceRv3vuI5OxIoGQ1zb/0tl+DSM1kamOGyP3CZBwg68avE+9oRLoPJPLy3goXbITE0tG0BAJNp8pXK +riR/a31q9iAzG/6XFAgKpzh76CbRlrFBQfD+x5AddKJ9NCnySNZgsLwA5zTThGKVce7rfJref6L6 zr1eYEKCkjO6Ne5/X2JkOwfqdiAeUmIZGcqWjGGSMbLH7e7VEMm+dlMzCu2cVbgzGntkC/bSZDbOs nlFmiLqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tbaJs-0000000GC7n-0NII; Sat, 25 Jan 2025 07:11:04 +0000 Received: from fhigh-b8-smtp.messagingengine.com ([202.12.124.159]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tbaEb-0000000GBhe-2wf3 for linux-arm-kernel@lists.infradead.org; Sat, 25 Jan 2025 07:05:39 +0000 Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfhigh.stl.internal (Postfix) with ESMTP id 0B4B125400D9; Sat, 25 Jan 2025 02:05:36 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Sat, 25 Jan 2025 02:05:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=testtoast.com; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1737788735; x= 1737875135; bh=1IoEO+9R8j8Un9cYoSvY/uysWqLsZR32aOL15xQ72n4=; b=H pkQMzUWRU0IbTI5uVW6Du8Ief0tRebl8KNXKyjp036hksrhAWQfgvuyDQShJEsqo LZEaeJNvx9XewjVe1/kqsIZGC+X0tK8ATuCoeTQjC4p3UvwF4418t23exld/A+Mk tiQO+/h9Qq2lZh91LlYV8q3hkiKYHtyAYEN3wFb5V7pN2n/8HHHA55HD+1M7p7Fm TNHJ3m04eNFiJRkMnRv2WFoFMWEZkzDUpOGIxZqbG/lnqOEYAL8lQRcrde2Af6g9 O5tkIdO6lbJ56KGrB5IY0RcBa+eoTVzUo8USsxKymhP4BfNG0R5f2LcWVG+FFNdL Q6MhDsiwHITV+I36c3hyQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1737788735; x=1737875135; bh=1 IoEO+9R8j8Un9cYoSvY/uysWqLsZR32aOL15xQ72n4=; b=kjwOkX5T+Xdcv5BN6 fahiMD6uSdJJdV1G80LTI6uUtbfGeQHGGtopJNXlDgO2bY/HpPYhu7Zsi+2Tt9B0 tzUutA5k0ixMV/G4qvHFqAEOM4co+vAcM1j3OF0woZtrJV5E15ZuRabmznklVBLE Sc6za2JkEFTvfzs/nzjHbXCpprMpWjl5CitKvR/N3GswwcslG36gDuWZmWqMrfNV hDndn/2WcqxyFpXa/3mmRLAZ6XOXnOFbg+pCIXVV+yXfi0MAB0DsW1RIueN+dkI9 IVSMcqi9zxMk1vQXIsvlBQp1qB1WOR4vGLyTigy3/AUHZvACdsUHyGl8hqTwL2Cr imDTQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejgedgieejhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddt necuhfhrohhmpefthigrnhcuhggrlhhklhhinhcuoehrhigrnhesthgvshhtthhorghsth drtghomheqnecuggftrfgrthhtvghrnhepffehieffgedtgfffjeetveegfeekleeileek veeuteffteetudffveegieeiheetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprhihrghnsehtvghsthhtohgrshhtrdgtohhmpdhnsggprhgt phhtthhopedufedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheplhhgihhrugifoh hougesghhmrghilhdrtghomhdprhgtphhtthhopegsrhhoohhnihgvsehkvghrnhgvlhdr ohhrghdprhgtphhtthhopehpvghrvgigsehpvghrvgigrdgtiidprhgtphhtthhopehtih ifrghisehsuhhsvgdrtghomhdprhgtphhtthhopeifvghnshestghsihgvrdhorhhgpdhr tghpthhtohepjhgvrhhnvghjrdhskhhrrggsvggtsehgmhgrihhlrdgtohhmpdhrtghpth htohepshgrmhhuvghlsehshhholhhlrghnugdrohhrghdprhgtphhtthhopehlihhnuhig qdhsohhunhgusehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugi dqrghrmhdqkhgvrhhnvghlsehlihhsthhsrdhinhhfrhgruggvrggurdhorhhg X-ME-Proxy: Feedback-ID: idc0145fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 25 Jan 2025 02:05:31 -0500 (EST) From: Ryan Walklin To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, Chris Morgan , Ryan Walklin Subject: [PATCH v2 3/5] ASoC: sun4i-codec: support hp-det-gpios property Date: Sat, 25 Jan 2025 20:00:13 +1300 Message-ID: <20250125070458.13822-4-ryan@testtoast.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250125070458.13822-1-ryan@testtoast.com> References: <20250125070458.13822-1-ryan@testtoast.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250124_230537_799187_34F15A77 X-CRM114-Status: GOOD ( 18.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 From: Chris Morgan Add support for GPIO headphone detection with the hp-det-gpios property. In order for this to properly disable the path upon removal of headphones, the output must be labelled Headphone which is a common sink in the driver. Describe a headphone jack and detection GPIO in the driver, check for a corresponding device tree node, and enable jack detection in a new machine init function if described. Signed-off-by: Chris Morgan Signed-off-by: Ryan Walklin --- Changelog v1..v2: - Whitespace fixes. - Remove vendor prefix from device tree string. --- sound/soc/sunxi/sun4i-codec.c | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index f24bbefeb3923..3701f56c72756 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -331,6 +332,7 @@ struct sun4i_codec { struct clk *clk_module; struct reset_control *rst; struct gpio_desc *gpio_pa; + struct gpio_desc *gpio_hp; /* ADC_FIFOC register is at different offset on different SoCs */ struct regmap_field *reg_adc_fifoc; @@ -1583,6 +1585,49 @@ static struct snd_soc_dai_driver dummy_cpu_dai = { .ops = &dummy_dai_ops, }; +static struct snd_soc_jack sun4i_headphone_jack; + +static struct snd_soc_jack_pin sun4i_headphone_jack_pins[] = { + { .pin = "Headphone", .mask = SND_JACK_HEADPHONE }, +}; + +static struct snd_soc_jack_gpio sun4i_headphone_jack_gpio = { + .name = "hp-det", + .report = SND_JACK_HEADPHONE, + .debounce_time = 150, +}; + +static int sun4i_codec_machine_init(struct snd_soc_pcm_runtime *rtd) +{ + struct snd_soc_card *card = rtd->card; + struct sun4i_codec *scodec = snd_soc_card_get_drvdata(card); + int ret; + + if (scodec->gpio_hp) { + ret = snd_soc_card_jack_new_pins(card, "Headphone Jack", + SND_JACK_HEADPHONE, + &sun4i_headphone_jack, + sun4i_headphone_jack_pins, + ARRAY_SIZE(sun4i_headphone_jack_pins)); + if (ret) { + dev_err(rtd->dev, + "Headphone jack creation failed: %d\n", ret); + return ret; + } + + sun4i_headphone_jack_gpio.desc = scodec->gpio_hp; + ret = snd_soc_jack_add_gpios(&sun4i_headphone_jack, 1, + &sun4i_headphone_jack_gpio); + + if (ret) { + dev_err(rtd->dev, "Headphone GPIO not added: %d\n", ret); + return ret; + } + } + + return 0; +} + static struct snd_soc_dai_link *sun4i_codec_create_link(struct device *dev, int *num_links) { @@ -1608,6 +1653,7 @@ static struct snd_soc_dai_link *sun4i_codec_create_link(struct device *dev, link->codecs->name = dev_name(dev); link->platforms->name = dev_name(dev); link->dai_fmt = SND_SOC_DAIFMT_I2S; + link->init = sun4i_codec_machine_init; *num_links = 1; @@ -2302,6 +2348,13 @@ static int sun4i_codec_probe(struct platform_device *pdev) return ret; } + scodec->gpio_hp = devm_gpiod_get_optional(&pdev->dev, "hp-det", GPIOD_IN); + if (IS_ERR(scodec->gpio_hp)) { + ret = PTR_ERR(scodec->gpio_hp); + dev_err_probe(&pdev->dev, ret, "Failed to get hp-det gpio\n"); + return ret; + } + /* reg_field setup */ scodec->reg_adc_fifoc = devm_regmap_field_alloc(&pdev->dev, scodec->regmap, From patchwork Sat Jan 25 07:00:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Walklin X-Patchwork-Id: 13950238 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 29D0FC02182 for ; Sat, 25 Jan 2025 07:12:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hLsGe+Pf+NJk0N+fJlpAq1eWp/8FyDIG5iZXZV2pPus=; b=YDC6xVUWXa8jdbc44s1jK4z1Hc tH2hw06VCVPrcTpo1lkmwUOs45U9uAEn6blqihOJ2OUWMPLyg3orq+HEDjTuVdGZM1tkXHLtGfrOG GxIO43zHwxY143OLW173MrW+COyCIvU4LlNNx/UnGe6lBN91RIdzs79DDnANfgcuRP1xlvlMPI6h/ WdcfbiTmaIpiWkFPSSmhUOPrBPrF0ztiVTIoQI73rC3uh0jRkd/nGZsTnGUClphAgsTHzfQs0KwaE AAj5HCfr7RtZ0n5duM1xQEqVaNDKMAlIFOZO1lVR+uGMmjkF5eyzd06BoV/PTCEY823O/hwefollw PFWU8iXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tbaL7-0000000GCDV-34Wm; Sat, 25 Jan 2025 07:12:21 +0000 Received: from fhigh-b8-smtp.messagingengine.com ([202.12.124.159]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tbaEf-0000000GBi4-3cRc for linux-arm-kernel@lists.infradead.org; Sat, 25 Jan 2025 07:05:43 +0000 Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.stl.internal (Postfix) with ESMTP id F214A2540109; Sat, 25 Jan 2025 02:05:40 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Sat, 25 Jan 2025 02:05:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=testtoast.com; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1737788740; x= 1737875140; bh=hLsGe+Pf+NJk0N+fJlpAq1eWp/8FyDIG5iZXZV2pPus=; b=r RdX4bN/DWi7OAgkNY45u0kt/vTzPnSMRElz3f/snNFzroo23T7QpXoDswna8W7v4 g1BIrX5ZqV0ylVMRQwoIJJ6PYzOYkG1y3cQ7bZZQ1ZW0qN9ZK6IKFMkDk+iEOpEd xOmPryn9S6PMH5YibDzvhUzT4H15AkwKqSE25+K2U3Ws7ZvkdSKypKWB3vYXknbb 4UP6FFhjiRGgBmJKEm+vA5CZ3A8FWuwY+2skIlZzZmb+/AdObxTXSz5WvO/ce59d aSFf816T4sfQ0CgIkDCQl5lqgO0RMKQD71+f0lzmI6etbrTaNbFANOzuSmDeKvKS R/Gc0TiCvLnvipZIzT4ag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1737788740; x=1737875140; bh=h LsGe+Pf+NJk0N+fJlpAq1eWp/8FyDIG5iZXZV2pPus=; b=h3IwaLEnIuyuv7C5Q U3LCLKrd5eRYdJDxjwL7wtS9FUfouzyCvXkyViD0cVPc2Jm0dAQYXGU5p5IsY7iO +4LGtKlug7F51wjVbluzxt2ONqeitZh21vOnEUmpHAIiAWpbGlHroDnhddQMwgwY 1NYpyFAYSlLX76XrDjoH3sxt3qXysKIeUnkTzSMGGj1l2Iq53lwLjSKBWaNnPUkn W/xi8vPcxJbCmBR5Y+OqoTMgi01gPzI9NtlfD/e+/OHVe+6eIQj1MACU8m/4hbt4 V0QytVuLoE2ARvqEBhUE2P8YLZw2lnXR8nJ++fMaPfk3lckSyqJRnMYoUkF1dT+J 5TdOA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejgedgieejhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddt necuhfhrohhmpefthigrnhcuhggrlhhklhhinhcuoehrhigrnhesthgvshhtthhorghsth drtghomheqnecuggftrfgrthhtvghrnhepffehieffgedtgfffjeetveegfeekleeileek veeuteffteetudffveegieeiheetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprhihrghnsehtvghsthhtohgrshhtrdgtohhmpdhnsggprhgt phhtthhopedufedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheplhhgihhrugifoh hougesghhmrghilhdrtghomhdprhgtphhtthhopegsrhhoohhnihgvsehkvghrnhgvlhdr ohhrghdprhgtphhtthhopehpvghrvgigsehpvghrvgigrdgtiidprhgtphhtthhopehtih ifrghisehsuhhsvgdrtghomhdprhgtphhtthhopeifvghnshestghsihgvrdhorhhgpdhr tghpthhtohepjhgvrhhnvghjrdhskhhrrggsvggtsehgmhgrihhlrdgtohhmpdhrtghpth htohepshgrmhhuvghlsehshhholhhlrghnugdrohhrghdprhgtphhtthhopehlihhnuhig qdhsohhunhgusehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugi dqrghrmhdqkhgvrhhnvghlsehlihhsthhsrdhinhhfrhgruggvrggurdhorhhg X-ME-Proxy: Feedback-ID: idc0145fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 25 Jan 2025 02:05:36 -0500 (EST) From: Ryan Walklin To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, Chris Morgan , Ryan Walklin Subject: [PATCH v2 4/5] arm64: dts: allwinner: h700: Add hp-det-gpios for Anbernic RG35XX Date: Sat, 25 Jan 2025 20:00:14 +1300 Message-ID: <20250125070458.13822-5-ryan@testtoast.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250125070458.13822-1-ryan@testtoast.com> References: <20250125070458.13822-1-ryan@testtoast.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250124_230541_957243_5D0031B2 X-CRM114-Status: GOOD ( 11.97 ) 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 From: Chris Morgan Add support for headphone insertion detection via GPIO for the RG35XX series, and add the corresponding routing to the codec node. Signed-off-by: Chris Morgan Signed-off-by: Ryan Walklin --- Changelog v1..v2: - Remove vendor prefix from GPIO description. - Whitespace fix --- .../boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts index 34c2bb4cc0474..0e3537505d293 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts @@ -232,8 +232,11 @@ panel_in_rgb: endpoint { }; &codec { - allwinner,audio-routing = "Line Out", "LINEOUT"; + /* Both speakers and headphone jack connected to 74HC4052D analog mux */ + allwinner,audio-routing = "Speaker", "LINEOUT", + "Headphone", "LINEOUT"; allwinner,pa-gpios = <&pio 8 5 GPIO_ACTIVE_HIGH>; // PI5 + hp-det-gpios = <&pio 8 3 GPIO_ACTIVE_HIGH>; // PI3 status = "okay"; }; From patchwork Sat Jan 25 07:00:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Walklin X-Patchwork-Id: 13950239 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 8FD9DC02182 for ; Sat, 25 Jan 2025 07:13:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=v+QB5oAaTd71HtR/hfa4+42MYQULAvj4CXOLQvU0AhE=; b=UA092wT+D1aidrBnKSWsPBJzWs 9lR2pkfIc717nc0EPwgDUbSyrp23+b7SieZcG4zmbuSzWcmKJZkaF/rVfq/PJdiT1SsDiGuGEiYCG +gx+2uzfX1vcZgOuEx2oclUlqkNTUxWoA2M7/vOg5Pda/7Mc2lmEz7LIMwUGV+H0Bb5GI6sNbzBfz lfYu4YblMMoaLB9aeWt83h3q+1VAwrswkvKjVMgElWPSScLXANP5/+eFWNrYt5+P7GcH3XPQM/93a DMBz+XB7MM0GBbfW7KltLj/frjzpd4mbigVpOh2xH2F83ELGg/nyE8asJdZPqFEh7npimhexyDD9X rMasw6WA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tbaMO-0000000GCIS-1ZQy; Sat, 25 Jan 2025 07:13:40 +0000 Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tbaEk-0000000GBj4-2GRh for linux-arm-kernel@lists.infradead.org; Sat, 25 Jan 2025 07:05:48 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id 9E6D81140114; Sat, 25 Jan 2025 02:05:45 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Sat, 25 Jan 2025 02:05:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=testtoast.com; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1737788745; x= 1737875145; bh=v+QB5oAaTd71HtR/hfa4+42MYQULAvj4CXOLQvU0AhE=; b=p 4Q7DEp2m0ci9sGnZcssfEytvThRtk7s/9Wndjl2zS2IfDZUwAmresYORUn3jUdyl +g3ZmI8JsFtUaOBdBxbJjw4YOdGHw7aNZLGf4hB5jvfHgKzM6Fix9s17esxQfzHZ 9p7Wa+8+ITkqSXe9Bfo0uubMM0lAqhN+vWNZxqBeSZdRYTqH9BjRP2wlzc9gvxJ1 tavVFSS7FciLiLZRXW3zQjlr1XEpu+QZN7F9hHR5CMoOzrQivdxaVcZejJsU7R2P zg1Qr8TmasbpYR2N73sUJ131uJaI/hxZAfGro0cLR5ohicdtP2pasRfjwKt4TXxX dRlX26hb002t3de+u53Hw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1737788745; x=1737875145; bh=v +QB5oAaTd71HtR/hfa4+42MYQULAvj4CXOLQvU0AhE=; b=p0hWQ6m1elopHi6Z1 yxmwExmG0ou4W+seSd96PE4IgmnyBPOrVa9oW4OIMd+85Sd+34FNWWDfGfIXNRaj 4q9OwFF4CslTo6YJ2obc5K6QYWVcKJ7C4GtoxIK/ycMLS1rmXEF21Y033tjZTF0C WCydRH6+Zp4lPJNDNzzEel2ME+zoObBT8FDiYt5+UWGKdLi7zVPZOSA0qP5KEyHo bAtCqCwf5cVMZkDhifcnoElSw5c6kSPvhK9qE+pXp3VWJHjTdv47FAs+sVGUCt4F HsOQbywq1yIC7vz+mPWoJ+3K6J9K/3G1gc4DRqG15tC8nbGUtsVSufOZhzqo9tyj oREjg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejgedgieejhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddt necuhfhrohhmpefthigrnhcuhggrlhhklhhinhcuoehrhigrnhesthgvshhtthhorghsth drtghomheqnecuggftrfgrthhtvghrnhepjeevhedtjeeuvdeiteelgeehjeegieeuveev ffetffdvudevfefhudejiedvgfdunecuffhomhgrihhnpehgihhthhhusgdrtghomhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrhigrnhes thgvshhtthhorghsthdrtghomhdpnhgspghrtghpthhtohepudefpdhmohguvgepshhmth hpohhuthdprhgtphhtthhopehlghhirhgufihoohgusehgmhgrihhlrdgtohhmpdhrtghp thhtohepsghrohhonhhivgeskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepphgvrhgvgi esphgvrhgvgidrtgiipdhrtghpthhtohepthhifigrihesshhushgvrdgtohhmpdhrtghp thhtohepfigvnhhssegtshhivgdrohhrghdprhgtphhtthhopehjvghrnhgvjhdrshhkrh grsggvtgesghhmrghilhdrtghomhdprhgtphhtthhopehsrghmuhgvlhesshhhohhllhgr nhgurdhorhhgpdhrtghpthhtoheplhhinhhugidqshhouhhnugesvhhgvghrrdhkvghrnh gvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdgrrhhmqdhkvghrnhgvlheslhhishht shdrihhnfhhrrgguvggrugdrohhrgh X-ME-Proxy: Feedback-ID: idc0145fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 25 Jan 2025 02:05:41 -0500 (EST) From: Ryan Walklin To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, Chris Morgan , Ryan Walklin Subject: [PATCH v2 5/5] ASoC: sun4i-codec: change h616 card name Date: Sat, 25 Jan 2025 20:00:15 +1300 Message-ID: <20250125070458.13822-6-ryan@testtoast.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250125070458.13822-1-ryan@testtoast.com> References: <20250125070458.13822-1-ryan@testtoast.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250124_230546_634957_62DECE18 X-CRM114-Status: GOOD ( 10.53 ) 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 Adding jack detection requires sound servers to act on the emitted events, which are described by ALSA Use Case Manager configurations in userspace. These configurations include the card name in the file path, so alter the card name for the H616 to remove spaces, making UCM referencing easier. Add a long_name to maintain consistency with the other drivers. The corresponding ALSA UCM patch is here: https://github.com/alsa-project/alsa-ucm-conf/pull/491 Signed-off-by: Ryan Walklin --- Changelog v1..v2: - Separate patch for card->long_name - Note UCM patch link --- sound/soc/sunxi/sun4i-codec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 3701f56c72756..68e2d82228a0b 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -2012,7 +2012,8 @@ static struct snd_soc_card *sun50i_h616_codec_create_card(struct device *dev) card->dev = dev; card->owner = THIS_MODULE; - card->name = "H616 Audio Codec"; + card->name = "h616-audio-codec"; + card->long_name = "H616 Audio Codec"; card->driver_name = "sun4i-codec"; card->controls = sun50i_h616_card_controls; card->num_controls = ARRAY_SIZE(sun50i_h616_card_controls);