[alsa-devel] Question about aux device
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Wed May 29 06:28:08 CEST 2019
Hi ALSA ML
I wonder about aux device probe method.
Does someone know about it ?
(1)
snd_soc_instantiate_card() binds all (normal) components by
soc_bind_dai_link()
~~~~~~~~~~~~~~~~~
(2)
And initialize/probe all binded (normal) components after that.
Here, in this operation, it will calls soc_probe_component().
~~~~~~~~~~~~~~~~~~~
(3)
After that, auxiliary component is probed by using soc_probe_component()
~~~~~~~~~~~~~~~~~~~
(4)
And, auxiliary component is binded by soc_bind_dai_link() after that.
~~~~~~~~~~~~~~~~~
static int snd_soc_instantiate_card(struct snd_soc_card *card)
{
...
/* probe normal components here */
for_each_card_prelinks(card, i, dai_link) {
(1)=> ret = soc_bind_dai_link(card, dai_link);
if (ret != 0)
goto probe_end;
}
...
/* probe all components used by DAI links on this card */
for_each_comp_order(order) {
for_each_card_rtds(card, rtd) {
(2)=> ret = soc_probe_link_components(card, rtd, order);
...
}
}
}
/* probe auxiliary components */
(3)=> ret = soc_probe_aux_devices(card);
...
for_each_card_links(card, dai_link) {
...
(4)=> ret = soc_bind_dai_link(card, dai_link);
...
}
}
1st question is it seems the order of (1)/(2) and (3)/(4) are different.
are there some reason about it ? or no reason ?
2nd question is can we merge these ? (1)+(4) and (2)+(3).
Or do we have some reason ?
For example (3)/(4) need to be called after xxxx.
Thank you for your help !!
Best regards
---
Kuninori Morimoto
More information about the Alsa-devel
mailing list