diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2010-07-12 23:01:15 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-07-13 07:26:26 -0400 |
commit | b427b44cc8793af521b0dc3a9fdd9fcc275c3bd7 (patch) | |
tree | 6e81428ef40465802fd9b6048a4249453e8fe46c | |
parent | 5b61ea499727f22ebdaaeedb9801b12ed6eb59c7 (diff) |
ASoC: fsi: fixup clock inversion operation
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>
-rw-r--r-- | sound/soc/sh/fsi.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 3396a0db06ba..4fa75087c45b 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c | |||
@@ -683,20 +683,15 @@ static int fsi_dai_startup(struct snd_pcm_substream *substream, | |||
683 | 683 | ||
684 | /* clock inversion (CKG2) */ | 684 | /* clock inversion (CKG2) */ |
685 | data = 0; | 685 | data = 0; |
686 | switch (SH_FSI_INVERSION_MASK & flags) { | 686 | if (SH_FSI_LRM_INV & flags) |
687 | case SH_FSI_LRM_INV: | 687 | data |= 1 << 12; |
688 | data = 1 << 12; | 688 | if (SH_FSI_BRM_INV & flags) |
689 | break; | 689 | data |= 1 << 8; |
690 | case SH_FSI_BRM_INV: | 690 | if (SH_FSI_LRS_INV & flags) |
691 | data = 1 << 8; | 691 | data |= 1 << 4; |
692 | break; | 692 | if (SH_FSI_BRS_INV & flags) |
693 | case SH_FSI_LRS_INV: | 693 | data |= 1 << 0; |
694 | data = 1 << 4; | 694 | |
695 | break; | ||
696 | case SH_FSI_BRS_INV: | ||
697 | data = 1 << 0; | ||
698 | break; | ||
699 | } | ||
700 | fsi_reg_write(fsi, CKG2, data); | 695 | fsi_reg_write(fsi, CKG2, data); |
701 | 696 | ||
702 | /* do fmt, di fmt */ | 697 | /* do fmt, di fmt */ |