All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: Daniel Baluta <daniel.baluta@gmail.com>
Cc: Zidan Wang <b50113@freescale.com>,
	Mark Brown <broonie@kernel.org>,
	Zidan Wang <zidan.wang@freescale.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, <tiwai@suse.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	<patches@opensource.wolfsonmicro.com>,
	<alsa-devel@alsa-project.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	<shengjiu.wang@nxp.com>, <mihai.serban@nxp.com>,
	<viorel.suman@nxp.com>
Subject: Re: [alsa-devel][PATCH v2 2/2] ASoC: wm8960: Let wm8960 driver configure its bit clock and frame clock
Date: Mon, 3 Apr 2017 14:54:36 +0100	[thread overview]
Message-ID: <20170403135436.GV6986@localhost.localdomain> (raw)
In-Reply-To: <CAEnQRZA_BzqY5ywkik0-+dCXj1C7ORzjh3Fnt_AM_e=HnaOKMg@mail.gmail.com>

On Mon, Apr 03, 2017 at 04:39:40PM +0300, Daniel Baluta wrote:
> On Mon, Apr 3, 2017 at 4:34 PM, Charles Keepax
> <ckeepax@opensource.wolfsonmicro.com> wrote:
> > On Mon, Apr 03, 2017 at 04:16:23PM +0300, Daniel Baluta wrote:
> > Does this problem still remain after the relaxed clock
> > computation? The maths you quote depends on the derived BCLK
> > being exactly the correct speed for the audio, that is no longer
> > the case anymore.
> >
> > I would have thought the patch would cover both situations, as in
> > if we can produce a suitable LRCLK, then we just pick a BCLK we
> 
> That!
> 
> The problem for remaining rates is that we cannot derive the LRCLK
> 
> <snip>
> + for (j = 0; j < ARRAY_SIZE(dac_divs); ++j) {
> + if (sysclk != dac_divs[j] * lrclk)
> + continue;
> </snip>
> 

If you can't generate the LRCLK you either need a different
source clock or to use the PLL. You don't want to be trying to
pull 44.1k audio over a link that is clocked on a 48k based
clock.

Is the problem here that the PLL part of the code is making the
same assumption as the direct part of the code was, that the bclk
should be exact?

Thanks,
Charles

WARNING: multiple messages have this Message-ID (diff)
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: Daniel Baluta <daniel.baluta@gmail.com>
Cc: alsa-devel@alsa-project.org, Zidan Wang <b50113@freescale.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Zidan Wang <zidan.wang@freescale.com>,
	tiwai@suse.de,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	shengjiu.wang@nxp.com, patches@opensource.wolfsonmicro.com,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	viorel.suman@nxp.com, mihai.serban@nxp.com
Subject: Re: [PATCH v2 2/2] ASoC: wm8960: Let wm8960 driver configure its bit clock and frame clock
Date: Mon, 3 Apr 2017 14:54:36 +0100	[thread overview]
Message-ID: <20170403135436.GV6986@localhost.localdomain> (raw)
In-Reply-To: <CAEnQRZA_BzqY5ywkik0-+dCXj1C7ORzjh3Fnt_AM_e=HnaOKMg@mail.gmail.com>

On Mon, Apr 03, 2017 at 04:39:40PM +0300, Daniel Baluta wrote:
> On Mon, Apr 3, 2017 at 4:34 PM, Charles Keepax
> <ckeepax@opensource.wolfsonmicro.com> wrote:
> > On Mon, Apr 03, 2017 at 04:16:23PM +0300, Daniel Baluta wrote:
> > Does this problem still remain after the relaxed clock
> > computation? The maths you quote depends on the derived BCLK
> > being exactly the correct speed for the audio, that is no longer
> > the case anymore.
> >
> > I would have thought the patch would cover both situations, as in
> > if we can produce a suitable LRCLK, then we just pick a BCLK we
> 
> That!
> 
> The problem for remaining rates is that we cannot derive the LRCLK
> 
> <snip>
> + for (j = 0; j < ARRAY_SIZE(dac_divs); ++j) {
> + if (sysclk != dac_divs[j] * lrclk)
> + continue;
> </snip>
> 

If you can't generate the LRCLK you either need a different
source clock or to use the PLL. You don't want to be trying to
pull 44.1k audio over a link that is clocked on a 48k based
clock.

Is the problem here that the PLL part of the code is making the
same assumption as the direct part of the code was, that the bclk
should be exact?

Thanks,
Charles

  reply	other threads:[~2017-04-03 13:54 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-07  7:31 [alsa-devel][PATCH v2 1/2] ASoC: wm8960: Let wm8960 codec driver manage its own MCLK Zidan Wang
2015-01-07  7:31 ` Zidan Wang
2015-01-07  7:31 ` [alsa-devel][PATCH v2 2/2] ASoC: wm8960: Let wm8960 driver configure its bit clock and frame clock Zidan Wang
2015-01-07  7:31   ` Zidan Wang
2015-01-14 19:27   ` Mark Brown
2015-01-15 13:34     ` Zidan Wang
2015-01-15 13:34       ` [PATCH " Zidan Wang
2017-04-03 13:16       ` [alsa-devel][PATCH " Daniel Baluta
2017-04-03 13:16         ` [PATCH " Daniel Baluta
2017-04-03 13:34         ` [alsa-devel][PATCH " Charles Keepax
2017-04-03 13:34           ` [PATCH " Charles Keepax
2017-04-03 13:39           ` [alsa-devel][PATCH " Daniel Baluta
2017-04-03 13:39             ` [PATCH " Daniel Baluta
2017-04-03 13:54             ` Charles Keepax [this message]
2017-04-03 13:54               ` Charles Keepax
2017-04-04  7:55               ` [alsa-devel][PATCH " Daniel Baluta
2017-04-04  7:55                 ` [PATCH " Daniel Baluta
2017-04-04  8:55                 ` [alsa-devel][PATCH " Charles Keepax
2017-04-04  8:55                   ` [PATCH " Charles Keepax
2015-01-14 19:19 ` [alsa-devel][PATCH v2 1/2] ASoC: wm8960: Let wm8960 codec driver manage its own MCLK Mark Brown
2015-01-14 19:19   ` [PATCH " Mark Brown

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=20170403135436.GV6986@localhost.localdomain \
    --to=ckeepax@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=b50113@freescale.com \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@gmail.com \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mihai.serban@nxp.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=perex@perex.cz \
    --cc=shengjiu.wang@nxp.com \
    --cc=tiwai@suse.de \
    --cc=viorel.suman@nxp.com \
    --cc=zidan.wang@freescale.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.