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>, Lu Guanqun <guanqun.lu@intel.com>,
Vinod Koul <vinod.koul@intel.com>,
Harsha Priya <priya.harsha@intel.com>,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: [PATCH 11/11] ASoC: Use data based init for sn95031 DAPM
Date: Wed, 30 Mar 2011 21:53:17 +0800 [thread overview]
Message-ID: <1301493197-8673-11-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: Harsha Priya <priya.harsha@intel.com>
CC: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
---
sound/soc/codecs/sn95031.c | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c
index 2a30eae..569555f 100644
--- a/sound/soc/codecs/sn95031.c
+++ b/sound/soc/codecs/sn95031.c
@@ -825,8 +825,6 @@ EXPORT_SYMBOL_GPL(sn95031_jack_detection);
/* codec registration */
static int sn95031_codec_probe(struct snd_soc_codec *codec)
{
- int ret;
-
pr_debug("codec_probe called\n");
codec->dapm.bias_level = SND_SOC_BIAS_OFF;
@@ -877,16 +875,7 @@ static int sn95031_codec_probe(struct snd_soc_codec *codec)
snd_soc_add_controls(codec, sn95031_snd_controls,
ARRAY_SIZE(sn95031_snd_controls));
- ret = snd_soc_dapm_new_controls(&codec->dapm, sn95031_dapm_widgets,
- ARRAY_SIZE(sn95031_dapm_widgets));
- if (ret)
- pr_err("soc_dapm_new_control failed %d", ret);
- ret = snd_soc_dapm_add_routes(&codec->dapm, sn95031_audio_map,
- ARRAY_SIZE(sn95031_audio_map));
- if (ret)
- pr_err("soc_dapm_add_routes failed %d", ret);
-
- return ret;
+ return 0;
}
static int sn95031_codec_remove(struct snd_soc_codec *codec)
@@ -903,6 +892,10 @@ struct snd_soc_codec_driver sn95031_codec = {
.read = sn95031_read,
.write = sn95031_write,
.set_bias_level = sn95031_set_vaud_bias,
+ .dapm_widgets = sn95031_dapm_widgets,
+ .num_dapm_widgets = ARRAY_SIZE(sn95031_dapm_widgets),
+ .dapm_routes = sn95031_audio_map,
+ .num_dapm_routes = ARRAY_SIZE(sn95031_audio_map),
};
static int __devinit sn95031_device_probe(struct platform_device *pdev)
--
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 ` [PATCH 10/11] ASoC: Use data based init for tlv320aic23 DAPM Lu Guanqun
2011-03-30 13:53 ` Lu Guanqun [this message]
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-11-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=priya.harsha@intel.com \
--cc=tiwai@suse.de \
--cc=vinod.koul@intel.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;
as well as URLs for NNTP newsgroup(s).