summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorChen Liangjun <b36089@freescale.com>2012-08-01 10:42:44 +0800
committerChen Liangjun <b36089@freescale.com>2012-08-01 10:42:44 +0800
commitedafa36df5a0f16586aea50a404e9cb83ae570ea (patch)
tree7ccd7fe195aa2bc476be662f700acda237e21423 /sound
parent091604c85f017199cae9d437545a96157ab063e0 (diff)
ENGR00218958 ESAI ASRC: fix system hang cause by accessing ASRC with no clock
In ESAI_ASRC, to use ASRC for p2p playback, ESAI driver would maintain an variable to keep track of ASRC pair number allocated. So every time ESAI driver want to use ASRC, he would first init the variable to a value (0 in ESAI driver)stand for unvalid pair number and then request an valid pair number. At last, open the ASRC clock for ASRC register access. However, ASRC driver treat 0 as an valid pair number. Thus, if an ESAI ASRC playback is failed, ESAI driver would check whether the pair number is valid. If the pair number is valid, ESAI driver would access ASRC register to do some clean work. Thus, the init 0 value would be treat as an valid pair number and ASRC register would be access without ASRC clock. In the case, an system hang happens. In this patch, init pair number variable to -1 after its allocation. Signed-off-by: Chen Liangjun <b36089@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/imx/imx-pcm-dma-mx2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c
index 712bf7d49522..b36b28108049 100644
--- a/sound/soc/imx/imx-pcm-dma-mx2.c
+++ b/sound/soc/imx/imx-pcm-dma-mx2.c
@@ -426,6 +426,7 @@ static int snd_imx_open(struct snd_pcm_substream *substream)
iprtd->asrc_enable = true;
iprtd->p2p =
(struct asrc_p2p_params *)snd_soc_pcm_get_drvdata(rtd);
+ iprtd->asrc_index = -1;
}
runtime->private_data = iprtd;