]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7266055ccddc1f7e3453d94ad681a11805e1e242
tree1fe87c4440804f2956b469820f851ca687b4efa8
parent2571b48a7765169a3bc478e7beac029d6aadc56d
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