All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH 2/8] ASoC: dmic: Convert table based DAPM setup
Date: Tue, 27 Aug 2013 15:50:55 +0200	[thread overview]
Message-ID: <1377611461-3638-2-git-send-email-lars@metafoo.de> (raw)
In-Reply-To: <1377611461-3638-1-git-send-email-lars@metafoo.de>

Let the core take care of instantiating the DAPM widgets and routes, this makes
the code a bit shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/dmic.c | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/sound/soc/codecs/dmic.c b/sound/soc/codecs/dmic.c
index 66967ba..b2090b2 100644
--- a/sound/soc/codecs/dmic.c
+++ b/sound/soc/codecs/dmic.c
@@ -50,20 +50,11 @@ static const struct snd_soc_dapm_route intercon[] = {
 	{"DMIC AIF", NULL, "DMic"},
 };
 
-static int dmic_probe(struct snd_soc_codec *codec)
-{
-	struct snd_soc_dapm_context *dapm = &codec->dapm;
-
-	snd_soc_dapm_new_controls(dapm, dmic_dapm_widgets,
-				  ARRAY_SIZE(dmic_dapm_widgets));
-        snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon));
-	snd_soc_dapm_new_widgets(dapm);
-
-	return 0;
-}
-
 static struct snd_soc_codec_driver soc_dmic = {
-	.probe	= dmic_probe,
+	.dapm_widgets = dmic_dapm_widgets,
+	.num_dapm_widgets = ARRAY_SIZE(dmic_dapm_widgets),
+	.dapm_routes = intercon,
+	.num_dapm_routes = ARRAY_SIZE(intercon),
 };
 
 static int dmic_dev_probe(struct platform_device *pdev)
-- 
1.8.0

  reply	other threads:[~2013-08-27 13:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27 13:50 [PATCH 1/8] ASoC: dapm: Fix marking widgets dirty when a route is added Lars-Peter Clausen
2013-08-27 13:50 ` Lars-Peter Clausen [this message]
2013-08-27 14:32   ` [PATCH 2/8] ASoC: dmic: Convert table based DAPM setup Mark Brown
2013-08-27 13:50 ` [PATCH 3/8] ASoC: tlv320aic32x4: Convert table based control and " Lars-Peter Clausen
2013-08-27 14:35   ` Mark Brown
2013-08-27 14:41     ` Lars-Peter Clausen
2013-08-27 14:54       ` Mark Brown
2013-08-27 13:50 ` [PATCH 4/8] ASoC; wm8904: Remove unnecessary call to snd_soc_dapm_new_widgets() Lars-Peter Clausen
2013-08-27 14:36   ` Mark Brown
2013-08-27 13:50 ` [PATCH 5/8] ASoC: jack: " Lars-Peter Clausen
2013-08-27 14:37   ` Mark Brown
2013-08-27 13:50 ` [PATCH 6/8] ASoC: Call snd_soc_dapm_new_widgets() only once during card initialization Lars-Peter Clausen
2013-08-27 14:38   ` Mark Brown
2013-08-27 13:51 ` [PATCH 7/8] ASoC: Move call to snd_soc_dapm_new_widgets() after snd_soc_dapm_auto_nc_codec_pins() Lars-Peter Clausen
2013-08-27 14:41   ` Mark Brown
2013-08-27 13:51 ` [PATCH 8/8] ASoC: Pass card instead of dapm context to snd_soc_dapm_new_widgets() Lars-Peter Clausen
2013-08-27 14:42   ` Mark Brown
2013-08-27 14:33 ` [PATCH 1/8] ASoC: dapm: Fix marking widgets dirty when a route is added Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1377611461-3638-2-git-send-email-lars@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.