diff options
Diffstat (limited to 'sound/soc/davinci/davinci-i2s.c')
-rw-r--r-- | sound/soc/davinci/davinci-i2s.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c index d0d60b8a54d4..300e12118c00 100644 --- a/sound/soc/davinci/davinci-i2s.c +++ b/sound/soc/davinci/davinci-i2s.c | |||
@@ -265,6 +265,7 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
265 | struct davinci_mcbsp_dev *dev = snd_soc_dai_get_drvdata(cpu_dai); | 265 | struct davinci_mcbsp_dev *dev = snd_soc_dai_get_drvdata(cpu_dai); |
266 | unsigned int pcr; | 266 | unsigned int pcr; |
267 | unsigned int srgr; | 267 | unsigned int srgr; |
268 | bool inv_fs = false; | ||
268 | /* Attention srgr is updated by hw_params! */ | 269 | /* Attention srgr is updated by hw_params! */ |
269 | srgr = DAVINCI_MCBSP_SRGR_FSGM | | 270 | srgr = DAVINCI_MCBSP_SRGR_FSGM | |
270 | DAVINCI_MCBSP_SRGR_FPER(DEFAULT_BITPERSAMPLE * 2 - 1) | | 271 | DAVINCI_MCBSP_SRGR_FPER(DEFAULT_BITPERSAMPLE * 2 - 1) | |
@@ -330,7 +331,7 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
330 | * more empty bit clock slots between channels as the sample | 331 | * more empty bit clock slots between channels as the sample |
331 | * rate is lowered. | 332 | * rate is lowered. |
332 | */ | 333 | */ |
333 | fmt ^= SND_SOC_DAIFMT_NB_IF; | 334 | inv_fs = true; |
334 | case SND_SOC_DAIFMT_DSP_A: | 335 | case SND_SOC_DAIFMT_DSP_A: |
335 | dev->mode = MOD_DSP_A; | 336 | dev->mode = MOD_DSP_A; |
336 | break; | 337 | break; |
@@ -394,6 +395,8 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
394 | default: | 395 | default: |
395 | return -EINVAL; | 396 | return -EINVAL; |
396 | } | 397 | } |
398 | if (inv_fs == true) | ||
399 | pcr ^= (DAVINCI_MCBSP_PCR_FSXP | DAVINCI_MCBSP_PCR_FSRP); | ||
397 | davinci_mcbsp_write_reg(dev, DAVINCI_MCBSP_SRGR_REG, srgr); | 400 | davinci_mcbsp_write_reg(dev, DAVINCI_MCBSP_SRGR_REG, srgr); |
398 | dev->pcr = pcr; | 401 | dev->pcr = pcr; |
399 | davinci_mcbsp_write_reg(dev, DAVINCI_MCBSP_PCR_REG, pcr); | 402 | davinci_mcbsp_write_reg(dev, DAVINCI_MCBSP_PCR_REG, pcr); |