diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-08-16 09:08:49 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-08-16 09:08:49 -0400 |
commit | 24519911673eb5ef3eafcee5d247a52f36347f79 (patch) | |
tree | cc3912a08269278a76fe9f79674a7b078d08aea5 | |
parent | d62f50dc7c6e4c0974591db25ff116fc412c1735 (diff) |
ALSA: hda - Replace ALC269 quanta and lifebook models with fixups
Implement new fixup entries for Quanta FL1 and Fujitsu Lifebook
specific COEF and pin configurations. Removed the model entries
from alc269_quirks.c.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | Documentation/sound/alsa/HD-Audio-Models.txt | 2 | ||||
-rw-r--r-- | sound/pci/hda/alc269_quirks.c | 211 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 58 |
3 files changed, 55 insertions, 216 deletions
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index 7f98aa2cd6ad..e444c0d852a8 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt | |||
@@ -68,10 +68,8 @@ ALC267/268 | |||
68 | ALC269 | 68 | ALC269 |
69 | ====== | 69 | ====== |
70 | basic Basic preset | 70 | basic Basic preset |
71 | quanta Quanta FL1 | ||
72 | laptop-amic Laptops with analog-mic input | 71 | laptop-amic Laptops with analog-mic input |
73 | laptop-dmic Laptops with digital-mic input | 72 | laptop-dmic Laptops with digital-mic input |
74 | lifebook Fujitsu Lifebook S6420 | ||
75 | auto auto-config reading BIOS (default) | 73 | auto auto-config reading BIOS (default) |
76 | 74 | ||
77 | ALC662/663/272 | 75 | ALC662/663/272 |
diff --git a/sound/pci/hda/alc269_quirks.c b/sound/pci/hda/alc269_quirks.c index e5c61c8f9ddc..7d33f05bfc70 100644 --- a/sound/pci/hda/alc269_quirks.c +++ b/sound/pci/hda/alc269_quirks.c | |||
@@ -12,7 +12,6 @@ enum { | |||
12 | ALC269_DMIC, | 12 | ALC269_DMIC, |
13 | ALC269VB_AMIC, | 13 | ALC269VB_AMIC, |
14 | ALC269VB_DMIC, | 14 | ALC269VB_DMIC, |
15 | ALC269_LIFEBOOK, | ||
16 | ALC269_MODEL_LAST /* last tag */ | 15 | ALC269_MODEL_LAST /* last tag */ |
17 | }; | 16 | }; |
18 | 17 | ||
@@ -60,65 +59,6 @@ static const struct snd_kcontrol_new alc269_base_mixer[] = { | |||
60 | { } /* end */ | 59 | { } /* end */ |
61 | }; | 60 | }; |
62 | 61 | ||
63 | /* Acer specific */ | ||
64 | /* bind volumes of both NID 0x02 and 0x03 */ | ||
65 | static const struct hda_bind_ctls alc268_acer_bind_master_vol = { | ||
66 | .ops = &snd_hda_bind_vol, | ||
67 | .values = { | ||
68 | HDA_COMPOSE_AMP_VAL(0x02, 3, 0, HDA_OUTPUT), | ||
69 | HDA_COMPOSE_AMP_VAL(0x03, 3, 0, HDA_OUTPUT), | ||
70 | 0 | ||
71 | }, | ||
72 | }; | ||
73 | |||
74 | #define alc268_acer_master_sw_get alc262_hp_master_sw_get | ||
75 | #define alc268_acer_master_sw_put alc262_hp_master_sw_put | ||
76 | |||
77 | static const struct snd_kcontrol_new alc269_quanta_fl1_mixer[] = { | ||
78 | /* output mixer control */ | ||
79 | HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol), | ||
80 | { | ||
81 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
82 | .name = "Master Playback Switch", | ||
83 | .subdevice = HDA_SUBDEV_AMP_FLAG, | ||
84 | .info = snd_hda_mixer_amp_switch_info, | ||
85 | .get = snd_hda_mixer_amp_switch_get, | ||
86 | .put = alc268_acer_master_sw_put, | ||
87 | .private_value = HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT), | ||
88 | }, | ||
89 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
90 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
91 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
92 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | ||
93 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | ||
94 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), | ||
95 | { } | ||
96 | }; | ||
97 | |||
98 | static const struct snd_kcontrol_new alc269_lifebook_mixer[] = { | ||
99 | /* output mixer control */ | ||
100 | HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol), | ||
101 | { | ||
102 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
103 | .name = "Master Playback Switch", | ||
104 | .subdevice = HDA_SUBDEV_AMP_FLAG, | ||
105 | .info = snd_hda_mixer_amp_switch_info, | ||
106 | .get = snd_hda_mixer_amp_switch_get, | ||
107 | .put = alc268_acer_master_sw_put, | ||
108 | .private_value = HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT), | ||
109 | }, | ||
110 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
111 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
112 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
113 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | ||
114 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | ||
115 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), | ||
116 | HDA_CODEC_VOLUME("Dock Mic Playback Volume", 0x0b, 0x03, HDA_INPUT), | ||
117 | HDA_CODEC_MUTE("Dock Mic Playback Switch", 0x0b, 0x03, HDA_INPUT), | ||
118 | HDA_CODEC_VOLUME("Dock Mic Boost Volume", 0x1b, 0, HDA_INPUT), | ||
119 | { } | ||
120 | }; | ||
121 | |||
122 | static const struct snd_kcontrol_new alc269_laptop_mixer[] = { | 62 | static const struct snd_kcontrol_new alc269_laptop_mixer[] = { |
123 | HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), | 63 | HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), |
124 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT), | 64 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT), |
@@ -172,127 +112,6 @@ static const struct snd_kcontrol_new alc269vb_laptop_digital_capture_mixer[] = { | |||
172 | { } /* end */ | 112 | { } /* end */ |
173 | }; | 113 | }; |
174 | 114 | ||
175 | static const struct hda_verb alc269_quanta_fl1_verbs[] = { | ||
176 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
177 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
178 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
179 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN}, | ||
180 | {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_MIC_EVENT}, | ||
181 | {0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
182 | { } | ||
183 | }; | ||
184 | |||
185 | static const struct hda_verb alc269_lifebook_verbs[] = { | ||
186 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
187 | {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
188 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
189 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
190 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN}, | ||
191 | {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
192 | {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
193 | {0x1a, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN}, | ||
194 | {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_MIC_EVENT}, | ||
195 | {0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
196 | { } | ||
197 | }; | ||
198 | |||
199 | /* toggle speaker-output according to the hp-jack state */ | ||
200 | static void alc269_quanta_fl1_speaker_automute(struct hda_codec *codec) | ||
201 | { | ||
202 | alc_hp_automute(codec); | ||
203 | |||
204 | snd_hda_codec_write(codec, 0x20, 0, | ||
205 | AC_VERB_SET_COEF_INDEX, 0x0c); | ||
206 | snd_hda_codec_write(codec, 0x20, 0, | ||
207 | AC_VERB_SET_PROC_COEF, 0x680); | ||
208 | |||
209 | snd_hda_codec_write(codec, 0x20, 0, | ||
210 | AC_VERB_SET_COEF_INDEX, 0x0c); | ||
211 | snd_hda_codec_write(codec, 0x20, 0, | ||
212 | AC_VERB_SET_PROC_COEF, 0x480); | ||
213 | } | ||
214 | |||
215 | #define alc269_lifebook_speaker_automute \ | ||
216 | alc269_quanta_fl1_speaker_automute | ||
217 | |||
218 | static void alc269_lifebook_mic_autoswitch(struct hda_codec *codec) | ||
219 | { | ||
220 | unsigned int present_laptop; | ||
221 | unsigned int present_dock; | ||
222 | |||
223 | present_laptop = snd_hda_jack_detect(codec, 0x18); | ||
224 | present_dock = snd_hda_jack_detect(codec, 0x1b); | ||
225 | |||
226 | /* Laptop mic port overrides dock mic port, design decision */ | ||
227 | if (present_dock) | ||
228 | snd_hda_codec_write(codec, 0x23, 0, | ||
229 | AC_VERB_SET_CONNECT_SEL, 0x3); | ||
230 | if (present_laptop) | ||
231 | snd_hda_codec_write(codec, 0x23, 0, | ||
232 | AC_VERB_SET_CONNECT_SEL, 0x0); | ||
233 | if (!present_dock && !present_laptop) | ||
234 | snd_hda_codec_write(codec, 0x23, 0, | ||
235 | AC_VERB_SET_CONNECT_SEL, 0x1); | ||
236 | } | ||
237 | |||
238 | static void alc269_quanta_fl1_unsol_event(struct hda_codec *codec, | ||
239 | unsigned int res) | ||
240 | { | ||
241 | switch (res >> 26) { | ||
242 | case ALC_HP_EVENT: | ||
243 | alc269_quanta_fl1_speaker_automute(codec); | ||
244 | break; | ||
245 | case ALC_MIC_EVENT: | ||
246 | alc_mic_automute(codec); | ||
247 | break; | ||
248 | } | ||
249 | } | ||
250 | |||
251 | static void alc269_lifebook_unsol_event(struct hda_codec *codec, | ||
252 | unsigned int res) | ||
253 | { | ||
254 | if ((res >> 26) == ALC_HP_EVENT) | ||
255 | alc269_lifebook_speaker_automute(codec); | ||
256 | if ((res >> 26) == ALC_MIC_EVENT) | ||
257 | alc269_lifebook_mic_autoswitch(codec); | ||
258 | } | ||
259 | |||
260 | static void alc269_quanta_fl1_setup(struct hda_codec *codec) | ||
261 | { | ||
262 | struct alc_spec *spec = codec->spec; | ||
263 | spec->autocfg.hp_pins[0] = 0x15; | ||
264 | spec->autocfg.speaker_pins[0] = 0x14; | ||
265 | spec->automute_mixer_nid[0] = 0x0c; | ||
266 | spec->automute = 1; | ||
267 | spec->automute_mode = ALC_AUTOMUTE_MIXER; | ||
268 | spec->ext_mic_pin = 0x18; | ||
269 | spec->int_mic_pin = 0x19; | ||
270 | spec->auto_mic = 1; | ||
271 | } | ||
272 | |||
273 | static void alc269_quanta_fl1_init_hook(struct hda_codec *codec) | ||
274 | { | ||
275 | alc269_quanta_fl1_speaker_automute(codec); | ||
276 | alc_mic_automute(codec); | ||
277 | } | ||
278 | |||
279 | static void alc269_lifebook_setup(struct hda_codec *codec) | ||
280 | { | ||
281 | struct alc_spec *spec = codec->spec; | ||
282 | spec->autocfg.hp_pins[0] = 0x15; | ||
283 | spec->autocfg.hp_pins[1] = 0x1a; | ||
284 | spec->autocfg.speaker_pins[0] = 0x14; | ||
285 | spec->automute_mixer_nid[0] = 0x0c; | ||
286 | spec->automute = 1; | ||
287 | spec->automute_mode = ALC_AUTOMUTE_MIXER; | ||
288 | } | ||
289 | |||
290 | static void alc269_lifebook_init_hook(struct hda_codec *codec) | ||
291 | { | ||
292 | alc269_lifebook_speaker_automute(codec); | ||
293 | alc269_lifebook_mic_autoswitch(codec); | ||
294 | } | ||
295 | |||
296 | static const struct hda_verb alc269_laptop_dmic_init_verbs[] = { | 115 | static const struct hda_verb alc269_laptop_dmic_init_verbs[] = { |
297 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, | 116 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, |
298 | {0x23, AC_VERB_SET_CONNECT_SEL, 0x05}, | 117 | {0x23, AC_VERB_SET_CONNECT_SEL, 0x05}, |
@@ -482,15 +301,12 @@ static const struct hda_verb alc269vb_init_verbs[] = { | |||
482 | */ | 301 | */ |
483 | static const char * const alc269_models[ALC269_MODEL_LAST] = { | 302 | static const char * const alc269_models[ALC269_MODEL_LAST] = { |
484 | [ALC269_BASIC] = "basic", | 303 | [ALC269_BASIC] = "basic", |
485 | [ALC269_QUANTA_FL1] = "quanta", | ||
486 | [ALC269_AMIC] = "laptop-amic", | 304 | [ALC269_AMIC] = "laptop-amic", |
487 | [ALC269_DMIC] = "laptop-dmic", | 305 | [ALC269_DMIC] = "laptop-dmic", |
488 | [ALC269_LIFEBOOK] = "lifebook", | ||
489 | [ALC269_AUTO] = "auto", | 306 | [ALC269_AUTO] = "auto", |
490 | }; | 307 | }; |
491 | 308 | ||
492 | static const struct snd_pci_quirk alc269_cfg_tbl[] = { | 309 | static const struct snd_pci_quirk alc269_cfg_tbl[] = { |
493 | SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_QUANTA_FL1), | ||
494 | SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A", | 310 | SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A", |
495 | ALC269_AMIC), | 311 | ALC269_AMIC), |
496 | SND_PCI_QUIRK(0x1043, 0x1013, "ASUS N61Da", ALC269VB_AMIC), | 312 | SND_PCI_QUIRK(0x1043, 0x1013, "ASUS N61Da", ALC269VB_AMIC), |
@@ -529,7 +345,6 @@ static const struct snd_pci_quirk alc269_cfg_tbl[] = { | |||
529 | SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_AMIC), | 345 | SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_AMIC), |
530 | SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_AMIC), | 346 | SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_AMIC), |
531 | SND_PCI_QUIRK(0x104d, 0x9071, "Sony VAIO", ALC269_AUTO), | 347 | SND_PCI_QUIRK(0x104d, 0x9071, "Sony VAIO", ALC269_AUTO), |
532 | SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook ICH9M-based", ALC269_LIFEBOOK), | ||
533 | SND_PCI_QUIRK(0x152d, 0x1778, "Quanta ON1", ALC269_DMIC), | 348 | SND_PCI_QUIRK(0x152d, 0x1778, "Quanta ON1", ALC269_DMIC), |
534 | SND_PCI_QUIRK(0x17aa, 0x3be9, "Quanta Wistron", ALC269_AMIC), | 349 | SND_PCI_QUIRK(0x17aa, 0x3be9, "Quanta Wistron", ALC269_AMIC), |
535 | SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_AMIC), | 350 | SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_AMIC), |
@@ -549,19 +364,6 @@ static const struct alc_config_preset alc269_presets[] = { | |||
549 | .channel_mode = alc269_modes, | 364 | .channel_mode = alc269_modes, |
550 | .input_mux = &alc269_capture_source, | 365 | .input_mux = &alc269_capture_source, |
551 | }, | 366 | }, |
552 | [ALC269_QUANTA_FL1] = { | ||
553 | .mixers = { alc269_quanta_fl1_mixer }, | ||
554 | .init_verbs = { alc269_init_verbs, alc269_quanta_fl1_verbs }, | ||
555 | .num_dacs = ARRAY_SIZE(alc269_dac_nids), | ||
556 | .dac_nids = alc269_dac_nids, | ||
557 | .hp_nid = 0x03, | ||
558 | .num_channel_mode = ARRAY_SIZE(alc269_modes), | ||
559 | .channel_mode = alc269_modes, | ||
560 | .input_mux = &alc269_capture_source, | ||
561 | .unsol_event = alc269_quanta_fl1_unsol_event, | ||
562 | .setup = alc269_quanta_fl1_setup, | ||
563 | .init_hook = alc269_quanta_fl1_init_hook, | ||
564 | }, | ||
565 | [ALC269_AMIC] = { | 367 | [ALC269_AMIC] = { |
566 | .mixers = { alc269_laptop_mixer }, | 368 | .mixers = { alc269_laptop_mixer }, |
567 | .cap_mixer = alc269_laptop_analog_capture_mixer, | 369 | .cap_mixer = alc269_laptop_analog_capture_mixer, |
@@ -618,18 +420,5 @@ static const struct alc_config_preset alc269_presets[] = { | |||
618 | .setup = alc269vb_laptop_dmic_setup, | 420 | .setup = alc269vb_laptop_dmic_setup, |
619 | .init_hook = alc_inithook, | 421 | .init_hook = alc_inithook, |
620 | }, | 422 | }, |
621 | [ALC269_LIFEBOOK] = { | ||
622 | .mixers = { alc269_lifebook_mixer }, | ||
623 | .init_verbs = { alc269_init_verbs, alc269_lifebook_verbs }, | ||
624 | .num_dacs = ARRAY_SIZE(alc269_dac_nids), | ||
625 | .dac_nids = alc269_dac_nids, | ||
626 | .hp_nid = 0x03, | ||
627 | .num_channel_mode = ARRAY_SIZE(alc269_modes), | ||
628 | .channel_mode = alc269_modes, | ||
629 | .input_mux = &alc269_capture_source, | ||
630 | .unsol_event = alc269_lifebook_unsol_event, | ||
631 | .setup = alc269_lifebook_setup, | ||
632 | .init_hook = alc269_lifebook_init_hook, | ||
633 | }, | ||
634 | }; | 423 | }; |
635 | 424 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 349acc6bdbac..e2fbe3664ab4 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -159,6 +159,7 @@ struct alc_spec { | |||
159 | void (*power_hook)(struct hda_codec *codec); | 159 | void (*power_hook)(struct hda_codec *codec); |
160 | #endif | 160 | #endif |
161 | void (*shutup)(struct hda_codec *codec); | 161 | void (*shutup)(struct hda_codec *codec); |
162 | void (*automute_hook)(struct hda_codec *codec); | ||
162 | 163 | ||
163 | /* for pin sensing */ | 164 | /* for pin sensing */ |
164 | unsigned int jack_present: 1; | 165 | unsigned int jack_present: 1; |
@@ -560,6 +561,15 @@ static void update_speakers(struct hda_codec *codec) | |||
560 | spec->autocfg.line_out_pins, on, false); | 561 | spec->autocfg.line_out_pins, on, false); |
561 | } | 562 | } |
562 | 563 | ||
564 | static void call_update_speakers(struct hda_codec *codec) | ||
565 | { | ||
566 | struct alc_spec *spec = codec->spec; | ||
567 | if (spec->automute_hook) | ||
568 | spec->automute_hook(codec); | ||
569 | else | ||
570 | update_speakers(codec); | ||
571 | } | ||
572 | |||
563 | /* standard HP-automute helper */ | 573 | /* standard HP-automute helper */ |
564 | static void alc_hp_automute(struct hda_codec *codec) | 574 | static void alc_hp_automute(struct hda_codec *codec) |
565 | { | 575 | { |
@@ -570,7 +580,7 @@ static void alc_hp_automute(struct hda_codec *codec) | |||
570 | spec->jack_present = | 580 | spec->jack_present = |
571 | detect_jacks(codec, ARRAY_SIZE(spec->autocfg.hp_pins), | 581 | detect_jacks(codec, ARRAY_SIZE(spec->autocfg.hp_pins), |
572 | spec->autocfg.hp_pins); | 582 | spec->autocfg.hp_pins); |
573 | update_speakers(codec); | 583 | call_update_speakers(codec); |
574 | } | 584 | } |
575 | 585 | ||
576 | /* standard line-out-automute helper */ | 586 | /* standard line-out-automute helper */ |
@@ -583,7 +593,7 @@ static void alc_line_automute(struct hda_codec *codec) | |||
583 | spec->line_jack_present = | 593 | spec->line_jack_present = |
584 | detect_jacks(codec, ARRAY_SIZE(spec->autocfg.line_out_pins), | 594 | detect_jacks(codec, ARRAY_SIZE(spec->autocfg.line_out_pins), |
585 | spec->autocfg.line_out_pins); | 595 | spec->autocfg.line_out_pins); |
586 | update_speakers(codec); | 596 | call_update_speakers(codec); |
587 | } | 597 | } |
588 | 598 | ||
589 | #define get_connection_index(codec, mux, nid) \ | 599 | #define get_connection_index(codec, mux, nid) \ |
@@ -840,7 +850,7 @@ static int alc_automute_mode_put(struct snd_kcontrol *kcontrol, | |||
840 | default: | 850 | default: |
841 | return -EINVAL; | 851 | return -EINVAL; |
842 | } | 852 | } |
843 | update_speakers(codec); | 853 | call_update_speakers(codec); |
844 | return 1; | 854 | return 1; |
845 | } | 855 | } |
846 | 856 | ||
@@ -4500,6 +4510,30 @@ static void alc269_fixup_stereo_dmic(struct hda_codec *codec, | |||
4500 | alc_write_coef_idx(codec, 0x07, coef | 0x80); | 4510 | alc_write_coef_idx(codec, 0x07, coef | 0x80); |
4501 | } | 4511 | } |
4502 | 4512 | ||
4513 | static void alc269_quanta_automute(struct hda_codec *codec) | ||
4514 | { | ||
4515 | update_speakers(codec); | ||
4516 | |||
4517 | snd_hda_codec_write(codec, 0x20, 0, | ||
4518 | AC_VERB_SET_COEF_INDEX, 0x0c); | ||
4519 | snd_hda_codec_write(codec, 0x20, 0, | ||
4520 | AC_VERB_SET_PROC_COEF, 0x680); | ||
4521 | |||
4522 | snd_hda_codec_write(codec, 0x20, 0, | ||
4523 | AC_VERB_SET_COEF_INDEX, 0x0c); | ||
4524 | snd_hda_codec_write(codec, 0x20, 0, | ||
4525 | AC_VERB_SET_PROC_COEF, 0x480); | ||
4526 | } | ||
4527 | |||
4528 | static void alc269_fixup_quanta_mute(struct hda_codec *codec, | ||
4529 | const struct alc_fixup *fix, int action) | ||
4530 | { | ||
4531 | struct alc_spec *spec = codec->spec; | ||
4532 | if (action != ALC_FIXUP_ACT_PROBE) | ||
4533 | return; | ||
4534 | spec->automute_hook = alc269_quanta_automute; | ||
4535 | } | ||
4536 | |||
4503 | enum { | 4537 | enum { |
4504 | ALC269_FIXUP_SONY_VAIO, | 4538 | ALC269_FIXUP_SONY_VAIO, |
4505 | ALC275_FIXUP_SONY_VAIO_GPIO2, | 4539 | ALC275_FIXUP_SONY_VAIO_GPIO2, |
@@ -4511,6 +4545,8 @@ enum { | |||
4511 | ALC271_FIXUP_DMIC, | 4545 | ALC271_FIXUP_DMIC, |
4512 | ALC269_FIXUP_PCM_44K, | 4546 | ALC269_FIXUP_PCM_44K, |
4513 | ALC269_FIXUP_STEREO_DMIC, | 4547 | ALC269_FIXUP_STEREO_DMIC, |
4548 | ALC269_FIXUP_QUANTA_MUTE, | ||
4549 | ALC269_FIXUP_LIFEBOOK, | ||
4514 | }; | 4550 | }; |
4515 | 4551 | ||
4516 | static const struct alc_fixup alc269_fixups[] = { | 4552 | static const struct alc_fixup alc269_fixups[] = { |
@@ -4577,6 +4613,20 @@ static const struct alc_fixup alc269_fixups[] = { | |||
4577 | .type = ALC_FIXUP_FUNC, | 4613 | .type = ALC_FIXUP_FUNC, |
4578 | .v.func = alc269_fixup_stereo_dmic, | 4614 | .v.func = alc269_fixup_stereo_dmic, |
4579 | }, | 4615 | }, |
4616 | [ALC269_FIXUP_QUANTA_MUTE] = { | ||
4617 | .type = ALC_FIXUP_FUNC, | ||
4618 | .v.func = alc269_fixup_quanta_mute, | ||
4619 | }, | ||
4620 | [ALC269_FIXUP_LIFEBOOK] = { | ||
4621 | .type = ALC_FIXUP_PINS, | ||
4622 | .v.pins = (const struct alc_pincfg[]) { | ||
4623 | { 0x1a, 0x2101103f }, /* dock line-out */ | ||
4624 | { 0x1b, 0x23a11040 }, /* dock mic-in */ | ||
4625 | { } | ||
4626 | }, | ||
4627 | .chained = true, | ||
4628 | .chain_id = ALC269_FIXUP_QUANTA_MUTE | ||
4629 | }, | ||
4580 | }; | 4630 | }; |
4581 | 4631 | ||
4582 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { | 4632 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
@@ -4592,11 +4642,13 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
4592 | SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), | 4642 | SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), |
4593 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), | 4643 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), |
4594 | SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC), | 4644 | SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC), |
4645 | SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK), | ||
4595 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), | 4646 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), |
4596 | SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE), | 4647 | SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE), |
4597 | SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), | 4648 | SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), |
4598 | SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE), | 4649 | SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE), |
4599 | SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE), | 4650 | SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE), |
4651 | SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_QUANTA_MUTE), | ||
4600 | SND_PCI_QUIRK(0x17aa, 0x3bf8, "Lenovo Ideapd", ALC269_FIXUP_PCM_44K), | 4652 | SND_PCI_QUIRK(0x17aa, 0x3bf8, "Lenovo Ideapd", ALC269_FIXUP_PCM_44K), |
4601 | SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), | 4653 | SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), |
4602 | {} | 4654 | {} |