Skip to content

Commit

Permalink
ASoC: fsl_ssi: adjust set DAI format in AC'97 mode
Browse files Browse the repository at this point in the history
Adjust set DAI format function in fsl_ssi driver
so it doesn't fail and clears RXDIR in AC'97 mode.

Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Maciej S. Szmigiero authored and Mark Brown committed Aug 14, 2015
1 parent 8ed0c84 commit dce0332
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sound/soc/fsl/fsl_ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,14 +900,16 @@ static int _fsl_ssi_set_dai_fmt(struct device *dev,
scr &= ~CCSR_SSI_SCR_SYS_CLK_EN;
break;
default:
return -EINVAL;
if (!fsl_ssi_is_ac97(ssi_private))
return -EINVAL;
}

stcr |= strcr;
srcr |= strcr;

if (ssi_private->cpu_dai_drv.symmetric_rates) {
/* Need to clear RXDIR when using SYNC mode */
if (ssi_private->cpu_dai_drv.symmetric_rates
|| fsl_ssi_is_ac97(ssi_private)) {
/* Need to clear RXDIR when using SYNC or AC97 mode */
srcr &= ~CCSR_SSI_SRCR_RXDIR;
scr |= CCSR_SSI_SCR_SYN;
}
Expand Down

0 comments on commit dce0332

Please sign in to comment.