From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Ujfalusi Subject: Re: How to trigger a widget? Date: Wed, 22 Feb 2012 09:28:01 +0200 Message-ID: <4F449901.302@ti.com> References: <4F420D6D.4050500@metafoo.de> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from na3sys009aog121.obsmtp.com (na3sys009aog121.obsmtp.com [74.125.149.145]) by alsa0.perex.cz (Postfix) with ESMTP id 51B122454E for ; Wed, 22 Feb 2012 08:27:57 +0100 (CET) Received: by lahc1 with SMTP id c1so9176168lah.20 for ; Tue, 21 Feb 2012 23:27:54 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: "Wang, Kuirong" Cc: "alsa-devel@alsa-project.org" , Lars-Peter Clausen List-Id: alsa-devel@alsa-project.org 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=E9ter