aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-11-07 08:59:40 -0500
committerTakashi Iwai <tiwai@suse.de>2011-11-08 02:59:35 -0500
commit3dcd3be33046c9828a6057ee0f14de6e5d3b48a2 (patch)
treeb3cd8449a125994e064ac1e5cca39f91fce0a6b4 /sound
parentb42590b865cb4358a0c37b2128e303a18d897bf6 (diff)
ALSA: hda/realtek - Convert ALC262 model=fujitsu to auto-parser
It works well with the auto-parse and the default BIOS setup when an additional COEF setup (for benq) is used. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/alc262_quirks.c95
-rw-r--r--sound/pci/hda/patch_realtek.c2
2 files changed, 2 insertions, 95 deletions
diff --git a/sound/pci/hda/alc262_quirks.c b/sound/pci/hda/alc262_quirks.c
index bf573bde6bce..ae10d008abcb 100644
--- a/sound/pci/hda/alc262_quirks.c
+++ b/sound/pci/hda/alc262_quirks.c
@@ -9,7 +9,6 @@ enum {
9 ALC262_BASIC, 9 ALC262_BASIC,
10 ALC262_HIPPO, 10 ALC262_HIPPO,
11 ALC262_HIPPO_1, 11 ALC262_HIPPO_1,
12 ALC262_FUJITSU,
13 ALC262_ULTRA, 12 ALC262_ULTRA,
14 ALC262_MODEL_LAST /* last tag */ 13 ALC262_MODEL_LAST /* last tag */
15}; 14};
@@ -267,82 +266,6 @@ static const struct hda_verb alc262_sony_unsol_verbs[] = {
267 {} 266 {}
268}; 267};
269 268
270/*
271 * fujitsu model
272 * 0x14 = headphone/spdif-out, 0x15 = internal speaker,
273 * 0x1b = port replicator headphone out
274 */
275
276static const struct hda_verb alc262_fujitsu_unsol_verbs[] = {
277 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
278 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
279 {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
280 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
281 {}
282};
283
284static const struct hda_input_mux alc262_fujitsu_capture_source = {
285 .num_items = 3,
286 .items = {
287 { "Mic", 0x0 },
288 { "Internal Mic", 0x1 },
289 { "CD", 0x4 },
290 },
291};
292
293static void alc262_fujitsu_setup(struct hda_codec *codec)
294{
295 struct alc_spec *spec = codec->spec;
296
297 spec->autocfg.hp_pins[0] = 0x14;
298 spec->autocfg.hp_pins[1] = 0x1b;
299 spec->autocfg.speaker_pins[0] = 0x15;
300 alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP);
301}
302
303/* bind volumes of both NID 0x0c and 0x0d */
304static const struct hda_bind_ctls alc262_fujitsu_bind_master_vol = {
305 .ops = &snd_hda_bind_vol,
306 .values = {
307 HDA_COMPOSE_AMP_VAL(0x0c, 3, 0, HDA_OUTPUT),
308 HDA_COMPOSE_AMP_VAL(0x0d, 3, 0, HDA_OUTPUT),
309 0
310 },
311};
312
313static const struct snd_kcontrol_new alc262_fujitsu_mixer[] = {
314 HDA_BIND_VOL("Master Playback Volume", &alc262_fujitsu_bind_master_vol),
315 {
316 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
317 .name = "Master Playback Switch",
318 .subdevice = HDA_SUBDEV_NID_FLAG | 0x14,
319 .info = snd_ctl_boolean_mono_info,
320 .get = alc262_hp_master_sw_get,
321 .put = alc262_hp_master_sw_put,
322 },
323 {
324 .iface = NID_MAPPING,
325 .name = "Master Playback Switch",
326 .private_value = 0x1b,
327 },
328 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
329 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
330 HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT),
331 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
332 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
333 HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT),
334 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
335 HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
336 { } /* end */
337};
338
339/* additional init verbs for Benq laptops */
340static const struct hda_verb alc262_EAPD_verbs[] = {
341 {0x20, AC_VERB_SET_COEF_INDEX, 0x07},
342 {0x20, AC_VERB_SET_PROC_COEF, 0x3070},
343 {}
344};
345
346/* Samsung Q1 Ultra Vista model setup */ 269/* Samsung Q1 Ultra Vista model setup */
347static const struct snd_kcontrol_new alc262_ultra_mixer[] = { 270static const struct snd_kcontrol_new alc262_ultra_mixer[] = {
348 HDA_CODEC_VOLUME("Master Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 271 HDA_CODEC_VOLUME("Master Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
@@ -468,15 +391,12 @@ static const char * const alc262_models[ALC262_MODEL_LAST] = {
468 [ALC262_BASIC] = "basic", 391 [ALC262_BASIC] = "basic",
469 [ALC262_HIPPO] = "hippo", 392 [ALC262_HIPPO] = "hippo",
470 [ALC262_HIPPO_1] = "hippo_1", 393 [ALC262_HIPPO_1] = "hippo_1",
471 [ALC262_FUJITSU] = "fujitsu",
472 [ALC262_ULTRA] = "ultra", 394 [ALC262_ULTRA] = "ultra",
473 [ALC262_AUTO] = "auto", 395 [ALC262_AUTO] = "auto",
474}; 396};
475 397
476static const struct snd_pci_quirk alc262_cfg_tbl[] = { 398static const struct snd_pci_quirk alc262_cfg_tbl[] = {
477 SND_PCI_QUIRK(0x1002, 0x437b, "Hippo", ALC262_HIPPO), 399 SND_PCI_QUIRK(0x1002, 0x437b, "Hippo", ALC262_HIPPO),
478 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU),
479 SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU),
480 SND_PCI_QUIRK_MASK(0x144d, 0xff00, 0xc032, "Samsung Q1", 400 SND_PCI_QUIRK_MASK(0x144d, 0xff00, 0xc032, "Samsung Q1",
481 ALC262_ULTRA), 401 ALC262_ULTRA),
482 SND_PCI_QUIRK(0x144d, 0xc510, "Samsung Q45", ALC262_HIPPO), 402 SND_PCI_QUIRK(0x144d, 0xc510, "Samsung Q45", ALC262_HIPPO),
@@ -523,21 +443,6 @@ static const struct alc_config_preset alc262_presets[] = {
523 .setup = alc262_hippo1_setup, 443 .setup = alc262_hippo1_setup,
524 .init_hook = alc_inithook, 444 .init_hook = alc_inithook,
525 }, 445 },
526 [ALC262_FUJITSU] = {
527 .mixers = { alc262_fujitsu_mixer },
528 .init_verbs = { alc262_init_verbs, alc262_EAPD_verbs,
529 alc262_fujitsu_unsol_verbs },
530 .num_dacs = ARRAY_SIZE(alc262_dac_nids),
531 .dac_nids = alc262_dac_nids,
532 .hp_nid = 0x03,
533 .dig_out_nid = ALC262_DIGOUT_NID,
534 .num_channel_mode = ARRAY_SIZE(alc262_modes),
535 .channel_mode = alc262_modes,
536 .input_mux = &alc262_fujitsu_capture_source,
537 .unsol_event = alc_sku_unsol_event,
538 .setup = alc262_fujitsu_setup,
539 .init_hook = alc_inithook,
540 },
541 [ALC262_ULTRA] = { 446 [ALC262_ULTRA] = {
542 .mixers = { alc262_ultra_mixer }, 447 .mixers = { alc262_ultra_mixer },
543 .cap_mixer = alc262_ultra_capture_mixer, 448 .cap_mixer = alc262_ultra_capture_mixer,
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 55bdb730b3d0..50820708be3b 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4411,6 +4411,8 @@ static const struct alc_fixup alc262_fixups[] = {
4411 4411
4412static const struct snd_pci_quirk alc262_fixup_tbl[] = { 4412static const struct snd_pci_quirk alc262_fixup_tbl[] = {
4413 SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", ALC262_FIXUP_HP_Z200), 4413 SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", ALC262_FIXUP_HP_Z200),
4414 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FIXUP_BENQ),
4415 SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FIXUP_BENQ),
4414 SND_PCI_QUIRK(0x10f1, 0x2915, "Tyan Thunder n6650W", ALC262_FIXUP_TYAN), 4416 SND_PCI_QUIRK(0x10f1, 0x2915, "Tyan Thunder n6650W", ALC262_FIXUP_TYAN),
4415 SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", 4417 SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1",
4416 ALC262_FIXUP_TOSHIBA_RX1), 4418 ALC262_FIXUP_TOSHIBA_RX1),