All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Genoud <richard.genoud@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Bo Shen <voice.shen@atmel.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
	devicetree-discuss@lists.ozlabs.org
Subject: Re: [PATCH v5 1/7] sound: codec: wm8731: add rates constraints
Date: Mon, 15 Jul 2013 16:53:46 +0200	[thread overview]
Message-ID: <CACQ1gAhmp-i7vzPKuTMxqs9Ytjynz9NTvrQk9R08U9Fo-cVzMg@mail.gmail.com> (raw)
In-Reply-To: <20130712114551.GD24508@sirena.org.uk>

2013/7/12 Mark Brown <broonie@kernel.org>:
> On Thu, Jul 11, 2013 at 06:15:53PM +0200, Richard Genoud wrote:
>
> Please always try to use commit logs that look like normal commit logs
> for the subsystem.
Ok, I'll pay attention to that.

>>       switch (freq) {
>> -     case 11289600:
>>       case 12000000:
>> +             wm8731->constraints = &wm8731_constraints_12000000;
>> +             break;
>>       case 12288000:
>> -     case 16934400:
>>       case 18432000:
>> -             wm8731->sysclk = freq;
>> +             wm8731->constraints = &wm8731_constraints_12288000_18432000;
>> +             break;
>> +     case 16934400:
>> +     case 11289600:
>> +             wm8731->constraints = &wm8731_constraints_11289600_16934400;
>>               break;
>>       default:
>>               return -EINVAL;
>>       }
>
> This isn't going to work with systems which have a variable clock as the
> input to the CODEC.  If it's imposing constraints the driver needs to
> allow setting the clock to zero as a way of removing constraints (and
> any existing drivers should be updated to do this if needed).
Maybe I'm wrong, but I didn't find any system using variable clock
with this codec.
The sam9g20ek (soc/atmel/sam9g20_wm8731.c) is not using a crystal, but
it's using a fixed clock anyway.
But there's soc/pxa/corgi.c and soc/pxa/poodle.c that puzzle me.
They seems to use a crystal, but they are setting a different sysclk
depending on the rate.
That seems wrong, but as I'm a newbie in ASoC...

WARNING: multiple messages have this Message-ID (diff)
From: richard.genoud@gmail.com (Richard Genoud)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 1/7] sound: codec: wm8731: add rates constraints
Date: Mon, 15 Jul 2013 16:53:46 +0200	[thread overview]
Message-ID: <CACQ1gAhmp-i7vzPKuTMxqs9Ytjynz9NTvrQk9R08U9Fo-cVzMg@mail.gmail.com> (raw)
In-Reply-To: <20130712114551.GD24508@sirena.org.uk>

2013/7/12 Mark Brown <broonie@kernel.org>:
> On Thu, Jul 11, 2013 at 06:15:53PM +0200, Richard Genoud wrote:
>
> Please always try to use commit logs that look like normal commit logs
> for the subsystem.
Ok, I'll pay attention to that.

>>       switch (freq) {
>> -     case 11289600:
>>       case 12000000:
>> +             wm8731->constraints = &wm8731_constraints_12000000;
>> +             break;
>>       case 12288000:
>> -     case 16934400:
>>       case 18432000:
>> -             wm8731->sysclk = freq;
>> +             wm8731->constraints = &wm8731_constraints_12288000_18432000;
>> +             break;
>> +     case 16934400:
>> +     case 11289600:
>> +             wm8731->constraints = &wm8731_constraints_11289600_16934400;
>>               break;
>>       default:
>>               return -EINVAL;
>>       }
>
> This isn't going to work with systems which have a variable clock as the
> input to the CODEC.  If it's imposing constraints the driver needs to
> allow setting the clock to zero as a way of removing constraints (and
> any existing drivers should be updated to do this if needed).
Maybe I'm wrong, but I didn't find any system using variable clock
with this codec.
The sam9g20ek (soc/atmel/sam9g20_wm8731.c) is not using a crystal, but
it's using a fixed clock anyway.
But there's soc/pxa/corgi.c and soc/pxa/poodle.c that puzzle me.
They seems to use a crystal, but they are setting a different sysclk
depending on the rate.
That seems wrong, but as I'm a newbie in ASoC...

  reply	other threads:[~2013-07-15 14:54 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-11 16:15 [PATCH v5 0/7] Sound support for at91sam9x5-wm8731 based boards Richard Genoud
2013-07-11 16:15 ` Richard Genoud
2013-07-11 16:15 ` [PATCH v5 1/7] sound: codec: wm8731: add rates constraints Richard Genoud
2013-07-11 16:15   ` Richard Genoud
2013-07-12 11:45   ` Mark Brown
2013-07-12 11:45     ` Mark Brown
2013-07-12 11:45     ` Mark Brown
2013-07-15 14:53     ` Richard Genoud [this message]
2013-07-15 14:53       ` Richard Genoud
2013-07-15 15:22       ` Mark Brown
2013-07-15 15:22         ` Mark Brown
2013-07-11 16:15 ` [PATCH v5 2/7] sound: sam9x5_wm8731: machine driver for at91sam9x5 wm8731 boards Richard Genoud
2013-07-11 16:15   ` Richard Genoud
2013-07-12 11:49   ` Mark Brown
2013-07-12 11:49     ` Mark Brown
2013-07-12 11:49     ` Mark Brown
2013-07-15 14:59     ` Richard Genoud
2013-07-15 14:59       ` Richard Genoud
2013-07-11 16:15 ` [PATCH v5 3/7] Documentation: DT: update atmel SSC with DMA binding Richard Genoud
2013-07-11 16:15   ` Richard Genoud
2013-07-11 16:15 ` [PATCH v5 4/7] ARM: AT91: DTS: sam9x5: add SSC DMA parameters Richard Genoud
2013-07-11 16:15   ` Richard Genoud
2013-07-11 16:15 ` [PATCH v5 5/7] ARM: AT91: DTS: sam9x5ek: add WM8731 codec Richard Genoud
2013-07-11 16:15   ` Richard Genoud
2013-07-11 16:15 ` [PATCH v5 6/7] ARM: AT91: DTS: sam9x5ek: enable SSC Richard Genoud
2013-07-11 16:15   ` Richard Genoud
2013-07-11 16:15 ` [PATCH v5 7/7] ARM: AT91: DTS: sam9x5ek: add sound configuration Richard Genoud
2013-07-11 16:15   ` Richard Genoud

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=CACQ1gAhmp-i7vzPKuTMxqs9Ytjynz9NTvrQk9R08U9Fo-cVzMg@mail.gmail.com \
    --to=richard.genoud@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=voice.shen@atmel.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.