From: Lars-Peter Clausen <lars@metafoo.de>
To: Timur Tabi <timur@freescale.com>
Cc: Takashi Iwai <tiwai@suse.de>,
alsa-devel@alsa-project.org, broonie@opensource.wolfsonmicro.com,
lrg@ti.com
Subject: Re: [PATCH] [v2] ASoC: support all possible sample rates in the WM8776 driver
Date: Fri, 16 Sep 2011 19:46:13 +0200 [thread overview]
Message-ID: <4E738B65.6080802@metafoo.de> (raw)
In-Reply-To: <4E737A89.8090509@freescale.com>
On 09/16/2011 06:34 PM, Timur Tabi wrote:
> Lars-Peter Clausen wrote:
>> You mentioned in an earlyer mail that you can switch the sysclk rate at
>> runtime. So setting the constraints based on the current sysclk rate won't
>> really work. I think you need some mechanism to specify the supported rates on
>> a per machine driver basis.
>
> Exactly. There are some other problems with getting the dynamic sysclk feature
> working. On the board where this is supported, the same clock is connected to
> adcmclk and dacmclk, so I can't support playback at 48KHz and capture at
> 44.1KHz. However, there's nothing stopping a customer from creating a board
> that has two independent clocks.
>
> So in the meantime, I'd really just like the ability to specify in the codec
> driver's .startup function exactly which sample rates are supported (based on
> the current mclk).
>
You can already do this. Though you'd limit your CODEC driver to the use-case
where only one fixed sysclk is used. This might be a problem if other people
were using the same CODEC and want to use it without this limitation.
>> Machine drivers are currently best placed to set constraints if the
>> clocking is limited.
>
> But how is the machine driver supposed to know what those sample rates are? >
It would need to know how which dividers that codec uses. That would mean
> that the machine driver has to be hard-codec with information on the
> internals of the codec.
How do you know which sysclk rate to select for a given sample rate, if you
don't know the samples rates the CODEC can produces for a given sysclk rate?
So ideally the CODEC driver would have callback which you could pass a set of
sysclk ranges the machine driver can supply and the CODEC driver would return a
list of sample rates it can support for this sysclk rate range. And then you
could use this updated list in your machine driver to decide which sysclk rate
to select. But I'm not sure if this isn't to over-engineered and hard-coding
this table into the machine driver wouldn't be better.
next prev parent reply other threads:[~2011-09-16 17:46 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-16 14:16 [PATCH] [v2] ASoC: support all possible sample rates in the WM8776 driver Timur Tabi
2011-09-16 15:37 ` Takashi Iwai
2011-09-16 15:47 ` Timur Tabi
2011-09-16 16:26 ` Mark Brown
2011-09-16 16:33 ` Timur Tabi
2011-09-16 16:47 ` Mark Brown
2011-09-16 16:54 ` Timur Tabi
2011-09-16 16:27 ` Lars-Peter Clausen
2011-09-16 16:28 ` Mark Brown
2011-09-16 16:34 ` Timur Tabi
2011-09-16 17:46 ` Lars-Peter Clausen [this message]
2011-09-16 18:19 ` Timur Tabi
2011-09-17 13:27 ` Mark Brown
2011-09-16 16:44 ` Mark Brown
2011-09-16 16:47 ` Timur Tabi
2011-09-16 16:48 ` Mark Brown
2011-09-16 16:56 ` Timur Tabi
2011-09-16 17:13 ` Mark Brown
2011-09-16 18:25 ` Timur Tabi
2011-09-17 12:58 ` 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=4E738B65.6080802@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@ti.com \
--cc=timur@freescale.com \
--cc=tiwai@suse.de \
/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.