Skip to content

Commit ae5f76d

Browse files
tokyovigilantebroonie
authored andcommitted
ASoC: sun4i-codec: correct dapm widgets and controls for h616
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 <[email protected]> Signed-off-by: Ryan Walklin <[email protected]> Tested-by: Philippe Simons <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 7bda89a commit ae5f76d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sound/soc/sunxi/sun4i-codec.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1916,10 +1916,11 @@ static const struct snd_soc_component_driver sun50i_h616_codec_codec = {
19161916
};
19171917

19181918
static const struct snd_kcontrol_new sun50i_h616_card_controls[] = {
1919-
SOC_DAPM_PIN_SWITCH("LINEOUT"),
1919+
SOC_DAPM_PIN_SWITCH("Speaker"),
19201920
};
19211921

19221922
static const struct snd_soc_dapm_widget sun50i_h616_codec_card_dapm_widgets[] = {
1923+
SND_SOC_DAPM_HP("Headphone", NULL),
19231924
SND_SOC_DAPM_LINE("Line Out", NULL),
19241925
SND_SOC_DAPM_SPK("Speaker", sun4i_codec_spk_event),
19251926
};

0 commit comments

Comments
 (0)