diff options
Diffstat (limited to 'sound/soc/sh/fsi.c')
-rw-r--r-- | sound/soc/sh/fsi.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 3396a0db06ba..ec4acac49ebd 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 */ |
@@ -726,15 +721,15 @@ static int fsi_dai_startup(struct snd_pcm_substream *substream, | |||
726 | break; | 721 | break; |
727 | case SH_FSI_FMT_TDM: | 722 | case SH_FSI_FMT_TDM: |
728 | msg = "TDM"; | 723 | msg = "TDM"; |
729 | data = CR_FMT(CR_TDM) | (fsi->chan - 1); | ||
730 | fsi->chan = is_play ? | 724 | fsi->chan = is_play ? |
731 | SH_FSI_GET_CH_O(flags) : SH_FSI_GET_CH_I(flags); | 725 | SH_FSI_GET_CH_O(flags) : SH_FSI_GET_CH_I(flags); |
726 | data = CR_FMT(CR_TDM) | (fsi->chan - 1); | ||
732 | break; | 727 | break; |
733 | case SH_FSI_FMT_TDM_DELAY: | 728 | case SH_FSI_FMT_TDM_DELAY: |
734 | msg = "TDM Delay"; | 729 | msg = "TDM Delay"; |
735 | data = CR_FMT(CR_TDM_D) | (fsi->chan - 1); | ||
736 | fsi->chan = is_play ? | 730 | fsi->chan = is_play ? |
737 | SH_FSI_GET_CH_O(flags) : SH_FSI_GET_CH_I(flags); | 731 | SH_FSI_GET_CH_O(flags) : SH_FSI_GET_CH_I(flags); |
732 | data = CR_FMT(CR_TDM_D) | (fsi->chan - 1); | ||
738 | break; | 733 | break; |
739 | default: | 734 | default: |
740 | dev_err(dai->dev, "unknown format.\n"); | 735 | dev_err(dai->dev, "unknown format.\n"); |