All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Barinov <vova.barinov@gmail.com>
To: Peter Meerwald <pmeerw@pmeerw.net>
Cc: vbarinov@embeddedalley.com, alsa-devel@alsa-project.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: PLL computation in TLV320AIC3x SoC driver
Date: Wed, 09 Dec 2009 23:35:01 +0300	[thread overview]
Message-ID: <4B2009F5.8020107@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0912091447230.17383@hippogriff.cosy.sbg.ac.at>

Hello Peter,

Peter Meerwald wrote:
> Hello,
>
>   
>>>>>> I'm trying to use the SoC TLV320AIC3x codec driver with sysclk
>>>>>> 16384000 and
>>>>>> ran into some problems with setting PLL; below is a patch against
>>>>>> linux-2.6-asoc
>>>>>>             
>
>   
>>> I just tested your patch works fine with sysclk=16384000 and 12288000 but
>>> fails with 11286900: it returns FSREF=45467 instead of desired 44100. I
>>> think that this is a valuable difference. Please check it.
>>>       
>> Please check  also 33868800  sysclk, it  returns  FSREF=47545 instead of
>> 48000.
>>     
>
> I have put the proposed code at http://pmeerw.net/clk/ for review;
>
>
>   
> note that the proposed code has less deviation from fsref in all cases and 
> manages to stay within recommended settings for sysclk 33868800 
>
> I have modified the following line to get rid of rounding errors as much 
> as possible:
> /* do not use codec_clk here since we'd loose precision */
> d = ((2048 * p * fsref) - j * sysclk) * 100 / (sysclk/100);
> and fixed a bug which always set pll_p = 1 in case d!=0
>
>   
I confirm that it handles all cases with best precision now.
> if code looks good, I'll submit a patch against linux-sound-2.6 as Mark 
> suggested
>
>   
I'm ok to submit.

  reply	other threads:[~2009-12-09 20:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-08 11:28 PLL computation in TLV320AIC3x SoC driver Peter Meerwald
2009-12-08 14:46 ` Vladimir Barinov
2009-12-08 15:12   ` Peter Meerwald
2009-12-08 15:46     ` Vladimir Barinov
2009-12-08 16:05       ` Vladimir Barinov
2009-12-09 14:01         ` Peter Meerwald
2009-12-09 20:35           ` Vladimir Barinov [this message]
2009-12-14 10:24             ` Peter Meerwald
2009-12-14 10:40               ` Mark Brown
2009-12-14 13:44                 ` Peter Meerwald
2009-12-17 11:48                   ` Mark Brown
2009-12-14 10:41               ` Vladimir Barinov
2009-12-08 14:56 ` Mark Brown
2009-12-08 15:02 ` Liam Girdwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B2009F5.8020107@gmail.com \
    --to=vova.barinov@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=pmeerw@pmeerw.net \
    --cc=vbarinov@embeddedalley.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.