ASoC: wm8{350, 753, 971}: Use snd_soc_dapm_to_codec() instead of dapm->codec
Subsystems (3)
PATCH 1/3 ASoC: wm8{350, 753, 971}: Use snd_soc_dapm_to_codec() instead of dapm->codec
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.
--- 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(-)
sound/soc/codecs/wm8350.c +1 -1
@@ -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;
sound/soc/codecs/wm8753.c +1 -1
@@ -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); }
sound/soc/codecs/wm8971.c +1 -1
@@ -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); }
Signature · 1 line
1.8.0
PATCH 2/3 ASoC: rx51: Use snd_soc_dapm_to_codec() instead of dapm->codec
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.
--- sound/soc/omap/rx51.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/omap/rx51.c +1 -1
@@ -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 );
Signature · 1 line
1.8.0
Re: [PATCH 2/3] ASoC: rx51: Use snd_soc_dapm_to_codec() instead of dapm->codec
Quoted 8 lines · Lars-Peter Clausen
The CODEC struct in the
snd_soc_dapm_contextstruct is deprecated and scheduled for removal. Use thesnd_soc_dapm_to_codec()function instead.Signed-off-by Lars-Peter Clausen <[email protected]>--- sound/soc/omap/rx51.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
PATCH 3/3 ASoC: Remove CODEC pointer from snd_soc_dapm_context
In reply to Lars-Peter ClausenThe 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.
--- 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(-)
include/sound/soc-dapm.h +0 -1
@@ -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 */
sound/soc/soc-core.c +0 -1
@@ -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)
sound/soc/soc-dapm.c +1 -1
@@ -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);
Signature · 1 line
1.8.0
Quoted 5 lines · Lars-Peter Clausen
The CODEC struct in the
snd_soc_dapm_contextstruct is deprecated and scheduled for removal. Use thesnd_soc_dapm_to_codec()function instead.Signed-off-by Lars-Peter Clausen <[email protected]>---
Thanks,
Charles
Quoted 2 lines · Lars-Peter Clausen
The CODEC struct in the
snd_soc_dapm_contextstruct is deprecated and scheduled for removal. Use thesnd_soc_dapm_to_codec()function instead.
Applied all, thanks.