diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-09 16:03:32 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-09 16:05:55 -0500 |
commit | 19a3477ec0eb635bdebd1dd905b1cee9a3c06c96 (patch) | |
tree | 617cceb6877e951db9908fd2f943341649a34d25 | |
parent | b68ef0e0368cda4e17541ae87bbb5b40dc15cbc1 (diff) |
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>
-rw-r--r-- | sound/soc/pxa/palm27x.c | 13 |
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; | |||
76 | static int palm27x_ac97_init(struct snd_soc_pcm_runtime *rtd) | 76 | static int palm27x_ac97_init(struct snd_soc_pcm_runtime *rtd) |
77 | { | 77 | { |
78 | struct snd_soc_codec *codec = rtd->codec; | 78 | struct snd_soc_codec *codec = rtd->codec; |
79 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
80 | int err; | 79 | int err; |
81 | 80 | ||
82 | /* not connected pins */ | ||
83 | snd_soc_dapm_nc_pin(dapm, "OUT3"); | ||
84 | snd_soc_dapm_nc_pin(dapm, "MONOOUT"); | ||
85 | snd_soc_dapm_nc_pin(dapm, "LINEINL"); | ||
86 | snd_soc_dapm_nc_pin(dapm, "LINEINR"); | ||
87 | snd_soc_dapm_nc_pin(dapm, "PCBEEP"); | ||
88 | snd_soc_dapm_nc_pin(dapm, "PHONE"); | ||
89 | snd_soc_dapm_nc_pin(dapm, "MIC2"); | ||
90 | |||
91 | /* Jack detection API stuff */ | 81 | /* Jack detection API stuff */ |
92 | err = snd_soc_jack_new(codec, "Headphone Jack", | 82 | err = snd_soc_jack_new(codec, "Headphone Jack", |
93 | SND_JACK_HEADPHONE, &hs_jack); | 83 | SND_JACK_HEADPHONE, &hs_jack); |
@@ -133,7 +123,8 @@ static struct snd_soc_card palm27x_asoc = { | |||
133 | .dapm_widgets = palm27x_dapm_widgets, | 123 | .dapm_widgets = palm27x_dapm_widgets, |
134 | .num_dapm_widgets = ARRAY_SIZE(palm27x_dapm_widgets), | 124 | .num_dapm_widgets = ARRAY_SIZE(palm27x_dapm_widgets), |
135 | .dapm_routes = audio_map, | 125 | .dapm_routes = audio_map, |
136 | .num_dapm_routes = ARRAY_SIZE(audio_map) | 126 | .num_dapm_routes = ARRAY_SIZE(audio_map), |
127 | .fully_routed = true, | ||
137 | }; | 128 | }; |
138 | 129 | ||
139 | static int palm27x_asoc_probe(struct platform_device *pdev) | 130 | static int palm27x_asoc_probe(struct platform_device *pdev) |