On Sun 27 Sep 2009 04:56, Cai, Cliff pondered:
> >-----Original Message-----
> >From: Robin Getz [mailto:[email protected]] 

[snip] - thanks for the feedback.

> >> +/* PLL settings coefficients, add more here... */ static 
> >const struct 
> >> +_pll_settings pll_settings[] = {
> >> +  /* 96k */
> >> +  /* {12288000, 96000, 0, 0, 0x0, 0x8, 0x0}, */
> >> +  /* 88.2k */
> >> +  /* {12288000, 88200, 20, 7, 0x0, 0x7, 0x1}, */
> >> +  /* 48k */
> >> +  {12288000, 48000, 0, 0, 0x0, 0x4, 0x0},
> >> +  /* 44.1k */
> >> +  {12288000, 44100,  40, 27, 0x0, 0x3, 0x1},
> >> +  {11289600, 44100, 0, 0, 0x0, 0x4, 0x0},
> >> +  /* 22.050k */
> >> +  {12288000, 22050,  40, 27, 0x1, 0x3, 0x1},
> >> +  {11289600, 22050, 0, 0, 0x0, 0x2, 0x0},
> >> +  /* 8k */
> >> +  /* {12288000, 8000, 3, 2, 0x3, 0x2, 0x1}, */
> >> +
> >> +};
> >
> >Don't these need to be calculated - as they depend on the 
> >crystal input?
> >
> 
> The rates commented can't be got through PLL
> Currently,and Yao Wei said he will check it with me once he is free.

I wasn't concerned about the commented out versions - my comment was that the 
pll_settings[] are used to directly write into the codec (in 
adau1371_hw_params() ).

struct _pll_settings {
        u32 mclk;
        u32 rate;
        u16 n;  /* N and M registers are inverted on REVB */
        u16 m;
        u8 input_div:2;
        u8 integer:4;
        u8 type:1;

The value for 48k:

{12288000, 48000, 0, 0, 0x0, 0x4, 0x0}

mclk changes depending on what CLKIN (clk) is - doesn't it?

It appears that in:

../blackfin/bf5xx-adau1371.c:bf5xx_adau1371_hw_params it does:

 /* Change input crystal source here */
        unsigned int clk = 12288000;
        snd_soc_dai_set_sysclk(codec_dai, 0, clk, 0);

which is:
     dai->ops->set_sysclk(codec_dai, 0, clk, 0);

which is (based on the fops)

adau1371_set_dai_sysclk(codec_dai, 0, clk, 0);

which sets adau1371->sysclk

which is used in adau1371_hw_params():

  get_coeff(adau1371->sysclk, params_rate(params));

so, rather than calculate things based on the sysclk at run time, it is doing 
a lookup on static/pre-calculated values....???

doesn't n and m need to be determined at run time?




_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to