ASoC: corgi: Automatically disconnect non-connected pins
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 9 Jan 2015 21:03:26 +0000 (22:03 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 9 Jan 2015 21:05:55 +0000 (21:05 +0000)
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>
sound/soc/pxa/corgi.c

index b7cd0a71fd707bc2d27807a4813be4f0025d762b..3580d10c9f282312056d6ad3952b6adbcf632ffe 100644 (file)
@@ -259,20 +259,6 @@ static const struct snd_kcontrol_new wm8731_corgi_controls[] = {
                corgi_set_spk),
 };
 
-/*
- * Logic for a wm8731 as connected on a Sharp SL-C7x0 Device
- */
-static int corgi_wm8731_init(struct snd_soc_pcm_runtime *rtd)
-{
-       struct snd_soc_codec *codec = rtd->codec;
-       struct snd_soc_dapm_context *dapm = &codec->dapm;
-
-       snd_soc_dapm_nc_pin(dapm, "LLINEIN");
-       snd_soc_dapm_nc_pin(dapm, "RLINEIN");
-
-       return 0;
-}
-
 /* corgi digital audio interface glue - connects codec <--> CPU */
 static struct snd_soc_dai_link corgi_dai = {
        .name = "WM8731",
@@ -281,7 +267,6 @@ static struct snd_soc_dai_link corgi_dai = {
        .codec_dai_name = "wm8731-hifi",
        .platform_name = "pxa-pcm-audio",
        .codec_name = "wm8731.0-001b",
-       .init = corgi_wm8731_init,
        .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
                   SND_SOC_DAIFMT_CBS_CFS,
        .ops = &corgi_ops,
@@ -300,6 +285,7 @@ static struct snd_soc_card corgi = {
        .num_dapm_widgets = ARRAY_SIZE(wm8731_dapm_widgets),
        .dapm_routes = corgi_audio_map,
        .num_dapm_routes = ARRAY_SIZE(corgi_audio_map),
+       .fully_routed = true,
 };
 
 static int corgi_probe(struct platform_device *pdev)