All of lore.kernel.org
 help / color / mirror / Atom feed
* Can iMX6SL supports different sampling rate for different SSIs?
@ 2015-03-17  0:24 Xuebing Wang
  2015-03-17  0:38 ` Nicolin Chen
  0 siblings, 1 reply; 4+ messages in thread
From: Xuebing Wang @ 2015-03-17  0:24 UTC (permalink / raw)
  To: Nicolin Chen, alsa-devel; +Cc: niranjan Patil, Richard Jiang

Nicolin,

Thank you very much for your always help.

I am using 3 SSIs (as I2S master mode) on iMX6SL for 3 different codec.

1) If I read iMX6SL reference manual correctly, I am deriving SSI 
sys_clock from pll4.

-- pll4 = Fref * (DIV_SELECT + NUM/DENOM)
    ** I am using a value of 786.432000 MHz

-- pll4_main_clk = pll4 / (PLL_AUDIOn: POST_DIV_SELECT) / 
CCM_ANALOG_MISC2n: MSB:LSB
    ** I am using a value of 196.608 MHz

-- SSI1_CLK_ROOT = pll4_main_clk / (CS1CDR: ssi1_clk_pred) / CS1CDR: 
ssi1_clk_podf
    ** I am using a value of 3.072 MHz (for 48k sampling rate)


2) As pll4_main_clk is global for all 3 SSIs, I think that we can *not* 
use 8k for ssi1 and 44.1k for ssi2, right? Because 8k and 44.1k requires 
different pll4 clock, right?
     -- However, as 48k, 32k, 16k, 8k can use same pll4, thus different 
SSI can use different sampling rate in this subset (48k, 32k, 16k, 8k).
     -- Same principle applies for 44.1k, 22.050, 11.025 subset of 
sampling rates.

Is my understanding correct?


-- 
Xuebing

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Can iMX6SL supports different sampling rate for different SSIs?
  2015-03-17  0:24 Can iMX6SL supports different sampling rate for different SSIs? Xuebing Wang
@ 2015-03-17  0:38 ` Nicolin Chen
  2015-03-17  0:45   ` Xuebing Wang
  2015-03-19 23:13   ` Xuebing Wang
  0 siblings, 2 replies; 4+ messages in thread
From: Nicolin Chen @ 2015-03-17  0:38 UTC (permalink / raw)
  To: Xuebing Wang; +Cc: alsa-devel, niranjan Patil, Richard Jiang

On Tue, Mar 17, 2015 at 08:24:27AM +0800, Xuebing Wang wrote:

> 2) As pll4_main_clk is global for all 3 SSIs, I think that we can *not* use
> 8k for ssi1 and 44.1k for ssi2, right? Because 8k and 44.1k requires
> different pll4 clock, right?

True.

>     -- However, as 48k, 32k, 16k, 8k can use same pll4, thus different SSI
> can use different sampling rate in this subset (48k, 32k, 16k, 8k).
>     -- Same principle applies for 44.1k, 22.050, 11.025 subset of sampling
> rates.

Correct. You need to choose 48K-group or 44.1K-group if only using PLL4.

If you are so obsessed with full sample rate support in hardware level,
you might need to do a trade-off like sacrificing video function -- you
would then be allowed to use PLL5 to forge a rate for another rate group.

I forgot if PLL3, another possible parent clock of SSI, is suitable for
one of the groups. You may also take a look at it.

Nicolin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Can iMX6SL supports different sampling rate for different SSIs?
  2015-03-17  0:38 ` Nicolin Chen
@ 2015-03-17  0:45   ` Xuebing Wang
  2015-03-19 23:13   ` Xuebing Wang
  1 sibling, 0 replies; 4+ messages in thread
From: Xuebing Wang @ 2015-03-17  0:45 UTC (permalink / raw)
  To: Nicolin Chen; +Cc: alsa-devel, niranjan Patil, Richard Jiang

Nicolin, thank you very much.


On 03/17/2015 08:38 AM, Nicolin Chen wrote:
> On Tue, Mar 17, 2015 at 08:24:27AM +0800, Xuebing Wang wrote:
>
>> 2) As pll4_main_clk is global for all 3 SSIs, I think that we can *not* use
>> 8k for ssi1 and 44.1k for ssi2, right? Because 8k and 44.1k requires
>> different pll4 clock, right?
> True.
>
>>      -- However, as 48k, 32k, 16k, 8k can use same pll4, thus different SSI
>> can use different sampling rate in this subset (48k, 32k, 16k, 8k).
>>      -- Same principle applies for 44.1k, 22.050, 11.025 subset of sampling
>> rates.
> Correct. You need to choose 48K-group or 44.1K-group if only using PLL4.
>
> If you are so obsessed with full sample rate support in hardware level,
> you might need to do a trade-off like sacrificing video function -- you
> would then be allowed to use PLL5 to forge a rate for another rate group.
>
> I forgot if PLL3, another possible parent clock of SSI, is suitable for
> one of the groups. You may also take a look at it.
>
> Nicolin
>

-- 
Xuebing

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Can iMX6SL supports different sampling rate for different SSIs?
  2015-03-17  0:38 ` Nicolin Chen
  2015-03-17  0:45   ` Xuebing Wang
@ 2015-03-19 23:13   ` Xuebing Wang
  1 sibling, 0 replies; 4+ messages in thread
From: Xuebing Wang @ 2015-03-19 23:13 UTC (permalink / raw)
  To: Nicolin Chen; +Cc: alsa-devel, niranjan Patil, Richard Jiang


On 03/17/2015 08:38 AM, Nicolin Chen wrote:
> On Tue, Mar 17, 2015 at 08:24:27AM +0800, Xuebing Wang wrote:
>
>> 2) As pll4_main_clk is global for all 3 SSIs, I think that we can *not* use
>> 8k for ssi1 and 44.1k for ssi2, right? Because 8k and 44.1k requires
>> different pll4 clock, right?
> True.
>
>>      -- However, as 48k, 32k, 16k, 8k can use same pll4, thus different SSI
>> can use different sampling rate in this subset (48k, 32k, 16k, 8k).
>>      -- Same principle applies for 44.1k, 22.050, 11.025 subset of sampling
>> rates.
> Correct. You need to choose 48K-group or 44.1K-group if only using PLL4.
>
> If you are so obsessed with full sample rate support in hardware level,
> you might need to do a trade-off like sacrificing video function -- you
> would then be allowed to use PLL5 to forge a rate for another rate group.
>
> I forgot if PLL3, another possible parent clock of SSI, is suitable for
> one of the groups. You may also take a look at it.

Nicolin,

Thanks a lot for your help.

I am using an unused PLL3_PFD (454.7M) for SSI3, and it is working ok.

1) 454.7M is actually 454.736842. For 48k sampling rate, I am using 
(clk_pred = 1, clk_podf = 37) to generate ssi baudclk.
-- 454.736842 / 1 / 37 = 12.290185 MHz

2) If I derive from PLL4, then ssi baudclk = 12.288000, which correspond 
to iMX6SL reference manual "Table 48-7. SSI Bit Clock and Frame Rate as 
a Function of PSR, PM, and DIV2".
-- This is very accurate down to 1Hz

3) There is some deviation of baudclk (12.290185 vs 12.288000 MHz), 
which translates to the deviation of bit_clock of (3.072546 MHz vs 
3.072000 MHz for 48k rate, 546Hz deviation).

Is this the most accurate clock we can get if we use PLL3_PFD? Thanks again.


> Nicolin
>

-- 
Xuebing

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-19 23:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-17  0:24 Can iMX6SL supports different sampling rate for different SSIs? Xuebing Wang
2015-03-17  0:38 ` Nicolin Chen
2015-03-17  0:45   ` Xuebing Wang
2015-03-19 23:13   ` Xuebing Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.