aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-05-07 15:27:49 -0400
committerMark Brown <broonie@kernel.org>2015-05-08 07:05:07 -0400
commit92ac4c5012a6505858c28be2dd5bf1c6f0dd26cf (patch)
tree2dbdfa87314a5e579b61d763b0392f5fc625f89a
parentc02e723f3e27f3bd32f24de473af69f0e39e8f79 (diff)
ASoC: z2: Automatically disconnect non-connected pins
Most DAPM input and output pins of the wm8750 are either used in the card's DAPM routing table or are marked as not connected. The only exceptions are the LINPUT1, RINPUT1, LINPUT2 input pins. Lets assume that those were simply overlooked and that the routing table is complete. 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/z2.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sound/soc/pxa/z2.c b/sound/soc/pxa/z2.c
index bcbfbe8303f7..990b1aa6d7f6 100644
--- a/sound/soc/pxa/z2.c
+++ b/sound/soc/pxa/z2.c
@@ -132,16 +132,8 @@ static const struct snd_soc_dapm_route z2_audio_map[] = {
132 */ 132 */
133static int z2_wm8750_init(struct snd_soc_pcm_runtime *rtd) 133static int z2_wm8750_init(struct snd_soc_pcm_runtime *rtd)
134{ 134{
135 struct snd_soc_codec *codec = rtd->codec;
136 struct snd_soc_dapm_context *dapm = &codec->dapm;
137 int ret; 135 int ret;
138 136
139 /* NC codec pins */
140 snd_soc_dapm_disable_pin(dapm, "LINPUT3");
141 snd_soc_dapm_disable_pin(dapm, "RINPUT3");
142 snd_soc_dapm_disable_pin(dapm, "OUT3");
143 snd_soc_dapm_disable_pin(dapm, "MONO1");
144
145 /* Jack detection API stuff */ 137 /* Jack detection API stuff */
146 ret = snd_soc_card_jack_new(rtd->card, "Headset Jack", SND_JACK_HEADSET, 138 ret = snd_soc_card_jack_new(rtd->card, "Headset Jack", SND_JACK_HEADSET,
147 &hs_jack, hs_jack_pins, 139 &hs_jack, hs_jack_pins,
@@ -189,6 +181,7 @@ static struct snd_soc_card snd_soc_z2 = {
189 .num_dapm_widgets = ARRAY_SIZE(wm8750_dapm_widgets), 181 .num_dapm_widgets = ARRAY_SIZE(wm8750_dapm_widgets),
190 .dapm_routes = z2_audio_map, 182 .dapm_routes = z2_audio_map,
191 .num_dapm_routes = ARRAY_SIZE(z2_audio_map), 183 .num_dapm_routes = ARRAY_SIZE(z2_audio_map),
184 .fully_routed = true,
192}; 185};
193 186
194static struct platform_device *z2_snd_device; 187static struct platform_device *z2_snd_device;