From: <jiada_wang@mentor.com> To: <lgirdwood@gmail.com>, <broonie@kernel.org>, <perex@perex.cz>, <tiwai@suse.com>, <kuninori.morimoto.gx@renesas.com> Cc: <alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>, <jiada_wang@mentor.com> Subject: [PATCH v1 1/1] ASoC: rsnd: ssi: Fix issue in dma data address assignment Date: Wed, 20 Dec 2017 20:58:34 -0800 [thread overview] Message-ID: <1513832314-29727-1-git-send-email-jiada_wang@mentor.com> (raw) From: Jiada Wang <jiada_wang@mentor.com> 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@mentor.com> --- sound/soc/sh/rcar/rsnd.h | 2 ++ sound/soc/sh/rcar/ssi.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index 57cd2bc..a26156c 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -459,6 +459,8 @@ struct rsnd_dai { unsigned int frm_clk_inv:1; unsigned int sys_delay:1; unsigned int data_alignment:1; + + struct rsnd_mod *dma[2]; }; #define rsnd_rdai_nr(priv) ((priv)->rdai_nr) diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index fece1e5f..4e97065 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -66,7 +66,6 @@ struct rsnd_ssi { struct rsnd_mod mod; - struct rsnd_mod *dma; u32 flags; u32 cr_own; @@ -861,7 +860,8 @@ 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); + struct rsnd_dai *rdai = rsnd_io_to_rdai(io); + int is_play = rsnd_io_is_play(io); int ret; /* @@ -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; } -- 1.7.9.5
WARNING: multiple messages have this Message-ID (diff)
From: <jiada_wang@mentor.com> To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, kuninori.morimoto.gx@renesas.com Cc: jiada_wang@mentor.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/1] ASoC: rsnd: ssi: Fix issue in dma data address assignment Date: Wed, 20 Dec 2017 20:58:34 -0800 [thread overview] Message-ID: <1513832314-29727-1-git-send-email-jiada_wang@mentor.com> (raw) From: Jiada Wang <jiada_wang@mentor.com> 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@mentor.com> --- sound/soc/sh/rcar/rsnd.h | 2 ++ sound/soc/sh/rcar/ssi.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index 57cd2bc..a26156c 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -459,6 +459,8 @@ struct rsnd_dai { unsigned int frm_clk_inv:1; unsigned int sys_delay:1; unsigned int data_alignment:1; + + struct rsnd_mod *dma[2]; }; #define rsnd_rdai_nr(priv) ((priv)->rdai_nr) diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index fece1e5f..4e97065 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -66,7 +66,6 @@ struct rsnd_ssi { struct rsnd_mod mod; - struct rsnd_mod *dma; u32 flags; u32 cr_own; @@ -861,7 +860,8 @@ 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); + struct rsnd_dai *rdai = rsnd_io_to_rdai(io); + int is_play = rsnd_io_is_play(io); int ret; /* @@ -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; } -- 1.7.9.5
next reply other threads:[~2017-12-21 4:58 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-12-21 4:58 jiada_wang [this message] 2017-12-21 4:58 ` [PATCH v1 1/1] ASoC: rsnd: ssi: Fix issue in dma data address assignment jiada_wang 2017-12-21 6:42 ` Kuninori Morimoto 2017-12-21 6:42 ` Kuninori Morimoto 2017-12-21 7:13 ` Jiada Wang 2017-12-21 7:13 ` Jiada Wang 2017-12-21 7:39 ` Kuninori Morimoto 2017-12-21 7:39 ` Kuninori Morimoto 2017-12-21 9:16 ` Jiada Wang 2017-12-21 9:16 ` Jiada Wang 2017-12-22 0:43 ` Kuninori Morimoto 2017-12-22 0:43 ` Kuninori Morimoto 2017-12-22 2:27 ` Jiada Wang 2017-12-22 2:27 ` Jiada Wang
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1513832314-29727-1-git-send-email-jiada_wang@mentor.com \ --to=jiada_wang@mentor.com \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=kuninori.morimoto.gx@renesas.com \ --cc=lgirdwood@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=perex@perex.cz \ --cc=tiwai@suse.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.