Commit b427b44c authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: fsi: fixup clock inversion operation

Clock inversion should be specified by each flags bit.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 5b61ea49
...@@ -683,20 +683,15 @@ static int fsi_dai_startup(struct snd_pcm_substream *substream, ...@@ -683,20 +683,15 @@ static int fsi_dai_startup(struct snd_pcm_substream *substream,
/* clock inversion (CKG2) */ /* clock inversion (CKG2) */
data = 0; data = 0;
switch (SH_FSI_INVERSION_MASK & flags) { if (SH_FSI_LRM_INV & flags)
case SH_FSI_LRM_INV: data |= 1 << 12;
data = 1 << 12; if (SH_FSI_BRM_INV & flags)
break; data |= 1 << 8;
case SH_FSI_BRM_INV: if (SH_FSI_LRS_INV & flags)
data = 1 << 8; data |= 1 << 4;
break; if (SH_FSI_BRS_INV & flags)
case SH_FSI_LRS_INV: data |= 1 << 0;
data = 1 << 4;
break;
case SH_FSI_BRS_INV:
data = 1 << 0;
break;
}
fsi_reg_write(fsi, CKG2, data); fsi_reg_write(fsi, CKG2, data);
/* do fmt, di fmt */ /* do fmt, di fmt */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment