aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_generic.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-03 09:55:06 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-12 02:43:24 -0500
commit2e03e9528d1cc15edf037c8e2ee0ae6499b0e59d (patch)
treec9f89ef9744ce85d7495cab78a2faf2204292b06 /sound/pci/hda/hda_generic.c
parentee8e765b0b6c9274e255025318cf8da1a3e30d45 (diff)
ALSA: hda - Add hooks for HP/line/mic auto switching
... as a preliminary work for migrating patch_sigmatel.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_generic.c')
-rw-r--r--sound/pci/hda/hda_generic.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 88f166e65752..6ff4a0db74e9 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -2780,6 +2780,8 @@ static int check_auto_mute_availability(struct hda_codec *codec)
2780 snd_printdd("hda-codec: Enable HP auto-muting on NID 0x%x\n", 2780 snd_printdd("hda-codec: Enable HP auto-muting on NID 0x%x\n",
2781 nid); 2781 nid);
2782 snd_hda_jack_detect_enable_callback(codec, nid, HDA_GEN_HP_EVENT, 2782 snd_hda_jack_detect_enable_callback(codec, nid, HDA_GEN_HP_EVENT,
2783 spec->hp_automute_hook ?
2784 spec->hp_automute_hook :
2783 snd_hda_gen_hp_automute); 2785 snd_hda_gen_hp_automute);
2784 spec->detect_hp = 1; 2786 spec->detect_hp = 1;
2785 } 2787 }
@@ -2793,6 +2795,8 @@ static int check_auto_mute_availability(struct hda_codec *codec)
2793 snd_printdd("hda-codec: Enable Line-Out auto-muting on NID 0x%x\n", nid); 2795 snd_printdd("hda-codec: Enable Line-Out auto-muting on NID 0x%x\n", nid);
2794 snd_hda_jack_detect_enable_callback(codec, nid, 2796 snd_hda_jack_detect_enable_callback(codec, nid,
2795 HDA_GEN_FRONT_EVENT, 2797 HDA_GEN_FRONT_EVENT,
2798 spec->line_automute_hook ?
2799 spec->line_automute_hook :
2796 snd_hda_gen_line_automute); 2800 snd_hda_gen_line_automute);
2797 spec->detect_lo = 1; 2801 spec->detect_lo = 1;
2798 } 2802 }
@@ -2845,6 +2849,8 @@ static bool auto_mic_check_imux(struct hda_codec *codec)
2845 snd_hda_jack_detect_enable_callback(codec, 2849 snd_hda_jack_detect_enable_callback(codec,
2846 spec->am_entry[i].pin, 2850 spec->am_entry[i].pin,
2847 HDA_GEN_MIC_EVENT, 2851 HDA_GEN_MIC_EVENT,
2852 spec->mic_autoswitch_hook ?
2853 spec->mic_autoswitch_hook :
2848 snd_hda_gen_mic_autoswitch); 2854 snd_hda_gen_mic_autoswitch);
2849 return true; 2855 return true;
2850} 2856}