diff options
| -rw-r--r-- | sound/pci/hda/patch_realtek.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index f912d74438a6..a5b0b50b6a92 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
| @@ -174,7 +174,6 @@ struct alc_spec { | |||
| 174 | 174 | ||
| 175 | /* hooks */ | 175 | /* hooks */ |
| 176 | void (*init_hook)(struct hda_codec *codec); | 176 | void (*init_hook)(struct hda_codec *codec); |
| 177 | void (*unsol_event)(struct hda_codec *codec, unsigned int res); | ||
| 178 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 177 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
| 179 | void (*power_hook)(struct hda_codec *codec); | 178 | void (*power_hook)(struct hda_codec *codec); |
| 180 | #endif | 179 | #endif |
| @@ -688,7 +687,7 @@ static void alc_update_knob_master(struct hda_codec *codec, hda_nid_t nid) | |||
| 688 | } | 687 | } |
| 689 | 688 | ||
| 690 | /* unsolicited event for HP jack sensing */ | 689 | /* unsolicited event for HP jack sensing */ |
| 691 | static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res) | 690 | static void alc_unsol_event(struct hda_codec *codec, unsigned int res) |
| 692 | { | 691 | { |
| 693 | int action; | 692 | int action; |
| 694 | 693 | ||
| @@ -1024,11 +1023,9 @@ static void alc_init_automute(struct hda_codec *codec) | |||
| 1024 | spec->automute_lo = spec->automute_lo_possible; | 1023 | spec->automute_lo = spec->automute_lo_possible; |
| 1025 | spec->automute_speaker = spec->automute_speaker_possible; | 1024 | spec->automute_speaker = spec->automute_speaker_possible; |
| 1026 | 1025 | ||
| 1027 | if (spec->automute_speaker_possible || spec->automute_lo_possible) { | 1026 | if (spec->automute_speaker_possible || spec->automute_lo_possible) |
| 1028 | /* create a control for automute mode */ | 1027 | /* create a control for automute mode */ |
| 1029 | alc_add_automute_mode_enum(codec); | 1028 | alc_add_automute_mode_enum(codec); |
| 1030 | spec->unsol_event = alc_sku_unsol_event; | ||
| 1031 | } | ||
| 1032 | } | 1029 | } |
| 1033 | 1030 | ||
| 1034 | /* return the position of NID in the list, or -1 if not found */ | 1031 | /* return the position of NID in the list, or -1 if not found */ |
| @@ -1191,7 +1188,6 @@ static void alc_init_auto_mic(struct hda_codec *codec) | |||
| 1191 | 1188 | ||
| 1192 | snd_printdd("realtek: Enable auto-mic switch on NID 0x%x/0x%x/0x%x\n", | 1189 | snd_printdd("realtek: Enable auto-mic switch on NID 0x%x/0x%x/0x%x\n", |
| 1193 | ext, fixed, dock); | 1190 | ext, fixed, dock); |
| 1194 | spec->unsol_event = alc_sku_unsol_event; | ||
| 1195 | } | 1191 | } |
| 1196 | 1192 | ||
| 1197 | /* check the availabilities of auto-mute and auto-mic switches */ | 1193 | /* check the availabilities of auto-mute and auto-mic switches */ |
| @@ -2062,14 +2058,6 @@ static int alc_init(struct hda_codec *codec) | |||
| 2062 | return 0; | 2058 | return 0; |
| 2063 | } | 2059 | } |
| 2064 | 2060 | ||
| 2065 | static void alc_unsol_event(struct hda_codec *codec, unsigned int res) | ||
| 2066 | { | ||
| 2067 | struct alc_spec *spec = codec->spec; | ||
| 2068 | |||
| 2069 | if (spec->unsol_event) | ||
| 2070 | spec->unsol_event(codec, res); | ||
| 2071 | } | ||
| 2072 | |||
| 2073 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 2061 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
| 2074 | static int alc_check_power_status(struct hda_codec *codec, hda_nid_t nid) | 2062 | static int alc_check_power_status(struct hda_codec *codec, hda_nid_t nid) |
| 2075 | { | 2063 | { |
| @@ -4271,14 +4259,12 @@ static void set_capture_mixer(struct hda_codec *codec) | |||
| 4271 | */ | 4259 | */ |
| 4272 | static void alc_auto_init_std(struct hda_codec *codec) | 4260 | static void alc_auto_init_std(struct hda_codec *codec) |
| 4273 | { | 4261 | { |
| 4274 | struct alc_spec *spec = codec->spec; | ||
| 4275 | alc_auto_init_multi_out(codec); | 4262 | alc_auto_init_multi_out(codec); |
| 4276 | alc_auto_init_extra_out(codec); | 4263 | alc_auto_init_extra_out(codec); |
| 4277 | alc_auto_init_analog_input(codec); | 4264 | alc_auto_init_analog_input(codec); |
| 4278 | alc_auto_init_input_src(codec); | 4265 | alc_auto_init_input_src(codec); |
| 4279 | alc_auto_init_digital(codec); | 4266 | alc_auto_init_digital(codec); |
| 4280 | if (spec->unsol_event) | 4267 | alc_inithook(codec); |
| 4281 | alc_inithook(codec); | ||
| 4282 | } | 4268 | } |
| 4283 | 4269 | ||
| 4284 | /* | 4270 | /* |
| @@ -4879,7 +4865,6 @@ static void alc260_fixup_gpio1_toggle(struct hda_codec *codec, | |||
| 4879 | spec->automute_speaker = 1; | 4865 | spec->automute_speaker = 1; |
| 4880 | spec->autocfg.hp_pins[0] = 0x0f; /* copy it for automute */ | 4866 | spec->autocfg.hp_pins[0] = 0x0f; /* copy it for automute */ |
| 4881 | snd_hda_jack_detect_enable(codec, 0x0f, ALC_HP_EVENT); | 4867 | snd_hda_jack_detect_enable(codec, 0x0f, ALC_HP_EVENT); |
| 4882 | spec->unsol_event = alc_sku_unsol_event; | ||
| 4883 | snd_hda_gen_add_verbs(&spec->gen, alc_gpio1_init_verbs); | 4868 | snd_hda_gen_add_verbs(&spec->gen, alc_gpio1_init_verbs); |
| 4884 | } | 4869 | } |
| 4885 | } | 4870 | } |
