asoc: update digital_cdc_rsc_mgr_hw_vote API

Update digital_cdc_rsc_mgr_hw_vote_enable/disable API with device
info for easy debug. Also, add swrm clock enable checks during SSR.
When SSR happens, swrm->hw_core_clk_en and swrm->aud_core_clk_en will
be reset without resetting audio_vote and core_vote clk. This would
cause clk mismatch in audio driver and adsp and device fails suspending
when there's no audio usecase. Make this change to reset audio_vote
and core_vote clk when receiving SWR_DEVICE_SSR_DOWN.

Change-Id: I9875aac9f6faf8b6481457a70f31b005073369e0
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
Цей коміт міститься в:
Meng Wang
2021-12-21 09:12:31 +08:00
зафіксовано Gerrit - the friendly Code Review server
джерело 42e49611b0
коміт 95c95b2d67
6 змінених файлів з 34 додано та 22 видалено

Переглянути файл

@@ -366,7 +366,7 @@ int mi2s_tdm_hw_vote_req(struct msm_common_pdata *pdata, int enable)
if (enable) {
if (atomic_read(&pdata->lpass_audio_hw_vote_ref_cnt) == 0) {
ret = digital_cdc_rsc_mgr_hw_vote_enable(pdata->lpass_audio_hw_vote);
ret = digital_cdc_rsc_mgr_hw_vote_enable(pdata->lpass_audio_hw_vote, NULL);
if (ret < 0) {
pr_err("%s lpass audio hw vote enable failed %d\n",
__func__, ret);
@@ -377,7 +377,7 @@ int mi2s_tdm_hw_vote_req(struct msm_common_pdata *pdata, int enable)
} else {
atomic_dec(&pdata->lpass_audio_hw_vote_ref_cnt);
if (atomic_read(&pdata->lpass_audio_hw_vote_ref_cnt) == 0)
digital_cdc_rsc_mgr_hw_vote_disable(pdata->lpass_audio_hw_vote);
digital_cdc_rsc_mgr_hw_vote_disable(pdata->lpass_audio_hw_vote, NULL);
else if (atomic_read(&pdata->lpass_audio_hw_vote_ref_cnt) < 0)
atomic_set(&pdata->lpass_audio_hw_vote_ref_cnt, 0);
}