diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-07-13 11:29:10 (GMT) |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-07-13 11:29:10 (GMT) |
commit | 4d53952a396d7fcde295b6eedee1f588dfb8464c (patch) | |
tree | 0a38a0b60d5506000c098556a6f2ddb60ecc75d6 /sound/soc | |
parent | 66b47fdb851924956b6e4696fb43a3496ae2c462 (diff) | |
parent | 637727838a5e82bc9285ab078a793eaae590bacb (diff) | |
download | linux-fsl-qoriq-4d53952a396d7fcde295b6eedee1f588dfb8464c.tar.xz |
Merge branch 'for-2.6.35' into for-2.6.36
Diffstat (limited to 'sound/soc')
-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 30765ab..b1cd859 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -674,20 +674,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 */ @@ -717,15 +712,15 @@ static int fsi_dai_startup(struct snd_pcm_substream *substream, break; case SH_FSI_FMT_TDM: msg = "TDM"; - data = CR_FMT(CR_TDM) | (fsi->chan - 1); fsi->chan = is_play ? SH_FSI_GET_CH_O(flags) : SH_FSI_GET_CH_I(flags); + data = CR_FMT(CR_TDM) | (fsi->chan - 1); break; case SH_FSI_FMT_TDM_DELAY: msg = "TDM Delay"; - data = CR_FMT(CR_TDM_D) | (fsi->chan - 1); fsi->chan = is_play ? SH_FSI_GET_CH_O(flags) : SH_FSI_GET_CH_I(flags); + data = CR_FMT(CR_TDM_D) | (fsi->chan - 1); break; default: dev_err(dai->dev, "unknown format.\n"); |