[alsa-devel] asoc: how to enable micbias and codec power when headset inserted

Mark Brown broonie at opensource.wolfsonmicro.com
Wed Jun 29 19:47:51 CEST 2011

On Wed, Jun 29, 2011 at 10:32:39PM +0530, Babu, Ramesh wrote:

> I have question on handling mic bias and codec bias when headset is inserted.
> When headset is inserted, the mic bias and codec bias should be ON, in order to get the
> button press interrupts from the headset.

> Do I need to have dapm path to achieve this?  

Use snd_soc_dapm_force_enable_pin() to force the micbias widget on and
_disable_pin() to turn it off again when the jack is removed.  You can
do this in response to a notification registered with the notifier chain
in the jack using snd_soc_jack_notifier_register().

More information about the Alsa-devel mailing list