ASoC: rockchip: multi-dais: Workaround for interleaved for GKI

Once upstream is merged, this patch can be dropped.
also for line CONFIG_NO_GKI

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I83f5a08e93010741c26ec044f70b388a50e6c7a9
This commit is contained in:
Sugar Zhang
2024-06-04 20:38:25 +08:00
committed by Tao Huang
parent f48e683a54
commit 56d2082cec

View File

@@ -196,6 +196,8 @@ static int dmaengine_config_interleaved(struct snd_pcm_substream *substream,
#ifdef CONFIG_NO_GKI
xt->nump = nump;
#else
xt->sgl[1].size = nump;
#endif
xt->numf = numf;
@@ -692,8 +694,14 @@ static int dmaengine_mpcm_open(struct snd_soc_component *component,
if (!prtd)
return -ENOMEM;
#ifdef CONFIG_NO_GKI
prtd->xt = kzalloc(sizeof(struct dma_interleaved_template) +
sizeof(struct data_chunk), GFP_KERNEL);
#else
prtd->xt = kzalloc(sizeof(struct dma_interleaved_template) +
sizeof(struct data_chunk) * 2, GFP_KERNEL);
#endif
if (!prtd->xt) {
kfree(prtd);
return -ENOMEM;