Repository navigation
ASoC: SOF: pcm: skip pcm_prepare for BE dai - #816
Conversation
|
@plbossart @ranj063 some kind of fix to thesofproject/sof#1250 @RanderWang |
There was a problem hiding this comment.
@xiulipan i just fixed a bunch of these copy past errors. "todo" is not one word. it should be "to do". Otherwise the fix looks correct.
There was a problem hiding this comment.
@ranj063
So should I fix this only or just fix all the todo? Since I copy paste it from the existing other function.
|
@ranj063 |
plbossart
left a comment
There was a problem hiding this comment.
For Pete's sake, please do not use 'some issue' in any issue or commit message. You have to clearly state what you are fixing
pcm_prepare also need to skip BE dai. This will fix snd_sof_find_spcm_dai fail issue, since we do not have spcm for BE dai. Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
|
@plbossart @ranj063 |
Sorry, what are you trying to say with 'some luck'. it's not a common English wording and I could interpret it in ways you did not intend. |
|
@plbossart |
|
@xiulipan did you mean the Up2 board works by accident? I can accept the argument, but I don't get what changed and resulted in the Minnowboard no longer working because of dai link indexes. I am not aware of topology changes and I do recall testing a long time ago when we fixed the SSP register settings. |
|
@plbossart |
|
@plbossart I can explain this. pcm_prepare ioctl is a recent addition following Takashi's suggestion and the first thing it does it look up the spcm with the dai link id to see if the hw_params needs to be set up again or not and this ioctl is called for both FE and BE dailinks. In the case of BE, we should just return without doing anything (which is what this PR does). As to why we didnt create trouble on the UP2 nocodec case: It's because when we find a spcm for a dai link we use the dai link ID to match and if you look in the topology we have a perfect match between FE and BE dai link ID's. So we will return a valid spcm for all the BE dai links as well. But in the byt nocodec topology, the FE dai link ID's are 0 and 1 whereas we only define BE dai link for SSP2 is 2 and this results in the match returning a NULL. |
|
thanks @ranj063. I wish I had seen those explanations earlier with a bit more context on what problem this addressed. It's really a consistent pattern of not describing what is being fixed, what generated the issue and how it's being fixed. |
pcm_prepare will call only sof_pcm_hw_params and it will skip BE dai.
There will be some issue to find the right BE dai with
snd_sof_find_spcm_dai.
Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com