alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: Convert WM9081 to table based control init
@ 2011-10-17 22:54 Mark Brown
  2011-10-18  7:49 ` Liam Girdwood
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2011-10-17 22:54 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown

At least for the core controls, the optionally selected controls are still
added programatically.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm9081.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
index f4fc03b..93f794c 100644
--- a/sound/soc/codecs/wm9081.c
+++ b/sound/soc/codecs/wm9081.c
@@ -1235,8 +1235,6 @@ static int wm9081_probe(struct snd_soc_codec *codec)
 	snd_soc_update_bits(codec, WM9081_ANALOGUE_SPEAKER_PGA,
 			    WM9081_SPKPGAZC, WM9081_SPKPGAZC);
 
-	snd_soc_add_controls(codec, wm9081_snd_controls,
-			     ARRAY_SIZE(wm9081_snd_controls));
 	if (!wm9081->pdata.num_retune_configs) {
 		dev_dbg(codec->dev,
 			"No ReTune Mobile data, using normal EQ\n");
@@ -1296,6 +1294,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9081 = {
 	.reg_cache_default = wm9081_reg_defaults,
 	.volatile_register = wm9081_volatile_register,
 
+	.controls         = wm9081_snd_controls,
+	.num_controls     = ARRAY_SIZE(wm9081_snd_controls),
 	.dapm_widgets	  = wm9081_dapm_widgets,
 	.num_dapm_widgets = ARRAY_SIZE(wm9081_dapm_widgets),
 	.dapm_routes     = wm9081_audio_paths,
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: Convert WM9081 to table based control init
  2011-10-17 22:54 [PATCH] ASoC: Convert WM9081 to table based control init Mark Brown
@ 2011-10-18  7:49 ` Liam Girdwood
  0 siblings, 0 replies; 2+ messages in thread
From: Liam Girdwood @ 2011-10-18  7:49 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, patches

On Mon, 2011-10-17 at 23:54 +0100, Mark Brown wrote:
> At least for the core controls, the optionally selected controls are still
> added programatically.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  sound/soc/codecs/wm9081.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
> index f4fc03b..93f794c 100644
> --- a/sound/soc/codecs/wm9081.c
> +++ b/sound/soc/codecs/wm9081.c
> @@ -1235,8 +1235,6 @@ static int wm9081_probe(struct snd_soc_codec *codec)
>  	snd_soc_update_bits(codec, WM9081_ANALOGUE_SPEAKER_PGA,
>  			    WM9081_SPKPGAZC, WM9081_SPKPGAZC);
>  
> -	snd_soc_add_controls(codec, wm9081_snd_controls,
> -			     ARRAY_SIZE(wm9081_snd_controls));
>  	if (!wm9081->pdata.num_retune_configs) {
>  		dev_dbg(codec->dev,
>  			"No ReTune Mobile data, using normal EQ\n");
> @@ -1296,6 +1294,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9081 = {
>  	.reg_cache_default = wm9081_reg_defaults,
>  	.volatile_register = wm9081_volatile_register,
>  
> +	.controls         = wm9081_snd_controls,
> +	.num_controls     = ARRAY_SIZE(wm9081_snd_controls),
>  	.dapm_widgets	  = wm9081_dapm_widgets,
>  	.num_dapm_widgets = ARRAY_SIZE(wm9081_dapm_widgets),
>  	.dapm_routes     = wm9081_audio_paths,

Acked-by: Liam Girdwood <lrg@ti.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-18  7:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-17 22:54 [PATCH] ASoC: Convert WM9081 to table based control init Mark Brown
2011-10-18  7:49 ` Liam Girdwood

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).