We should set src_msize and dest_msize for dma peripheral dev copy, for dai/ssp, they should be set to valid slot number, otherwise, the dma may copy in wrong burst size and data will run with wrong speed.
Signed-off-by: Keyon Jie yang.jie@linux.intel.com --- src/audio/dai.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/src/audio/dai.c b/src/audio/dai.c index c50a274..e04943b 100644 --- a/src/audio/dai.c +++ b/src/audio/dai.c @@ -599,8 +599,21 @@ static int dai_position(struct comp_dev *dev, struct sof_ipc_stream_posn *posn) return 0; }
+static uint32_t msize[] = {1, 2, 4, 8}; static int dai_config(struct comp_dev *dev, struct sof_ipc_dai_config *config) { + struct dai_data *dd = comp_get_drvdata(dev); + int i; + + /* set dma msize according to slot number */ + for (i = 0; i < ARRAY_SIZE(msize); i++) { + if (msize[i] == config->num_slots) { + dd->config.src_msize = i; + dd->config.dest_msize = i; + break; + } + } + /* calc frame bytes */ switch (config->sample_valid_bits) { case 16: