From: Lu Guanqun <guanqun.lu@intel.com>
To: alsa-devel@alsa-project.org
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Takashi Iwai <tiwai@suse.de>,
Sascha Hauer <s.hauer@pengutronix.de>,
Lu Guanqun <guanqun.lu@intel.com>,
Timur Tabi <timur@freescale.com>,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: [PATCH 10/11] ASoC: Use data based init for tlv320aic23 DAPM
Date: Wed, 30 Mar 2011 21:53:16 +0800 [thread overview]
Message-ID: <1301493197-8673-10-git-send-email-guanqun.lu@intel.com> (raw)
In-Reply-To: <1301493197-8673-1-git-send-email-guanqun.lu@intel.com>
CC: Liam Girdwood <lrg@slimlogic.co.uk>
CC: Mark Brown <broonie@opensource.wolfsonmicro.com>
CC: Jaroslav Kysela <perex@perex.cz>
CC: Takashi Iwai <tiwai@suse.de>
CC: Jarkko Nikula <jhnikula@gmail.com>
CC: Timur Tabi <timur@freescale.com>
CC: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
---
sound/soc/codecs/tlv320aic23.c | 19 +++++--------------
1 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
index 54a30ef..33bb52f 100644
--- a/sound/soc/codecs/tlv320aic23.c
+++ b/sound/soc/codecs/tlv320aic23.c
@@ -212,7 +212,7 @@ static const struct snd_soc_dapm_widget tlv320aic23_dapm_widgets[] = {
SND_SOC_DAPM_INPUT("MICIN"),
};
-static const struct snd_soc_dapm_route intercon[] = {
+static const struct snd_soc_dapm_route tlv320aic23_intercon[] = {
/* Output Mixer */
{"Output Mixer", "Line Bypass Switch", "Line Input"},
{"Output Mixer", "Playback Switch", "DAC"},
@@ -388,18 +388,6 @@ static int set_sample_rate_control(struct snd_soc_codec *codec, int mclk,
return 0;
}
-static int tlv320aic23_add_widgets(struct snd_soc_codec *codec)
-{
- struct snd_soc_dapm_context *dapm = &codec->dapm;
-
- snd_soc_dapm_new_controls(dapm, tlv320aic23_dapm_widgets,
- ARRAY_SIZE(tlv320aic23_dapm_widgets));
- /* set up audio path interconnects */
- snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon));
-
- return 0;
-}
-
static int tlv320aic23_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
@@ -676,7 +664,6 @@ static int tlv320aic23_probe(struct snd_soc_codec *codec)
snd_soc_add_controls(codec, tlv320aic23_snd_controls,
ARRAY_SIZE(tlv320aic23_snd_controls));
- tlv320aic23_add_widgets(codec);
return 0;
}
@@ -698,6 +685,10 @@ static struct snd_soc_codec_driver soc_codec_dev_tlv320aic23 = {
.read = tlv320aic23_read_reg_cache,
.write = tlv320aic23_write,
.set_bias_level = tlv320aic23_set_bias_level,
+ .dapm_widgets = tlv320aic23_dapm_widgets,
+ .num_dapm_widgets = ARRAY_SIZE(tlv320aic23_dapm_widgets),
+ .dapm_routes = tlv320aic23_intercon,
+ .num_dapm_routes = ARRAY_SIZE(tlv320aic23_intercon),
};
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
--
1.7.2.3
next prev parent reply other threads:[~2011-03-30 13:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-30 13:53 [PATCH 01/11] ASoC: Use data based init for ak4535 DAPM Lu Guanqun
2011-03-30 13:53 ` [PATCH 02/11] ASoC: Use data based init for ak4671 DAPM Lu Guanqun
2011-03-30 13:53 ` [PATCH 03/11] ASoC: Use data based init for cx20442 DAPM Lu Guanqun
2011-03-30 13:53 ` [PATCH 04/11] ASoC: Use data based init for max98088 DAPM Lu Guanqun
2011-03-30 13:53 ` [PATCH 05/11] ASoC: Use data based init for wm9713 DAPM Lu Guanqun
2011-03-30 13:53 ` [PATCH 06/11] ASoC: Use data based init for wm9712 DAPM Lu Guanqun
2011-03-30 13:53 ` [PATCH 07/11] ASoC: Use data based init for wm9705 DAPM Lu Guanqun
2011-03-30 13:53 ` [PATCH 08/11] ASoC: Use data based init for wm8728 DAPM Lu Guanqun
2011-03-30 13:53 ` [PATCH 09/11] ASoC: Use data based init for wm8711 DAPM Lu Guanqun
2011-03-30 13:53 ` Lu Guanqun [this message]
2011-03-30 13:53 ` [PATCH 11/11] ASoC: Use data based init for sn95031 DAPM Lu Guanqun
2011-03-30 19:10 ` [PATCH 01/11] ASoC: Use data based init for ak4535 DAPM Liam Girdwood
2011-03-30 21:13 ` 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=1301493197-8673-10-git-send-email-guanqun.lu@intel.com \
--to=guanqun.lu@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
--cc=s.hauer@pengutronix.de \
--cc=timur@freescale.com \
--cc=tiwai@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).