diff options
-rw-r--r-- | Documentation/sound/alsa/HD-Audio-Models.txt | 6 | ||||
-rw-r--r-- | sound/pci/hda/alc268_quirks.c | 189 | ||||
-rw-r--r-- | sound/pci/hda/alc269_quirks.c | 14 |
3 files changed, 14 insertions, 195 deletions
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index 6263c012fe4d..ac2ab9cef5fc 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt | |||
@@ -60,12 +60,6 @@ ALC267/268 | |||
60 | ========== | 60 | ========== |
61 | quanta-il1 Quanta IL1 mini-notebook | 61 | quanta-il1 Quanta IL1 mini-notebook |
62 | 3stack 3-stack model | 62 | 3stack 3-stack model |
63 | toshiba Toshiba A205 | ||
64 | acer Acer laptops | ||
65 | acer-dmic Acer laptops with digital-mic | ||
66 | acer-aspire Acer Aspire One | ||
67 | dell Dell OEM laptops (Vostro 1200) | ||
68 | zepto Zepto laptops | ||
69 | test for testing/debugging purpose, almost all controls can | 63 | test for testing/debugging purpose, almost all controls can |
70 | adjusted. Appearing only when compiled with | 64 | adjusted. Appearing only when compiled with |
71 | $CONFIG_SND_DEBUG=y | 65 | $CONFIG_SND_DEBUG=y |
diff --git a/sound/pci/hda/alc268_quirks.c b/sound/pci/hda/alc268_quirks.c index 7cbbde411649..e9533a29dd81 100644 --- a/sound/pci/hda/alc268_quirks.c +++ b/sound/pci/hda/alc268_quirks.c | |||
@@ -8,9 +8,6 @@ enum { | |||
8 | ALC268_AUTO, | 8 | ALC268_AUTO, |
9 | ALC267_QUANTA_IL1, | 9 | ALC267_QUANTA_IL1, |
10 | ALC268_3ST, | 10 | ALC268_3ST, |
11 | ALC268_ACER, | ||
12 | ALC268_ACER_DMIC, | ||
13 | ALC268_ACER_ASPIRE_ONE, | ||
14 | #ifdef CONFIG_SND_DEBUG | 11 | #ifdef CONFIG_SND_DEBUG |
15 | ALC268_TEST, | 12 | ALC268_TEST, |
16 | #endif | 13 | #endif |
@@ -58,111 +55,6 @@ static const struct hda_verb alc268_eapd_verbs[] = { | |||
58 | { } | 55 | { } |
59 | }; | 56 | }; |
60 | 57 | ||
61 | /* Acer specific */ | ||
62 | /* bind volumes of both NID 0x02 and 0x03 */ | ||
63 | static const struct hda_bind_ctls alc268_acer_bind_master_vol = { | ||
64 | .ops = &snd_hda_bind_vol, | ||
65 | .values = { | ||
66 | HDA_COMPOSE_AMP_VAL(0x02, 3, 0, HDA_OUTPUT), | ||
67 | HDA_COMPOSE_AMP_VAL(0x03, 3, 0, HDA_OUTPUT), | ||
68 | 0 | ||
69 | }, | ||
70 | }; | ||
71 | |||
72 | static void alc268_acer_setup(struct hda_codec *codec) | ||
73 | { | ||
74 | struct alc_spec *spec = codec->spec; | ||
75 | |||
76 | spec->autocfg.hp_pins[0] = 0x14; | ||
77 | spec->autocfg.speaker_pins[0] = 0x15; | ||
78 | spec->automute = 1; | ||
79 | spec->automute_mode = ALC_AUTOMUTE_AMP; | ||
80 | } | ||
81 | |||
82 | #define alc268_acer_master_sw_get alc262_hp_master_sw_get | ||
83 | #define alc268_acer_master_sw_put alc262_hp_master_sw_put | ||
84 | |||
85 | static const struct snd_kcontrol_new alc268_acer_aspire_one_mixer[] = { | ||
86 | /* output mixer control */ | ||
87 | HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol), | ||
88 | { | ||
89 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
90 | .name = "Master Playback Switch", | ||
91 | .subdevice = HDA_SUBDEV_NID_FLAG | 0x15, | ||
92 | .info = snd_ctl_boolean_mono_info, | ||
93 | .get = alc268_acer_master_sw_get, | ||
94 | .put = alc268_acer_master_sw_put, | ||
95 | }, | ||
96 | HDA_CODEC_VOLUME("Mic Boost Capture Volume", 0x18, 0, HDA_INPUT), | ||
97 | { } | ||
98 | }; | ||
99 | |||
100 | static const struct snd_kcontrol_new alc268_acer_mixer[] = { | ||
101 | /* output mixer control */ | ||
102 | HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol), | ||
103 | { | ||
104 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
105 | .name = "Master Playback Switch", | ||
106 | .subdevice = HDA_SUBDEV_NID_FLAG | 0x14, | ||
107 | .info = snd_ctl_boolean_mono_info, | ||
108 | .get = alc268_acer_master_sw_get, | ||
109 | .put = alc268_acer_master_sw_put, | ||
110 | }, | ||
111 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
112 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), | ||
113 | HDA_CODEC_VOLUME("Line In Boost Volume", 0x1a, 0, HDA_INPUT), | ||
114 | { } | ||
115 | }; | ||
116 | |||
117 | static const struct snd_kcontrol_new alc268_acer_dmic_mixer[] = { | ||
118 | /* output mixer control */ | ||
119 | HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol), | ||
120 | { | ||
121 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
122 | .name = "Master Playback Switch", | ||
123 | .subdevice = HDA_SUBDEV_NID_FLAG | 0x14, | ||
124 | .info = snd_ctl_boolean_mono_info, | ||
125 | .get = alc268_acer_master_sw_get, | ||
126 | .put = alc268_acer_master_sw_put, | ||
127 | }, | ||
128 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
129 | HDA_CODEC_VOLUME("Line In Boost Volume", 0x1a, 0, HDA_INPUT), | ||
130 | { } | ||
131 | }; | ||
132 | |||
133 | static const struct hda_verb alc268_acer_aspire_one_verbs[] = { | ||
134 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
135 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
136 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN}, | ||
137 | {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_MIC_EVENT}, | ||
138 | {0x23, AC_VERB_SET_CONNECT_SEL, 0x06}, | ||
139 | {0x23, AC_VERB_SET_AMP_GAIN_MUTE, 0xa017}, | ||
140 | { } | ||
141 | }; | ||
142 | |||
143 | static const struct hda_verb alc268_acer_verbs[] = { | ||
144 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, /* internal dmic? */ | ||
145 | {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
146 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
147 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
148 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | ||
149 | {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | ||
150 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN}, | ||
151 | { } | ||
152 | }; | ||
153 | |||
154 | static void alc268_acer_lc_setup(struct hda_codec *codec) | ||
155 | { | ||
156 | struct alc_spec *spec = codec->spec; | ||
157 | spec->autocfg.hp_pins[0] = 0x15; | ||
158 | spec->autocfg.speaker_pins[0] = 0x14; | ||
159 | spec->automute = 1; | ||
160 | spec->automute_mode = ALC_AUTOMUTE_AMP; | ||
161 | spec->ext_mic_pin = 0x18; | ||
162 | spec->int_mic_pin = 0x12; | ||
163 | spec->auto_mic = 1; | ||
164 | } | ||
165 | |||
166 | static const struct snd_kcontrol_new alc267_quanta_il1_mixer[] = { | 58 | static const struct snd_kcontrol_new alc267_quanta_il1_mixer[] = { |
167 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x2, 0x0, HDA_OUTPUT), | 59 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x2, 0x0, HDA_OUTPUT), |
168 | HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), | 60 | HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), |
@@ -299,24 +191,6 @@ static const struct hda_input_mux alc268_capture_source = { | |||
299 | }, | 191 | }, |
300 | }; | 192 | }; |
301 | 193 | ||
302 | static const struct hda_input_mux alc268_acer_capture_source = { | ||
303 | .num_items = 3, | ||
304 | .items = { | ||
305 | { "Mic", 0x0 }, | ||
306 | { "Internal Mic", 0x1 }, | ||
307 | { "Line", 0x2 }, | ||
308 | }, | ||
309 | }; | ||
310 | |||
311 | static const struct hda_input_mux alc268_acer_dmic_capture_source = { | ||
312 | .num_items = 3, | ||
313 | .items = { | ||
314 | { "Mic", 0x0 }, | ||
315 | { "Internal Mic", 0x6 }, | ||
316 | { "Line", 0x2 }, | ||
317 | }, | ||
318 | }; | ||
319 | |||
320 | #ifdef CONFIG_SND_DEBUG | 194 | #ifdef CONFIG_SND_DEBUG |
321 | static const struct snd_kcontrol_new alc268_test_mixer[] = { | 195 | static const struct snd_kcontrol_new alc268_test_mixer[] = { |
322 | /* Volume widgets */ | 196 | /* Volume widgets */ |
@@ -373,9 +247,6 @@ static const struct snd_kcontrol_new alc268_test_mixer[] = { | |||
373 | static const char * const alc268_models[ALC268_MODEL_LAST] = { | 247 | static const char * const alc268_models[ALC268_MODEL_LAST] = { |
374 | [ALC267_QUANTA_IL1] = "quanta-il1", | 248 | [ALC267_QUANTA_IL1] = "quanta-il1", |
375 | [ALC268_3ST] = "3stack", | 249 | [ALC268_3ST] = "3stack", |
376 | [ALC268_ACER] = "acer", | ||
377 | [ALC268_ACER_DMIC] = "acer-dmic", | ||
378 | [ALC268_ACER_ASPIRE_ONE] = "acer-aspire", | ||
379 | #ifdef CONFIG_SND_DEBUG | 250 | #ifdef CONFIG_SND_DEBUG |
380 | [ALC268_TEST] = "test", | 251 | [ALC268_TEST] = "test", |
381 | #endif | 252 | #endif |
@@ -383,13 +254,6 @@ static const char * const alc268_models[ALC268_MODEL_LAST] = { | |||
383 | }; | 254 | }; |
384 | 255 | ||
385 | static const struct snd_pci_quirk alc268_cfg_tbl[] = { | 256 | static const struct snd_pci_quirk alc268_cfg_tbl[] = { |
386 | SND_PCI_QUIRK(0x1025, 0x011e, "Acer Aspire 5720z", ALC268_ACER), | ||
387 | SND_PCI_QUIRK(0x1025, 0x0126, "Acer", ALC268_ACER), | ||
388 | SND_PCI_QUIRK(0x1025, 0x012e, "Acer Aspire 5310", ALC268_ACER), | ||
389 | SND_PCI_QUIRK(0x1025, 0x0130, "Acer Extensa 5210", ALC268_ACER), | ||
390 | SND_PCI_QUIRK(0x1025, 0x0136, "Acer Aspire 5315", ALC268_ACER), | ||
391 | SND_PCI_QUIRK(0x1025, 0x015b, "Acer Aspire One", | ||
392 | ALC268_ACER_ASPIRE_ONE), | ||
393 | SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST), | 257 | SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST), |
394 | SND_PCI_QUIRK(0x152d, 0x0771, "Quanta IL1", ALC267_QUANTA_IL1), | 258 | SND_PCI_QUIRK(0x152d, 0x0771, "Quanta IL1", ALC267_QUANTA_IL1), |
395 | {} | 259 | {} |
@@ -427,59 +291,6 @@ static const struct alc_config_preset alc268_presets[] = { | |||
427 | .channel_mode = alc268_modes, | 291 | .channel_mode = alc268_modes, |
428 | .input_mux = &alc268_capture_source, | 292 | .input_mux = &alc268_capture_source, |
429 | }, | 293 | }, |
430 | [ALC268_ACER] = { | ||
431 | .mixers = { alc268_acer_mixer, alc268_beep_mixer }, | ||
432 | .cap_mixer = alc268_capture_alt_mixer, | ||
433 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, | ||
434 | alc268_acer_verbs }, | ||
435 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), | ||
436 | .dac_nids = alc268_dac_nids, | ||
437 | .num_adc_nids = ARRAY_SIZE(alc268_adc_nids_alt), | ||
438 | .adc_nids = alc268_adc_nids_alt, | ||
439 | .capsrc_nids = alc268_capsrc_nids, | ||
440 | .hp_nid = 0x02, | ||
441 | .num_channel_mode = ARRAY_SIZE(alc268_modes), | ||
442 | .channel_mode = alc268_modes, | ||
443 | .input_mux = &alc268_acer_capture_source, | ||
444 | .unsol_event = alc_sku_unsol_event, | ||
445 | .setup = alc268_acer_setup, | ||
446 | .init_hook = alc_inithook, | ||
447 | }, | ||
448 | [ALC268_ACER_DMIC] = { | ||
449 | .mixers = { alc268_acer_dmic_mixer, alc268_beep_mixer }, | ||
450 | .cap_mixer = alc268_capture_alt_mixer, | ||
451 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, | ||
452 | alc268_acer_verbs }, | ||
453 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), | ||
454 | .dac_nids = alc268_dac_nids, | ||
455 | .num_adc_nids = ARRAY_SIZE(alc268_adc_nids_alt), | ||
456 | .adc_nids = alc268_adc_nids_alt, | ||
457 | .capsrc_nids = alc268_capsrc_nids, | ||
458 | .hp_nid = 0x02, | ||
459 | .num_channel_mode = ARRAY_SIZE(alc268_modes), | ||
460 | .channel_mode = alc268_modes, | ||
461 | .input_mux = &alc268_acer_dmic_capture_source, | ||
462 | .unsol_event = alc_sku_unsol_event, | ||
463 | .setup = alc268_acer_setup, | ||
464 | .init_hook = alc_inithook, | ||
465 | }, | ||
466 | [ALC268_ACER_ASPIRE_ONE] = { | ||
467 | .mixers = { alc268_acer_aspire_one_mixer, alc268_beep_mixer}, | ||
468 | .cap_mixer = alc268_capture_nosrc_mixer, | ||
469 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, | ||
470 | alc268_acer_aspire_one_verbs }, | ||
471 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), | ||
472 | .dac_nids = alc268_dac_nids, | ||
473 | .num_adc_nids = ARRAY_SIZE(alc268_adc_nids_alt), | ||
474 | .adc_nids = alc268_adc_nids_alt, | ||
475 | .capsrc_nids = alc268_capsrc_nids, | ||
476 | .hp_nid = 0x03, | ||
477 | .num_channel_mode = ARRAY_SIZE(alc268_modes), | ||
478 | .channel_mode = alc268_modes, | ||
479 | .unsol_event = alc_sku_unsol_event, | ||
480 | .setup = alc268_acer_lc_setup, | ||
481 | .init_hook = alc_inithook, | ||
482 | }, | ||
483 | #ifdef CONFIG_SND_DEBUG | 294 | #ifdef CONFIG_SND_DEBUG |
484 | [ALC268_TEST] = { | 295 | [ALC268_TEST] = { |
485 | .mixers = { alc268_test_mixer }, | 296 | .mixers = { alc268_test_mixer }, |
diff --git a/sound/pci/hda/alc269_quirks.c b/sound/pci/hda/alc269_quirks.c index 5ac0e2162a46..080b7e43f37b 100644 --- a/sound/pci/hda/alc269_quirks.c +++ b/sound/pci/hda/alc269_quirks.c | |||
@@ -62,6 +62,20 @@ static const struct snd_kcontrol_new alc269_base_mixer[] = { | |||
62 | { } /* end */ | 62 | { } /* end */ |
63 | }; | 63 | }; |
64 | 64 | ||
65 | /* Acer specific */ | ||
66 | /* bind volumes of both NID 0x02 and 0x03 */ | ||
67 | static const struct hda_bind_ctls alc268_acer_bind_master_vol = { | ||
68 | .ops = &snd_hda_bind_vol, | ||
69 | .values = { | ||
70 | HDA_COMPOSE_AMP_VAL(0x02, 3, 0, HDA_OUTPUT), | ||
71 | HDA_COMPOSE_AMP_VAL(0x03, 3, 0, HDA_OUTPUT), | ||
72 | 0 | ||
73 | }, | ||
74 | }; | ||
75 | |||
76 | #define alc268_acer_master_sw_get alc262_hp_master_sw_get | ||
77 | #define alc268_acer_master_sw_put alc262_hp_master_sw_put | ||
78 | |||
65 | static const struct snd_kcontrol_new alc269_quanta_fl1_mixer[] = { | 79 | static const struct snd_kcontrol_new alc269_quanta_fl1_mixer[] = { |
66 | /* output mixer control */ | 80 | /* output mixer control */ |
67 | HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol), | 81 | HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol), |