ASoC: SOF: Intel: hda: refine resume with init chip#1020
Conversation
|
I don't have time to look into this so will have to rely on others to approve. |
|
@zhuyingjiang while the overall flow looks OK, can you please check why you need to clear WAKESTS twice in hda_dsp_ctrl_init_chip() for the HDA case? Also, clearing WAKESTS should use snd_sof_dsp_write, update_bits() will not really clear it. |
There was a problem hiding this comment.
Code looks good, but again a few notes to the commit message. See also Ranjani's note on WAKESTS clearing.
Commit message for first -- minor change to make it easier to read.
Set the HDA stream position buffer during init chip. The position buffer
needs to be set in both HDA codec and nocodec cases. Use the SOF
defined function and move it to common code.
Commit message for the second -- here the explanation goes in a weird
order. I think it's better to start with the "unify resume code" to explain why
you are doing this and then add detail about the implementation. Otherwise
it's a bit hard to follow if you start with details and then reveal at the end
why you did it.
Unify resume code by using SOF common function hda_dsp_ctrl_init_chip()
which can handle both HDA and non-HDA cases. Move code to reset
stream-to-link mapping into hda_dsp_ctrl_init_chip.
Also in both, you can word-wrap to 74 columns.
|
@zhuyingjiang also please resolve conflicts |
@ranj063 As I checked, here should use snd_sof_dsp_write, I will update it. |
Thanks @kv2019i Will update it after some other check. |
7a5c98a to
f89585b
Compare
|
@plbossart @kv2019i @ranj063 Updated. |
kv2019i
left a comment
There was a problem hiding this comment.
Thanks, commits look good!
@RanderWang , @lyakh and @ranj063 : just to double check, is is safe to not do WAKESTS clearing before controller reset? The old code was wrong (it should not use update bits), but given we had many issues with the headset/wake detection, I want to be extra careful here.
@kv2019i I have a feeling this should be fine. With WAKEEN , we could be resuming because of a codec status change which is recorded before the controller is reset. But let me test this PR today just to make sure |
@kv2019i I have already test this on WHL RVP. It is OK. |
Ok great, thanks for confirming. Then this looks good to go. |
|
@zhuyingjiang can you please update your branch ? |
@ranj063 Sorry I don't get what you mean by "update branch", the target branch is not sof-dev? or there still need some more modification? |
@zhuyingjiang the status shows that the branch is out-of-date with the base branch. So I cant merge it as is |
f89585b to
cca4d1f
Compare
@ranj063 @RanderWang @keyonjie Rebased. |
|
@lyakh Your requested changes need to be addressed to merge the PR. Please review for me, thanks! |
5699e48 to
18fd15d
Compare
|
@lyakh removed that initialization. |
|
@zhuyingjiang sorry I've just merged the upstream changes. So could you please rebase and resubmit? |
OK. |
Set the HDA stream position buffer during init chip. The position buffer needs to be set in both HDA codec and nocodec cases. Using SOF defined function and move it to common code. Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
Unify resume code by using SOF common function hda_dsp_ctrl_init_chip() which can handle both HDA and non-HDA cases. Move code to reset stream-to-link mapping into hda_dsp_ctrl_init_chip(). Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
Remove the first clear WAKESTS, only one clear is needed during init chip. Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
18fd15d to
5ac2176
Compare
lyakh
left a comment
There was a problem hiding this comment.
formally looks fine to me.
Unify resume code by using SOF common function hda_dsp_ctrl_init_chip() which can handle both HDA and
non-HDA cases.