Skip to content

Commit

Permalink
ASoC: rsnd: ssi: Fix issue in dma data address assignment
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiada Wang authored and Mark Brown committed Sep 3, 2018
1 parent b735662 commit 0e28901
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions sound/soc/sh/rcar/rsnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,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;
struct device *dmac_dev; /* for IPMMU */
u32 parent_ssi_status;
Expand Down
4 changes: 1 addition & 3 deletions sound/soc/sh/rcar/ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@

struct rsnd_ssi {
struct rsnd_mod mod;
struct rsnd_mod *dma;

u32 flags;
u32 cr_own;
Expand Down Expand Up @@ -899,7 +898,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;

/*
Expand All @@ -914,7 +912,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;
}
Expand Down

0 comments on commit 0e28901

Please sign in to comment.