[alsa-devel] [PATCH] ASoC: OMAP: mcbsp: ensure that CLKX and CLKR are not used as ouput pins when they are used as input clock for the SRG.
Peter Ujfalusi
peter.ujfalusi at ti.com
Fri Jan 16 10:15:55 CET 2015
On 01/16/2015 12:28 AM, Thomas Niederprüm wrote:
> This patch fixes faulty behaviour in a setup where the input clock for
> the SRG is fed through the CLKR pin but the McBSP is configured to be
> master (SND_SOC_DAIFMT_CBS_CFS). In that case of course CLKR must not be
> configured as output pin. Otherwise the input clock is messed up
> horribly. The same reasoning applies if CLKX is configured as input for
> the SRG.
If CLKX/CLKR is used as input clock for McBSP then the CBS_CFS is not valid.
In this case you need to use CBM_CFS.
>
> Signed-off-by: Thomas Niederprüm <niederp at physik.uni-kl.de>
> ---
> sound/soc/omap/omap-mcbsp.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
> index bd3ef2a..c89f562 100644
> --- a/sound/soc/omap/omap-mcbsp.c
> +++ b/sound/soc/omap/omap-mcbsp.c
> @@ -530,8 +530,12 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
>
> case OMAP_MCBSP_SYSCLK_CLKX_EXT:
> regs->srgr2 |= CLKSM;
> + regs->pcr0 |= SCLKME;
> + regs->pcr0 &= ~CLKXM;
> + break;
> case OMAP_MCBSP_SYSCLK_CLKR_EXT:
> regs->pcr0 |= SCLKME;
> + regs->pcr0 &= ~CLKRM;
> break;
> default:
> err = -ENODEV;
>
--
Péter
More information about the Alsa-devel
mailing list