MLK-13208: ASoC: fsl_asrc_m2m: change the return value for signal_pending

There is error log after suspend resume with asrc alsa plugin.

"fsl-asrc 2034000.asrc: Pair A: failed to process buffer: -16"

"asrc_pair_convert_s16: Convert ASRC pair 0 failed,
[0x989410][440][0x9895d0][1764]"

Which is caused by the return value is -EBUSY when signal_pending, in this
case we can use the -ERESTARTSYS to instead, that system will recall the
convert function after resume.

Fixes commit e1e9de8e93 ("MLK-10048-2: ASoC: fsl_asrc: change
the return value")

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
This commit is contained in:
Shengjiu Wang
2018-09-05 14:34:49 +08:00
committed by Jason Liu
parent a380be08be
commit fa9bee21c9

View File

@ -329,7 +329,7 @@ int fsl_asrc_process_buffer_pre(struct completion *complete,
return -ETIME;
} else if (signal_pending(current)) {
pr_err("%sput task forcibly aborted\n", DIR_STR(dir));
return -EBUSY;
return -ERESTARTSYS;
}
return 0;
@ -723,7 +723,8 @@ static long fsl_asrc_ioctl_convert(struct fsl_asrc_pair *pair,
ret = fsl_asrc_process_buffer(pair, &buf);
if (ret) {
pair_err("failed to process buffer: %ld\n", ret);
if (ret != -ERESTARTSYS)
pair_err("failed to process buffer: %ld\n", ret);
return ret;
}