diff options
Diffstat (limited to 'sound/pci/hda/patch_conexant.c')
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 0de21193a2b0..220e567ccfff 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "hda_codec.h" | 31 | #include "hda_codec.h" |
32 | #include "hda_local.h" | 32 | #include "hda_local.h" |
33 | #include "hda_beep.h" | 33 | #include "hda_beep.h" |
34 | #include "hda_jack.h" | ||
34 | 35 | ||
35 | #define CXT_PIN_DIR_IN 0x00 | 36 | #define CXT_PIN_DIR_IN 0x00 |
36 | #define CXT_PIN_DIR_OUT 0x01 | 37 | #define CXT_PIN_DIR_OUT 0x01 |
@@ -3756,6 +3757,7 @@ static void cx_auto_automic(struct hda_codec *codec) | |||
3756 | static void cx_auto_unsol_event(struct hda_codec *codec, unsigned int res) | 3757 | static void cx_auto_unsol_event(struct hda_codec *codec, unsigned int res) |
3757 | { | 3758 | { |
3758 | int nid = (res & AC_UNSOL_RES_SUBTAG) >> 20; | 3759 | int nid = (res & AC_UNSOL_RES_SUBTAG) >> 20; |
3760 | snd_hda_jack_set_dirty(codec, nid); | ||
3759 | switch (res >> 26) { | 3761 | switch (res >> 26) { |
3760 | case CONEXANT_HP_EVENT: | 3762 | case CONEXANT_HP_EVENT: |
3761 | cx_auto_hp_automute(codec); | 3763 | cx_auto_hp_automute(codec); |
@@ -3983,9 +3985,7 @@ static void enable_unsol_pins(struct hda_codec *codec, int num_pins, | |||
3983 | { | 3985 | { |
3984 | int i; | 3986 | int i; |
3985 | for (i = 0; i < num_pins; i++) | 3987 | for (i = 0; i < num_pins; i++) |
3986 | snd_hda_codec_write(codec, pins[i], 0, | 3988 | snd_hda_jack_detect_enable(codec, pins[i], tag); |
3987 | AC_VERB_SET_UNSOLICITED_ENABLE, | ||
3988 | AC_USRSP_EN | tag); | ||
3989 | } | 3989 | } |
3990 | 3990 | ||
3991 | static void cx_auto_init_output(struct hda_codec *codec) | 3991 | static void cx_auto_init_output(struct hda_codec *codec) |
@@ -4060,16 +4060,14 @@ static void cx_auto_init_input(struct hda_codec *codec) | |||
4060 | 4060 | ||
4061 | if (spec->auto_mic) { | 4061 | if (spec->auto_mic) { |
4062 | if (spec->auto_mic_ext >= 0) { | 4062 | if (spec->auto_mic_ext >= 0) { |
4063 | snd_hda_codec_write(codec, | 4063 | snd_hda_jack_detect_enable(codec, |
4064 | cfg->inputs[spec->auto_mic_ext].pin, 0, | 4064 | cfg->inputs[spec->auto_mic_ext].pin, |
4065 | AC_VERB_SET_UNSOLICITED_ENABLE, | 4065 | CONEXANT_MIC_EVENT); |
4066 | AC_USRSP_EN | CONEXANT_MIC_EVENT); | ||
4067 | } | 4066 | } |
4068 | if (spec->auto_mic_dock >= 0) { | 4067 | if (spec->auto_mic_dock >= 0) { |
4069 | snd_hda_codec_write(codec, | 4068 | snd_hda_jack_detect_enable(codec, |
4070 | cfg->inputs[spec->auto_mic_dock].pin, 0, | 4069 | cfg->inputs[spec->auto_mic_dock].pin, |
4071 | AC_VERB_SET_UNSOLICITED_ENABLE, | 4070 | CONEXANT_MIC_EVENT); |
4072 | AC_USRSP_EN | CONEXANT_MIC_EVENT); | ||
4073 | } | 4071 | } |
4074 | cx_auto_automic(codec); | 4072 | cx_auto_automic(codec); |
4075 | } else { | 4073 | } else { |