summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ssm4567.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-11-06 15:59:24 +0100
committerMark Brown <broonie@kernel.org>2014-11-06 16:05:10 +0000
commit5ad72152b695ba5027f9c6ec9a48a8e1a70f25dc (patch)
treec78d81b08cf33627e7df6ea9488fbf0412eef0e2 /sound/soc/codecs/ssm4567.c
parentead99f89b7cd2b5cfe99601380a6f6f0a1ce7e53 (diff)
downloadlinux-5ad72152b695ba5027f9c6ec9a48a8e1a70f25dc.tar.bz2
ASoC: ssm4567: Add support for disabling the boost stage
This patch adds a switch to enable/disable boost stage of the output amplifier. Applications that know that they do not need the output amplifier boost stage can disable it to conserve a bit of power. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/ssm4567.c')
-rw-r--r--sound/soc/codecs/ssm4567.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/ssm4567.c b/sound/soc/codecs/ssm4567.c
index 217667926a77..a984485108cd 100644
--- a/sound/soc/codecs/ssm4567.c
+++ b/sound/soc/codecs/ssm4567.c
@@ -165,13 +165,20 @@ static const struct snd_kcontrol_new ssm4567_snd_controls[] = {
5, 1, 0),
};
+static const struct snd_kcontrol_new ssm4567_amplifier_boost_control =
+ SOC_DAPM_SINGLE("Switch", SSM4567_REG_POWER_CTRL, 1, 1, 1);
+
static const struct snd_soc_dapm_widget ssm4567_dapm_widgets[] = {
SND_SOC_DAPM_DAC("DAC", "HiFi Playback", SSM4567_REG_POWER_CTRL, 2, 1),
+ SND_SOC_DAPM_SWITCH("Amplifier Boost", SSM4567_REG_POWER_CTRL, 3, 1,
+ &ssm4567_amplifier_boost_control),
SND_SOC_DAPM_OUTPUT("OUT"),
};
static const struct snd_soc_dapm_route ssm4567_routes[] = {
+ { "OUT", NULL, "Amplifier Boost" },
+ { "Amplifier Boost", "Switch", "DAC" },
{ "OUT", NULL, "DAC" },
};