diff options
author | Jarkko Nikula <jarkko.nikula@nokia.com> | 2009-04-15 06:48:16 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-04-16 08:37:26 -0400 |
commit | 36ce85824549c1aece65478bf9fe2d224ae06f86 (patch) | |
tree | 5dc60c67c7e5fa2baf1a756f2219288a4da9be1f /sound | |
parent | 76fff3680286d3f7f1ced5e38d613deff86caf20 (diff) |
ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver
The DSP format wasn't still correct in OMAP McBSP DAI even after the commit
bd25867a6cbe7a00ef7dbe8d9ddebc91b00b9b3f.
Thanks to Peter Ujfalusi <peter.ujfalusi@nokia.com> for noticing and being
part of the fix. Now the FS length definition is more clear by defining
it with FWID(0).
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/omap/omap-mcbsp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 9c09b94f0cf8..90f4df7fd906 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c | |||
@@ -283,7 +283,7 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, | |||
283 | break; | 283 | break; |
284 | case SND_SOC_DAIFMT_DSP_B: | 284 | case SND_SOC_DAIFMT_DSP_B: |
285 | regs->srgr2 |= FPER(wlen * channels - 1); | 285 | regs->srgr2 |= FPER(wlen * channels - 1); |
286 | regs->srgr1 |= FWID(wlen * channels - 2); | 286 | regs->srgr1 |= FWID(0); |
287 | break; | 287 | break; |
288 | } | 288 | } |
289 | 289 | ||
@@ -302,6 +302,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
302 | { | 302 | { |
303 | struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data); | 303 | struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data); |
304 | struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; | 304 | struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; |
305 | unsigned int temp_fmt = fmt; | ||
305 | 306 | ||
306 | if (mcbsp_data->configured) | 307 | if (mcbsp_data->configured) |
307 | return 0; | 308 | return 0; |
@@ -328,6 +329,8 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
328 | /* 0-bit data delay */ | 329 | /* 0-bit data delay */ |
329 | regs->rcr2 |= RDATDLY(0); | 330 | regs->rcr2 |= RDATDLY(0); |
330 | regs->xcr2 |= XDATDLY(0); | 331 | regs->xcr2 |= XDATDLY(0); |
332 | /* Invert FS polarity configuration */ | ||
333 | temp_fmt ^= SND_SOC_DAIFMT_NB_IF; | ||
331 | break; | 334 | break; |
332 | default: | 335 | default: |
333 | /* Unsupported data format */ | 336 | /* Unsupported data format */ |
@@ -351,7 +354,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
351 | } | 354 | } |
352 | 355 | ||
353 | /* Set bit clock (CLKX/CLKR) and FS polarities */ | 356 | /* Set bit clock (CLKX/CLKR) and FS polarities */ |
354 | switch (fmt & SND_SOC_DAIFMT_INV_MASK) { | 357 | switch (temp_fmt & SND_SOC_DAIFMT_INV_MASK) { |
355 | case SND_SOC_DAIFMT_NB_NF: | 358 | case SND_SOC_DAIFMT_NB_NF: |
356 | /* | 359 | /* |
357 | * Normal BCLK + FS. | 360 | * Normal BCLK + FS. |