[alsa-devel] How to trigger a widget?

Lars-Peter Clausen lars at metafoo.de
Tue Feb 21 22:06:59 CET 2012

On 02/21/2012 06:09 AM, Wang, Kuirong wrote:
> On 02/20/2012 1:08 AM, Lars-Peter Clausen wrote:
>> Hi,
>> snd_soc_dapm_force_enable_pin is probably what you are looking for.
>> - Lars
> Thanks Lars. I tried the snd_soc_dapm_force_enable_pin, it didn't make different.
> 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.

I'm not quite sure if I understand what you want to do, but a
snd_soc_dapm_force_enable_pin followed by a snd_soc_dapm_sync should enable a
widget regardless of whether it is currently in use or not.

More information about the Alsa-devel mailing list