Skip to content

Commit

Permalink
ASoC: fsi: fixup clock inversion operation
Browse files Browse the repository at this point in the history
Clock inversion should be specified by each flags bit.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Jul 13, 2010
1 parent 5b61ea4 commit b427b44
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions sound/soc/sh/fsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,20 +683,15 @@ static int fsi_dai_startup(struct snd_pcm_substream *substream,

/* clock inversion (CKG2) */
data = 0;
switch (SH_FSI_INVERSION_MASK & flags) {
case SH_FSI_LRM_INV:
data = 1 << 12;
break;
case SH_FSI_BRM_INV:
data = 1 << 8;
break;
case SH_FSI_LRS_INV:
data = 1 << 4;
break;
case SH_FSI_BRS_INV:
data = 1 << 0;
break;
}
if (SH_FSI_LRM_INV & flags)
data |= 1 << 12;
if (SH_FSI_BRM_INV & flags)
data |= 1 << 8;
if (SH_FSI_LRS_INV & flags)
data |= 1 << 4;
if (SH_FSI_BRS_INV & flags)
data |= 1 << 0;

fsi_reg_write(fsi, CKG2, data);

/* do fmt, di fmt */
Expand Down

0 comments on commit b427b44

Please sign in to comment.