alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Seungwhan Youn <claude.youn@gmail.com>
Cc: Seungwhan Youn <sw.youn@samsung.com>,
	alsa-devel@alsa-project.org,
	Jassi Brar <jassisinghbrar@gmail.com>,
	Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH 4/7] ASoC: Automatically calculate clock	ratio for WM8580
Date: Sun, 15 Aug 2010 12:09:24 +0100	[thread overview]
Message-ID: <20100815110924.GA25723@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <AANLkTi=6Op9C3adxhN8HsZu9FewFYqeCWRoQs=P3LP18@mail.gmail.com>

On Sun, Aug 15, 2010 at 06:00:50PM +0900, Seungwhan Youn wrote:
> On Sat, Aug 14, 2010 at 4:35 AM, Mark Brown

> > +
> > +       switch (dai->driver->id) {
> > +       case WM8580_DAI_PAIFTX:
> > +               sel_mask = 0x3;
> > +               sel_shift = 0;
> > +               break;
> > +
> > +       case WM8580_DAI_PAIFRX:
> > +               sel_mask = 0xc;
> > +               sel_shift = 3;
> > +               break;

> These CLKSEL settings looks different with my WM8580 datasheet
> (released March 2009, Rev 4.7).
> I think these codes look...
> +       case WM8580_DAI_PAIFRX:
> +               sel_mask = 0x3;
> +               sel_shift = 0;
> +               break;

This one is exactly what's above as far as I can tell?....

> +       case WM8580_DAI_PAIFTX:
> +               sel_mask = 0xc;
> +               sel_shift = 2;
> +               break;

...but the shift is typoed here, yes.

> > +       switch (clk_id) {
> > +       case WM8580_CLKSRC_ADCMCLK:
> > +               if (dai->id != WM8580_DAI_PAIFTX)
> > +                       return -EINVAL;
> > +               sel = 0 << sel_shift;
> > +               break;

> During my test case with smdk6410 board, clock source of ADC should be
> set by ADCMCLK, if we want to hear a correct sound on playback and
> capture. And when ADC select MCLK or PLLA, source clock was broken
> both of playback and capture.
> Can you verify this(set source clock of ADC set to ADCMCLK) is right
> or is there something missing on other settings?

This should not be required in general.  Without knowing anything about
the tests you did, the problems you observed or why you believe this
configuration helps it's a bit hard to comment in detail.  I did test
briefly since I remembered the use of this from your code.

My best guess would be that this is related to the issue I mentioned in
the cover mail with multiple DAI links on one physical DAI.  Since the
DAIs are cross wired we really shouldn't have both CODEC interfaces
driving the audio interface simultaneously.  

What would be much more straightforward for this configuration is to run
the PLL output from the CODEC into the CPU and then have the CPU master
the actual audio interface but Jassi was fairly insistent on having the
CODEC master the bus and I'd need to verify again with the schematic if
the appropriate clock lines are run.  Actually, I think I'll just do
that if the hardware allows.

  reply	other threads:[~2010-08-15 11:09 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-13 19:33 [PATCH 0/7] WM8580 updates Mark Brown
2010-08-13 19:35 ` [PATCH 1/7] ASoC: Add a bit of resource unwinding in the S3C IISv4 driver Mark Brown
2010-08-13 19:35 ` [PATCH 2/7] ASoC: Convert WM8580 hw_params to use snd_soc_update_bits() Mark Brown
2010-08-13 19:35 ` [PATCH 3/7] ASoC: Remove unused rate selection bitmasks from WM8580 Mark Brown
2010-08-13 19:35 ` [PATCH 4/7] ASoC: Automatically calculate clock ratio for WM8580 Mark Brown
2010-08-15  9:00   ` Seungwhan Youn
2010-08-15 11:09     ` Mark Brown [this message]
2010-08-16  4:36       ` Jassi Brar
2010-08-16 10:20         ` Mark Brown
2010-08-16 12:51           ` Jassi Brar
2010-08-16 15:19             ` Mark Brown
2010-08-16 23:14               ` Jassi Brar
2010-08-17  9:46                 ` Mark Brown
2010-08-31  6:46                   ` Jassi Brar
2010-08-31 10:42                     ` Mark Brown
2010-08-16  4:16   ` Seungwhan Youn
2010-08-16 12:21     ` Mark Brown
2010-08-16 12:47       ` Jassi Brar
2010-08-13 19:35 ` [PATCH 5/7] ASoC: Implement BCLK rate selection " Mark Brown
2010-08-13 19:35 ` [PATCH 6/7] ASoC: Fix inverted WM8580 capture mute control Mark Brown
2010-08-15  4:50   ` Seungwhan Youn
2010-08-15  6:20     ` Seungwhan Youn
2010-08-13 19:35 ` [PATCH 7/7] ASoC: Automatically manage WM8580 DAC OSR Mark Brown
2010-08-14  4:09 ` [PATCH 0/7] WM8580 updates Jassi Brar
2010-08-15  9:21   ` Seungwhan Youn
2010-08-15 11:10     ` Mark Brown
2010-08-16  9:44       ` Seungwhan Youn
2010-08-16 14:49         ` Mark Brown
2010-08-19 11:37           ` Seungwhan Youn
2010-08-14 10:45 ` 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=20100815110924.GA25723@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=claude.youn@gmail.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=lrg@slimlogic.co.uk \
    --cc=sw.youn@samsung.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).