From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Trent Piepho <tpiepho@gmail.com>
Cc: alsa-devel@alsa-project.org,
Omair Mohammed Abdullah <omair.m.abdullah@linux.intel.com>,
Ramesh Babu <ramesh.babu@intel.com>,
lrg@ti.com
Subject: Re: ASoC:Question rate constraint between the dais
Date: Sat, 17 Mar 2012 11:48:57 +0000 [thread overview]
Message-ID: <20120317114856.GN3158@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <CA+7tXigaxPdkBGfciWgJx2PnZHPKftgWdXxYREOBYUiXW7aA=g@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1780 bytes --]
On Fri, Mar 16, 2012 at 06:01:44PM -0400, Trent Piepho wrote:
> On Fri, Mar 16, 2012 at 3:22 PM, Mark Brown
> > There's a way to do this, and it's the way that the WM8988 driver is
> > doing it - obviously you'll have different criteria for choosing
> > constraints but the actual application of the constraints is going to be
> > done in the same way.
> Since the constraint is based on the current configuration of another
> DAI, the two DAIs need some way to query each other's parameters. The
Since they're both provided by the same driver this is trivial.
> And as I said before, ALSA doesn't handle this 100%. There is a race
> if both streams are initialized at the same time. If you open one
Yes, I did reply to your previous mail about that pointing out that this
is impossible...
> I think what's necessary is for ALSA to let hw_params return an error
> code that means lets the driver say, "Sorry, the constraints have
> changed and the hw_params you have chosen are no longer valid. Here
> are new constraints, please try again."
Thinking about this slightly further than in my reply to Lars-Peter a
few minutes ago...
I think just returning -EINVAL on bad parameters (which is pretty much
what we do) is sufficient for this if the driver is good about keeping
the constraints up to date. Applications should already be able to take
the hint, though I imagine most of them wouldn't trust the drivers to
provide accurate constraints and aren't as widely deployed as PulseAudio
(which forced fixing the DMA stuff by virtue of everyone using it).
Though just spinning a small number of times will probably deal with
lying drivers well enough.
We could still generate an event but I'm now even less sure it's worth
drivers doing anything special about this.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2012-03-17 11:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-15 9:53 ASoC:Question rate constraint between the dais Ramesh Babu
2012-03-15 17:53 ` Mark Brown
2012-03-15 21:28 ` Trent Piepho
2012-03-16 19:25 ` Mark Brown
2012-03-16 20:00 ` Lars-Peter Clausen
2012-03-17 11:41 ` Mark Brown
2012-03-17 13:00 ` Clemens Ladisch
[not found] ` <9DF50024A2F6A5439EBFE2E74F4E9198055254@BGSMSX101.gar.corp.intel.com>
2012-03-16 10:05 ` Omair Mohammed Abdullah
2012-03-16 19:22 ` Mark Brown
2012-03-16 22:01 ` Trent Piepho
2012-03-17 11:48 ` Mark Brown [this message]
2012-03-17 19:49 ` Trent Piepho
2012-03-17 20:31 ` Mark Brown
2012-03-18 6:22 ` Jassi Brar
2012-03-18 21:27 ` Mark Brown
2012-03-19 16:12 ` James Courtier-Dutton
2012-03-19 16:32 ` 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=20120317114856.GN3158@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=lrg@ti.com \
--cc=omair.m.abdullah@linux.intel.com \
--cc=ramesh.babu@intel.com \
--cc=tpiepho@gmail.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).