diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-10-28 00:03:22 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-11-16 11:12:17 +0100 |
commit | 01a61e12b4602c82bde9797d0e153f3e53c95b04 (patch) | |
tree | 04f817cb8cec2bae3edcc9a873aea1b674b146ad /sound/pci/hda/patch_conexant.c | |
parent | 1835a0f9a2121ce3198dab67507d4d3e960cc09e (diff) |
ALSA: hda - Create jack-detection kcontrols
Create kcontrols for pin jack-detections, which work similarly like
jack-input layer. Each control will notify when the jack is plugged or
unplugged, and also user can read the value at any time via the normal
control API.
The control elements are created with iface=CARD, so that they won't
appear in the mixer apps.
So far, only the pins that enabled the jack-detection are registered.
For covering all pins, the transition of the common unsol-tag handling
would be needed. Stay tuned.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_conexant.c')
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 220e567ccfff..25fdd1e9561f 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -3770,6 +3770,7 @@ static void cx_auto_unsol_event(struct hda_codec *codec, unsigned int res) snd_hda_input_jack_report(codec, nid); break; } + snd_hda_jack_report_sync(codec); } /* check whether the pin config is suitable for auto-mic switching; @@ -4095,6 +4096,7 @@ static int cx_auto_init(struct hda_codec *codec) cx_auto_init_output(codec); cx_auto_init_input(codec); cx_auto_init_digital(codec); + snd_hda_jack_report_sync(codec); return 0; } |