ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT
Subsystems (3)
PATCH 1/1 ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT
From: Kuninori Morimoto <[email protected]>
R-Car Datasheet is indicating "SSICR.CKDV = 000 is invalid when SSIWSR.WS_MODE = 1 or SSIWSR.CONT = 1".
Current driver will set CONT, thus, we shouldn't use CKDV = 000. This patch fixup it.
--- sound/soc/sh/rcar/ssi.c | 9 +++++++++ 1 file changed, 9 insertions(+)
sound/soc/sh/rcar/ssi.c +9 -0
@@ -245,6 +245,15 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod,for (j =0 ; j <ARRAY_SIZE (ssi_clk_mul_table); j++) {/* +* It will set SSIWSR.CONT here, but SSICR.CKDV = 000 +* with it is not allowed. (SSIWSR.WS_MODE with +* SSICR.CKDV = 000 is not allowed either). +* Skip it. See SSICR.CKDV +*/ +if (j ==0 ) +continue ; + +/* * this driver is assuming that * system word is 32bit x chan * see rsnd_ssi_init()
Signature · 1 line
1.9.1
Hello!
Quoted 19 lines · Kuninori Morimoto
From: Kuninori Morimoto <[email protected]>
R-Car Datasheet is indicating "SSICR.CKDV = 000 is invalid when SSIWSR.WS_MODE = 1 or SSIWSR.CONT = 1".
Current driver will set CONT, thus, we shouldn't use CKDV = 000. This patch fixup it.Reported-by Hiroyuki Yokoyama <[email protected]>Signed-off-by Kuninori Morimoto <[email protected]>Tested-by Hiroyuki Yokoyama <[email protected]>--- sound/soc/sh/rcar/ssi.c | 9 +++++++++ 1 file changed, 9 insertions(+)sound/soc/sh/rcar/ssi.c +0
-0
sound/soc/sh/rcar/ssi.c static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod, · line 254
Quoted 10 lines
sound/soc/sh/rcar/ssi.c +7
-0@@ -245,6 +245,15 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod,for (j =0 ; j <ARRAY_SIZE (ssi_clk_mul_table); j++) {/* +* It will set SSIWSR.CONT here, but SSICR.CKDV = 000 +* with it is not allowed. (SSIWSR.WS_MODE with +* SSICR.CKDV = 000 is not allowed either). +* Skip it. See SSICR.CKDV +*/ +if (j ==0 ) +continue ;
Why not change the *for* statement itself to start with j = 1?
[...]
MBR, Sergei
Hi Sergei
Quoted 10 lines
sound/soc/sh/rcar/ssi.c static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod, · line 254
Quoted 8 lines
sound/soc/sh/rcar/ssi.c +7
-0/* +* It will set SSIWSR.CONT here, but SSICR.CKDV = 000 +* with it is not allowed. (SSIWSR.WS_MODE with +* SSICR.CKDV = 000 is not allowed either). +* Skip it. See SSICR.CKDV +*/ +if (j ==0 ) +continue ;Why not change the *for* statement itself to start with j = 1?
It can be one solution. Actually my local 1st patch was such style. But I thought that it is difficult to notice such magical operation from code. Thus, I used this style
Best regards
---
Kuninori Morimoto
Quoted 14 lines · Kuninori Morimoto
Hi Sergei
Quoted 10 lines
sound/soc/sh/rcar/ssi.c static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod, · line 254
Quoted 8 lines
sound/soc/sh/rcar/ssi.c +7
-0/* +* It will set SSIWSR.CONT here, but SSICR.CKDV = 000 +* with it is not allowed. (SSIWSR.WS_MODE with +* SSICR.CKDV = 000 is not allowed either). +* Skip it. See SSICR.CKDV +*/ +if (j ==0 ) +continue ;Why not change the *for* statement itself to start with j = 1?
Quoted 3 lines
It can be one solution. Actually my local 1st patch was such style. But I thought that it is difficult to notice such magical operation from code. Thus, I used this style
FWIIW, I think if you have a comment, like the one above, then j = 1 should be obvious enough.
Hi Simon
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
sound/soc/sh/rcar/ssi.c static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod, · line 254
Quoted 8 lines
sound/soc/sh/rcar/ssi.c +7
-0/* +* It will set SSIWSR.CONT here, but SSICR.CKDV = 000 +* with it is not allowed. (SSIWSR.WS_MODE with +* SSICR.CKDV = 000 is not allowed either). +* Skip it. See SSICR.CKDV +*/ +if (j ==0 ) +continue ;Why not change the *for* statement itself to start with j = 1?
Quoted 6 lines
Quoted 3 lines
It can be one solution. Actually my local 1st patch was such style. But I thought that it is difficult to notice such magical operation from code. Thus, I used this style
FWIIW, I think if you have a comment, like the one above, then j = 1 should be obvious enough.
I'm OK for both, and have no special opinion about this. Let's follow to ALSA SoC maintainer's opinion
Best regards
---
Kuninori Morimoto
Mark Brown
maintainerApplied "ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT" to the asoc tree
In reply to Kuninori MorimotoThe patch
ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
6b8530cc056efd4a11b034ca5b1e9f7e9563f553Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <[email protected]>
Date: Wed, 22 Mar 2017 04:02:43 +0000
Subject: [PATCH] ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT
R-Car Datasheet is indicating "SSICR.CKDV = 000 is invalid when SSIWSR.WS_MODE = 1 or SSIWSR.CONT = 1".
Current driver will set CONT, thus, we shouldn't use CKDV = 000. This patch fixup it.
--- sound/soc/sh/rcar/ssi.c | 9 +++++++++ 1 file changed, 9 insertions(+)
sound/soc/sh/rcar/ssi.c +9 -0
@@ -228,6 +228,15 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod,for (j =0 ; j <ARRAY_SIZE (ssi_clk_mul_table); j++) {/* +* It will set SSIWSR.CONT here, but SSICR.CKDV = 000 +* with it is not allowed. (SSIWSR.WS_MODE with +* SSICR.CKDV = 000 is not allowed either). +* Skip it. See SSICR.CKDV +*/ +if (j ==0 ) +continue ; + +/* * this driver is assuming that * system word is 32bit x chan * see rsnd_ssi_init()
Signature · 1 line
2.11.0