diff mbox

[1/2] ASoC: jive: Automatically disconnect non-connected pins

Message ID 1421415293-29589-1-git-send-email-lars@metafoo.de (mailing list archive)
State Accepted
Commit 3a41e0f7233a644b45e536a31c0116500ac106a4
Headers show

Commit Message

Lars-Peter Clausen Jan. 16, 2015, 1:34 p.m. UTC
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>
---
 sound/soc/samsung/jive_wm8750.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

Comments

Mark Brown Jan. 16, 2015, 4:59 p.m. UTC | #1
On Fri, Jan 16, 2015 at 02:34:52PM +0100, Lars-Peter Clausen wrote:
> 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.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/samsung/jive_wm8750.c b/sound/soc/samsung/jive_wm8750.c
index 6c3b359..7fcb51f 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 = {
 	.hw_params	= jive_hw_params,
 };
 
-static int jive_wm8750_init(struct snd_soc_pcm_runtime *rtd)
-{
-	struct snd_soc_codec *codec = rtd->codec;
-	struct snd_soc_dapm_context *dapm = &codec->dapm;
-
-	/* These endpoints are not being used. */
-	snd_soc_dapm_nc_pin(dapm, "LINPUT2");
-	snd_soc_dapm_nc_pin(dapm, "RINPUT2");
-	snd_soc_dapm_nc_pin(dapm, "LINPUT3");
-	snd_soc_dapm_nc_pin(dapm, "RINPUT3");
-	snd_soc_dapm_nc_pin(dapm, "OUT3");
-	snd_soc_dapm_nc_pin(dapm, "MONO");
-
-	return 0;
-}
-
 static struct snd_soc_dai_link jive_dai = {
 	.name		= "wm8750",
 	.stream_name	= "WM8750",
@@ -106,7 +90,6 @@  static struct snd_soc_dai_link jive_dai = {
 	.codec_dai_name = "wm8750-hifi",
 	.platform_name	= "s3c2412-i2s",
 	.codec_name	= "wm8750.0-001a",
-	.init		= jive_wm8750_init,
 	.dai_fmt	= SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
 			  SND_SOC_DAIFMT_CBS_CFS,
 	.ops		= &jive_ops,
@@ -123,6 +106,7 @@  static struct snd_soc_card snd_soc_machine_jive = {
 	.num_dapm_widgets = ARRAY_SIZE(wm8750_dapm_widgets),
 	.dapm_routes	= audio_map,
 	.num_dapm_routes = ARRAY_SIZE(audio_map),
+	.fully_routed	= true,
 };
 
 static struct platform_device *jive_snd_device;