Skip to content

Commit

Permalink
ASoC: Add pin switches for fixed analogue inputs and outputs on Speyside
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Apr 13, 2011
1 parent 68688e7 commit ea0e60d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sound/soc/samsung/speyside.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit ea0e60d

Please sign in to comment.