]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ASoC: rsnd: ssi: Fix issue in dma data address assignment
authorJiada Wang <jiada_wang@mentor.com>
Mon, 3 Sep 2018 07:07:07 +0000 (07:07 +0000)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 26 Nov 2019 12:16:29 +0000 (13:16 +0100)
BugLink: https://bugs.launchpad.net/bugs/1853915
[ Upstream commit 0e289012b47a2de1f029a6b61c75998e2f159dd9 ]

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.

Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
[Kuninori: tidyup for upstream]
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
sound/soc/sh/rcar/rsnd.h
sound/soc/sh/rcar/ssi.c

index eb6706d22391973b7db8601d8bec3532d068a4d4..a21a5e1ab4cad9c85c6b2a4acaec0a41cd991405 100644 (file)
@@ -432,6 +432,7 @@ struct rsnd_dai_stream {
        char name[RSND_DAI_NAME_SIZE];
        struct snd_pcm_substream *substream;
        struct rsnd_mod *mod[RSND_MOD_MAX];
+       struct rsnd_mod *dma;
        struct rsnd_dai *rdai;
        u32 parent_ssi_status;
 };
index 3d92eacbeded94b15810b14e2a3003c128de43cb..4df4f3fb459ecc4004384036ea6c25d4ce0700a2 100644 (file)
@@ -67,7 +67,6 @@
 
 struct rsnd_ssi {
        struct rsnd_mod mod;
-       struct rsnd_mod *dma;
 
        u32 flags;
        u32 cr_own;
@@ -878,7 +877,6 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,
                              struct rsnd_dai_stream *io,
                              struct rsnd_priv *priv)
 {
-       struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
        int ret;
 
        /*
@@ -893,7 +891,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, &io->dma);
 
        return ret;
 }