Hi Mark, Lars again
format = fe_cpu->formats & fe_codec->formats & be_cpu->formats & be_codec->formats;
I guess it is done before hw_param() (?), or snd_soc_instantiate_card() timing. but I couldn't find it. It is very confusable/complex. which function is doing this ?
My point is that it's not happening and you're going to need to add that support. It's slightly more complex than your picture as most things that do DPCM can rewrite the format so we normally don't want to constrain with the back end constraints. Like I said in my eariler reply I think we want to change things so that if there's no front end constraint we take the back end one instead.
In my debug, I guess key function is dpcm_init_runtime_hw() But, I would like to know about concept about this.
If my understanding is correct, the information which userland can get is setuped in .open
In non-DPCM case
soc_pcm_open() - soc_pcm_init_runtime_hw() /* setup runtime->hw */
In DPCM case
dpcm_fe_dai_open() - dpcm_fe_dai_startup() - dpcm_be_dai_startup() - soc_pcm_open() /* don't care runtime->hw */ - soc_pcm_open() /* don't care runtime-hw */ - dpcm_set_fe_runtime() - dpcm_init_runtime_hw() /* setup runtime->hw */
I guess my issue will be solved if I added code here which cares BE. But, I wounder non-DPCM case, runtime->hw has cpu/codec merged information in soc_pcm_init_runtime_hw(). But, DPCM cases, it cares only cpu information. why it doesn't care codec ?
If my understanding was correct, corrent image is...
non-DPCM hw = cpu & codec
DPCM hw = fe_cpu
I guess DPCM should be...
FE.hw = fe_cpu & fe_codec BE.hw = be_cpu & be_codec
And, if no FE constraint, final image will be
hw = FE.hw & BE.hw
But, am I misunderstanding ?
Best regards --- Kuninori Morimoto