diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-16 08:34:52 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-16 11:59:08 -0500 |
commit | 3a41e0f7233a644b45e536a31c0116500ac106a4 (patch) | |
tree | 31b670a2ebbe4ac8aef497785d568d5a93cd57a2 | |
parent | 5d6bdfd56849b0db094006d7aa118746c899fa01 (diff) |
ASoC: jive: Automatically disconnect non-connected pins
All DAPM input and output pins of the wm8750 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/samsung/jive_wm8750.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/sound/soc/samsung/jive_wm8750.c b/sound/soc/samsung/jive_wm8750.c index 6c3b359bb4c1..7fcb51faa2a0 100644 --- a/sound/soc/samsung/jive_wm8750.c +++ b/sound/soc/samsung/jive_wm8750.c | |||
@@ -83,22 +83,6 @@ static struct snd_soc_ops jive_ops = { | |||
83 | .hw_params = jive_hw_params, | 83 | .hw_params = jive_hw_params, |
84 | }; | 84 | }; |
85 | 85 | ||
86 | static int jive_wm8750_init(struct snd_soc_pcm_runtime *rtd) | ||
87 | { | ||
88 | struct snd_soc_codec *codec = rtd->codec; | ||
89 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
90 | |||
91 | /* These endpoints are not being used. */ | ||
92 | snd_soc_dapm_nc_pin(dapm, "LINPUT2"); | ||
93 | snd_soc_dapm_nc_pin(dapm, "RINPUT2"); | ||
94 | snd_soc_dapm_nc_pin(dapm, "LINPUT3"); | ||
95 | snd_soc_dapm_nc_pin(dapm, "RINPUT3"); | ||
96 | snd_soc_dapm_nc_pin(dapm, "OUT3"); | ||
97 | snd_soc_dapm_nc_pin(dapm, "MONO"); | ||
98 | |||
99 | return 0; | ||
100 | } | ||
101 | |||
102 | static struct snd_soc_dai_link jive_dai = { | 86 | static struct snd_soc_dai_link jive_dai = { |
103 | .name = "wm8750", | 87 | .name = "wm8750", |
104 | .stream_name = "WM8750", | 88 | .stream_name = "WM8750", |
@@ -106,7 +90,6 @@ static struct snd_soc_dai_link jive_dai = { | |||
106 | .codec_dai_name = "wm8750-hifi", | 90 | .codec_dai_name = "wm8750-hifi", |
107 | .platform_name = "s3c2412-i2s", | 91 | .platform_name = "s3c2412-i2s", |
108 | .codec_name = "wm8750.0-001a", | 92 | .codec_name = "wm8750.0-001a", |
109 | .init = jive_wm8750_init, | ||
110 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | 93 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | |
111 | SND_SOC_DAIFMT_CBS_CFS, | 94 | SND_SOC_DAIFMT_CBS_CFS, |
112 | .ops = &jive_ops, | 95 | .ops = &jive_ops, |
@@ -123,6 +106,7 @@ static struct snd_soc_card snd_soc_machine_jive = { | |||
123 | .num_dapm_widgets = ARRAY_SIZE(wm8750_dapm_widgets), | 106 | .num_dapm_widgets = ARRAY_SIZE(wm8750_dapm_widgets), |
124 | .dapm_routes = audio_map, | 107 | .dapm_routes = audio_map, |
125 | .num_dapm_routes = ARRAY_SIZE(audio_map), | 108 | .num_dapm_routes = ARRAY_SIZE(audio_map), |
109 | .fully_routed = true, | ||
126 | }; | 110 | }; |
127 | 111 | ||
128 | static struct platform_device *jive_snd_device; | 112 | static struct platform_device *jive_snd_device; |