From: Lars-Peter Clausen <lars@metafoo.de>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
patches@opensource.wolfsonmicro.com, lgirdwood@gmail.com
Subject: Re: [PATCH] ASoC: arizona: Check clocking during hw_params rather than startup
Date: Fri, 24 Jan 2014 18:25:06 +0100 [thread overview]
Message-ID: <52E2A1F2.6070707@metafoo.de> (raw)
In-Reply-To: <1390582753-1026-1-git-send-email-ckeepax@opensource.wolfsonmicro.com>
On 01/24/2014 05:59 PM, Charles Keepax wrote:
> It is a fairly common usage to configure SYSCLK as part of the hw_params
> callback in the machine driver. The current driver applies PCM
> constraints based on the value of SYSCLK during the startup callback
> however because many systems will have not configured SYSCLK yet this
> will often use the SYSCLK value that was used for the last stream.
>
> The patch checks the clocking constraints as part of the hw_params
> callback, which will be after any clocking changes have been made by
> the machine driver.
The problem with this approach is that if the sysclk is fixed instead to
e.g. falling back to rate conversion you'll get an error instead when
calling hw_params. The typical idiom here is to only apply the rate
constraints in the CODEC driver if the sysclk is non zero. This driver
already seems to do this. The problem that you probably see is that if the
machine driver changes the sysclk value in hw_params the constraints that
are setup are still setup with the previous sysclk in mind. I think instead
of removing the constraints support altogether from the driver a better
solution is to introduce a dynamic_sysclk or similar attribute to the DAI
link and not constrain the supported rates if this attribute is set to true.
- Lars
next prev parent reply other threads:[~2014-01-24 17:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-24 16:59 [PATCH] ASoC: arizona: Check clocking during hw_params rather than startup Charles Keepax
2014-01-24 17:25 ` Lars-Peter Clausen [this message]
2014-01-24 17:37 ` Mark Brown
2014-01-27 7:17 ` Lars-Peter Clausen
2014-01-27 10:55 ` Mark Brown
2014-01-27 11:25 ` 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=52E2A1F2.6070707@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.wolfsonmicro.com \
--cc=lgirdwood@gmail.com \
--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 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.