audio-kernel: Remove spf_apm_close_all from machine driver

Call spf_apm_close_all and msm_ion_crasH_handler from audio-pkt driver
only to avoid calling for these APIs twice.

Change-Id: I69f8f9cbafd5b08a24b45c8229d22a639eb35b8b
Signed-off-by: Ritu Sharma <quic_ritushar@quicinc.com>
This commit is contained in:
Ritu Sharma
2023-04-06 12:08:41 +05:30
committed by Gerrit - the friendly Code Review server
parent 96aa37207f
commit ec9966e427

View File

@@ -236,34 +236,6 @@ done:
return ret;
}
static void check_userspace_service_state(struct snd_soc_pcm_runtime *rtd,
struct msm_common_pdata *pdata)
{
uint32_t i;
dev_info(rtd->card->dev,"%s: pcm_id %d state %d\n", __func__,
rtd->num, pdata->aud_dev_state[rtd->num]);
mutex_lock(&pdata->aud_dev_lock);
if (pdata->aud_dev_state[rtd->num] == DEVICE_ENABLE) {
dev_info(rtd->card->dev, "%s userspace service crashed\n",
__func__);
/*Reset the state as sysfs node wont be triggred*/
pdata->aud_dev_state[rtd->num] = DEVICE_DISABLE;
for (i = 0; i < pdata->num_aud_devs; i++) {
if (pdata->aud_dev_state[i] == DEVICE_ENABLE)
goto exit;
}
/*Issue close all graph cmd to DSP*/
spf_core_apm_close_all();
/*unmap all dma mapped buffers*/
msm_audio_ion_crash_handler();
}
exit:
mutex_unlock(&pdata->aud_dev_lock);
return;
}
static int get_mi2s_tdm_auxpcm_intf_index(const char *stream_name)
{
@@ -581,8 +553,6 @@ void msm_common_snd_shutdown(struct snd_pcm_substream *substream)
return;
}
check_userspace_service_state(rtd, pdata);
if (index >= 0) {
mutex_lock(&pdata->lock[index]);
atomic_dec(&pdata->lpass_intf_clk_ref_cnt[index]);