[alsa-devel] snd_soc_jack_add_gpios vs. SOC_DAPM_PIN_SWITCH

Stephen Warren swarren at nvidia.com
Tue Feb 1 01:03:58 CET 2011


I've set up headphone hack detection in my machine driver, using
snd_soc_jack_new, snd_soc_jack_add_pins, and snd_soc_jack_add_gpios.

I've also created a control to allow the user to enable/disable the headphone
jack:

static const struct snd_kcontrol_new harmony_controls[] = {
	SOC_DAPM_PIN_SWITCH("Headphone Jack"),
};

On their own, both of these work fine.

However, if I use the control to disable the headphones, then unplug/replug
the headphones, the jack detect seems to override the control, and I hear
audio from the headphones.

Is this something that's known not yet implemented or was never intended to
be used this way, or should I look further to find the issue?

FYI, sound/soc/samsung/smartq_wm8987.c has this same code structure, and I 
imagine will have the same issue.

Thanks.

-- 
nvpublic



More information about the Alsa-devel mailing list