* [PATCH 1/6] ASoC: sn95031: Use table based control setup
@ 2014-11-05 9:46 Lars-Peter Clausen
2014-11-05 9:46 ` [PATCH 2/6] ASoC: tas2552: Use table based DAPM setup Lars-Peter Clausen
` (6 more replies)
0 siblings, 7 replies; 11+ messages in thread
From: Lars-Peter Clausen @ 2014-11-05 9:46 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: alsa-devel, Lars-Peter Clausen, Vinod Koul, patches, Dan Murphy,
Charles Keepax
Makes the code a bit cleaner.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
sound/soc/codecs/sn95031.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c
index cf8fa40..6167c59 100644
--- a/sound/soc/codecs/sn95031.c
+++ b/sound/soc/codecs/sn95031.c
@@ -867,9 +867,6 @@ static int sn95031_codec_probe(struct snd_soc_codec *codec)
snd_soc_write(codec, SN95031_SSR2, 0x10);
snd_soc_write(codec, SN95031_SSR3, 0x40);
- snd_soc_add_codec_controls(codec, sn95031_snd_controls,
- ARRAY_SIZE(sn95031_snd_controls));
-
return 0;
}
@@ -886,6 +883,9 @@ static struct snd_soc_codec_driver sn95031_codec = {
.remove = sn95031_codec_remove,
.set_bias_level = sn95031_set_vaud_bias,
.idle_bias_off = true,
+
+ .controls = sn95031_snd_controls,
+ .num_controls = ARRAY_SIZE(sn95031_snd_controls),
.dapm_widgets = sn95031_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(sn95031_dapm_widgets),
.dapm_routes = sn95031_audio_map,
--
1.8.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/6] ASoC: tas2552: Use table based DAPM setup
2014-11-05 9:46 [PATCH 1/6] ASoC: sn95031: Use table based control setup Lars-Peter Clausen
@ 2014-11-05 9:46 ` Lars-Peter Clausen
2014-11-05 9:46 ` [PATCH 3/6] ASoC: wl1273: Use table based control setup Lars-Peter Clausen
` (5 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Lars-Peter Clausen @ 2014-11-05 9:46 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: alsa-devel, Lars-Peter Clausen, Vinod Koul, patches, Dan Murphy,
Charles Keepax
Makes the code a bit cleaner and shorter.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
sound/soc/codecs/tas2552.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
index f039dc8..b505212 100644
--- a/sound/soc/codecs/tas2552.c
+++ b/sound/soc/codecs/tas2552.c
@@ -345,7 +345,6 @@ static const struct reg_default tas2552_init_regs[] = {
static int tas2552_codec_probe(struct snd_soc_codec *codec)
{
struct tas2552_data *tas2552 = snd_soc_codec_get_drvdata(codec);
- struct snd_soc_dapm_context *dapm = &codec->dapm;
int ret;
tas2552->codec = codec;
@@ -390,11 +389,6 @@ static int tas2552_codec_probe(struct snd_soc_codec *codec)
snd_soc_write(codec, TAS2552_CFG_2, TAS2552_BOOST_EN |
TAS2552_APT_EN | TAS2552_LIM_EN);
- snd_soc_dapm_new_controls(dapm, tas2552_dapm_widgets,
- ARRAY_SIZE(tas2552_dapm_widgets));
- snd_soc_dapm_add_routes(dapm, tas2552_audio_map,
- ARRAY_SIZE(tas2552_audio_map));
-
return 0;
patch_fail:
@@ -462,6 +456,10 @@ static struct snd_soc_codec_driver soc_codec_dev_tas2552 = {
.resume = tas2552_resume,
.controls = tas2552_snd_controls,
.num_controls = ARRAY_SIZE(tas2552_snd_controls),
+ .dapm_widgets = tas2552_dapm_widgets,
+ .num_dapm_widgets = ARRAY_SIZE(tas2552_dapm_widgets),
+ .dapm_routes = tas2552_audio_map,
+ .num_dapm_routes = ARRAY_SIZE(tas2552_audio_map),
};
static const struct regmap_config tas2552_regmap_config = {
--
1.8.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/6] ASoC: wl1273: Use table based control setup
2014-11-05 9:46 [PATCH 1/6] ASoC: sn95031: Use table based control setup Lars-Peter Clausen
2014-11-05 9:46 ` [PATCH 2/6] ASoC: tas2552: Use table based DAPM setup Lars-Peter Clausen
@ 2014-11-05 9:46 ` Lars-Peter Clausen
2014-11-05 9:46 ` [PATCH 4/6] ASoC: wm8737: Use table based DAPM and " Lars-Peter Clausen
` (4 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Lars-Peter Clausen @ 2014-11-05 9:46 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: alsa-devel, Lars-Peter Clausen, Vinod Koul, patches, Dan Murphy,
Charles Keepax
Makes the code a bit shorter and cleaner.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
sound/soc/codecs/wl1273.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/wl1273.c b/sound/soc/codecs/wl1273.c
index f3d4e88..00aea41 100644
--- a/sound/soc/codecs/wl1273.c
+++ b/sound/soc/codecs/wl1273.c
@@ -452,7 +452,6 @@ static int wl1273_probe(struct snd_soc_codec *codec)
{
struct wl1273_core **core = codec->dev->platform_data;
struct wl1273_priv *wl1273;
- int r;
dev_dbg(codec->dev, "%s.\n", __func__);
@@ -470,12 +469,7 @@ static int wl1273_probe(struct snd_soc_codec *codec)
snd_soc_codec_set_drvdata(codec, wl1273);
- r = snd_soc_add_codec_controls(codec, wl1273_controls,
- ARRAY_SIZE(wl1273_controls));
- if (r)
- kfree(wl1273);
-
- return r;
+ return 0;
}
static int wl1273_remove(struct snd_soc_codec *codec)
@@ -492,6 +486,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wl1273 = {
.probe = wl1273_probe,
.remove = wl1273_remove,
+ .controls = wl1273_controls,
+ .num_controls = ARRAY_SIZE(wl1273_controls),
.dapm_widgets = wl1273_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(wl1273_dapm_widgets),
.dapm_routes = wl1273_dapm_routes,
--
1.8.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/6] ASoC: wm8737: Use table based DAPM and control setup
2014-11-05 9:46 [PATCH 1/6] ASoC: sn95031: Use table based control setup Lars-Peter Clausen
2014-11-05 9:46 ` [PATCH 2/6] ASoC: tas2552: Use table based DAPM setup Lars-Peter Clausen
2014-11-05 9:46 ` [PATCH 3/6] ASoC: wl1273: Use table based control setup Lars-Peter Clausen
@ 2014-11-05 9:46 ` Lars-Peter Clausen
2014-11-05 14:21 ` Charles Keepax
2014-11-05 9:46 ` [PATCH 5/6] ASoC: wm8961: " Lars-Peter Clausen
` (3 subsequent siblings)
6 siblings, 1 reply; 11+ messages in thread
From: Lars-Peter Clausen @ 2014-11-05 9:46 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: alsa-devel, Lars-Peter Clausen, Vinod Koul, patches, Dan Murphy,
Charles Keepax
Makes the code a bit cleaner and shorter.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
sound/soc/codecs/wm8737.c | 22 +++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/sound/soc/codecs/wm8737.c b/sound/soc/codecs/wm8737.c
index 744a422..fe41dd2b 100644
--- a/sound/soc/codecs/wm8737.c
+++ b/sound/soc/codecs/wm8737.c
@@ -277,17 +277,6 @@ static const struct snd_soc_dapm_route intercon[] = {
{ "AIF", NULL, "ADCR" },
};
-static int wm8737_add_widgets(struct snd_soc_codec *codec)
-{
- struct snd_soc_dapm_context *dapm = &codec->dapm;
-
- snd_soc_dapm_new_controls(dapm, wm8737_dapm_widgets,
- ARRAY_SIZE(wm8737_dapm_widgets));
- snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon));
-
- return 0;
-}
-
/* codec mclk clock divider coefficients */
static const struct {
u32 mclk;
@@ -593,10 +582,6 @@ static int wm8737_probe(struct snd_soc_codec *codec)
/* Bias level configuration will have done an extra enable */
regulator_bulk_disable(ARRAY_SIZE(wm8737->supplies), wm8737->supplies);
- snd_soc_add_codec_controls(codec, wm8737_snd_controls,
- ARRAY_SIZE(wm8737_snd_controls));
- wm8737_add_widgets(codec);
-
return 0;
err_enable:
@@ -617,6 +602,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8737 = {
.suspend = wm8737_suspend,
.resume = wm8737_resume,
.set_bias_level = wm8737_set_bias_level,
+
+ .controls = wm8737_snd_controls,
+ .num_controls = ARRAY_SIZE(wm8737_snd_controls),
+ .dapm_widgets = wm8737_dapm_widgets,
+ .num_dapm_widgets = ARRAY_SIZE(wm8737_dapm_widgets),
+ .dapm_routes = intercon,
+ .num_dapm_routes = ARRAY_SIZE(intercon),
};
static const struct of_device_id wm8737_of_match[] = {
--
1.8.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/6] ASoC: wm8961: Use table based DAPM and control setup
2014-11-05 9:46 [PATCH 1/6] ASoC: sn95031: Use table based control setup Lars-Peter Clausen
` (2 preceding siblings ...)
2014-11-05 9:46 ` [PATCH 4/6] ASoC: wm8737: Use table based DAPM and " Lars-Peter Clausen
@ 2014-11-05 9:46 ` Lars-Peter Clausen
2014-11-05 14:22 ` Charles Keepax
2014-11-05 9:46 ` [PATCH 6/6] ASoC: wm8995: " Lars-Peter Clausen
` (2 subsequent siblings)
6 siblings, 1 reply; 11+ messages in thread
From: Lars-Peter Clausen @ 2014-11-05 9:46 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: alsa-devel, Lars-Peter Clausen, Vinod Koul, patches, Dan Murphy,
Charles Keepax
Makes the code a bit cleaner.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
sound/soc/codecs/wm8961.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c
index 41d23e9..e077bb2 100644
--- a/sound/soc/codecs/wm8961.c
+++ b/sound/soc/codecs/wm8961.c
@@ -835,7 +835,6 @@ static struct snd_soc_dai_driver wm8961_dai = {
static int wm8961_probe(struct snd_soc_codec *codec)
{
- struct snd_soc_dapm_context *dapm = &codec->dapm;
u16 reg;
/* Enable class W */
@@ -873,12 +872,6 @@ static int wm8961_probe(struct snd_soc_codec *codec)
wm8961_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
- snd_soc_add_codec_controls(codec, wm8961_snd_controls,
- ARRAY_SIZE(wm8961_snd_controls));
- snd_soc_dapm_new_controls(dapm, wm8961_dapm_widgets,
- ARRAY_SIZE(wm8961_dapm_widgets));
- snd_soc_dapm_add_routes(dapm, audio_paths, ARRAY_SIZE(audio_paths));
-
return 0;
}
@@ -915,6 +908,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8961 = {
.suspend = wm8961_suspend,
.resume = wm8961_resume,
.set_bias_level = wm8961_set_bias_level,
+
+ .controls = wm8961_snd_controls,
+ .num_controls = ARRAY_SIZE(wm8961_snd_controls),
+ .dapm_widgets = wm8961_dapm_widgets,
+ .num_dapm_widgets = ARRAY_SIZE(wm8961_dapm_widgets),
+ .dapm_routes = audio_paths,
+ .num_dapm_routes = ARRAY_SIZE(audio_paths),
};
static const struct regmap_config wm8961_regmap = {
--
1.8.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 6/6] ASoC: wm8995: Use table based DAPM and control setup
2014-11-05 9:46 [PATCH 1/6] ASoC: sn95031: Use table based control setup Lars-Peter Clausen
` (3 preceding siblings ...)
2014-11-05 9:46 ` [PATCH 5/6] ASoC: wm8961: " Lars-Peter Clausen
@ 2014-11-05 9:46 ` Lars-Peter Clausen
2014-11-05 14:22 ` Charles Keepax
2014-11-05 12:12 ` [PATCH 1/6] ASoC: sn95031: Use table based " Vinod Koul
2014-11-05 14:50 ` Mark Brown
6 siblings, 1 reply; 11+ messages in thread
From: Lars-Peter Clausen @ 2014-11-05 9:46 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: alsa-devel, Lars-Peter Clausen, Vinod Koul, patches, Dan Murphy,
Charles Keepax
Makes the code a bit cleaner.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
sound/soc/codecs/wm8995.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/wm8995.c b/sound/soc/codecs/wm8995.c
index 1288ede..e40c8a6 100644
--- a/sound/soc/codecs/wm8995.c
+++ b/sound/soc/codecs/wm8995.c
@@ -2102,13 +2102,6 @@ static int wm8995_probe(struct snd_soc_codec *codec)
wm8995_update_class_w(codec);
- snd_soc_add_codec_controls(codec, wm8995_snd_controls,
- ARRAY_SIZE(wm8995_snd_controls));
- snd_soc_dapm_new_controls(&codec->dapm, wm8995_dapm_widgets,
- ARRAY_SIZE(wm8995_dapm_widgets));
- snd_soc_dapm_add_routes(&codec->dapm, wm8995_intercon,
- ARRAY_SIZE(wm8995_intercon));
-
return 0;
err_reg_enable:
@@ -2205,6 +2198,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8995 = {
.remove = wm8995_remove,
.set_bias_level = wm8995_set_bias_level,
.idle_bias_off = true,
+
+ .controls = wm8995_snd_controls,
+ .num_controls = ARRAY_SIZE(wm8995_snd_controls),
+ .dapm_widgets = wm8995_dapm_widgets,
+ .num_dapm_widgets = ARRAY_SIZE(wm8995_dapm_widgets),
+ .dapm_routes = wm8995_intercon,
+ .num_dapm_routes = ARRAY_SIZE(wm8995_intercon),
};
static struct regmap_config wm8995_regmap = {
--
1.8.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/6] ASoC: sn95031: Use table based control setup
2014-11-05 9:46 [PATCH 1/6] ASoC: sn95031: Use table based control setup Lars-Peter Clausen
` (4 preceding siblings ...)
2014-11-05 9:46 ` [PATCH 6/6] ASoC: wm8995: " Lars-Peter Clausen
@ 2014-11-05 12:12 ` Vinod Koul
2014-11-05 14:50 ` Mark Brown
6 siblings, 0 replies; 11+ messages in thread
From: Vinod Koul @ 2014-11-05 12:12 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: alsa-devel, patches, Liam Girdwood, Mark Brown, Dan Murphy,
Charles Keepax
On Wed, Nov 05, 2014 at 10:46:31AM +0100, Lars-Peter Clausen wrote:
> Makes the code a bit cleaner.
Looks good to me,
Acked-by: Vinod Koul <vinod.koul@intel.com>
--
~Vinod
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> sound/soc/codecs/sn95031.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c
> index cf8fa40..6167c59 100644
> --- a/sound/soc/codecs/sn95031.c
> +++ b/sound/soc/codecs/sn95031.c
> @@ -867,9 +867,6 @@ static int sn95031_codec_probe(struct snd_soc_codec *codec)
> snd_soc_write(codec, SN95031_SSR2, 0x10);
> snd_soc_write(codec, SN95031_SSR3, 0x40);
>
> - snd_soc_add_codec_controls(codec, sn95031_snd_controls,
> - ARRAY_SIZE(sn95031_snd_controls));
> -
> return 0;
> }
>
> @@ -886,6 +883,9 @@ static struct snd_soc_codec_driver sn95031_codec = {
> .remove = sn95031_codec_remove,
> .set_bias_level = sn95031_set_vaud_bias,
> .idle_bias_off = true,
> +
> + .controls = sn95031_snd_controls,
> + .num_controls = ARRAY_SIZE(sn95031_snd_controls),
> .dapm_widgets = sn95031_dapm_widgets,
> .num_dapm_widgets = ARRAY_SIZE(sn95031_dapm_widgets),
> .dapm_routes = sn95031_audio_map,
> --
> 1.8.0
>
--
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/6] ASoC: wm8737: Use table based DAPM and control setup
2014-11-05 9:46 ` [PATCH 4/6] ASoC: wm8737: Use table based DAPM and " Lars-Peter Clausen
@ 2014-11-05 14:21 ` Charles Keepax
0 siblings, 0 replies; 11+ messages in thread
From: Charles Keepax @ 2014-11-05 14:21 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: alsa-devel, Vinod Koul, patches, Liam Girdwood, Mark Brown, Dan Murphy
On Wed, Nov 05, 2014 at 10:46:34AM +0100, Lars-Peter Clausen wrote:
> Makes the code a bit cleaner and shorter.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 5/6] ASoC: wm8961: Use table based DAPM and control setup
2014-11-05 9:46 ` [PATCH 5/6] ASoC: wm8961: " Lars-Peter Clausen
@ 2014-11-05 14:22 ` Charles Keepax
0 siblings, 0 replies; 11+ messages in thread
From: Charles Keepax @ 2014-11-05 14:22 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: alsa-devel, Vinod Koul, patches, Liam Girdwood, Mark Brown, Dan Murphy
On Wed, Nov 05, 2014 at 10:46:35AM +0100, Lars-Peter Clausen wrote:
> Makes the code a bit cleaner.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmiro.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 6/6] ASoC: wm8995: Use table based DAPM and control setup
2014-11-05 9:46 ` [PATCH 6/6] ASoC: wm8995: " Lars-Peter Clausen
@ 2014-11-05 14:22 ` Charles Keepax
0 siblings, 0 replies; 11+ messages in thread
From: Charles Keepax @ 2014-11-05 14:22 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: alsa-devel, Vinod Koul, patches, Liam Girdwood, Mark Brown, Dan Murphy
On Wed, Nov 05, 2014 at 10:46:36AM +0100, Lars-Peter Clausen wrote:
> Makes the code a bit cleaner.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/6] ASoC: sn95031: Use table based control setup
2014-11-05 9:46 [PATCH 1/6] ASoC: sn95031: Use table based control setup Lars-Peter Clausen
` (5 preceding siblings ...)
2014-11-05 12:12 ` [PATCH 1/6] ASoC: sn95031: Use table based " Vinod Koul
@ 2014-11-05 14:50 ` Mark Brown
6 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2014-11-05 14:50 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: alsa-devel, Vinod Koul, patches, Liam Girdwood, Dan Murphy,
Charles Keepax
[-- Attachment #1.1: Type: text/plain, Size: 118 bytes --]
On Wed, Nov 05, 2014 at 10:46:31AM +0100, Lars-Peter Clausen wrote:
> Makes the code a bit cleaner.
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-11-05 14:50 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-05 9:46 [PATCH 1/6] ASoC: sn95031: Use table based control setup Lars-Peter Clausen
2014-11-05 9:46 ` [PATCH 2/6] ASoC: tas2552: Use table based DAPM setup Lars-Peter Clausen
2014-11-05 9:46 ` [PATCH 3/6] ASoC: wl1273: Use table based control setup Lars-Peter Clausen
2014-11-05 9:46 ` [PATCH 4/6] ASoC: wm8737: Use table based DAPM and " Lars-Peter Clausen
2014-11-05 14:21 ` Charles Keepax
2014-11-05 9:46 ` [PATCH 5/6] ASoC: wm8961: " Lars-Peter Clausen
2014-11-05 14:22 ` Charles Keepax
2014-11-05 9:46 ` [PATCH 6/6] ASoC: wm8995: " Lars-Peter Clausen
2014-11-05 14:22 ` Charles Keepax
2014-11-05 12:12 ` [PATCH 1/6] ASoC: sn95031: Use table based " Vinod Koul
2014-11-05 14:50 ` Mark Brown
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.