ASoC: Intel: Skylake: Fix module load when module size > DMA buffer size
authorJeeja KP <jeeja.kp@intel.com>
Mon, 13 Mar 2017 16:41:31 +0000 (22:11 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 15 Mar 2017 17:28:18 +0000 (17:28 +0000)
commitb7d0254c51f3ce79a8931690e8a2f035208f6b55
treeb13a6487b7f2cb4d069d3419da67a082bfce790d
parent7bd86a30599de479bd863e18472207337485d339
ASoC: Intel: Skylake: Fix module load when module size > DMA buffer size

When module size > DMA buffer size, driver copies first chunk and waits
for the BDL complete interrupt. BDL complete interrupt never occurs and
wait time expires as module load IPC is not send to start the DMA from
DSP.

To fix the above issue need to follow the below steps:
1. After copying the first chunk, send the module load IPC to start the
DMA.
2. Wait for the BDL interrupt. Once interrupt is received, copy the
next chunk.
3. Continue step 2 till all bytes are copied.
4. When all the bytes are copied (bytes_left = 0), wait for module load
IPC response
5. Handled module load IPC response messages, check the load module IPC
response and wake up the thread to complete module load.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-sst-cldma.c
sound/soc/intel/skylake/skl-sst-cldma.h
sound/soc/intel/skylake/skl-sst-dsp.h
sound/soc/intel/skylake/skl-sst-ipc.c
sound/soc/intel/skylake/skl-sst-ipc.h
sound/soc/intel/skylake/skl-sst.c