* [PATCH 1/3] ASoC: wm8{350, 753, 971}: Use snd_soc_dapm_to_codec() instead of dapm->codec
@ 2014-09-29 9:40 Lars-Peter Clausen
2014-09-29 9:40 ` [PATCH 2/3] ASoC: rx51: " Lars-Peter Clausen
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Lars-Peter Clausen @ 2014-09-29 9:40 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: alsa-devel, Lars-Peter Clausen, patches, Peter Ujfalusi,
Charles Keepax, Jarkko Nikula
The CODEC struct in the snd_soc_dapm_context struct is deprecated and
scheduled for removal. Use the snd_soc_dapm_to_codec() function instead.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
sound/soc/codecs/wm8350.c | 2 +-
sound/soc/codecs/wm8753.c | 2 +-
sound/soc/codecs/wm8971.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
index 3dfdcc4..628ec77 100644
--- a/sound/soc/codecs/wm8350.c
+++ b/sound/soc/codecs/wm8350.c
@@ -212,7 +212,7 @@ static void wm8350_pga_work(struct work_struct *work)
{
struct snd_soc_dapm_context *dapm =
container_of(work, struct snd_soc_dapm_context, delayed_work.work);
- struct snd_soc_codec *codec = dapm->codec;
+ struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm);
struct wm8350_data *wm8350_data = snd_soc_codec_get_drvdata(codec);
struct wm8350_output *out1 = &wm8350_data->out1,
*out2 = &wm8350_data->out2;
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index e54e097..21ca3a9 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -1433,7 +1433,7 @@ static void wm8753_work(struct work_struct *work)
struct snd_soc_dapm_context *dapm =
container_of(work, struct snd_soc_dapm_context,
delayed_work.work);
- struct snd_soc_codec *codec = dapm->codec;
+ struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm);
wm8753_set_bias_level(codec, dapm->bias_level);
}
diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c
index 0499cd4..39ddb9b 100644
--- a/sound/soc/codecs/wm8971.c
+++ b/sound/soc/codecs/wm8971.c
@@ -615,7 +615,7 @@ static void wm8971_work(struct work_struct *work)
struct snd_soc_dapm_context *dapm =
container_of(work, struct snd_soc_dapm_context,
delayed_work.work);
- struct snd_soc_codec *codec = dapm->codec;
+ struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm);
wm8971_set_bias_level(codec, codec->dapm.bias_level);
}
--
1.8.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/3] ASoC: rx51: Use snd_soc_dapm_to_codec() instead of dapm->codec
2014-09-29 9:40 [PATCH 1/3] ASoC: wm8{350, 753, 971}: Use snd_soc_dapm_to_codec() instead of dapm->codec Lars-Peter Clausen
@ 2014-09-29 9:40 ` Lars-Peter Clausen
2014-09-29 15:33 ` Jarkko Nikula
2014-09-29 9:40 ` [PATCH 3/3] ASoC: Remove CODEC pointer from snd_soc_dapm_context Lars-Peter Clausen
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Lars-Peter Clausen @ 2014-09-29 9:40 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: alsa-devel, Lars-Peter Clausen, patches, Peter Ujfalusi,
Charles Keepax, Jarkko Nikula
The CODEC struct in the snd_soc_dapm_context struct is deprecated and
scheduled for removal. Use the snd_soc_dapm_to_codec() function instead.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
sound/soc/omap/rx51.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c
index 943922c..b10ae80 100644
--- a/sound/soc/omap/rx51.c
+++ b/sound/soc/omap/rx51.c
@@ -168,7 +168,7 @@ static int rx51_spk_event(struct snd_soc_dapm_widget *w,
static int rx51_hp_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event)
{
- struct snd_soc_codec *codec = w->dapm->codec;
+ struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
if (SND_SOC_DAPM_EVENT_ON(event))
tpa6130a2_stereo_enable(codec, 1);
--
1.8.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 2/3] ASoC: rx51: Use snd_soc_dapm_to_codec() instead of dapm->codec
2014-09-29 9:40 ` [PATCH 2/3] ASoC: rx51: " Lars-Peter Clausen
@ 2014-09-29 15:33 ` Jarkko Nikula
0 siblings, 0 replies; 6+ messages in thread
From: Jarkko Nikula @ 2014-09-29 15:33 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: alsa-devel, patches, Liam Girdwood, Peter Ujfalusi, Mark Brown,
Charles Keepax
On Mon, Sep 29, 2014 at 11:40:41AM +0200, Lars-Peter Clausen wrote:
> The CODEC struct in the snd_soc_dapm_context struct is deprecated and
> scheduled for removal. Use the snd_soc_dapm_to_codec() function instead.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> sound/soc/omap/rx51.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/3] ASoC: Remove CODEC pointer from snd_soc_dapm_context
2014-09-29 9:40 [PATCH 1/3] ASoC: wm8{350, 753, 971}: Use snd_soc_dapm_to_codec() instead of dapm->codec Lars-Peter Clausen
2014-09-29 9:40 ` [PATCH 2/3] ASoC: rx51: " Lars-Peter Clausen
@ 2014-09-29 9:40 ` Lars-Peter Clausen
2014-09-29 12:53 ` [PATCH 1/3] ASoC: wm8{350, 753, 971}: Use snd_soc_dapm_to_codec() instead of dapm->codec Charles Keepax
2014-09-29 17:31 ` Mark Brown
3 siblings, 0 replies; 6+ messages in thread
From: Lars-Peter Clausen @ 2014-09-29 9:40 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: alsa-devel, Lars-Peter Clausen, patches, Peter Ujfalusi,
Charles Keepax, Jarkko Nikula
The only remaining user of the CODEC pointer in the DAPM struct is to
initialize the CODEC pointer in the widget struct. The later is scheduled
for removal, but has still a few users left. For now use
dapm->component->codec to initialize it.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
include/sound/soc-dapm.h | 1 -
sound/soc/soc-core.c | 1 -
sound/soc/soc-dapm.c | 2 +-
3 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index f955d65..fa03217 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -594,7 +594,6 @@ struct snd_soc_dapm_context {
struct device *dev; /* from parent - for debug */
struct snd_soc_component *component; /* parent component */
- struct snd_soc_codec *codec; /* parent codec */
struct snd_soc_card *card; /* parent card */
/* used during DAPM updates */
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 263514a..3d8cff6 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -4353,7 +4353,6 @@ int snd_soc_register_codec(struct device *dev,
if (codec_drv->read)
codec->component.read = snd_soc_codec_drv_read;
codec->component.ignore_pmdown_time = codec_drv->ignore_pmdown_time;
- codec->dapm.codec = codec;
codec->dapm.idle_bias_off = codec_drv->idle_bias_off;
codec->dapm.suspend_bias_off = codec_drv->suspend_bias_off;
if (codec_drv->seq_notifier)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 7efe4fa..2d06892 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3125,7 +3125,7 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
}
w->dapm = dapm;
- w->codec = dapm->codec;
+ w->codec = dapm->component->codec;
INIT_LIST_HEAD(&w->sources);
INIT_LIST_HEAD(&w->sinks);
INIT_LIST_HEAD(&w->list);
--
1.8.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 1/3] ASoC: wm8{350, 753, 971}: Use snd_soc_dapm_to_codec() instead of dapm->codec
2014-09-29 9:40 [PATCH 1/3] ASoC: wm8{350, 753, 971}: Use snd_soc_dapm_to_codec() instead of dapm->codec Lars-Peter Clausen
2014-09-29 9:40 ` [PATCH 2/3] ASoC: rx51: " Lars-Peter Clausen
2014-09-29 9:40 ` [PATCH 3/3] ASoC: Remove CODEC pointer from snd_soc_dapm_context Lars-Peter Clausen
@ 2014-09-29 12:53 ` Charles Keepax
2014-09-29 17:31 ` Mark Brown
3 siblings, 0 replies; 6+ messages in thread
From: Charles Keepax @ 2014-09-29 12:53 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: alsa-devel, patches, Liam Girdwood, Peter Ujfalusi, Mark Brown,
Jarkko Nikula
On Mon, Sep 29, 2014 at 11:40:40AM +0200, Lars-Peter Clausen wrote:
> The CODEC struct in the snd_soc_dapm_context struct is deprecated and
> scheduled for removal. Use the snd_soc_dapm_to_codec() function instead.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 1/3] ASoC: wm8{350, 753, 971}: Use snd_soc_dapm_to_codec() instead of dapm->codec
2014-09-29 9:40 [PATCH 1/3] ASoC: wm8{350, 753, 971}: Use snd_soc_dapm_to_codec() instead of dapm->codec Lars-Peter Clausen
` (2 preceding siblings ...)
2014-09-29 12:53 ` [PATCH 1/3] ASoC: wm8{350, 753, 971}: Use snd_soc_dapm_to_codec() instead of dapm->codec Charles Keepax
@ 2014-09-29 17:31 ` Mark Brown
3 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2014-09-29 17:31 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: alsa-devel, patches, Liam Girdwood, Peter Ujfalusi,
Charles Keepax, Jarkko Nikula
[-- Attachment #1.1: Type: text/plain, Size: 237 bytes --]
On Mon, Sep 29, 2014 at 11:40:40AM +0200, Lars-Peter Clausen wrote:
> The CODEC struct in the snd_soc_dapm_context struct is deprecated and
> scheduled for removal. Use the snd_soc_dapm_to_codec() function instead.
Applied all, 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] 6+ messages in thread
end of thread, other threads:[~2014-09-29 17:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-29 9:40 [PATCH 1/3] ASoC: wm8{350, 753, 971}: Use snd_soc_dapm_to_codec() instead of dapm->codec Lars-Peter Clausen
2014-09-29 9:40 ` [PATCH 2/3] ASoC: rx51: " Lars-Peter Clausen
2014-09-29 15:33 ` Jarkko Nikula
2014-09-29 9:40 ` [PATCH 3/3] ASoC: Remove CODEC pointer from snd_soc_dapm_context Lars-Peter Clausen
2014-09-29 12:53 ` [PATCH 1/3] ASoC: wm8{350, 753, 971}: Use snd_soc_dapm_to_codec() instead of dapm->codec Charles Keepax
2014-09-29 17:31 ` 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.