]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00218958 ESAI ASRC: fix system hang cause by accessing ASRC with no clock
authorChen Liangjun <b36089@freescale.com>
Wed, 1 Aug 2012 02:42:44 +0000 (10:42 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:12:35 +0000 (14:12 +0200)
commitbe9e340d3f15ff2139265dedd9de7781005ec699
tree7ccd7fe195aa2bc476be662f700acda237e21423
parent9688a35a76d3d0c1667a34cac230e9be0a26d225
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>
sound/soc/imx/imx-pcm-dma-mx2.c