asoc: check subsys state in FE instead of q6 state

audio can use adsp or modem. Hence check
apr subsys state commonly instead of adsp or modem.

Change-Id: Ice70ab23797ec5f940e1bda3fa1b2d84c196fc56
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
This commit is contained in:
Ramprasad Katkam
2019-04-15 18:37:10 +05:30
committed by Meng Wang
parent 47673f2f83
commit 17f0516574
4 changed files with 36 additions and 0 deletions

View File

@@ -426,12 +426,19 @@ static int msm_transcode_loopback_set_params(struct snd_compr_stream *cstream,
struct trans_loopback_pdata *pdata;
uint32_t bit_width = 16;
int ret = 0;
enum apr_subsys_state subsys_state;
if (trans == NULL) {
pr_err("%s: Invalid param\n", __func__);
return -EINVAL;
}
subsys_state = apr_get_subsys_state();
if (subsys_state == APR_SUBSYS_DOWN) {
pr_debug("%s: adsp is down\n", __func__);
return -ENETRESET;
}
mutex_lock(&trans->lock);
rtd = snd_pcm_substream_chip(cstream);