From: Axel Lin <axel.lin@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Timur Tabi <timur@freescale.com>,
Arnaud Patard <arnaud.patard@rtp-net.org>,
Liam Girdwood <lrg@ti.com>
Subject: [PATCH] ASoC: Convert cs42l51 to table based DAPM and control init
Date: Tue, 20 Dec 2011 10:19:54 +0800 [thread overview]
Message-ID: <1324347594.19384.4.camel@phoenix> (raw)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
sound/soc/codecs/cs42l51.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index 528510b..ffce9f2 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -511,7 +511,6 @@ static struct snd_soc_dai_driver cs42l51_dai = {
static int cs42l51_probe(struct snd_soc_codec *codec)
{
struct cs42l51_private *cs42l51 = snd_soc_codec_get_drvdata(codec);
- struct snd_soc_dapm_context *dapm = &codec->dapm;
int ret, reg;
ret = cs42l51_fill_cache(codec);
@@ -539,20 +538,20 @@ static int cs42l51_probe(struct snd_soc_codec *codec)
if (ret < 0)
return ret;
- snd_soc_add_controls(codec, cs42l51_snd_controls,
- ARRAY_SIZE(cs42l51_snd_controls));
- snd_soc_dapm_new_controls(dapm, cs42l51_dapm_widgets,
- ARRAY_SIZE(cs42l51_dapm_widgets));
- snd_soc_dapm_add_routes(dapm, cs42l51_routes,
- ARRAY_SIZE(cs42l51_routes));
-
return 0;
}
static struct snd_soc_codec_driver soc_codec_device_cs42l51 = {
- .probe = cs42l51_probe,
+ .probe = cs42l51_probe,
.reg_cache_size = CS42L51_NUMREGS + 1,
.reg_word_size = sizeof(u8),
+
+ .controls = cs42l51_snd_controls,
+ .num_controls = ARRAY_SIZE(cs42l51_snd_controls),
+ .dapm_widgets = cs42l51_dapm_widgets,
+ .num_dapm_widgets = ARRAY_SIZE(cs42l51_dapm_widgets),
+ .dapm_routes = cs42l51_routes,
+ .num_dapm_routes = ARRAY_SIZE(cs42l51_routes),
};
static int cs42l51_i2c_probe(struct i2c_client *i2c_client,
--
1.7.5.4
next reply other threads:[~2011-12-20 2:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-20 2:19 Axel Lin [this message]
2011-12-20 12:05 ` [PATCH] ASoC: Convert cs42l51 to table based DAPM and control init 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=1324347594.19384.4.camel@phoenix \
--to=axel.lin@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=arnaud.patard@rtp-net.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lars@metafoo.de \
--cc=lrg@ti.com \
--cc=timur@freescale.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.