All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: "Babu, Ramesh" <ramesh.babu@intel.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Liam Girdwood <lrg@ti.com>
Subject: Re: Using sync dapm_sync in stream_event call back
Date: Fri, 9 Nov 2012 13:26:20 +0000	[thread overview]
Message-ID: <20121109132619.GE23807@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <32F4D3A311A1404B92CF923AFF38C3C529EEBD@BGSMSX101.gar.corp.intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 1686 bytes --]

On Thu, Nov 08, 2012 at 04:28:43AM +0000, Babu, Ramesh wrote:

Fix your mailer to word wrap within paragraphs, not doing this makes
your messages extremely hard to read.  I've reflowed your text for
legibility.

> App is re-routing the audio within codec by changing mixer settings
> (for a same stream/device).  When app changes a MUX mixer settings,
> temporarily DAPM path gets broken and shut downs BIAS/CLOCK.  I was
> planning to use a Virtual Widget which I enable in my open and disable
> it during stream_event(STREAM_STOP).  This is to make sure BIAS/CLOCK
> will never shut down, as long as stream is active.  I'm not sure if
> this is correct way to do it. Any inputs?

Open coding this at the driver level is not particularly sensible, there
is nothing driver specific about this as the same issue will apply to
any device.  It seems like a useful feature to add but should be at the
subsystem level.  Off the top of my head the simplest approach is likely
to be to add another timeout similar to the pop timer which we use to
keep supplies and biases running a little longer after their users have
been powered down.

I would at some point like to get something in the userspace API that
allows atomic updates of many controls (freeze the device, update the
controls and then unfreeze as one) which would also cover this but is
much more work.

If you are going to do this as a local hack this isn't a good way to do
it.  You should be driving the state transitions from the application
level so enabling your virtual widget before you do anything, doing your
changes and then disabling it when you're done.  This will cover a wider
range of use cases much more robustly.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



      reply	other threads:[~2012-11-09 13:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-07  9:53 Using sync dapm_sync in stream_event call back Babu, Ramesh
2012-11-07 14:47 ` Mark Brown
2012-11-08  4:28   ` Babu, Ramesh
2012-11-09 13:26     ` Mark Brown [this message]

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=20121109132619.GE23807@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lrg@ti.com \
    --cc=ramesh.babu@intel.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.