Hi, On Fri, Jul 02, 2010 at 22:42:26, Raffaele Recalcati wrote: > From: Raffaele Recalcati <raffaele.recalc...@bticino.it> > > When McBSP peripheral gets the clock from an external pin, > there are three possible chooses, MCBSP_CLKX, MCBSP_CLKR > and MCBSP_CLKS. > evm-dm365 uses MCBSP_CLKR, instead in bmx board I have a different > hardware connection and I use MCBSP_CLKS, so I have added > this possibility. > > This patch has been developed against the: > > http://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git > git tree and has been tested on bmx board (similar to dm365 evm) > > Signed-off-by: Raffaele Recalcati <raffaele.recalc...@bticino.it> > Signed-off-by: Davide Bonfanti <davide.bonfa...@bticino.it> > --- > arch/arm/mach-davinci/include/mach/asp.h | 15 +++++++++++++++ > sound/soc/davinci/davinci-i2s.c | 27 ++++++++++++++++++++++----- > 2 files changed, 37 insertions(+), 5 deletions(-) > > diff --git a/arch/arm/mach-davinci/include/mach/asp.h > b/arch/arm/mach-davinci/include/mach/asp.h > index 834725f..0847d21 100644 > --- a/arch/arm/mach-davinci/include/mach/asp.h > +++ b/arch/arm/mach-davinci/include/mach/asp.h > @@ -153,6 +153,7 @@ struct davinci_mcbsp_dev {
[...] > > unsigned int fmt; > int clk_div; > + int clk_input_pin; > }; > > static inline void davinci_mcbsp_write_reg(struct davinci_mcbsp_dev *dev, > @@ -279,11 +280,26 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai > *cpu_dai, > DAVINCI_MCBSP_PCR_CLKRM; > break; > case SND_SOC_DAIFMT_CBM_CFS: > - /* McBSP CLKR pin is the input for the Sample Rate Generator. > - * McBSP FSR and FSX are driven by the Sample Rate Generator. */ > - pcr = DAVINCI_MCBSP_PCR_SCLKME | > - DAVINCI_MCBSP_PCR_FSXM | > - DAVINCI_MCBSP_PCR_FSRM; > + pcr = DAVINCI_MCBSP_PCR_FSRM | DAVINCI_MCBSP_PCR_FSXM; > + /* > + * Selection of the clock input pin that is the > + * input for the Sample Rate Generator. > + * McBSP FSR and FSX are driven by the Sample Rate > + * Generator. > + */ > + switch (dev->clk_input_pin) { > + case MCBSP_CLKS: > + pcr |= DAVINCI_MCBSP_PCR_CLKXM | > + DAVINCI_MCBSP_PCR_CLKRM; > + break; > + case MCBSP_CLKR: > + pcr |= DAVINCI_MCBSP_PCR_SCLKME; > + break; > + default: > + dev_err(&pdev->dev, "bad clk_input_pin\n"); The above line results on compilation error as pdev is not defined in this function. Regards, Sudhakar _______________________________________________ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source