diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-09 16:03:26 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-09 16:05:55 -0500 |
commit | 46d0d8df157b4d9bdf7849ce4ae795d399018669 (patch) | |
tree | b68208f1e8721544c98316909bf5633fd71e4323 /sound/soc/pxa | |
parent | 3c066c642aba407819cf83413025705c6e2a68f9 (diff) |
ASoC: corgi: Automatically disconnect non-connected pins
All DAPM input and output pins of the wm8994 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')
-rw-r--r-- | sound/soc/pxa/corgi.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c index b7cd0a71fd70..3580d10c9f28 100644 --- a/sound/soc/pxa/corgi.c +++ b/sound/soc/pxa/corgi.c | |||
@@ -259,20 +259,6 @@ static const struct snd_kcontrol_new wm8731_corgi_controls[] = { | |||
259 | corgi_set_spk), | 259 | corgi_set_spk), |
260 | }; | 260 | }; |
261 | 261 | ||
262 | /* | ||
263 | * Logic for a wm8731 as connected on a Sharp SL-C7x0 Device | ||
264 | */ | ||
265 | static int corgi_wm8731_init(struct snd_soc_pcm_runtime *rtd) | ||
266 | { | ||
267 | struct snd_soc_codec *codec = rtd->codec; | ||
268 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
269 | |||
270 | snd_soc_dapm_nc_pin(dapm, "LLINEIN"); | ||
271 | snd_soc_dapm_nc_pin(dapm, "RLINEIN"); | ||
272 | |||
273 | return 0; | ||
274 | } | ||
275 | |||
276 | /* corgi digital audio interface glue - connects codec <--> CPU */ | 262 | /* corgi digital audio interface glue - connects codec <--> CPU */ |
277 | static struct snd_soc_dai_link corgi_dai = { | 263 | static struct snd_soc_dai_link corgi_dai = { |
278 | .name = "WM8731", | 264 | .name = "WM8731", |
@@ -281,7 +267,6 @@ static struct snd_soc_dai_link corgi_dai = { | |||
281 | .codec_dai_name = "wm8731-hifi", | 267 | .codec_dai_name = "wm8731-hifi", |
282 | .platform_name = "pxa-pcm-audio", | 268 | .platform_name = "pxa-pcm-audio", |
283 | .codec_name = "wm8731.0-001b", | 269 | .codec_name = "wm8731.0-001b", |
284 | .init = corgi_wm8731_init, | ||
285 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | 270 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | |
286 | SND_SOC_DAIFMT_CBS_CFS, | 271 | SND_SOC_DAIFMT_CBS_CFS, |
287 | .ops = &corgi_ops, | 272 | .ops = &corgi_ops, |
@@ -300,6 +285,7 @@ static struct snd_soc_card corgi = { | |||
300 | .num_dapm_widgets = ARRAY_SIZE(wm8731_dapm_widgets), | 285 | .num_dapm_widgets = ARRAY_SIZE(wm8731_dapm_widgets), |
301 | .dapm_routes = corgi_audio_map, | 286 | .dapm_routes = corgi_audio_map, |
302 | .num_dapm_routes = ARRAY_SIZE(corgi_audio_map), | 287 | .num_dapm_routes = ARRAY_SIZE(corgi_audio_map), |
288 | .fully_routed = true, | ||
303 | }; | 289 | }; |
304 | 290 | ||
305 | static int corgi_probe(struct platform_device *pdev) | 291 | static int corgi_probe(struct platform_device *pdev) |