From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: <jiada_wang@mentor.com>
Cc: <lgirdwood@gmail.com>, <broonie@kernel.org>, <perex@perex.cz>,
<tiwai@suse.com>, <gustavo@embeddedor.com>,
<alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH linux-next 1/1] ASoC: rsnd: ssiu: reset SSI_MODE register
Date: Sun, 29 Oct 2017 23:38:57 +0000 [thread overview]
Message-ID: <87d155ttv2.wl%kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <1509030462-4799-1-git-send-email-jiada_wang@mentor.com>
Hi Jiada
> register SSI_MODE is set when SSI works in TDM Extended or
> TDM (Ex-)Split mode, but it isn't reset after SSI stops.
> this will cause issue, if SSI starts to work in other modes
> which requie SSI_MODE to have different value.
>
> This patch resets SSI_MODE register in .stop callback,
> when last stream calls .stop.
>
> Fixes: 186fadc132f0 ("ASoC: rsnd: add TDM Extend Mode support")
> Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
> ---
> sound/soc/sh/rcar/ssiu.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/sound/soc/sh/rcar/ssiu.c b/sound/soc/sh/rcar/ssiu.c
> index 4d94875..eff9f3b 100644
> --- a/sound/soc/sh/rcar/ssiu.c
> +++ b/sound/soc/sh/rcar/ssiu.c
> @@ -217,6 +217,8 @@ static int rsnd_ssiu_stop_gen2(struct rsnd_mod *mod,
> if (rsnd_ssi_multi_slaves_runtime(io))
> rsnd_mod_write(mod, SSI_CONTROL, 0);
>
> + rsnd_mod_write(mod, SSI_MODE, 0);
> +
> return 0;
> }
Thank you for your patch.
But, I don't want to reset register when stop, because
it might be point-less if SoC has power domain.
How about this or similar (not tested) ?
------------------
diff --git a/sound/soc/sh/rcar/ssiu.c b/sound/soc/sh/rcar/ssiu.c
index 4d94875..8dc2e92 100644
--- a/sound/soc/sh/rcar/ssiu.c
+++ b/sound/soc/sh/rcar/ssiu.c
@@ -130,14 +130,13 @@ static int rsnd_ssiu_init_gen2(struct rsnd_mod *mod,
if (ret < 0)
return ret;
- if (rsnd_runtime_is_ssi_tdm(io)) {
- /*
- * TDM Extend Mode
- * see
- * rsnd_ssi_config_init()
- */
- rsnd_mod_write(mod, SSI_MODE, 0x1);
- }
+ /*
+ * TDM Extend Mode
+ * see
+ * rsnd_ssi_config_init()
+ */
+ rsnd_mod_write(mod, SSI_MODE,
+ rsnd_runtime_is_ssi_tdm(io) ? 0x1 : 0x0);
if (rsnd_ssi_use_busif(io)) {
rsnd_mod_write(mod, SSI_BUSIF_ADINR,
Best regards
---
Kuninori Morimoto
next prev parent reply other threads:[~2017-10-29 23:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-26 15:07 jiada_wang
2017-10-29 23:38 ` Kuninori Morimoto [this message]
2017-10-30 8:08 ` Jiada Wang
2017-10-30 8:10 ` Kuninori Morimoto
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=87d155ttv2.wl%kuninori.morimoto.gx@renesas.com \
--to=kuninori.morimoto.gx@renesas.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=gustavo@embeddedor.com \
--cc=jiada_wang@mentor.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®