mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
ASoC: rockchip: multi-dais: Use the frame burst
Always use the frame burst even if there is only one mapping. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Change-Id: I3774be5286d618dd61ed11e443ee657ea22cd8d8
This commit is contained in:
@@ -630,7 +630,6 @@ static int dmaengine_mpcm_hw_params(struct snd_soc_component *component,
|
||||
struct dma_slave_config slave_config;
|
||||
snd_pcm_format_t format;
|
||||
unsigned int *maps;
|
||||
int frame_bytes;
|
||||
int ret, num, i, sz;
|
||||
|
||||
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
|
||||
@@ -638,7 +637,6 @@ static int dmaengine_mpcm_hw_params(struct snd_soc_component *component,
|
||||
else
|
||||
maps = pcm->mdais->capture_channel_maps;
|
||||
format = params_format(params);
|
||||
frame_bytes = snd_pcm_format_size(format, params_channels(params));
|
||||
num = pcm->mdais->num_dais;
|
||||
|
||||
for (i = 0; i < num; i++) {
|
||||
@@ -661,11 +659,11 @@ static int dmaengine_mpcm_hw_params(struct snd_soc_component *component,
|
||||
sz = snd_pcm_format_size(format, maps[i]);
|
||||
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
|
||||
chan = pcm->tx_chans[i];
|
||||
if (sz && (frame_bytes - sz) > 0)
|
||||
if (sz)
|
||||
slave_config.dst_maxburst = sz / slave_config.dst_addr_width;
|
||||
} else {
|
||||
chan = pcm->rx_chans[i];
|
||||
if (sz && (frame_bytes - sz) > 0)
|
||||
if (sz)
|
||||
slave_config.src_maxburst = sz / slave_config.src_addr_width;
|
||||
}
|
||||
if (!chan)
|
||||
|
||||
Reference in New Issue
Block a user