Thread (20 messages) flat view 20 messages, 4 authors, 2012-08-01
STALE5151d

[PATCH 3/4] ASoC: sgtl5000: remove unneeded snd_soc_dapm_new_widgets in probe

From: Dong Aisheng <hidden>
Date: 2012-07-20 09:20:26
Also in: alsa-devel
Subsystem: nxp sgtl5000 driver, sound, sound - soc layer / dynamic audio power management (asoc), the rest · Maintainers: Fabio Estevam, Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown, Linus Torvalds

From: Dong Aisheng <redacted>

There's a driver bug that sgtl5000 dapm widget kcontrols do not work.
e.g. can not select capture mux with amixer tool(no error info prompted).

The root cause is that we still call snd_soc_dapm_new_widgets in
codec driver probe function afer converting to table based widgets.
This will cause the card dapm widgets are instantiated before the
dapm_routes are registered.
Then, no available dapm widget pathes can be found during instantiation
which finally will cause soc_dapm_mux_update_power to fail(can not find
correct path with kcontrol) in snd_soc_dapm_put_enum_double function.

Here we remove the unneeded snd_soc_dapm_new_widgets in codec probe
and let the soc core to handle the register sequence properly.
Then we can fix above issue.

Cc: Mark Brown <redacted>
Cc: Liam Girdwood <redacted>
Cc: Wolfram Sang <redacted>
Cc: Shawn Guo <redacted>
Signed-off-by: Dong Aisheng <redacted>
---
 sound/soc/codecs/sgtl5000.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 8af6a52..5c54b6f 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1357,8 +1357,6 @@ static int sgtl5000_probe(struct snd_soc_codec *codec)
 	if (ret)
 		goto err;
 
-	snd_soc_dapm_new_widgets(&codec->dapm);
-
 	return 0;
 
 err:
-- 
1.7.0.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help