mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
ASoC: rockchip: multi_dais_pcm: refine dma slave config
This patch refine dma slave config only when interlace size is valid. Change-Id: If02cec29083d5f582ccd0efcd78e7a6547d2df66 Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This commit is contained in:
@@ -271,14 +271,16 @@ static int dmaengine_mpcm_hw_params(struct snd_pcm_substream *substream,
|
||||
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
|
||||
chan = pcm->tx_chans[i];
|
||||
if (sz) {
|
||||
slave_config.dst_maxburst = sz / slave_config.dst_addr_width;
|
||||
slave_config.src_interlace_size = frame_bytes - sz;
|
||||
if (slave_config.src_interlace_size)
|
||||
slave_config.dst_maxburst = sz / slave_config.dst_addr_width;
|
||||
}
|
||||
} else {
|
||||
chan = pcm->rx_chans[i];
|
||||
if (sz) {
|
||||
slave_config.src_maxburst = sz / slave_config.src_addr_width;
|
||||
slave_config.dst_interlace_size = frame_bytes - sz;
|
||||
if (slave_config.dst_interlace_size)
|
||||
slave_config.src_maxburst = sz / slave_config.src_addr_width;
|
||||
}
|
||||
}
|
||||
if (!chan)
|
||||
|
||||
Reference in New Issue
Block a user