On Fri, Apr 10, 2015 at 07:12:28AM +0000, Kuninori Morimoto wrote:
I'm not sure what exactly was intended here but this seems to need fixing in the core - I think the assumption in the DPCM code is that the sort of hardware that uses it will have rewriting support that makes the back end constraints irrelevant to the front end. I think what we want here is some way to signal to the framework that the front end constraints aren't used and it should use the back end ones instead - perhaps just omit the constraints that aren't rewritten and then have the framework take those from the backend instead.
Now I'm debuging about this issue, but it is very complex. I need your help. where should I check/debug ?
I think you're going to need to implement some new code.
Which function/method controls format ? I guess it is doning some kind of
format = cpu->formats & codec->formats;
DPCM case need to care about FE/BE, and maybe this is lost item.
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.