summaryrefslogtreecommitdiff
path: root/sound/soc/samsung/speyside.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-12 11:09:53 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-13 21:02:12 +0400
commitea0e60de385a984ab54d6694b03119d1706f548e (patch)
tree7f79eff61c781b50a9c45bea7e230bf96de905ec /sound/soc/samsung/speyside.c
parent68688e78ed4bc8d1a811ca29e2f8681561706db3 (diff)
downloadlinux-ea0e60de385a984ab54d6694b03119d1706f548e.tar.xz
ASoC: Add pin switches for fixed analogue inputs and outputs on Speyside
Pin switches enable direct control of the DAPM state from userspace, enabling simple enabling and disabling of the path. This is especially useful for outputs such as the speaker which are composed of several physical devices as it allows them to be controlled as a group. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound/soc/samsung/speyside.c')
-rw-r--r--sound/soc/samsung/speyside.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/samsung/speyside.c b/sound/soc/samsung/speyside.c
index 612a39e0e108..e171a321889f 100644
--- a/sound/soc/samsung/speyside.c
+++ b/sound/soc/samsung/speyside.c
@@ -190,6 +190,12 @@ static struct snd_soc_codec_conf speyside_codec_conf[] = {
},
};
+static const struct snd_kcontrol_new controls[] = {
+ SOC_DAPM_PIN_SWITCH("Main Speaker"),
+ SOC_DAPM_PIN_SWITCH("Main DMIC"),
+ SOC_DAPM_PIN_SWITCH("Main AMIC"),
+};
+
static struct snd_soc_dapm_widget widgets[] = {
SND_SOC_DAPM_HP("Headphone", NULL),
SND_SOC_DAPM_MIC("Headset Mic", NULL),
@@ -238,6 +244,8 @@ static struct snd_soc_card speyside = {
.set_bias_level = speyside_set_bias_level,
+ .controls = controls,
+ .num_controls = ARRAY_SIZE(controls),
.dapm_widgets = widgets,
.num_dapm_widgets = ARRAY_SIZE(widgets),
.dapm_routes = audio_paths,