All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about dapm setup
@ 2019-05-29  4:50 Kuninori Morimoto
  2019-05-29 10:34 ` Charles Keepax
  0 siblings, 1 reply; 5+ messages in thread
From: Kuninori Morimoto @ 2019-05-29  4:50 UTC (permalink / raw)
  To: Linux-ALSA


Hi ALSA ML

snd_soc_instantiate_card() setups dapm, but its timing seems
very randomly for me.
In my understanding, dapm setup timing is not so serious.
So, I think we can do it in one place,
but are there some reasons ?
For example, "xxxx should be called after yyyy"


static int snd_soc_instantiate_card(struct snd_soc_card *card)
{
	...

=>	snd_soc_dapm_debugfs_init(&card->dapm, card->debugfs_card_root);

	...

	if (card->dapm_widgets)
		snd_soc_dapm_new_controls(&card->dapm, card->dapm_widgets,
					  card->num_dapm_widgets);

	if (card->of_dapm_widgets)
		snd_soc_dapm_new_controls(&card->dapm, card->of_dapm_widgets,
					  card->num_of_dapm_widgets);

	...

	snd_soc_dapm_link_dai_widgets(card);
	snd_soc_dapm_connect_dai_link_widgets(card);

	if (card->controls)
		snd_soc_add_card_controls(card, card->controls,
					  card->num_controls);

	if (card->dapm_routes)
		snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes,
					card->num_dapm_routes);

	if (card->of_dapm_routes)
		snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes,
					card->num_of_dapm_routes);
	...

	snd_soc_dapm_new_widgets(card);

	...

	dapm_mark_endpoints_dirty(card);
	snd_soc_dapm_sync(&card->dapm);
	...
}




Thank you for your help !!
Best regards
---
Kuninori Morimoto

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-05-31  0:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29  4:50 Question about dapm setup Kuninori Morimoto
2019-05-29 10:34 ` Charles Keepax
2019-05-30  0:12   ` Kuninori Morimoto
2019-05-30 14:56     ` Charles Keepax
2019-05-31  0:57       ` Kuninori Morimoto

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.