ASoC: OMAP: Continue fixing DSP DAI format in McBSP DAI driver
PATCH 1/1 ASoC: OMAP: Continue fixing DSP DAI format in McBSP DAI driver
Fix "ASoC: OMAP: Fix DSP DAI format in McBSP DAI driver" was not correct due misunderstanding of DSP_A format and similar error in TLV320AIC33 codec which was used to test the original fix.
This patch corrects now DSP_A format in OMAP McBSP DAI driver and is verified with TLV320AIC23 codec that's implementing DSP_A correctly.
--- sound/soc/omap/omap-mcbsp.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-)
sound/soc/omap/omap-mcbsp.c +2 -5
@@ -265,7 +265,7 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream,break ;case SND_SOC_DAIFMT_DSP_A : regs->srgr2 |=FPER (wlen *2 -1 ); - regs->srgr1 |=FWID (0 ); + regs->srgr1 |=FWID (wlen *2 -2 );break ; }
@@ -284,7 +284,6 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, {struct omap_mcbsp_data *mcbsp_data =to_mcbsp (cpu_dai->private_data);struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; -unsigned int temp_fmt = fmt;if (mcbsp_data->configured)return 0 ;
@@ -307,8 +306,6 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,/* 0-bit data delay */ regs->rcr2 |=RDATDLY (0 ); regs->xcr2 |=XDATDLY (0 ); -/* Invert bit clock and FS polarity configuration for DSP_A */ - temp_fmt ^=SND_SOC_DAIFMT_IB_IF ;break ;default :/* Unsupported data format */
@@ -332,7 +329,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, }/* Set bit clock (CLKX/CLKR) and FS polarities */ -switch (temp_fmt &SND_SOC_DAIFMT_INV_MASK ) { +switch (fmt &SND_SOC_DAIFMT_INV_MASK ) {case SND_SOC_DAIFMT_NB_NF :/* * Normal BCLK + FS.
Signature · 1 line
1.5.6.5
Takashi Iwai
AppliedAt Wed, 22 Oct 2008 15:00:29 +0300,
Quoted 5 lines · Jarkko Nikula
Fix "ASoC: OMAP: Fix DSP DAI format in McBSP DAI driver" was not correct due misunderstanding of
DSP_Aformat and similar error in TLV320AIC33 codec which was used to test the original fix.
Quoted 7 lines
This patch corrects now
DSP_Aformat in OMAP McBSP DAI driver and is verified with TLV320AIC23 codec that's implementingDSP_Acorrectly.Signed-off-by Jarkko Nikula <[email protected]>Cc Arun KS <[email protected]>Signed-off-by Jarkko Nikula <[email protected]>
Applied. Will be put to the next pull request.
Thanks,
Takashi
Quoted 51 lines
--- sound/soc/omap/omap-mcbsp.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-)sound/soc/omap/omap-mcbsp.c +2
-5@@ -265,7 +265,7 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream,break ;case SND_SOC_DAIFMT_DSP_A : regs->srgr2 |=FPER (wlen *2 -1 ); - regs->srgr1 |=FWID (0 ); + regs->srgr1 |=FWID (wlen *2 -2 );break ; }@@ -284,7 +284,6 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, {struct omap_mcbsp_data *mcbsp_data =to_mcbsp (cpu_dai->private_data);struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; -unsigned int temp_fmt = fmt;if (mcbsp_data->configured)return 0 ;@@ -307,8 +306,6 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,/* 0-bit data delay */ regs->rcr2 |=RDATDLY (0 ); regs->xcr2 |=XDATDLY (0 ); -/* Invert bit clock and FS polarity configuration for DSP_A */ - temp_fmt ^=SND_SOC_DAIFMT_IB_IF ;break ;default :/* Unsupported data format */ @@ -332,7 +329,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, }/* Set bit clock (CLKX/CLKR) and FS polarities */ -switch (temp_fmt &SND_SOC_DAIFMT_INV_MASK ) { +switch (fmt &SND_SOC_DAIFMT_INV_MASK ) {case SND_SOC_DAIFMT_NB_NF :/* * Normal BCLK + FS. Signature · 6 lines
1.5.6.5 _______________________________________________ Alsa-devel mailing list [email protected] http://mailman.alsa-project.org/mailman/listinfo/alsa-devel