ASoC: fsl-ssi: Fix i2s_mode variable setup
In fsl_ssi_hw_params() we update the I2S and NET bits using the i2s_mode variable. The fsl_ssi_set_dai_fmt() function only writes the i2s-mode to the i2s_mode variable and not the NET bit. This fixes it by adding that bit to i2s_mode. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Родитель
2b0db996ba
Коммит
07a28dbe7a
|
@ -745,7 +745,6 @@ static int fsl_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
|
|||
fsl_ssi_setup_reg_vals(ssi_private);
|
||||
|
||||
scr = read_ssi(&ssi->scr) & ~(CCSR_SSI_SCR_SYN | CCSR_SSI_SCR_I2S_MODE_MASK);
|
||||
scr |= CCSR_SSI_SCR_NET;
|
||||
|
||||
mask = CCSR_SSI_STCR_TXBIT0 | CCSR_SSI_STCR_TFDIR | CCSR_SSI_STCR_TXDIR |
|
||||
CCSR_SSI_STCR_TSCKP | CCSR_SSI_STCR_TFSI | CCSR_SSI_STCR_TFSL |
|
||||
|
@ -753,14 +752,15 @@ static int fsl_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
|
|||
stcr = read_ssi(&ssi->stcr) & ~mask;
|
||||
srcr = read_ssi(&ssi->srcr) & ~mask;
|
||||
|
||||
ssi_private->i2s_mode = CCSR_SSI_SCR_NET;
|
||||
switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
|
||||
case SND_SOC_DAIFMT_I2S:
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
ssi_private->i2s_mode = CCSR_SSI_SCR_I2S_MODE_MASTER;
|
||||
ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_MASTER;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
ssi_private->i2s_mode = CCSR_SSI_SCR_I2S_MODE_SLAVE;
|
||||
ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_SLAVE;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
@ -785,7 +785,7 @@ static int fsl_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
|
|||
CCSR_SSI_STCR_TXBIT0;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_AC97:
|
||||
ssi_private->i2s_mode = CCSR_SSI_SCR_I2S_MODE_NORMAL;
|
||||
ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_NORMAL;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
|
Загрузка…
Ссылка в новой задаче