ASoC: sun50i-codec-analog: Enable DAPM for earpiece switch
authorSamuel Holland <samuel@sholland.org>
Sun, 26 Jul 2020 02:53:34 +0000 (21:53 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 17 Aug 2020 15:19:17 +0000 (16:19 +0100)
commit7829e68d55692c9f7f5665ebec9fa1f33d5ad72f
tree1fe87c4440804f2956b469820f851ca687b4efa8
parent95d34762f201c0f7cf0ed920815f349cfe336fe1
ASoC: sun50i-codec-analog: Enable DAPM for earpiece switch

By including the earpiece mute switch in the DAPM graph, both the
earpiece amplifier and the Mixer/DAC inputs can be powered off when
the earpiece is muted.

While the widget is really just a simple switch, it is represented
as a "mixer with named controls" to avoid including the widget name
in the kcontrol name. Otherwise, it is not possible to give the widget
an accurate, descriptive name without changing the kcontrol name
seen by userspace (which should be stable).

The mute switch is between the source selection and the amplifier,
as per the diagram in the SoC manual.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20200726025334.59931-9-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sunxi/sun50i-codec-analog.c