All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: "Wang, Kuirong" <kuirongw@quicinc.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: How to trigger a widget?
Date: Wed, 22 Feb 2012 09:28:01 +0200	[thread overview]
Message-ID: <4F449901.302@ti.com> (raw)
In-Reply-To: <D618B7A80E26984A9E4E1FD204983C1AA8AAF4@nasanexd01d.na.qualcomm.com>

Hi,

On 02/21/2012 07:09 AM, Wang, Kuirong wrote:
> I have kcontrol to enable a function of codec on fly.  With or
> without the function, it cannot impact the established audio routing.
> So I created widget as a supply, as long as the audio path is
> established, this supply widget is triggered. The supply widget has a
> callback event function.  The kcontrol control has an event callback
> function as well which calls the enable/disable pin to trigger the
> widget callback event, so this particular function can be enabled or
> disabled.

Would not it be simpler if you just enable/disable the feature in the
kcontrol's set callback?

Another way I would go is this:

                  |-> (off) ---------|
[Feature switch] -|                  |-> [next widget]
                  |-> (on) -> [PGA] -|

In the PGA you turn on/off the feature. If the switch changes it will
not affect other items in the path, it will only make the PGA to turn
on/off.

-- 
Péter

  parent reply	other threads:[~2012-02-22  7:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-20  7:13 How to trigger a widget? Wang, Kuirong
2012-02-20  9:07 ` Lars-Peter Clausen
2012-02-21  5:09   ` Wang, Kuirong
2012-02-21 21:06     ` Lars-Peter Clausen
2012-02-22  7:28     ` Peter Ujfalusi [this message]
2012-02-24  4:57       ` Wang, Kuirong

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=4F449901.302@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=kuirongw@quicinc.com \
    --cc=lars@metafoo.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.