summaryrefslogtreecommitdiff
path: root/sound/soc/pxa/tosa.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-05-07 22:27:48 +0300
committerMark Brown <broonie@kernel.org>2015-05-08 14:05:07 +0300
commitc02e723f3e27f3bd32f24de473af69f0e39e8f79 (patch)
tree347d3fd8951b5c4f96186a787f5431fc9b2d5177 /sound/soc/pxa/tosa.c
parent9b44bacd584220e721fb477cfd6de457f34a4f11 (diff)
downloadlinux-c02e723f3e27f3bd32f24de473af69f0e39e8f79.tar.xz
ASoC: tosa: Automatically disconnect non-connected pins
Most DAPM input and output pins of the wm9712 are either used in the card's DAPM routing table or are marked as not connected. The only two exception are "PHONE" and "PCBEEP" input, 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>
Diffstat (limited to 'sound/soc/pxa/tosa.c')
-rw-r--r--sound/soc/pxa/tosa.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c
index cb49284e853a..f59f566551ef 100644
--- a/sound/soc/pxa/tosa.c
+++ b/sound/soc/pxa/tosa.c
@@ -185,17 +185,6 @@ static const struct snd_kcontrol_new tosa_controls[] = {
tosa_set_spk),
};
-static int tosa_ac97_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, "OUT3");
- snd_soc_dapm_nc_pin(dapm, "MONOOUT");
-
- return 0;
-}
-
static struct snd_soc_dai_link tosa_dai[] = {
{
.name = "AC97",
@@ -204,7 +193,6 @@ static struct snd_soc_dai_link tosa_dai[] = {
.codec_dai_name = "wm9712-hifi",
.platform_name = "pxa-pcm-audio",
.codec_name = "wm9712-codec",
- .init = tosa_ac97_init,
.ops = &tosa_ops,
},
{
@@ -230,6 +218,7 @@ static struct snd_soc_card tosa = {
.num_dapm_widgets = ARRAY_SIZE(tosa_dapm_widgets),
.dapm_routes = audio_map,
.num_dapm_routes = ARRAY_SIZE(audio_map),
+ .fully_routed = true,
};
static int tosa_probe(struct platform_device *pdev)