summaryrefslogtreecommitdiff
path: root/sound/soc/pxa/palm27x.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-01-10 00:03:32 +0300
committerMark Brown <broonie@kernel.org>2015-01-10 00:05:55 +0300
commit19a3477ec0eb635bdebd1dd905b1cee9a3c06c96 (patch)
tree617cceb6877e951db9908fd2f943341649a34d25 /sound/soc/pxa/palm27x.c
parentb68ef0e0368cda4e17541ae87bbb5b40dc15cbc1 (diff)
downloadlinux-19a3477ec0eb635bdebd1dd905b1cee9a3c06c96.tar.xz
ASoC: palm27x: Automatically disconnect non-connected pins
All DAPM input and output pins of the wm9712 are either used in the card's DAPM routing table or are marked as not connected. Set the fully_routed flag of the card instead of manually marking the unused inputs and outputs as not connected. This makes the code a bit shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/pxa/palm27x.c')
-rw-r--r--sound/soc/pxa/palm27x.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/sound/soc/pxa/palm27x.c b/sound/soc/pxa/palm27x.c
index 5a0b82f93b15..910336c5ebeb 100644
--- a/sound/soc/pxa/palm27x.c
+++ b/sound/soc/pxa/palm27x.c
@@ -76,18 +76,8 @@ static struct snd_soc_card palm27x_asoc;
static int palm27x_ac97_init(struct snd_soc_pcm_runtime *rtd)
{
struct snd_soc_codec *codec = rtd->codec;
- struct snd_soc_dapm_context *dapm = &codec->dapm;
int err;
- /* not connected pins */
- snd_soc_dapm_nc_pin(dapm, "OUT3");
- snd_soc_dapm_nc_pin(dapm, "MONOOUT");
- snd_soc_dapm_nc_pin(dapm, "LINEINL");
- snd_soc_dapm_nc_pin(dapm, "LINEINR");
- snd_soc_dapm_nc_pin(dapm, "PCBEEP");
- snd_soc_dapm_nc_pin(dapm, "PHONE");
- snd_soc_dapm_nc_pin(dapm, "MIC2");
-
/* Jack detection API stuff */
err = snd_soc_jack_new(codec, "Headphone Jack",
SND_JACK_HEADPHONE, &hs_jack);
@@ -133,7 +123,8 @@ static struct snd_soc_card palm27x_asoc = {
.dapm_widgets = palm27x_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(palm27x_dapm_widgets),
.dapm_routes = audio_map,
- .num_dapm_routes = ARRAY_SIZE(audio_map)
+ .num_dapm_routes = ARRAY_SIZE(audio_map),
+ .fully_routed = true,
};
static int palm27x_asoc_probe(struct platform_device *pdev)