On 3/17/2021 4:16 PM, Srinivas Kandagatla wrote:
Hi All,
Am trying to load a FrontEnd/pcm dai definition from ASoC topology however I hit a catch 22 situation here. Topology is loaded as part of component probe() but component probe is only called as part of sound-card bind().
Any pointers on how is this supposed to work?
Thanks, srini
Hi,
I would say I partially described how it works, when writing topology kunit tests, here is link to cover letter: https://lore.kernel.org/alsa-devel/20210120152846.1703655-1-amadeuszx.slawin...
To sum it up, there is no predefined order in which component and card should be created. After each one of them is created ASoC tries to rebind everything together and it should call component probe if everything connects correctly.
I'm not sure what problem you are seeing, but if you look at topology test cases I only define BE in it, no FEs. So I guess you can look at it.
You can also look at skylake (sound/soc/intel/skylake) or SOF (sound/soc/sof/) driver code which are real use cases of topology.
skylake and SOF code have pcm part which creates component and registers probe function responsible for loading topology. Separate part are machine drivers which create card (sound/soc/intel/boards).