asoc: avoid excessive logging
Excessive logging by pr_err() could cause audio thread to stuck in the printing session which results PD down notification timeout. This eventually can cause ADSP PDR failure. Fix this issue by using pr_err_ratelimited and dev_err_ratelimited to limit the number of error messages during the ADSP PDR. Change-Id: I68b617fef53ebd03ba79fd919bffd8c35e6eb048 Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
This commit is contained in:
parent
8766446f90
commit
f74e89bd89
@ -2788,12 +2788,10 @@ static int msm_compr_pointer(struct snd_compr_stream *cstream,
|
|||||||
rc = q6asm_get_session_time(
|
rc = q6asm_get_session_time(
|
||||||
prtd->audio_client, &prtd->marker_timestamp);
|
prtd->audio_client, &prtd->marker_timestamp);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
pr_err("%s: Get Session Time return =%lld\n",
|
|
||||||
__func__, timestamp);
|
|
||||||
if (atomic_read(&prtd->error))
|
if (atomic_read(&prtd->error))
|
||||||
return -ENETRESET;
|
return -ENETRESET;
|
||||||
else
|
else
|
||||||
return -EAGAIN;
|
return rc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -9644,10 +9644,11 @@ int q6asm_get_session_time(struct audio_client *ac, uint64_t *tstamp)
|
|||||||
ac->session, mtmx_params.hdr.opcode);
|
ac->session, mtmx_params.hdr.opcode);
|
||||||
rc = apr_send_pkt(ac->apr, (uint32_t *) &mtmx_params);
|
rc = apr_send_pkt(ac->apr, (uint32_t *) &mtmx_params);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
pr_err("%s: Commmand 0x%x failed %d\n", __func__,
|
dev_err_ratelimited(ac->dev, "%s: Get Session Time failed %d\n",
|
||||||
mtmx_params.hdr.opcode, rc);
|
__func__, rc);
|
||||||
goto fail_cmd;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = wait_event_timeout(ac->time_wait,
|
rc = wait_event_timeout(ac->time_wait,
|
||||||
(atomic_read(&ac->time_flag) == 0),
|
(atomic_read(&ac->time_flag) == 0),
|
||||||
msecs_to_jiffies(TIMEOUT_MS));
|
msecs_to_jiffies(TIMEOUT_MS));
|
||||||
|
Loading…
Reference in New Issue
Block a user