From patchwork Fri Feb 14 22:02:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Walklin X-Patchwork-Id: 13975664 Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) (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 5DB6F1DC9AC; Fri, 14 Feb 2025 22:03:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739570590; cv=none; b=VCG9FPzcVpNykIJQDiPtm8fVphkrfXMVk5ck/IXcSUK9Q6JsCQkHGX8NvBohgvZpZEjqk2PV2XVuEVzniuvGEDG7XRz7GPociK7QK0sOLNUvDKbZ+FWrU1+2mXmbpHyex8VNYDvMgpcc/CUUZ5aLMCRMLTDvuPjcaKC9/n84iQc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739570590; c=relaxed/simple; bh=4ffj4HC4tu/PHI7cgsOXXER//acU6AvxNr0GPZrr5iw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ACmEsfb09N7ijKoPsE2PZK6kOqJ2SAi1Zxvce9itbSnku9sxqsy5keXKpXKg7cvoy7SRUNfMVWoTpwhqVWE5zaQAf+EHFkSu1R0Npt8DcZxwWfK3l5BsiipFqAZt3C8iBKwMI3ooTOLLP2ByvcnNNAbv0UIm3bYNNyh6StmMJfg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=testtoast.com; spf=pass smtp.mailfrom=testtoast.com; dkim=pass (2048-bit key) header.d=testtoast.com header.i=@testtoast.com header.b=sH28oRQD; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=rlPDzohn; arc=none smtp.client-ip=202.12.124.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=testtoast.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=testtoast.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=testtoast.com header.i=@testtoast.com header.b="sH28oRQD"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="rlPDzohn" Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfhigh.stl.internal (Postfix) with ESMTP id 30B04254016F; Fri, 14 Feb 2025 17:03:07 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Fri, 14 Feb 2025 17:03:07 -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=1739570587; x= 1739656987; bh=uCaiF0dqbp4bwhlBinjrBKomV700hQl+mu+AYigkmoo=; b=s H28oRQD6s1zNuVS12lanjr9OjwABjGom6Klmh7VlRguzl3zedexO7k296u0fYrtg 2JUHlICGJJ5mZKqmcrjdiaukDaSc85zYmeMrHcifhhoRSMV0PzQiEvRUaMZ8bk6i 9itS7TOaqSwQDZpldO3Qrta9ypDl/pCpK155SF9EDjR7ilW+86rrO5BPWurBd10D y9/N82okwwyH4iPuLgemrzy+L8nyGP5LSrAv7IVEq42kgqtQEIR4mtnK/MNLvon4 lTsa1hSf62EdSMZtgLjOtQs4UgoUkgMT41ZyU9jyeN7Cc/Bu89ETwxoYj/fpR+Rb 6LAqGe4Yxb2AnhYb/x+ew== 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=1739570587; x=1739656987; bh=u CaiF0dqbp4bwhlBinjrBKomV700hQl+mu+AYigkmoo=; b=rlPDzohnzWFPy+6Ky uMltyrq1QtSGMf2HOWKsajsj6W4RCj4ZujkOIaxJUYkJ9tuDd2jXJ6qSiBMlyUvB nZHmxvd7H8y+oOgakimd2skx4WM4JdtS+hr3uXpaszSWjRMt+x5Sz+goGzmDA/wJ gBz9UtKgjRm2ayPiqCjuI3OkqA58sjxbN6wfv+F9u1Kwr0pXFyLKvtIF2OqdZXXO ftAnIlrYznYFOnA39HBaGds/7hyxrKuYiqXuyM76akBYkAb5sjSRqIi3qvUlveXb wTA/TOPZg0GU1a1SOB1jzhCnot34Fx0zkAf2mfymxBiquuTRbrD6/tl7d2wVtxW2 0A5sg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdehtdektdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddt necuhfhrohhmpefthigrnhcuhggrlhhklhhinhcuoehrhigrnhesthgvshhtthhorghsth drtghomheqnecuggftrfgrthhtvghrnhepffehieffgedtgfffjeetveegfeekleeileek veeuteffteetudffveegieeiheetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprhihrghnsehtvghsthhtohgrshhtrdgtohhmpdhnsggprhgt phhtthhopeduhedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheplhhgihhrugifoh hougesghhmrghilhdrtghomhdprhgtphhtthhopegsrhhoohhnihgvsehkvghrnhgvlhdr ohhrghdprhgtphhtthhopehpvghrvgigsehpvghrvgigrdgtiidprhgtphhtthhopehtih ifrghisehsuhhsvgdrtghomhdprhgtphhtthhopeifvghnshestghsihgvrdhorhhgpdhr tghpthhtohepjhgvrhhnvghjrdhskhhrrggsvggtsehgmhgrihhlrdgtohhmpdhrtghpth htohepshgrmhhuvghlsehshhholhhlrghnugdrohhrghdprhgtphhtthhopehlihhnuhig qdhsohhunhgusehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugi dqrghrmhdqkhgvrhhnvghlsehlihhsthhsrdhinhhfrhgruggvrggurdhorhhg X-ME-Proxy: Feedback-ID: idc0145fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 14 Feb 2025 17:03:02 -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 , Rob Herring , Philippe Simons , Ryan Walklin Subject: [PATCH v3 1/5] ASoC: dt-bindings: sun4i-a10-codec: add hp-det-gpios Date: Sat, 15 Feb 2025 11:02:23 +1300 Message-ID: <20250214220247.10810-2-ryan@testtoast.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250214220247.10810-1-ryan@testtoast.com> References: <20250214220247.10810-1-ryan@testtoast.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chris Morgan Devices integrating Allwinner SoCs may use line-out or headphone jacks with jack detection circuits attached to a GPIO. Support defining these in DTs. A number of Anbernic devices featuring the H700 SoC use this mechanism to switch between a headphone jack and an internal speaker, so add these to the allowed routing items. 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 Changelog v2..v3: - Add Reviewed-by tag --- .../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 Fri Feb 14 22:02:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Walklin X-Patchwork-Id: 13975665 Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) (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 593DF1FC0EF; Fri, 14 Feb 2025 22:03:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739570596; cv=none; b=Gy2gzfuS+EUKCKJrZ854Z3IS0z2BQWMFVwM7imzNp2uWQYnBX3pBZODA3FsaBT4VhfgPv7FImYv9FrbyF1Y6bMclaMmBMzoFG/BeopdTZgAGjC6L8VZd5110Jvwh61J49QLSDdYXq/rou4V0+eem5H6zOdm01XXET1EXlMu1uBY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739570596; c=relaxed/simple; bh=HXrBrgZ0i+5VU91GpVY/rEeGxIvZenjl9fAtj8inY8I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m225nrTwQ5BdbwIHG6npLOKs1NHbRl++Zhgyn/1hqEnqgoziBmlfGvW4yGG2ryX7ZyCFaVY9RW1qV4n52NVCNyCnRFYgMxHgHGQS5kwaLCMPv3JOCITful9ieka6CCGAndDckHTYQR6XRYs3XstohFgFQhBCR8yjjpsT8fJJQmg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=testtoast.com; spf=pass smtp.mailfrom=testtoast.com; dkim=pass (2048-bit key) header.d=testtoast.com header.i=@testtoast.com header.b=c886sJFT; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=G6E8P8L5; arc=none smtp.client-ip=202.12.124.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=testtoast.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=testtoast.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=testtoast.com header.i=@testtoast.com header.b="c886sJFT"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="G6E8P8L5" Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id 1E3C9254016F; Fri, 14 Feb 2025 17:03:13 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Fri, 14 Feb 2025 17:03:13 -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=1739570592; x= 1739656992; bh=2qPwN79Uv5GTOoN5qb6sqVr1UhzN0N8IbfXzXbZmDIA=; b=c 886sJFT/RjaBVsHLukqf80E+EOUHuPCaZlscq5oC15FNYxMFckdHZoaR6YWjC7AE dKp/6gbygQLQFYFj44kdgPjZ0DpI5IAj3Rl6A49fvc2YaXlXYQV3glY1s8AkTqVt 5FILu2dT4m1hW51o1CFXYsOXVRTdehGD+v86V1W/HHwq87ycJ1A08ZMTcn2Gv+zI XX1DO+u3p/N+5omVhMaVsgp4p6XsrSY5EHWu4AfE9fXsnWJbPFk6467U1lQX2QGG L352DuNwSEMjbbuGlXCbW2or63NWtMkg3MqYRy+C4/qNpIWsqj5MESHgpozPT/ab WlwSuiM9Uer5NttycYL+A== 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=1739570592; x=1739656992; bh=2 qPwN79Uv5GTOoN5qb6sqVr1UhzN0N8IbfXzXbZmDIA=; b=G6E8P8L5upXF33CVQ eGKvVP/YRRB99+Q+6hQZUAtm9Rzp+RaNSQidTHce4HlCmRY/fwEXqFznSr5H/5fu hsUVwn90Vunr0BGQq0RhRSImQaRh1wxD8kPE3992t2VrU6oHzqGAWUYU+EN5TYe3 55IPZx89ZqjTV0skchdu5z7EgADsT5pvjdr/94BzBVdagfF8pwlY7I7OuGWQc8T8 keDNQrn41icPlIbCHl1pD6Xy7nmw7iz7mXgK0IvoyJ6pLpKhfP37w44yZoWmQkpw ovOX/0M4p92DUsOaTQd9wG2JplLLmacVjNP8yfJ0IOVVKgmIS3QYW7UJuRREC3Bo lwQpA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdehtdektdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddt necuhfhrohhmpefthigrnhcuhggrlhhklhhinhcuoehrhigrnhesthgvshhtthhorghsth drtghomheqnecuggftrfgrthhtvghrnhepffehieffgedtgfffjeetveegfeekleeileek veeuteffteetudffveegieeiheetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprhihrghnsehtvghsthhtohgrshhtrdgtohhmpdhnsggprhgt phhtthhopeduhedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheplhhgihhrugifoh hougesghhmrghilhdrtghomhdprhgtphhtthhopegsrhhoohhnihgvsehkvghrnhgvlhdr ohhrghdprhgtphhtthhopehpvghrvgigsehpvghrvgigrdgtiidprhgtphhtthhopehtih ifrghisehsuhhsvgdrtghomhdprhgtphhtthhopeifvghnshestghsihgvrdhorhhgpdhr tghpthhtohepjhgvrhhnvghjrdhskhhrrggsvggtsehgmhgrihhlrdgtohhmpdhrtghpth htohepshgrmhhuvghlsehshhholhhlrghnugdrohhrghdprhgtphhtthhopehlihhnuhig qdhsohhunhgusehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugi dqrghrmhdqkhgvrhhnvghlsehlihhsthhsrdhinhhfrhgruggvrggurdhorhhg X-ME-Proxy: Feedback-ID: idc0145fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 14 Feb 2025 17:03:07 -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 , Rob Herring , Philippe Simons , Ryan Walklin Subject: [PATCH v3 2/5] ASoC: sun4i-codec: correct dapm widgets and controls for h616 Date: Sat, 15 Feb 2025 11:02:24 +1300 Message-ID: <20250214220247.10810-3-ryan@testtoast.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250214220247.10810-1-ryan@testtoast.com> References: <20250214220247.10810-1-ryan@testtoast.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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. 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 --- 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 Fri Feb 14 22:02:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Walklin X-Patchwork-Id: 13975666 Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) (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 D623B1DE2A9; Fri, 14 Feb 2025 22:03:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739570601; cv=none; b=Hm1vWCWhO/Nl8GajSKE5jCSNrDr9d7Q+zDhzgcE4k9HD/+t6AJcrzAnt0Mzai/y6qDvRf3L9ZUlwtiz2OOHN9j8bsAkr3P76XxZWpwc3eeZmapQpKPjreM5Cji7V6jhMRwb3y38U4xUQGpvy6yV/Y20WEn4xRjsOxervIS5VERo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739570601; c=relaxed/simple; bh=o4fmsSDO4lcy6w6rzyg4ehsS7WRcrQRpQBhuCvu8GGY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aJcBfvWVKenGs0oJ5QTlB7wbE91IVQGb3mbceNS3CRnZoOLkM4V0Ex9JyE5MKfSGrekvN4OL6zRjWsuwgvHuSn7MUmlqpc3NYA1YZcH62sn8c6ZUytmwmrtYNXZgAwflEO//uITQF62AmYHKPu2B3aMJ+Sz6fYLySFH6x+PkJ0Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=testtoast.com; spf=pass smtp.mailfrom=testtoast.com; dkim=pass (2048-bit key) header.d=testtoast.com header.i=@testtoast.com header.b=A07uP8uR; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=O68Ivs0s; arc=none smtp.client-ip=202.12.124.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=testtoast.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=testtoast.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=testtoast.com header.i=@testtoast.com header.b="A07uP8uR"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="O68Ivs0s" Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id A531D2540160; Fri, 14 Feb 2025 17:03:18 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Fri, 14 Feb 2025 17:03:19 -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=1739570598; x= 1739656998; bh=yQTl2yWBxu//zbP5sWSZfsZGIV4BkU9peMdt+WBASkE=; b=A 07uP8uRFfo/ZmZ1tqW2W+6UpvSREqOJDLX5jBILeQBP5UlJrz+RfbuBrLqYf41ww bR7Irqlb4HVXMV+ZKp349SognNu9W3dIZT8n2x4vtsVmR4e7ZSgZ4ZgMI170wBUb VjcNhCwPjyo8DuD2VH06c/9yBnuu7rNqf2+CkJXE3Ewu8KhH8Q1t2FU3nQESqDUu QTjXoNsN8RfKCtbgBNSSvjFmeb2CJgsxe3ahMlj9U1MFkz24pDaTC9JWMM3XcWH0 4AVTRhPQ8DUbBLh7/Gy93yOu1EJTC9OzRoohUHZb3P+1wvZs1BOYFahcszyCgyCU qwG2sHxr14r1goSy7D2pQ== 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=1739570598; x=1739656998; bh=y QTl2yWBxu//zbP5sWSZfsZGIV4BkU9peMdt+WBASkE=; b=O68Ivs0sRRGjv1io4 r+dpnT769VZRxjQ1UFjWwArNTGkcUctQNy7wqfraeqW+bNaFaRI7EakbZgx+Lhly Q/KL+T+ldftfWsjzIFA/PkLEPXs8GPmOCscTT1lpPu914H6jSuxvQCnkb9C987ww 2ratELoRpRsqr/o3uaBF7i1RPMQstMcU9rvvq8qgXoK/RDk4gMSpMghUGbbTR60U /H2akzErkI1FlGT0CiMkUP+6KM/E20daa6Uw0+c3c7fLnU7jHG+mJ4jB7O3LsPGr uTvj72B7nG53hfIbiJmosIuVrdjcTZUU9+7mNDSHQbB1d+hMmKjL3t5ZcpZEQHkW oaOzw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdehtdektdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddt necuhfhrohhmpefthigrnhcuhggrlhhklhhinhcuoehrhigrnhesthgvshhtthhorghsth drtghomheqnecuggftrfgrthhtvghrnhepffehieffgedtgfffjeetveegfeekleeileek veeuteffteetudffveegieeiheetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprhihrghnsehtvghsthhtohgrshhtrdgtohhmpdhnsggprhgt phhtthhopeduhedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheplhhgihhrugifoh hougesghhmrghilhdrtghomhdprhgtphhtthhopegsrhhoohhnihgvsehkvghrnhgvlhdr ohhrghdprhgtphhtthhopehpvghrvgigsehpvghrvgigrdgtiidprhgtphhtthhopehtih ifrghisehsuhhsvgdrtghomhdprhgtphhtthhopeifvghnshestghsihgvrdhorhhgpdhr tghpthhtohepjhgvrhhnvghjrdhskhhrrggsvggtsehgmhgrihhlrdgtohhmpdhrtghpth htohepshgrmhhuvghlsehshhholhhlrghnugdrohhrghdprhgtphhtthhopehlihhnuhig qdhsohhunhgusehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugi dqrghrmhdqkhgvrhhnvghlsehlihhsthhsrdhinhhfrhgruggvrggurdhorhhg X-ME-Proxy: Feedback-ID: idc0145fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 14 Feb 2025 17:03:13 -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 , Rob Herring , Philippe Simons , Ryan Walklin Subject: [PATCH v3 3/5] ASoC: sun4i-codec: support hp-det-gpios property Date: Sat, 15 Feb 2025 11:02:25 +1300 Message-ID: <20250214220247.10810-4-ryan@testtoast.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250214220247.10810-1-ryan@testtoast.com> References: <20250214220247.10810-1-ryan@testtoast.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: - Separate DAPM changes into separate patch and add rationale. --- 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 Fri Feb 14 22:02:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Walklin X-Patchwork-Id: 13975667 Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) (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 4F99B1F5413; Fri, 14 Feb 2025 22:03:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739570606; cv=none; b=fO+lNz9N55zdJuk2GcuI1yxf5cctd5Y/lmZNc3MfYXGcaAlynBPTWFIdK0H4fBblKy38GeXtGt/+QR2GzlqxSrW0WHJqdx1tCFzUIIF0I8+pk9ALKoqpANpjC94zkDYooIYOUFt54lL/uvZ1JgkzKQNiGMZ1hYKl1YeScxVm13o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739570606; c=relaxed/simple; bh=hMNSrAQZw5JT8eDQy3bSzHsPzON3V5WqUMY8R0Dx0TM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ussv2wG1no1Q9U5CThkmCr0V8tb2Z6dlRWD92wfWo/5P9q3CYO6wl8DOgbMxh7gOBVvVoHWxfKcQJ+5BIDSVTgCXYv37PdIjUIK+7Ob3p1LW5udEEphP2sc5xyhYmcXQQKaMaAQ8vXx5F1A+uPiZvs4rT242u/u0hydnVhB4KBA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=testtoast.com; spf=pass smtp.mailfrom=testtoast.com; dkim=pass (2048-bit key) header.d=testtoast.com header.i=@testtoast.com header.b=q5LayLcQ; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=oFoUqNNb; arc=none smtp.client-ip=202.12.124.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=testtoast.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=testtoast.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=testtoast.com header.i=@testtoast.com header.b="q5LayLcQ"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="oFoUqNNb" Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfhigh.stl.internal (Postfix) with ESMTP id 210CE2540160; Fri, 14 Feb 2025 17:03:24 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Fri, 14 Feb 2025 17:03:24 -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=1739570603; x= 1739657003; bh=PjC5DK6n9nLBAmpsaRuvFi1ggdVIu+83ktUYSLFQX1o=; b=q 5LayLcQWqxxpzDzMFRmJPbIk6QfntwKo/FbTbHNkkzkRvAs++EL5f/zQCqPMDwTY crZ5UFAqywyk9I1Aqg+obAfJewNVvN285SvAX53BC+f5EyXRTsomUGkm29ql++OF aHC12J82wxhlWLkTDVvv0YkWIAVHWdljsRYIccwro2xGXdhkdC24rVJhx+WhQFmC 31J8mY9QUZHtllb+E45dwpqlSoEaaJTL1vtPUivqAxRce6K6hcKWa8zJgahZh7Pv mSnM0gr6IzA0mk0MxH6kLbkO6mjNWhob5eiaqjmXf/nPh6cyQaAaLqbEggBAXiPm boFkaG5YQylLknpMS4Iqg== 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=1739570603; x=1739657003; bh=P jC5DK6n9nLBAmpsaRuvFi1ggdVIu+83ktUYSLFQX1o=; b=oFoUqNNbWjnuvB4eu HlUpXR04VMD8P05MXIy5n4hMUoSwLwM8qEl7ZaiGRxFmACc68SeSnIINGLJIBJEK qm8xDK7Gq94038ge2i0UuiDxrJuw1IHN5dzv+VTJpywSu4sOWj7GngqIipvrj42h zRMHxEnWEAvS9t1YtwwQXHawgGGFzus7wxt9AUwweQrbJDKssODTxeIUUeeSOv4C IhMk+n6jV9I098Fx0m1HAKSKQs6MC/eMihgdmZivtEuPVHjSqAN4Qo3poabYhQ4A 1wu6NjOP5Gt1+UYe0iKpvTLXPeS176ntWL063rIY/J+ToFriSB8Y1FjO23JKf1kF WS4rA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdehtdektdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddt necuhfhrohhmpefthigrnhcuhggrlhhklhhinhcuoehrhigrnhesthgvshhtthhorghsth drtghomheqnecuggftrfgrthhtvghrnhepffehieffgedtgfffjeetveegfeekleeileek veeuteffteetudffveegieeiheetnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrg hmpehmrghilhhfrhhomheprhihrghnsehtvghsthhtohgrshhtrdgtohhmpdhnsggprhgt phhtthhopeduhedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheplhhgihhrugifoh hougesghhmrghilhdrtghomhdprhgtphhtthhopegsrhhoohhnihgvsehkvghrnhgvlhdr ohhrghdprhgtphhtthhopehpvghrvgigsehpvghrvgigrdgtiidprhgtphhtthhopehtih ifrghisehsuhhsvgdrtghomhdprhgtphhtthhopeifvghnshestghsihgvrdhorhhgpdhr tghpthhtohepjhgvrhhnvghjrdhskhhrrggsvggtsehgmhgrihhlrdgtohhmpdhrtghpth htohepshgrmhhuvghlsehshhholhhlrghnugdrohhrghdprhgtphhtthhopehlihhnuhig qdhsohhunhgusehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugi dqrghrmhdqkhgvrhhnvghlsehlihhsthhsrdhinhhfrhgruggvrggurdhorhhg X-ME-Proxy: Feedback-ID: idc0145fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 14 Feb 2025 17:03:19 -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 , Rob Herring , Philippe Simons , Ryan Walklin Subject: [PATCH v3 4/5] arm64: dts: allwinner: h700: Add hp-det-gpios for Anbernic RG35XX Date: Sat, 15 Feb 2025 11:02:26 +1300 Message-ID: <20250214220247.10810-5-ryan@testtoast.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250214220247.10810-1-ryan@testtoast.com> References: <20250214220247.10810-1-ryan@testtoast.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Tested-by: Philippe Simons --- Changelog v1..v2: - Remove vendor prefix from GPIO description. - Whitespace fix Changelog v2..v3: - Add Tested-by tag --- .../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 a231abf1684ad..b482fdf1fdba8 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 @@ -178,8 +178,11 @@ reg_vcc5v: regulator-vcc5v { /* USB-C power input */ }; &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 Fri Feb 14 22:02:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Walklin X-Patchwork-Id: 13975668 Received: from fout-b8-smtp.messagingengine.com (fout-b8-smtp.messagingengine.com [202.12.124.151]) (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 CDBAD1DC198; Fri, 14 Feb 2025 22:03:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.151 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739570613; cv=none; b=phuLvYSAdHc319beo/p7N+c0zcLXWnMngQAiGf389qBAGkDXSjX57253FKM9/HL/KPEpm58KIUp908ag98emxnAaYBG/qBrownTApejo10/9abPL/XsDCjb8hbfi7/YZlcomRpXv0+T4B4gkvJaUiejWSIfS+APe5a+deb/uAUQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739570613; c=relaxed/simple; bh=C1pSc+Q88lWwv8lyzUEZsi+O8dQyzz/w4NmzIChw0I4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XsMk8lpgd6aXfuMuOElKYWpwpgUxXJBvjLlQ0062nOFmHzJVRIe7tCUfWDDPLl0AzGAgg9YkaR6bR/A+2gVJlmZL0OrAlC/mSzWNxSp7jyPMOj2lov7w8Xniis+8SDKnfNMqSDsLHUM/aiBzYDgu/2y1b49Zc+tPv/XPZtrnHZ8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=testtoast.com; spf=pass smtp.mailfrom=testtoast.com; dkim=pass (2048-bit key) header.d=testtoast.com header.i=@testtoast.com header.b=Ebm2AD8T; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=qk9WjaBg; arc=none smtp.client-ip=202.12.124.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=testtoast.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=testtoast.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=testtoast.com header.i=@testtoast.com header.b="Ebm2AD8T"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="qk9WjaBg" Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id BD7AD11400E1; Fri, 14 Feb 2025 17:03:29 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Fri, 14 Feb 2025 17:03:30 -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=1739570609; x= 1739657009; bh=gTke6NecdvaDv8ZvNHp8Udw6/L8ag3GpaDjR8TobllU=; b=E bm2AD8TMqXNNsfgC2vUjpOf2c5IJ4IFSFrvzCqYSGdA6o86oFkLDAeV9f0lE01wR rQEkZ2zuo1D4bM1oN79/kqd4L9j3e+5I/0IXpHNKCDCTrF6w0rAGpEibA9Eo3HR4 wmFzPRJlIWiNgroFrnR6Oqhtzt2xw+dJwMrxbozdr8F4JoK5xHzsBQPPkuY+OClm F7NouZDzY4cg4+LiMZIvWT9QaUkvva5mP3TGL3VIN9dCbn30eBSxJm+jsIxxRf87 7/w0V2YSP4pzvStDauhdOXiHD39Qt149H7vpjpJ+1gUgxM3BB44bTZ7GxJ4RqHXf OkK5qpaoByDCD34NXNmqQ== 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=1739570609; x=1739657009; bh=g Tke6NecdvaDv8ZvNHp8Udw6/L8ag3GpaDjR8TobllU=; b=qk9WjaBgPkQweCi9l bljhlilpSmnnKxuGgXp61UxqYVTtu1wuhRvLuALCAuZBkhUCKiyZ9eLQUkHoWFLd 3+6DUMXu5LuJAXAzNuTsYW/uiqe/PeXCq8XJOGVr8C/cbati1WnvU0BlxWzaN7Lk 3bofUSa1mcYHioRjDkCS13b0WLW0KBLJUCy9yJ0yh/64GFSz9o6OX2ypS2JNviu3 kK0pvmuFFOGitb7to6CX2pQiMTgd8VbU87QhaEQGLb/Fz7EVOPUqQZQRzeMmeb3j SmmuDocGi0LksOkxtQL+4oGkq8my7ChndpeOWb8h/io61xOIOqX3bKXJELaEEv/7 0OhyQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdehtdektdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddt necuhfhrohhmpefthigrnhcuhggrlhhklhhinhcuoehrhigrnhesthgvshhtthhorghsth drtghomheqnecuggftrfgrthhtvghrnhepjeevhedtjeeuvdeiteelgeehjeegieeuveev ffetffdvudevfefhudejiedvgfdunecuffhomhgrihhnpehgihhthhhusgdrtghomhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrhigrnhes thgvshhtthhorghsthdrtghomhdpnhgspghrtghpthhtohepudehpdhmohguvgepshhmth hpohhuthdprhgtphhtthhopehlghhirhgufihoohgusehgmhgrihhlrdgtohhmpdhrtghp thhtohepsghrohhonhhivgeskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepphgvrhgvgi esphgvrhgvgidrtgiipdhrtghpthhtohepthhifigrihesshhushgvrdgtohhmpdhrtghp thhtohepfigvnhhssegtshhivgdrohhrghdprhgtphhtthhopehjvghrnhgvjhdrshhkrh grsggvtgesghhmrghilhdrtghomhdprhgtphhtthhopehsrghmuhgvlhesshhhohhllhgr nhgurdhorhhgpdhrtghpthhtoheplhhinhhugidqshhouhhnugesvhhgvghrrdhkvghrnh gvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdgrrhhmqdhkvghrnhgvlheslhhishht shdrihhnfhhrrgguvggrugdrohhrgh X-ME-Proxy: Feedback-ID: idc0145fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 14 Feb 2025 17:03:24 -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 , Rob Herring , Philippe Simons , Ryan Walklin Subject: [PATCH v3 5/5] ASoC: sun4i-codec: add h616 card long_name Date: Sat, 15 Feb 2025 11:02:27 +1300 Message-ID: <20250214220247.10810-6-ryan@testtoast.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250214220247.10810-1-ryan@testtoast.com> References: <20250214220247.10810-1-ryan@testtoast.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 long card name in the file path (falling back to card->name if this is not present), so add a long card name for the H616 without spaces, making UCM referencing easier. The corresponding ALSA UCM patch is here (now merged): 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 Changelog v2..v3: - Add card->long_name rather than change existing card->name --- sound/soc/sunxi/sun4i-codec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 3701f56c72756..93733ff2e32a0 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -2013,6 +2013,7 @@ 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->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);