On Wed, 2017-09-20 at 10:38 -0500, Pierre-Louis Bossart wrote:
On 9/20/17 8:58 AM, Liam Girdwood wrote:
Add an interrupt handler to slear any SSP IRQs. TODO: extend this to report XRUNS and other errors.
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com
src/drivers/ssp.c | 23 +++++++++++++++++++++++ src/include/reef/ssp.h | 6 +++++- 2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/src/drivers/ssp.c b/src/drivers/ssp.c index 6d2c004..547c91c 100644 --- a/src/drivers/ssp.c +++ b/src/drivers/ssp.c @@ -370,6 +370,24 @@ static int ssp_trigger(struct dai *dai, int cmd, int direction) return 0; }
+/* The IRQ handler allows the SSP port to drain the playback FIFO to make sure
- every sample has been played */
+static void ssp_irq_handler(void *data) +{
- struct dai *dai = data;
- int i;
- trace_value(ssp_read(dai, SSSR));
- /* empty Rx FIFO */
- for (i = 0; i < 16; i++)
ssp_read(dai, SSDR);
I am having a hard-time with this one. Is this really the playback FIFO that we are draining if we read from a FIFO? and why do we need to drain, it's that what DMAs are for?
Oh comment is wrong. I'll fix. FIFO loop should be removed too.
Liam