summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.h
diff options
context:
space:
mode:
authorTakashi Iwai2011-10-27 22:12:46 +0200
committerTakashi Iwai2011-11-16 11:11:15 +0100
commit1835a0f9a2121ce3198dab67507d4d3e960cc09e (patch)
tree5cbd9f34a3cb5d4906042c9fed5ab5fe2813123e /sound/pci/hda/hda_codec.h
parentALSA: hda - Introduce snd_hda_get_pin_label() (diff)
downloadkernel-qcow2-linux-1835a0f9a2121ce3198dab67507d4d3e960cc09e.tar.gz
kernel-qcow2-linux-1835a0f9a2121ce3198dab67507d4d3e960cc09e.tar.xz
kernel-qcow2-linux-1835a0f9a2121ce3198dab67507d4d3e960cc09e.zip
ALSA: hda - Cache the jack-detection value
Introduce a table containing the pins and their jack-detection states for avoiding the unnecessary verbs to check the pin status at each time. When the unsol event is enabled via snd_hda_jack_detect_enable(), it automatically adds the given NID to the table. Then the driver supposes that the codec driver will set the dirty flag appropariately when an unsolicited event is invoked for that pin. The behavior for reading other pins that aren't registered in the table doesn't change. Only the pins assigned to the table are cached, so far. In near futre, this table can be extended to use the central place for the unsolicited events of all pins, etc, and eventually include the jack-detect kcontrols that replace the current input-jack stuff. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r--sound/pci/hda/hda_codec.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 564471169cae..97aa65d1f1d1 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -869,6 +869,9 @@ struct hda_codec {
void (*proc_widget_hook)(struct snd_info_buffer *buffer,
struct hda_codec *codec, hda_nid_t nid);
+ /* jack detection */
+ struct snd_array jacktbl;
+
#ifdef CONFIG_SND_HDA_INPUT_JACK
/* jack detection */
struct snd_array jacks;