RE: [PATCH] ASoC: fsl_sai: Add isr to deal with error flag
From: Li.Xiubo@freescale.com <hidden>
Date: 2014-03-27 03:41:06
Also in:
alsa-devel, lkml
Subject: Re: [PATCH] ASoC: fsl_sai: Add isr to deal with error flag =20 On Thu, Mar 27, 2014 at 10:53:50AM +0800, Xiubo Li-B47053 wrote:quoted
quoted
On Thu, Mar 27, 2014 at 10:13:48AM +0800, Xiubo Li-B47053 wrote:quoted
quoted
+ regmap_read(sai->regmap, FSL_SAI_TCSR, &xcsr); + regmap_write(sai->regmap, FSL_SAI_TCSR, xcsr); + + if (xcsr & FSL_SAI_CSR_WSF) + dev_dbg(dev, "isr: Start of Tx word detected\n"); + + if (xcsr & FSL_SAI_CSR_SEF) + dev_dbg(dev, "isr: Tx Frame sync error detected\n"); + + if (xcsr & FSL_SAI_CSR_FEF) + dev_dbg(dev, "isr: Transmit underrun detected\n"); +Actually, the above three isrs should to write a logic 1 to this fi=
eld
quoted
quoted
quoted
to clear this flag.quoted
+ if (xcsr & FSL_SAI_CSR_FWF) + dev_dbg(dev, "isr: Enabled transmit FIFO is empty\n"); + + if (xcsr & FSL_SAI_CSR_FRF) + dev_dbg(dev, "isr: Transmit FIFO watermark has beenreached\n");quoted
quoted
quoted
quoted
+While are these ones really needed to clear manually ?The reference manual doesn't mention about the requirement. So SAI sh=
ould
doquoted
quoted
the self-clearance.Yes, I do think we should let it do the self-clearance, and shouldn'tinterferequoted
of them...=20 SAI is supposed to ignore the interference, isn't it? =20
Maybe, but I'm not very sure. And these bits are all writable and readable.