* [PATCH 1/2] ASoC: codecs: JZ4740: Fix OOPS
@ 2011-04-12 17:33 Lars-Peter Clausen
2011-04-12 17:33 ` [PATCH 2/2] ASoC: codecs: JZ4740: Convert to table based controls and DAPM setup Lars-Peter Clausen
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Lars-Peter Clausen @ 2011-04-12 17:33 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood; +Cc: alsa-devel, linux-kernel, Lars-Peter Clausen
Commit ce6120cc(ASoC: Decouple DAPM from CODECs) changed the signature of
snd_soc_dapm_widgets_new to take an pointer to a snd_soc_dapm_context instead of
a snd_soc_codec. The call to snd_soc_dapm_widgets_new in jz4740_codec_dev_probe
was not updated to reflect this change, which results in a compiletime warning
and a runtime OOPS.
Since the core code calls snd_soc_dapm_widgets_new after the codec has been
registered it can be dropped here.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
sound/soc/codecs/jz4740.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c
index f7cd346..f5ccdbf7 100644
--- a/sound/soc/codecs/jz4740.c
+++ b/sound/soc/codecs/jz4740.c
@@ -308,8 +308,6 @@ static int jz4740_codec_dev_probe(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(dapm, jz4740_codec_dapm_routes,
ARRAY_SIZE(jz4740_codec_dapm_routes));
- snd_soc_dapm_new_widgets(codec);
-
jz4740_codec_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;
--
1.7.2.5
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] ASoC: codecs: JZ4740: Convert to table based controls and DAPM setup 2011-04-12 17:33 [PATCH 1/2] ASoC: codecs: JZ4740: Fix OOPS Lars-Peter Clausen @ 2011-04-12 17:33 ` Lars-Peter Clausen 2011-04-13 7:39 ` [alsa-devel] [PATCH 1/2] ASoC: codecs: JZ4740: Fix OOPS Liam Girdwood 2011-04-13 17:36 ` Mark Brown 2 siblings, 0 replies; 4+ messages in thread From: Lars-Peter Clausen @ 2011-04-12 17:33 UTC (permalink / raw) To: Mark Brown, Liam Girdwood; +Cc: alsa-devel, linux-kernel, Lars-Peter Clausen Use the newly introduced dapm_widgets, dpam_routes and controls fields of the snd_soc_dai_driver struct to setup controls and DAPM. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> --- sound/soc/codecs/jz4740.c | 18 +++++++----------- 1 files changed, 7 insertions(+), 11 deletions(-) diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c index f5ccdbf7..e373f8f 100644 --- a/sound/soc/codecs/jz4740.c +++ b/sound/soc/codecs/jz4740.c @@ -294,20 +294,9 @@ static int jz4740_codec_set_bias_level(struct snd_soc_codec *codec, static int jz4740_codec_dev_probe(struct snd_soc_codec *codec) { - struct snd_soc_dapm_context *dapm = &codec->dapm; - snd_soc_update_bits(codec, JZ4740_REG_CODEC_1, JZ4740_CODEC_1_SW2_ENABLE, JZ4740_CODEC_1_SW2_ENABLE); - snd_soc_add_controls(codec, jz4740_codec_controls, - ARRAY_SIZE(jz4740_codec_controls)); - - snd_soc_dapm_new_controls(dapm, jz4740_codec_dapm_widgets, - ARRAY_SIZE(jz4740_codec_dapm_widgets)); - - snd_soc_dapm_add_routes(dapm, jz4740_codec_dapm_routes, - ARRAY_SIZE(jz4740_codec_dapm_routes)); - jz4740_codec_set_bias_level(codec, SND_SOC_BIAS_STANDBY); return 0; @@ -348,6 +337,13 @@ static struct snd_soc_codec_driver soc_codec_dev_jz4740_codec = { .reg_cache_default = jz4740_codec_regs, .reg_word_size = sizeof(u32), .reg_cache_size = 2, + + .controls = jz4740_codec_controls, + .num_controls = ARRAY_SIZE(jz4740_codec_controls), + .dapm_widgets = jz4740_codec_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(jz4740_codec_dapm_widgets), + .dapm_routes = jz4740_codec_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(jz4740_codec_dapm_routes), }; static int __devinit jz4740_codec_probe(struct platform_device *pdev) -- 1.7.2.5 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [alsa-devel] [PATCH 1/2] ASoC: codecs: JZ4740: Fix OOPS 2011-04-12 17:33 [PATCH 1/2] ASoC: codecs: JZ4740: Fix OOPS Lars-Peter Clausen 2011-04-12 17:33 ` [PATCH 2/2] ASoC: codecs: JZ4740: Convert to table based controls and DAPM setup Lars-Peter Clausen @ 2011-04-13 7:39 ` Liam Girdwood 2011-04-13 17:36 ` Mark Brown 2 siblings, 0 replies; 4+ messages in thread From: Liam Girdwood @ 2011-04-13 7:39 UTC (permalink / raw) To: Lars-Peter Clausen; +Cc: Mark Brown, alsa-devel, linux-kernel On Tue, 2011-04-12 at 19:33 +0200, Lars-Peter Clausen wrote: > Commit ce6120cc(ASoC: Decouple DAPM from CODECs) changed the signature of > snd_soc_dapm_widgets_new to take an pointer to a snd_soc_dapm_context instead of > a snd_soc_codec. The call to snd_soc_dapm_widgets_new in jz4740_codec_dev_probe > was not updated to reflect this change, which results in a compiletime warning > and a runtime OOPS. > > Since the core code calls snd_soc_dapm_widgets_new after the codec has been > registered it can be dropped here. > > Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> > --- Both Acked-by: Liam Girdwood <lrg@ti.com> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] ASoC: codecs: JZ4740: Fix OOPS 2011-04-12 17:33 [PATCH 1/2] ASoC: codecs: JZ4740: Fix OOPS Lars-Peter Clausen 2011-04-12 17:33 ` [PATCH 2/2] ASoC: codecs: JZ4740: Convert to table based controls and DAPM setup Lars-Peter Clausen 2011-04-13 7:39 ` [alsa-devel] [PATCH 1/2] ASoC: codecs: JZ4740: Fix OOPS Liam Girdwood @ 2011-04-13 17:36 ` Mark Brown 2 siblings, 0 replies; 4+ messages in thread From: Mark Brown @ 2011-04-13 17:36 UTC (permalink / raw) To: Lars-Peter Clausen; +Cc: Liam Girdwood, alsa-devel, linux-kernel On Tue, Apr 12, 2011 at 07:33:28PM +0200, Lars-Peter Clausen wrote: > Commit ce6120cc(ASoC: Decouple DAPM from CODECs) changed the signature of > snd_soc_dapm_widgets_new to take an pointer to a snd_soc_dapm_context instead of > a snd_soc_codec. The call to snd_soc_dapm_widgets_new in jz4740_codec_dev_probe Applied both, thanks. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-13 17:36 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-04-12 17:33 [PATCH 1/2] ASoC: codecs: JZ4740: Fix OOPS Lars-Peter Clausen 2011-04-12 17:33 ` [PATCH 2/2] ASoC: codecs: JZ4740: Convert to table based controls and DAPM setup Lars-Peter Clausen 2011-04-13 7:39 ` [alsa-devel] [PATCH 1/2] ASoC: codecs: JZ4740: Fix OOPS Liam Girdwood 2011-04-13 17:36 ` Mark Brown
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).