From: Chen Liangjun Date: Sun, 12 Aug 2012 15:03:01 +0000 (+0800) Subject: ENGR00220172 ESAI ASRC: put all asrc pair release operation to shutdown() X-Git-Tag: v3.0.35-fsl~618 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e147d5dc7332dbd565f56c21f0221c549ef84351;p=karo-tx-linux.git ENGR00220172 ESAI ASRC: put all asrc pair release operation to shutdown() When use ASRC for ESAI P2P playback, ESAI driver would release ASRC pair resource immediately after ASRC function's error return.It may introduce risk that in ESAI machine driver's shutdown(), ASRC resource release operation may be double called. In this case, system hang happens due to ASRC register's operation with no clock. In this patch, let all ASRC resource release operation in ESAI machine driver's shutdown(). Signed-off-by: Chen Liangjun --- diff --git a/sound/soc/imx/imx-cs42888.c b/sound/soc/imx/imx-cs42888.c index e06b1a7fc314..c372587ecce9 100644 --- a/sound/soc/imx/imx-cs42888.c +++ b/sound/soc/imx/imx-cs42888.c @@ -85,8 +85,6 @@ static int config_asrc(struct snd_pcm_substream *substream, ret = asrc_req_pair(channel, &iprtd->asrc_index); if (ret < 0) { pr_err("Fail to request asrc pair\n"); - asrc_release_pair(iprtd->asrc_index); - asrc_finish_conv(iprtd->asrc_index); return -EINVAL; } @@ -102,8 +100,6 @@ static int config_asrc(struct snd_pcm_substream *substream, ret = asrc_config_pair(&config); if (ret < 0) { pr_err("Fail to config asrc\n"); - asrc_release_pair(iprtd->asrc_index); - asrc_finish_conv(iprtd->asrc_index); return ret; }