mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Liam Girdwood <lrg@ti.com>
Cc: <linux-kernel@vger.kernel.org>, <alsa-devel@alsa-project.org>,
	<drivers@analog.com>, <device-drivers-devel@blackfin.uclinux.org>,
	Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH 1/7] ASoC: ad193X: Use table based DAPM and controls setup
Date: Mon, 28 Nov 2011 17:28:06 +0100	[thread overview]
Message-ID: <1322497692-27868-1-git-send-email-lars@metafoo.de> (raw)

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/ad193x.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/sound/soc/codecs/ad193x.c b/sound/soc/codecs/ad193x.c
index 1901cd2..1dfda5c 100644
--- a/sound/soc/codecs/ad193x.c
+++ b/sound/soc/codecs/ad193x.c
@@ -345,7 +345,6 @@ static struct snd_soc_dai_driver ad193x_dai = {
 static int ad193x_probe(struct snd_soc_codec *codec)
 {
 	struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(codec);
-	struct snd_soc_dapm_context *dapm = &codec->dapm;
 	int ret;
 
 	codec->control_data = ad193x->regmap;
@@ -371,17 +370,17 @@ static int ad193x_probe(struct snd_soc_codec *codec)
 	snd_soc_write(codec, AD193X_PLL_CLK_CTRL0, 0x99); /* mclk=24.576Mhz: 0x9D; mclk=12.288Mhz: 0x99 */
 	snd_soc_write(codec, AD193X_PLL_CLK_CTRL1, 0x04);
 
-	snd_soc_add_controls(codec, ad193x_snd_controls,
-			     ARRAY_SIZE(ad193x_snd_controls));
-	snd_soc_dapm_new_controls(dapm, ad193x_dapm_widgets,
-				  ARRAY_SIZE(ad193x_dapm_widgets));
-	snd_soc_dapm_add_routes(dapm, audio_paths, ARRAY_SIZE(audio_paths));
-
 	return ret;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_ad193x = {
 	.probe = 	ad193x_probe,
+	.controls = ad193x_snd_controls,
+	.num_controls = ARRAY_SIZE(ad193x_snd_controls),
+	.dapm_widgets = ad193x_dapm_widgets,
+	.num_dapm_widgets = ARRAY_SIZE(ad193x_dapm_widgets),
+	.dapm_routes = audio_paths,
+	.num_dapm_routes = ARRAY_SIZE(audio_paths),
 };
 
 #if defined(CONFIG_SPI_MASTER)
-- 
1.7.7.3



             reply	other threads:[~2011-11-28 16:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-28 16:28 Lars-Peter Clausen [this message]
2011-11-28 16:28 ` [PATCH 2/7] ASoC: ad193X: Provide dB ranges for the volume controls Lars-Peter Clausen
2011-11-28 16:28 ` [PATCH 3/7] ASoC: AD193X: Make enum items const char * const Lars-Peter Clausen
2011-11-28 18:53   ` Mark Brown
2011-11-28 19:01     ` Lars-Peter Clausen
2011-11-28 19:03       ` Mark Brown
2011-11-28 16:28 ` [PATCH 4/7] ASoC: ad193X: Remove non-functional DAPM route controls Lars-Peter Clausen
2011-11-28 16:28 ` [PATCH 5/7] ASOC: AD193X: Add sysclk DAPM supply Lars-Peter Clausen
2011-11-29  5:24   ` Mike Frysinger
2011-11-29 11:34     ` Mark Brown
2011-11-30  5:42       ` Mike Frysinger
2011-11-28 16:28 ` [PATCH 6/7] ASoC: AD193X: Use snd_soc_update_bits where appropriate Lars-Peter Clausen
2011-11-28 16:28 ` [PATCH 7/7] ASoC: AD193X: Convert to direct regmap API usage Lars-Peter Clausen
2011-11-28 18:57 ` [PATCH 1/7] ASoC: ad193X: Use table based DAPM and controls setup 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=1322497692-27868-1-git-send-email-lars@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=device-drivers-devel@blackfin.uclinux.org \
    --cc=drivers@analog.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®