Re: [PATCH v1 1/1] ASoC: rsnd: ssi: Fix issue in dma data address assignment

From: Kuninori Morimoto
Date: Thu Dec 21 2017 - 01:42:29 EST



Hi Jiada

Thank you for your patch

> Same SSI device may be used in different dai links,
> by only having one dma struct in rsnd_ssi, after the first
> instance's dma config be initilized, the following instances
> can no longer configure dma, this causes issue, when their
> dma data address are different from the first instance.
>
> This patch by introduces two dma struct in rdai, each SSI
> instance in a dai link is assigned with two dma struct,
> to store dma configuration for playback and capture.
>
> Signed-off-by: Jiada Wang <jiada_wang@xxxxxxxxxx>
> ---
(snip)
> @@ -876,7 +876,7 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,
> return ret;
>
> /* SSI probe might be called many times in MUX multi path */
> - ret = rsnd_dma_attach(io, mod, &ssi->dma);
> + ret = rsnd_dma_attach(io, mod, &rdai->dma[is_play]);
>
> return ret;
> }

Some cases, same SSI might be used on different dai links.
In my understanding, it happen if you uses MIXer.
But, are you using same SSI for both playback and capture ??

Best regards
---
Kuninori Morimoto