From: Ryan Walklin <ryan@testtoast.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>
Cc: linux-sound@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org,
Chris Morgan <macromorgan@hotmail.com>,
Ryan Walklin <ryan@testtoast.com>
Subject: [PATCH v2 2/5] ASoC: sun4i-codec: correct dapm widgets and controls for h616
Date: Sat, 25 Jan 2025 20:00:12 +1300 [thread overview]
Message-ID: <20250125070458.13822-3-ryan@testtoast.com> (raw)
In-Reply-To: <20250125070458.13822-1-ryan@testtoast.com>
From: Chris Morgan <macromorgan@hotmail.com>
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 <macromorgan@hotmail.com>
Signed-off-by: Ryan Walklin <ryan@testtoast.com>
--
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),
};
--
2.48.1
next prev parent reply other threads:[~2025-01-25 7:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-25 7:00 [PATCH v2 0/5] ASoC: sun4i-codec: add headphone dectection for Anbernic RG35XX devices Ryan Walklin
2025-01-25 7:00 ` [PATCH v2 1/5] ASoC: dt-bindings: sun4i-a10-codec: add hp-det-gpios Ryan Walklin
2025-01-27 19:12 ` Rob Herring (Arm)
2025-01-25 7:00 ` Ryan Walklin [this message]
2025-01-25 7:00 ` [PATCH v2 3/5] ASoC: sun4i-codec: support hp-det-gpios property Ryan Walklin
2025-01-25 7:00 ` [PATCH v2 4/5] arm64: dts: allwinner: h700: Add hp-det-gpios for Anbernic RG35XX Ryan Walklin
2025-01-25 7:00 ` [PATCH v2 5/5] ASoC: sun4i-codec: change h616 card name Ryan Walklin
2025-01-26 7:51 ` Icenowy Zheng
2025-01-28 1:10 ` Ryan Walklin
2025-02-14 20:52 ` Ryan Walklin
2025-02-11 21:05 ` [PATCH v2 0/5] ASoC: sun4i-codec: add headphone dectection for Anbernic RG35XX devices Philippe Simons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250125070458.13822-3-ryan@testtoast.com \
--to=ryan@testtoast.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jernej.skrabec@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=macromorgan@hotmail.com \
--cc=perex@perex.cz \
--cc=samuel@sholland.org \
--cc=tiwai@suse.com \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox