alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: Matt Flax <flatmax@flatmax.org>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
	patches@opensource.wolfsonmicro.com
Subject: Re: [PATCH 2/2] ASoc: wm8731: add normal mode with 12MHz XTAL
Date: Mon, 13 Jun 2016 12:59:10 +0100	[thread overview]
Message-ID: <20160613115910.GV20422@localhost.localdomain> (raw)
In-Reply-To: <575E80B2.3040309@flatmax.org>

On Mon, Jun 13, 2016 at 07:45:22PM +1000, Matt Flax wrote:
> On 13/06/16 18:37, Charles Keepax wrote:
> >On Sun, Jun 12, 2016 at 01:22:26PM +1000, Matt Flax wrote:
> >>It appears that my logic here is flawed.
> >> From what I can tell, it isn't possible to get a suitable bit clock out of
> >>the codec when using a 12 MHz crystal. For that reason, in my hardware I
> >>will change crystals from 12 MHz.
> >This looks correct the chip only has simple dividers so you won't
> >be able to get a good audio rate clock from a 12MHz crystal.
> >
> >>I just want to check ... are there any versions of this codec which output
> >>the bit clock when in USB mode on the BCLK pin ?
> >>
> >Apologies I am not quite sure I follow what USB mode is in this
> >context, and the bit clock surely always comes out of the BCLK
> >pin. Do you simply mean a system with a clock speed that
> >relates to the 48MHz USB clock, such as your 12MHz? Basically any
> >part that has a PLL/FLL should work for that, for example the
> >wm8998:
> >
> >http://www.cirrus.com/en/products/pro/detail/P1265.html
> 
> Literally, with the chip set to usb mode (register 0b0001000 bit 0, page 41
> of the data sheet) it appears that the 12 MHz clock comes out of the BCLK
> pin, rather then the bit clock.

Ah seems there are two versions of the chip the MC and L I was
looking at the datasheet for the version that doesn't have that
mode.

>From that datasheet it looks like it should be possible to
support audio rate clocks from a 12MHz input. Although as you say
the 44.1 clock is not exactly 44.1. I am not sure why you are
getting 12MHz coming out of the BCLK pin the datasheet certainly
does not appear to suggest this should happen. Are you sure the
sample rate and clock divider registers are set sensibly? My
first guess would be if things are in an unsupported state then
perhaps it just fires the clock straight through. I assume we are
very sure the input clock is 12MHz? Only other thing I can
imagine is for some reason we have a higher clock rate than we
expected and on the scope it would be hard to differenciate
between 12.288MHz and 12MHz dead. So for example if it was a
48MHz USB clock coming in rather than 12, then the chip tries to
generate a 3.072MHz bit clock that would look like 12MHz.

Again I guess a newer part with an PLL might be simpler as you
can simply use the PLL to generate audio rate clocks from the
12MHz.

Thanks,
Charles

  reply	other threads:[~2016-06-13 11:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1465517516-1917-1-git-send-email-flatmax@flatmax.org>
     [not found] ` <1465517516-1917-2-git-send-email-flatmax@flatmax.org>
2016-06-11  9:16   ` [PATCH 2/2] ASoc: wm8731: add normal mode with 12MHz XTAL Matt Flax
2016-06-12  3:22     ` Matt Flax
2016-06-13  8:37       ` Charles Keepax
2016-06-13  9:45         ` Matt Flax
2016-06-13 11:59           ` Charles Keepax [this message]
2016-06-13 12:39             ` Matt Flax
2016-06-15 16:56               ` Charles Keepax
2016-06-19 21:46       ` Rob Calhoun
2016-06-19 22:23         ` Matt Flax
2016-06-20 10:55         ` Charles Keepax

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=20160613115910.GV20422@localhost.localdomain \
    --to=ckeepax@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=flatmax@flatmax.org \
    --cc=patches@opensource.wolfsonmicro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).