summaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa/brownstone.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-05-07 21:27:46 +0200
committerMark Brown <broonie@kernel.org>2015-05-08 12:05:07 +0100
commit6b9aa50cd239ff78f6680d070315608a49218159 (patch)
treec8f6e38e2a8d614b5864cb30ba897c35cd063e4e /sound/soc/pxa/brownstone.c
parentb787f68c36d49bb1d9236f403813641efa74a031 (diff)
downloadlinux-stable-6b9aa50cd239ff78f6680d070315608a49218159.tar.gz
linux-stable-6b9aa50cd239ff78f6680d070315608a49218159.tar.bz2
linux-stable-6b9aa50cd239ff78f6680d070315608a49218159.zip
ASoC: brownstone: Automatically disconnect non-connected pins
Most DAPM input and output pins of the wm8994 are either used in the card's DAPM routing table or are marked as not connected. The only exception is DMIC2DAT input. Given that DMIC1DAT is explicitly mentioned in the DAPM routes lets assume that DMIC2DAT simply has been overlooked and should be 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/brownstone.c')
-rw-r--r--sound/soc/pxa/brownstone.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/sound/soc/pxa/brownstone.c b/sound/soc/pxa/brownstone.c
index 79936e3e80e7..2b26318bc200 100644
--- a/sound/soc/pxa/brownstone.c
+++ b/sound/soc/pxa/brownstone.c
@@ -45,29 +45,6 @@ static const struct snd_soc_dapm_route brownstone_audio_map[] = {
{"MICBIAS1", NULL, "Main Mic"},
};
-static int brownstone_wm8994_init(struct snd_soc_pcm_runtime *rtd)
-{
- struct snd_soc_codec *codec = rtd->codec;
- struct snd_soc_dapm_context *dapm = &codec->dapm;
-
- /* set endpoints to not connected */
- snd_soc_dapm_nc_pin(dapm, "HPOUT2P");
- snd_soc_dapm_nc_pin(dapm, "HPOUT2N");
- snd_soc_dapm_nc_pin(dapm, "LINEOUT1N");
- snd_soc_dapm_nc_pin(dapm, "LINEOUT1P");
- snd_soc_dapm_nc_pin(dapm, "LINEOUT2N");
- snd_soc_dapm_nc_pin(dapm, "LINEOUT2P");
- snd_soc_dapm_nc_pin(dapm, "IN1LN");
- snd_soc_dapm_nc_pin(dapm, "IN1LP");
- snd_soc_dapm_nc_pin(dapm, "IN1RP");
- snd_soc_dapm_nc_pin(dapm, "IN2LP:VXRN");
- snd_soc_dapm_nc_pin(dapm, "IN2RN");
- snd_soc_dapm_nc_pin(dapm, "IN2RP:VXRP");
- snd_soc_dapm_nc_pin(dapm, "IN2LN");
-
- return 0;
-}
-
static int brownstone_wm8994_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
@@ -115,7 +92,6 @@ static struct snd_soc_dai_link brownstone_wm8994_dai[] = {
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBS_CFS,
.ops = &brownstone_ops,
- .init = brownstone_wm8994_init,
},
};
@@ -132,6 +108,7 @@ static struct snd_soc_card brownstone = {
.num_dapm_widgets = ARRAY_SIZE(brownstone_dapm_widgets),
.dapm_routes = brownstone_audio_map,
.num_dapm_routes = ARRAY_SIZE(brownstone_audio_map),
+ .fully_routed = true,
};
static int brownstone_probe(struct platform_device *pdev)