ASoC: omap-mcbsp: Add support for Left Justified format
PATCH v2 1/1 ASoC: omap-mcbsp: Add support for Left Justified format
Basic support for Left Justified coding for OMAP McBSP.
Signed-off-by Peter Ujfalusi <[email protected]>
--- sound/soc/omap/omap-mcbsp.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-)
sound/soc/omap/omap-mcbsp.c +11 -1
@@ -331,7 +331,8 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, format = mcbsp_data->fmt &SND_SOC_DAIFMT_FORMAT_MASK ; wpf = channels =params_channels (params); -if (channels ==2 && format ==SND_SOC_DAIFMT_I2S ) { +if (channels ==2 && (format ==SND_SOC_DAIFMT_I2S || + format ==SND_SOC_DAIFMT_LEFT_J )) {/* Use dual-phase frames */ regs->rcr2 |=RPHASE ; regs->xcr2 |=XPHASE ;
@@ -376,6 +377,7 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream,/* Set FS period and length in terms of bit clock periods */ switch (format) {case SND_SOC_DAIFMT_I2S : +case SND_SOC_DAIFMT_LEFT_J : regs->srgr2 |=FPER (framesize -1 ); regs->srgr1 |=FWID ((framesize >>1 ) -1 );break ;
@@ -427,6 +429,14 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, regs->rcr2 |=RDATDLY (1 ); regs->xcr2 |=XDATDLY (1 );break ; +case SND_SOC_DAIFMT_LEFT_J : +/* 0-bit data delay */ + regs->rcr2 |=RDATDLY (0 ); + regs->xcr2 |=XDATDLY (0 ); + regs->spcr1 |=RJUST (2 ); +/* Invert FS polarity configuration */ + temp_fmt ^=SND_SOC_DAIFMT_NB_IF ; +break ;case SND_SOC_DAIFMT_DSP_A :/* 1-bit data delay */ regs->rcr2 |=RDATDLY (1 );
Signature · 1 line
1.7.0.2
Quoted 7 lines · On Fri, 19 Mar 2010 12:27:31 +0200 Peter Ujfalusi <[email protected]>…
Basic support for Left Justified coding for OMAP McBSP.
Signed-off-by Peter Ujfalusi <[email protected]>--- sound/soc/omap/omap-mcbsp.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-)
Acked-by Jarkko Nikula <[email protected]>
Liam Girdwood
Acked-byQuoted 11 lines · Jarkko Nikula
Quoted 7 lines · On Fri, 19 Mar 2010 12:27:31 +0200 Peter Ujfalusi <[email protected]>…
Basic support for Left Justified coding for OMAP McBSP.
Signed-off-by Peter Ujfalusi <[email protected]>--- sound/soc/omap/omap-mcbsp.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-)Acked-by Jarkko Nikula <[email protected]>
Acked-by Liam Girdwood <[email protected]>
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk
Mark Brown
AppliedQuoted 10 lines · Liam Girdwood
Quoted 7 lines · Jarkko Nikula
Quoted 3 lines · Peter Ujfalusi
Basic support for Left Justified coding for OMAP McBSP.
Signed-off-by Peter Ujfalusi <[email protected]>Acked-by Jarkko Nikula <[email protected]>Acked-by Liam Girdwood <[email protected]>
Applied, thanks.