aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_realtek.c636
1 files changed, 328 insertions, 308 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 0ca5151908d7..84ae90cc1114 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -101,7 +101,7 @@ static hda_nid_t alc880_z71v_dac_nids[1] = {
101 101
102#if 0 102#if 0
103/* The datasheet says the node 0x07 is connected from inputs, 103/* The datasheet says the node 0x07 is connected from inputs,
104 * but it shows zero connection in the real implementation. 104 * but it shows zero connection in the real implementation on some devices.
105 */ 105 */
106static hda_nid_t alc880_adc_nids[3] = { 106static hda_nid_t alc880_adc_nids[3] = {
107 /* ADC0-2 */ 107 /* ADC0-2 */
@@ -373,7 +373,7 @@ static int alc880_ch_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uc
373#define AMP_VAL_IDX_SHIFT 19 373#define AMP_VAL_IDX_SHIFT 19
374#define AMP_VAL_IDX_MASK (0x0f<<19) 374#define AMP_VAL_IDX_MASK (0x0f<<19)
375 375
376static int alc_bind_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 376static int alc_bind_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
377{ 377{
378 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 378 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
379 struct alc_spec *spec = codec->spec; 379 struct alc_spec *spec = codec->spec;
@@ -382,13 +382,13 @@ static int alc_bind_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf
382 down(&spec->bind_mutex); 382 down(&spec->bind_mutex);
383 pval = kcontrol->private_value; 383 pval = kcontrol->private_value;
384 kcontrol->private_value = pval & ~AMP_VAL_IDX_MASK; /* index 0 */ 384 kcontrol->private_value = pval & ~AMP_VAL_IDX_MASK; /* index 0 */
385 snd_hda_mixer_amp_volume_info(kcontrol, uinfo); 385 snd_hda_mixer_amp_switch_info(kcontrol, uinfo);
386 kcontrol->private_value = pval; 386 kcontrol->private_value = pval;
387 up(&spec->bind_mutex); 387 up(&spec->bind_mutex);
388 return 0; 388 return 0;
389} 389}
390 390
391static int alc_bind_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 391static int alc_bind_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
392{ 392{
393 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 393 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
394 struct alc_spec *spec = codec->spec; 394 struct alc_spec *spec = codec->spec;
@@ -397,13 +397,13 @@ static int alc_bind_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
397 down(&spec->bind_mutex); 397 down(&spec->bind_mutex);
398 pval = kcontrol->private_value; 398 pval = kcontrol->private_value;
399 kcontrol->private_value = pval & ~AMP_VAL_IDX_MASK; /* index 0 */ 399 kcontrol->private_value = pval & ~AMP_VAL_IDX_MASK; /* index 0 */
400 snd_hda_mixer_amp_volume_get(kcontrol, ucontrol); 400 snd_hda_mixer_amp_switch_get(kcontrol, ucontrol);
401 kcontrol->private_value = pval; 401 kcontrol->private_value = pval;
402 up(&spec->bind_mutex); 402 up(&spec->bind_mutex);
403 return 0; 403 return 0;
404} 404}
405 405
406static int alc_bind_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 406static int alc_bind_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
407{ 407{
408 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 408 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
409 struct alc_spec *spec = codec->spec; 409 struct alc_spec *spec = codec->spec;
@@ -415,21 +415,21 @@ static int alc_bind_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
415 indices = (pval & AMP_VAL_IDX_MASK) >> AMP_VAL_IDX_SHIFT; 415 indices = (pval & AMP_VAL_IDX_MASK) >> AMP_VAL_IDX_SHIFT;
416 for (i = 0; i < indices; i++) { 416 for (i = 0; i < indices; i++) {
417 kcontrol->private_value = (pval & ~AMP_VAL_IDX_MASK) | (i << AMP_VAL_IDX_SHIFT); 417 kcontrol->private_value = (pval & ~AMP_VAL_IDX_MASK) | (i << AMP_VAL_IDX_SHIFT);
418 change |= snd_hda_mixer_amp_volume_put(kcontrol, ucontrol); 418 change |= snd_hda_mixer_amp_switch_put(kcontrol, ucontrol);
419 } 419 }
420 kcontrol->private_value = pval; 420 kcontrol->private_value = pval;
421 up(&spec->bind_mutex); 421 up(&spec->bind_mutex);
422 return change; 422 return change;
423} 423}
424 424
425#define ALC_BIND_VOL_MONO(xname, nid, channel, indices, direction) \ 425#define ALC_BIND_MUTE_MONO(xname, nid, channel, indices, direction) \
426 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = 0, \ 426 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = 0, \
427 .info = alc_bind_vol_info, \ 427 .info = alc_bind_switch_info, \
428 .get = alc_bind_vol_get, \ 428 .get = alc_bind_switch_get, \
429 .put = alc_bind_vol_put, \ 429 .put = alc_bind_switch_put, \
430 .private_value = HDA_COMPOSE_AMP_VAL(nid, channel, indices, direction) } 430 .private_value = HDA_COMPOSE_AMP_VAL(nid, channel, indices, direction) }
431 431
432#define ALC_BIND_VOL(xname,nid,indices,dir) ALC_BIND_VOL_MONO(xname,nid,3,indices,dir) 432#define ALC_BIND_MUTE(xname,nid,indices,dir) ALC_BIND_MUTE_MONO(xname,nid,3,indices,dir)
433 433
434/* 434/*
435 */ 435 */
@@ -439,14 +439,14 @@ static int alc_bind_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
439 * HP=0x19 439 * HP=0x19
440 */ 440 */
441static snd_kcontrol_new_t alc880_base_mixer[] = { 441static snd_kcontrol_new_t alc880_base_mixer[] = {
442 ALC_BIND_VOL("Front Playback Volume", 0x0c, 2, HDA_OUTPUT), 442 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
443 HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), 443 ALC_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
444 ALC_BIND_VOL("Surround Playback Volume", 0x0f, 2, HDA_OUTPUT), 444 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
445 HDA_CODEC_MUTE("Surround Playback Switch", 0x1a, 0x0, HDA_OUTPUT), 445 ALC_BIND_MUTE("Surround Playback Switch", 0x1a, 2, HDA_INPUT),
446 ALC_BIND_VOL_MONO("Center Playback Volume", 0x0e, 1, 2, HDA_OUTPUT), 446 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT),
447 ALC_BIND_VOL_MONO("LFE Playback Volume", 0x0e, 2, 2, HDA_OUTPUT), 447 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT),
448 HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x18, 1, 0x0, HDA_OUTPUT), 448 ALC_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT),
449 HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x18, 2, 0x0, HDA_OUTPUT), 449 ALC_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT),
450 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), 450 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
451 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), 451 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
452 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), 452 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
@@ -457,8 +457,8 @@ static snd_kcontrol_new_t alc880_base_mixer[] = {
457 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x3, HDA_INPUT), 457 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x3, HDA_INPUT),
458 HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), 458 HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT),
459 HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), 459 HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT),
460 ALC_BIND_VOL("Headphone Playback Volume", 0x0d, 2, HDA_OUTPUT), 460 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
461 HDA_CODEC_MUTE("Headphone Playback Switch", 0x19, 0x0, HDA_OUTPUT), 461 ALC_BIND_MUTE("Headphone Playback Switch", 0x0d, 2, HDA_INPUT),
462 /* We don't use NID 0x07 - see above */ 462 /* We don't use NID 0x07 - see above */
463 HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), 463 HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
464 HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), 464 HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
@@ -492,16 +492,16 @@ static snd_kcontrol_new_t alc880_base_mixer[] = {
492 * Line-In/Side=0x1a, Mic=0x18, F-Mic=0x1b, HP=0x19 492 * Line-In/Side=0x1a, Mic=0x18, F-Mic=0x1b, HP=0x19
493 */ 493 */
494static snd_kcontrol_new_t alc880_five_stack_mixer[] = { 494static snd_kcontrol_new_t alc880_five_stack_mixer[] = {
495 ALC_BIND_VOL("Front Playback Volume", 0x0c, 2, HDA_OUTPUT), 495 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
496 HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), 496 ALC_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
497 ALC_BIND_VOL("Surround Playback Volume", 0x0f, 2, HDA_OUTPUT), 497 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
498 HDA_CODEC_MUTE("Surround Playback Switch", 0x17, 0x0, HDA_OUTPUT), 498 ALC_BIND_MUTE("Surround Playback Switch", 0x0f, 2, HDA_INPUT),
499 ALC_BIND_VOL_MONO("Center Playback Volume", 0x0e, 1, 2, HDA_OUTPUT), 499 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT),
500 ALC_BIND_VOL_MONO("LFE Playback Volume", 0x0e, 2, 2, HDA_OUTPUT), 500 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT),
501 HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x16, 1, 0x0, HDA_OUTPUT), 501 ALC_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT),
502 HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x16, 2, 0x0, HDA_OUTPUT), 502 ALC_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT),
503 ALC_BIND_VOL("Side Playback Volume", 0x0d, 2, HDA_OUTPUT), 503 HDA_CODEC_VOLUME("Side Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
504 HDA_CODEC_MUTE("Side Playback Switch", 0x1a, 0x0, HDA_OUTPUT), 504 ALC_BIND_MUTE("Side Playback Switch", 0x0d, 2, HDA_INPUT),
505 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), 505 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
506 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), 506 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
507 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), 507 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
@@ -575,10 +575,10 @@ static snd_kcontrol_new_t alc880_w810_base_mixer[] = {
575}; 575};
576 576
577static snd_kcontrol_new_t alc880_z71v_mixer[] = { 577static snd_kcontrol_new_t alc880_z71v_mixer[] = {
578 ALC_BIND_VOL("Front Playback Volume", 0x0c, 2, HDA_OUTPUT), 578 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
579 HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), 579 ALC_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
580 ALC_BIND_VOL("Headphone Playback Volume", 0x0d, 2, HDA_OUTPUT), 580 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
581 HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), 581 ALC_BIND_MUTE("Headphone Playback Switch", 0x0d, 2, HDA_INPUT),
582 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), 582 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
583 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), 583 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
584 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), 584 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
@@ -636,51 +636,66 @@ static int alc_build_controls(struct hda_codec *codec)
636 * initialize the codec volumes, etc 636 * initialize the codec volumes, etc
637 */ 637 */
638 638
639#define AMP_IN_MUTE(idx) (0x7080 | ((idx)<<8))
640#define AMP_IN_UNMUTE(idx) (0x7000 | ((idx)<<8))
641#define AMP_OUT_MUTE 0xb080
642#define AMP_OUT_UNMUTE 0xb000
643#define AMP_OUT_ZERO 0xb000
644#define PIN_IN 0x20
645#define PIN_VREF 0x24
646#define PIN_OUT 0x40
647#define PIN_HP 0xc0
648
639static struct hda_verb alc880_init_verbs_three_stack[] = { 649static struct hda_verb alc880_init_verbs_three_stack[] = {
650 /* Set pin widgets for output */
651 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
652 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
653 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
654 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
640 /* Line In pin widget for input */ 655 /* Line In pin widget for input */
641 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, 656 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
642 /* CD pin widget for input */ 657 /* CD pin widget for input */
643 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, 658 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
644 /* Mic1 (rear panel) pin widget for input and vref at 80% */ 659 /* Mic1 (rear panel) pin widget for input and vref at 80% */
645 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, 660 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF},
646 /* Mic2 (front panel) pin widget for input and vref at 80% */ 661 /* Mic2 (front panel) pin widget for input and vref at 80% */
647 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, 662 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF},
648 /* unmute amp left and right */ 663 /* unmute capture amp left and right */
649 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 664 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
650 /* set connection select to mic in */ 665 /* set connection select to mic in */
651 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00}, 666 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00},
652 /* unmute amp left and right */ 667 /* unmute capture1 amp left and right */
653 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 668 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
654 /* set connection select to mic in */ 669 /* set connection select to mic in */
655 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, 670 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
656 /* unmute amp left and right */ 671 /* unmute capture2 amp left and right */
657 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 672 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
658 /* set connection select to mic in */ 673 /* set connection select to mic in */
659 {0x09, AC_VERB_SET_CONNECT_SEL, 0x00}, 674 {0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
660 /* unmute front mixer amp left (volume = 0) */ 675 /* set vol=0 front mixer amp */
661 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 676 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
662 /* mute pin widget amp left and right (no gain on this amp) */ 677 /* unmute front-out pin widget amp (no gain on this amp) */
663 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, 678 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
664 /* unmute rear mixer amp left and right (volume = 0) */ 679 /* set vol=0 rear mixer amp */
665 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 680 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
666 /* mute pin widget amp left and right (no gain on this amp) */ 681 /* mute line-in pin widget amp left and right (no gain on this amp) */
667 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, 682 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
668 /* unmute rear mixer amp left and right (volume = 0) */ 683 /* set vol=0 clfe mixer amp */
669 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 684 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
670 /* mute pin widget amp left and right (no gain on this amp) */ 685 /* mute mic pin widget amp left and right (no gain on this amp) */
671 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, 686 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
672 687
673 /* using rear surround as the path for headphone output */ 688 /* using rear surround as the path for headphone output */
674 /* unmute rear surround mixer amp left and right (volume = 0) */ 689 /* set vol=0 rear surround mixer amp */
675 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 690 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
676 /* PASD 3 stack boards use the Mic 2 as the headphone output */ 691 /* PASD 3 stack boards use the Mic 2 as the headphone output */
677 /* need to program the selector associated with the Mic 2 pin widget to 692 /* need to program the selector associated with the Mic 2 pin widget to
678 * surround path (index 0x01) for headphone output */ 693 * surround path (index 0x01) for headphone output */
679 {0x11, AC_VERB_SET_CONNECT_SEL, 0x01}, 694 {0x11, AC_VERB_SET_CONNECT_SEL, 0x01},
680 /* mute pin widget amp left and right (no gain on this amp) */ 695 /* unmute pin widget amp left and right (no gain on this amp) */
681 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, 696 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
682 /* need to retask the Mic 2 pin widget to output */ 697 /* need to retask the Mic 2 pin widget to output */
683 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 698 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
684 699
685 /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) for mixer widget(nid=0x0B) 700 /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) for mixer widget(nid=0x0B)
686 * to support the input path of analog loopback 701 * to support the input path of analog loopback
@@ -688,14 +703,14 @@ static struct hda_verb alc880_init_verbs_three_stack[] = {
688 * mic (mic 2) 703 * mic (mic 2)
689 */ 704 */
690 /* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 & Line In 2 = 0x03 */ 705 /* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 & Line In 2 = 0x03 */
691 /* unmute CD */ 706 /* mute CD */
692 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x04 << 8))}, 707 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
693 /* unmute Line In */ 708 /* unmute Line In */
694 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8))}, 709 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
695 /* unmute Mic 1 */ 710 /* mute Mic 1 */
696 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 711 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
697 /* unmute Line In 2 (for PASD boards Mic 2) */ 712 /* mute Line In 2 (for PASD boards Mic 2) */
698 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x03 << 8))}, 713 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
699 714
700 /* Unmute input amps for the line out paths to support the output path of 715 /* Unmute input amps for the line out paths to support the output path of
701 * analog loopback 716 * analog loopback
@@ -704,66 +719,70 @@ static struct hda_verb alc880_init_verbs_three_stack[] = {
704 */ 719 */
705 /* Amp Indexes: DAC = 0x01 & mixer = 0x00 */ 720 /* Amp Indexes: DAC = 0x01 & mixer = 0x00 */
706 /* Unmute Front out path */ 721 /* Unmute Front out path */
707 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 722 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
708 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))}, 723 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
709 /* Unmute Surround (used as HP) out path */ 724 /* Unmute Surround (used as HP) out path */
710 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 725 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
711 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))}, 726 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
712 /* Unmute C/LFE out path */ 727 /* Unmute C/LFE out path */
713 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 728 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
714 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x01 << 8))}, /* mute */ 729 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
715 /* Unmute rear Surround out path */ 730 /* Unmute rear Surround out path */
716 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 731 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
717 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))}, 732 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
718 733
719 { } 734 { }
720}; 735};
721 736
722static struct hda_verb alc880_init_verbs_five_stack[] = { 737static struct hda_verb alc880_init_verbs_five_stack[] = {
738 /* Set pin widgets for output */
739 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
740 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
741 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
742 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
723 /* Line In pin widget for input */ 743 /* Line In pin widget for input */
724 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, 744 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
725 /* CD pin widget for input */ 745 /* CD pin widget for input */
726 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, 746 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
727 /* Mic1 (rear panel) pin widget for input and vref at 80% */ 747 /* Mic1 (rear panel) pin widget for input and vref at 80% */
728 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, 748 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF},
729 /* Mic2 (front panel) pin widget for input and vref at 80% */ 749 /* Mic2 (front panel) pin widget for input and vref at 80% */
730 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, 750 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF},
731 /* unmute amp left and right */ 751 /* mute capture amp left and right */
732 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 752 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
733 /* set connection select to mic in */ 753 /* set connection select to mic in */
734 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00}, 754 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00},
735 /* unmute amp left and right */ 755 /* mute amp1 left and right */
736 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 756 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
737 /* set connection select to mic in */ 757 /* set connection select to mic in */
738 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, 758 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
739 /* unmute amp left and right */ 759 /* mute amp left and right */
740 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 760 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
741 /* set connection select to mic in */ 761 /* set connection select to mic in */
742 {0x09, AC_VERB_SET_CONNECT_SEL, 0x00}, 762 {0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
743 /* unmute front mixer amp left and right (volume = 0) */ 763 /* set vol=0 front mixer amp */
744 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 764 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
745 /* mute pin widget amp left and right (no gain on this amp) */ 765 /* unmute front-out pin widget amp (no gain on this amp) */
746 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, 766 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
747 /* five rear and clfe */ 767 /* set vol=0 rear mixer amp */
748 /* unmute rear mixer amp left and right (volume = 0) */ 768 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
749 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 769 /* unmute rear-out pin widget (no gain on this amp) */
750 /* mute pin widget amp left and right (no gain on this amp) */ 770 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
751 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, 771 /* set vol=0 clfe mixer amp */
752 /* unmute clfe mixer amp left and right (volume = 0) */ 772 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
753 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 773 /* unmute clfe-pin widget amp (no gain on this amp) */
754 /* mute pin widget amp left and right (no gain on this amp) */ 774 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
755 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000},
756 775
757 /* using rear surround as the path for headphone output */ 776 /* using rear surround as the path for headphone output */
758 /* unmute rear surround mixer amp left and right (volume = 0) */ 777 /* set vol=0 rear surround mixer amp */
759 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 778 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
760 /* PASD 3 stack boards use the Mic 2 as the headphone output */ 779 /* PASD 3 stack boards use the Mic 2 as the headphone output */
761 /* need to program the selector associated with the Mic 2 pin widget to 780 /* need to program the selector associated with the Mic 2 pin widget to
762 * surround path (index 0x01) for headphone output 781 * surround path (index 0x01) for headphone output
763 */ 782 */
764 {0x11, AC_VERB_SET_CONNECT_SEL, 0x01}, 783 {0x11, AC_VERB_SET_CONNECT_SEL, 0x01},
765 /* mute pin widget amp left and right (no gain on this amp) */ 784 /* mute pin widget amp left and right (no gain on this amp) */
766 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, 785 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
767 /* need to retask the Mic 2 pin widget to output */ 786 /* need to retask the Mic 2 pin widget to output */
768 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 787 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40},
769 788
@@ -773,13 +792,13 @@ static struct hda_verb alc880_init_verbs_five_stack[] = {
773 /* Note: PASD motherboards uses the Line In 2 as the input for front panel mic (mic 2) */ 792 /* Note: PASD motherboards uses the Line In 2 as the input for front panel mic (mic 2) */
774 /* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 & Line In 2 = 0x03*/ 793 /* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 & Line In 2 = 0x03*/
775 /* unmute CD */ 794 /* unmute CD */
776 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x04 << 8))}, 795 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
777 /* unmute Line In */ 796 /* unmute Line In */
778 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8))}, 797 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
779 /* unmute Mic 1 */ 798 /* unmute Mic 1 */
780 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 799 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
781 /* unmute Line In 2 (for PASD boards Mic 2) */ 800 /* unmute Line In 2 (for PASD boards Mic 2) */
782 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x03 << 8))}, 801 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
783 802
784 /* Unmute input amps for the line out paths to support the output path of 803 /* Unmute input amps for the line out paths to support the output path of
785 * analog loopback 804 * analog loopback
@@ -788,123 +807,121 @@ static struct hda_verb alc880_init_verbs_five_stack[] = {
788 */ 807 */
789 /* Amp Indexes: DAC = 0x01 & mixer = 0x00 */ 808 /* Amp Indexes: DAC = 0x01 & mixer = 0x00 */
790 /* Unmute Front out path */ 809 /* Unmute Front out path */
791 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 810 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
792 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))}, 811 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
793 /* Unmute Surround (used as HP) out path */ 812 /* Unmute Surround (used as HP) out path */
794 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 813 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
795 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))}, 814 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
796 /* Unmute C/LFE out path */ 815 /* Unmute C/LFE out path */
797 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 816 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
798 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x01 << 8))}, /* mute */ 817 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
799 /* Unmute rear Surround out path */ 818 /* Unmute rear Surround out path */
800 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 819 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
801 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))}, 820 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
802 821
803 { } 822 { }
804}; 823};
805 824
806static struct hda_verb alc880_w810_init_verbs[] = { 825static struct hda_verb alc880_w810_init_verbs[] = {
807 /* front channel selector/amp: input 0: DAC: unmuted, (no volume selection) */ 826 /* front channel selector/amp: input 0: DAC: unmuted, (no volume selection) */
808 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 827 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
809 828
810 /* front channel selector/amp: input 1: capture mix: muted, (no volume selection) */ 829 /* front channel selector/amp: input 1: capture mix: muted, (no volume selection) */
811 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, 0x7180}, 830 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
812 831
813 /* front channel selector/amp: output 0: unmuted, max volume */ 832 /* front channel selector/amp: output 0: unmuted, max volume */
814 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 833 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
815 834
816 /* front out pin: muted, (no volume selection) */ 835 /* front out pin: muted, (no volume selection) */
817 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 836 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
818 837
819 /* front out pin: NOT headphone enable, out enable, vref disabled */ 838 /* front out pin: NOT headphone enable, out enable, vref disabled */
820 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 839 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
821 840
822 841
823 /* surround channel selector/amp: input 0: DAC: unmuted, (no volume selection) */ 842 /* surround channel selector/amp: input 0: DAC: unmuted, (no volume selection) */
824 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 843 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
825 844
826 /* surround channel selector/amp: input 1: capture mix: muted, (no volume selection) */ 845 /* surround channel selector/amp: input 1: capture mix: muted, (no volume selection) */
827 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, 0x7180}, 846 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
828 847
829 /* surround channel selector/amp: output 0: unmuted, max volume */ 848 /* surround channel selector/amp: output 0: unmuted, max volume */
830 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 849 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
831 850
832 /* surround out pin: muted, (no volume selection) */ 851 /* surround out pin: muted, (no volume selection) */
833 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 852 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
834 853
835 /* surround out pin: NOT headphone enable, out enable, vref disabled */ 854 /* surround out pin: NOT headphone enable, out enable, vref disabled */
836 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 855 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
837 856
838 857
839 /* c/lfe channel selector/amp: input 0: DAC: unmuted, (no volume selection) */ 858 /* c/lfe channel selector/amp: input 0: DAC: unmuted, (no volume selection) */
840 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 859 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
841 860
842 /* c/lfe channel selector/amp: input 1: capture mix: muted, (no volume selection) */ 861 /* c/lfe channel selector/amp: input 1: capture mix: muted, (no volume selection) */
843 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, 0x7180}, 862 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
844 863
845 /* c/lfe channel selector/amp: output 0: unmuted, max volume */ 864 /* c/lfe channel selector/amp: output 0: unmuted, max volume */
846 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 865 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
847 866
848 /* c/lfe out pin: muted, (no volume selection) */ 867 /* c/lfe out pin: muted, (no volume selection) */
849 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 868 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
850 869
851 /* c/lfe out pin: NOT headphone enable, out enable, vref disabled */ 870 /* c/lfe out pin: NOT headphone enable, out enable, vref disabled */
852 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 871 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
853 872
854 873
855 /* hphone/speaker input selector: front DAC */ 874 /* hphone/speaker input selector: front DAC */
856 {0x13, AC_VERB_SET_CONNECT_SEL, 0x0}, 875 {0x13, AC_VERB_SET_CONNECT_SEL, 0x0},
857 876
858 /* hphone/speaker out pin: muted, (no volume selection) */ 877 /* hphone/speaker out pin: muted, (no volume selection) */
859 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 878 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
860 879
861 /* hphone/speaker out pin: NOT headphone enable, out enable, vref disabled */ 880 /* hphone/speaker out pin: NOT headphone enable, out enable, vref disabled */
862 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 881 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
863 882
864 883
865 { } 884 { }
866}; 885};
867 886
868static struct hda_verb alc880_z71v_init_verbs[] = { 887static struct hda_verb alc880_z71v_init_verbs[] = {
869 /* front channel selector/amp: input 0: DAC: unmuted, (no volume selection) */ 888 /* front channel selector/amp: muted, DAC and mix (no vol) */
870 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 889 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
871 /* front channel selector/amp: input 1: capture mix: muted, (no volume selection) */ 890 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
872 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, 0x7180}, 891 /* front channel selector/amp: output 0: vol=0 */
873 /* front channel selector/amp: output 0: unmuted, max volume */ 892 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
874 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 893 /* front out pin: unmuted, (no volume selection) */
875 /* front out pin: muted, (no volume selection) */ 894 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
876 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080},
877 /* front out pin: NOT headphone enable, out enable, vref disabled */ 895 /* front out pin: NOT headphone enable, out enable, vref disabled */
878 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 896 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
879 /* headphone channel selector/amp: input 0: DAC: unmuted, (no volume selection) */ 897 /* headphone channel selector/amp: muted, DAC and mix (no vol) */
880 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 898 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
881 /* headphone channel selector/amp: input 1: capture mix: muted, (no volume selection) */ 899 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
882 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, 0x7180}, 900 /* headphone channel selector/amp: output 0: vol=0 */
883 /* headphone channel selector/amp: output 0: unmuted, max volume */ 901 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
884 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 902 /* headphone out pin: muted, (no volume selection) */
885 /* headphone out pin: muted, (no volume selection) */ 903 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
886 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080},
887 /* headpohne out pin: headphone enable, out enable, vref disabled */ 904 /* headpohne out pin: headphone enable, out enable, vref disabled */
888 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0}, 905 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
889 906
890 /* Line In pin widget for input */ 907 /* Line In pin widget for input */
891 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, 908 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
892 /* CD pin widget for input */ 909 /* CD pin widget for input */
893 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, 910 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
894 /* Mic1 (rear panel) pin widget for input and vref at 80% */ 911 /* Mic1 (rear panel) pin widget for input and vref at 80% */
895 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, 912 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF},
896 /* Mic2 (front panel) pin widget for input and vref at 80% */ 913 /* Mic2 (front panel) pin widget for input and vref at 80% */
897 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, 914 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF},
898 /* unmute amp left and right */ 915 /* unmute amp left and right */
899 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 916 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
900 /* set connection select to mic in */ 917 /* set connection select to mic in */
901 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00}, 918 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00},
902 /* unmute amp left and right */ 919 /* unmute amp left and right */
903 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 920 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
904 /* set connection select to mic in */ 921 /* set connection select to mic in */
905 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, 922 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
906 /* unmute amp left and right */ 923 /* unmute amp left and right */
907 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 924 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
908 /* set connection select to mic in */ 925 /* set connection select to mic in */
909 {0x09, AC_VERB_SET_CONNECT_SEL, 0x00}, 926 {0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
910 /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) for mixer 927 /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) for mixer
@@ -913,13 +930,13 @@ static struct hda_verb alc880_z71v_init_verbs[] = {
913 /* Note: PASD motherboards uses the Line In 2 as the input for front panel mic (mic 2) */ 930 /* Note: PASD motherboards uses the Line In 2 as the input for front panel mic (mic 2) */
914 /* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 & Line In 2 = 0x03*/ 931 /* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 & Line In 2 = 0x03*/
915 /* unmute CD */ 932 /* unmute CD */
916 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x04 << 8))}, 933 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
917 /* unmute Line In */ 934 /* unmute Line In */
918 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8))}, 935 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
919 /* unmute Mic 1 */ 936 /* unmute Mic 1 */
920 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 937 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
921 /* unmute Line In 2 (for PASD boards Mic 2) */ 938 /* unmute Line In 2 (for PASD boards Mic 2) */
922 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x03 << 8))}, 939 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
923 940
924 { } 941 { }
925}; 942};
@@ -1284,10 +1301,14 @@ static int alc_test_pin_src_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
1284 } 1301 }
1285 1302
1286static snd_kcontrol_new_t alc880_test_mixer[] = { 1303static snd_kcontrol_new_t alc880_test_mixer[] = {
1287 ALC_BIND_VOL("Front Playback Volume", 0x0c, 2, HDA_OUTPUT), 1304 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
1288 ALC_BIND_VOL("Surround Playback Volume", 0x0d, 2, HDA_OUTPUT), 1305 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
1289 ALC_BIND_VOL("CLFE Playback Volume", 0x0e, 2, HDA_OUTPUT), 1306 HDA_CODEC_VOLUME("CLFE Playback Volume", 0x0e, 0x0, HDA_OUTPUT),
1290 ALC_BIND_VOL("Side Playback Volume", 0x0f, 2, HDA_OUTPUT), 1307 HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
1308 ALC_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
1309 ALC_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT),
1310 ALC_BIND_MUTE("CLFE Playback Volume", 0x0e, 2, HDA_INPUT),
1311 ALC_BIND_MUTE("Side Playback Volume", 0x0f, 2, HDA_INPUT),
1291 PIN_CTL_TEST("Front Pin Mode", 0x14), 1312 PIN_CTL_TEST("Front Pin Mode", 0x14),
1292 PIN_CTL_TEST("Surround Pin Mode", 0x15), 1313 PIN_CTL_TEST("Surround Pin Mode", 0x15),
1293 PIN_CTL_TEST("CLFE Pin Mode", 0x16), 1314 PIN_CTL_TEST("CLFE Pin Mode", 0x16),
@@ -1310,10 +1331,10 @@ static snd_kcontrol_new_t alc880_test_mixer[] = {
1310 HDA_CODEC_MUTE("In-4 Playback Switch", 0x0b, 0x3, HDA_INPUT), 1331 HDA_CODEC_MUTE("In-4 Playback Switch", 0x0b, 0x3, HDA_INPUT),
1311 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x4, HDA_INPUT), 1332 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x4, HDA_INPUT),
1312 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x4, HDA_INPUT), 1333 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x4, HDA_INPUT),
1313 HDA_CODEC_VOLUME("Capture Volume", 0x07, 0x0, HDA_INPUT), 1334 HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
1314 HDA_CODEC_MUTE("Capture Switch", 0x07, 0x0, HDA_INPUT), 1335 HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
1315 HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x08, 0x0, HDA_INPUT), 1336 HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
1316 HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x08, 0x0, HDA_INPUT), 1337 HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
1317 { 1338 {
1318 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1339 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1319 .name = "Input Source", 1340 .name = "Input Source",
@@ -1328,54 +1349,59 @@ static snd_kcontrol_new_t alc880_test_mixer[] = {
1328 .info = alc880_ch_mode_info, 1349 .info = alc880_ch_mode_info,
1329 .get = alc880_ch_mode_get, 1350 .get = alc880_ch_mode_get,
1330 .put = alc880_ch_mode_put, 1351 .put = alc880_ch_mode_put,
1331 .private_value = ARRAY_SIZE(alc880_test_modes),
1332 }, 1352 },
1333 { } /* end */ 1353 { } /* end */
1334}; 1354};
1335 1355
1336static struct hda_verb alc880_test_init_verbs[] = { 1356static struct hda_verb alc880_test_init_verbs[] = {
1337 /* Unmute inputs of 0x0c - 0x0f */ 1357 /* Unmute inputs of 0x0c - 0x0f */
1338 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 1358 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
1339 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, 0x7100}, 1359 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
1340 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 1360 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
1341 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, 0x7100}, 1361 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
1342 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 1362 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
1343 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, 0x7100}, 1363 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
1344 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 1364 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
1345 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, 0x7100}, 1365 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
1346 /* Vol output for 0x0c-0x0f */ 1366 /* Vol output for 0x0c-0x0f */
1347 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 1367 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
1348 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 1368 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
1349 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 1369 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
1350 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 1370 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
1351 /* Set output pins 0x14-0x17 */ 1371 /* Set output pins 0x14-0x17 */
1352 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 1372 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1353 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 1373 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1354 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 1374 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1355 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 1375 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1356 /* Unmute output pins 0x14-0x17 */ 1376 /* Unmute output pins 0x14-0x17 */
1357 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 1377 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1358 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 1378 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1359 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 1379 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1360 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 1380 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1361 /* Set input pins 0x18-0x1c */ 1381 /* Set input pins 0x18-0x1c */
1362 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, /* vref 80% */ 1382 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF},
1363 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, 1383 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF},
1364 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, 1384 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
1365 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, 1385 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
1366 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, 1386 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
1367 /* Mute input pins 0x18-0x1b */ 1387 /* Mute input pins 0x18-0x1b */
1368 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 1388 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
1369 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 1389 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
1370 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 1390 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
1371 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 1391 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
1372 /* ADC set up */ 1392 /* ADC set up */
1373 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 1393 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1374 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00}, 1394 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00},
1375 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 1395 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1376 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, 1396 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
1377 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 1397 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1378 {0x09, AC_VERB_SET_CONNECT_SEL, 0x00}, 1398 {0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
1399 /* Analog input/passthru */
1400 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1401 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
1402 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
1403 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
1404 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
1379 { } 1405 { }
1380}; 1406};
1381#endif 1407#endif
@@ -1621,10 +1647,8 @@ static struct alc_channel_mode alc260_modes[1] = {
1621}; 1647};
1622 1648
1623snd_kcontrol_new_t alc260_base_mixer[] = { 1649snd_kcontrol_new_t alc260_base_mixer[] = {
1624 ALC_BIND_VOL("Front Playback Volume", 0x08, 2, HDA_OUTPUT), 1650 HDA_CODEC_VOLUME("Front Playback Volume", 0x08, 0x0, HDA_OUTPUT),
1625 /* use LINE2 for the output */ 1651 ALC_BIND_MUTE("Front Playback Switch", 0x08, 2, HDA_INPUT),
1626 /* HDA_CODEC_MUTE("Front Playback Switch", 0x0f, 0x0, HDA_OUTPUT), */
1627 HDA_CODEC_MUTE("Front Playback Switch", 0x15, 0x0, HDA_OUTPUT),
1628 HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT), 1652 HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT),
1629 HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT), 1653 HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT),
1630 HDA_CODEC_VOLUME("Line Playback Volume", 0x07, 0x02, HDA_INPUT), 1654 HDA_CODEC_VOLUME("Line Playback Volume", 0x07, 0x02, HDA_INPUT),
@@ -1635,10 +1659,10 @@ snd_kcontrol_new_t alc260_base_mixer[] = {
1635 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x07, 0x01, HDA_INPUT), 1659 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x07, 0x01, HDA_INPUT),
1636 HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x07, 0x05, HDA_INPUT), 1660 HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x07, 0x05, HDA_INPUT),
1637 HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x07, 0x05, HDA_INPUT), 1661 HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x07, 0x05, HDA_INPUT),
1638 ALC_BIND_VOL("Headphone Playback Volume", 0x09, 2, HDA_OUTPUT), 1662 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x09, 0x0, HDA_OUTPUT),
1639 HDA_CODEC_MUTE("Headphone Playback Switch", 0x10, 0x0, HDA_OUTPUT), 1663 ALC_BIND_MUTE("Headphone Playback Switch", 0x09, 2, HDA_INPUT),
1640 ALC_BIND_VOL_MONO("Mono Playback Volume", 0x0a, 1, 2, HDA_OUTPUT), 1664 HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT),
1641 HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x11, 1, 0x0, HDA_OUTPUT), 1665 ALC_BIND_MUTE_MONO("Mono Playback Switch", 0x0a, 1, 2, HDA_OUTPUT),
1642 HDA_CODEC_VOLUME("Capture Volume", 0x04, 0x0, HDA_INPUT), 1666 HDA_CODEC_VOLUME("Capture Volume", 0x04, 0x0, HDA_INPUT),
1643 HDA_CODEC_MUTE("Capture Switch", 0x04, 0x0, HDA_INPUT), 1667 HDA_CODEC_MUTE("Capture Switch", 0x04, 0x0, HDA_INPUT),
1644 { 1668 {
@@ -1653,58 +1677,58 @@ snd_kcontrol_new_t alc260_base_mixer[] = {
1653 1677
1654static struct hda_verb alc260_init_verbs[] = { 1678static struct hda_verb alc260_init_verbs[] = {
1655 /* Line In pin widget for input */ 1679 /* Line In pin widget for input */
1656 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, 1680 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
1657 /* CD pin widget for input */ 1681 /* CD pin widget for input */
1658 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, 1682 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
1659 /* Mic1 (rear panel) pin widget for input and vref at 80% */ 1683 /* Mic1 (rear panel) pin widget for input and vref at 80% */
1660 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, 1684 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF},
1661 /* Mic2 (front panel) pin widget for input and vref at 80% */ 1685 /* Mic2 (front panel) pin widget for input and vref at 80% */
1662 {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, 1686 {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF},
1663 /* LINE-2 is used for line-out in rear */ 1687 /* LINE-2 is used for line-out in rear */
1664 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 1688 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1665 /* select line-out */ 1689 /* select line-out */
1666 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, 1690 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
1667 /* LINE-OUT pin */ 1691 /* LINE-OUT pin */
1668 {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 1692 {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1669 /* enable HP */ 1693 /* enable HP */
1670 {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 1694 {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
1671 /* enable Mono */ 1695 /* enable Mono */
1672 {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 1696 {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1673 /* unmute amp left and right */ 1697 /* mute capture amp left and right */
1674 {0x04, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 1698 {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1675 /* set connection select to line in (default select for this ADC) */ 1699 /* set connection select to line in (default select for this ADC) */
1676 {0x04, AC_VERB_SET_CONNECT_SEL, 0x02}, 1700 {0x04, AC_VERB_SET_CONNECT_SEL, 0x02},
1677 /* unmute Line-Out mixer amp left and right (volume = 0) */ 1701 /* set vol=0 Line-Out mixer amp left and right */
1678 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 1702 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
1679 /* mute pin widget amp left and right (no gain on this amp) */ 1703 /* unmute pin widget amp left and right (no gain on this amp) */
1680 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 1704 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1681 /* unmute HP mixer amp left and right (volume = 0) */ 1705 /* set vol=0 HP mixer amp left and right */
1682 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 1706 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
1683 /* mute pin widget amp left and right (no gain on this amp) */ 1707 /* unmute pin widget amp left and right (no gain on this amp) */
1684 {0x10, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 1708 {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1685 /* unmute Mono mixer amp left and right (volume = 0) */ 1709 /* set vol=0 Mono mixer amp left and right */
1686 {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 1710 {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
1687 /* mute pin widget amp left and right (no gain on this amp) */ 1711 /* unmute pin widget amp left and right (no gain on this amp) */
1688 {0x11, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 1712 {0x11, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1689 /* mute LINE-2 out */ 1713 /* unmute LINE-2 out pin */
1690 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 1714 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1691 /* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 & Line In 2 = 0x03 */ 1715 /* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 & Line In 2 = 0x03 */
1692 /* unmute CD */ 1716 /* mute CD */
1693 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x04 << 8))}, 1717 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
1694 /* unmute Line In */ 1718 /* mute Line In */
1695 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8))}, 1719 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
1696 /* unmute Mic */ 1720 /* mute Mic */
1697 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 1721 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1698 /* Amp Indexes: DAC = 0x01 & mixer = 0x00 */ 1722 /* Amp Indexes: DAC = 0x01 & mixer = 0x00 */
1699 /* Unmute Front out path */ 1723 /* mute Front out path */
1700 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 1724 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1701 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))}, 1725 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
1702 /* Unmute Headphone out path */ 1726 /* mute Headphone out path */
1703 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 1727 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1704 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))}, 1728 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
1705 /* Unmute Mono out path */ 1729 /* mute Mono out path */
1706 {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 1730 {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1707 {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))}, 1731 {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
1708 { } 1732 { }
1709}; 1733};
1710 1734
@@ -1828,16 +1852,16 @@ static int alc882_mux_enum_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u
1828 * Mic=0x18, Front Mic=0x19, Line-In=0x1a, HP=0x1b 1852 * Mic=0x18, Front Mic=0x19, Line-In=0x1a, HP=0x1b
1829 */ 1853 */
1830static snd_kcontrol_new_t alc882_base_mixer[] = { 1854static snd_kcontrol_new_t alc882_base_mixer[] = {
1831 ALC_BIND_VOL("Front Playback Volume", 0x0c, 2, HDA_OUTPUT), 1855 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
1832 HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), 1856 ALC_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
1833 ALC_BIND_VOL("Surround Playback Volume", 0x0d, 2, HDA_OUTPUT), 1857 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
1834 HDA_CODEC_MUTE("Surround Playback Switch", 0x15, 0x0, HDA_OUTPUT), 1858 ALC_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT),
1835 ALC_BIND_VOL_MONO("Center Playback Volume", 0x0e, 1, 2, HDA_OUTPUT), 1859 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT),
1836 ALC_BIND_VOL_MONO("LFE Playback Volume", 0x0e, 2, 2, HDA_OUTPUT), 1860 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT),
1837 HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x16, 1, 0x0, HDA_OUTPUT), 1861 ALC_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT),
1838 HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x16, 2, 0x0, HDA_OUTPUT), 1862 ALC_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_OUTPUT),
1839 ALC_BIND_VOL("Side Playback Volume", 0x0f, 2, HDA_OUTPUT), 1863 HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
1840 HDA_CODEC_MUTE("Side Playback Switch", 0x17, 0x0, HDA_OUTPUT), 1864 ALC_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT),
1841 HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), 1865 HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
1842 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), 1866 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
1843 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), 1867 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
@@ -1869,91 +1893,87 @@ static snd_kcontrol_new_t alc882_base_mixer[] = {
1869 1893
1870static struct hda_verb alc882_init_verbs[] = { 1894static struct hda_verb alc882_init_verbs[] = {
1871 /* Front mixer: unmute input/output amp left and right (volume = 0) */ 1895 /* Front mixer: unmute input/output amp left and right (volume = 0) */
1872 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 1896 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
1873 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 1897 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1898 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
1874 /* Rear mixer */ 1899 /* Rear mixer */
1875 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 1900 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
1876 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 1901 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1902 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
1877 /* CLFE mixer */ 1903 /* CLFE mixer */
1878 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 1904 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
1879 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 1905 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1906 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
1880 /* Side mixer */ 1907 /* Side mixer */
1881 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 1908 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
1882 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 1909 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1910 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
1883 1911
1884 /* Front Pin: to output mode */ 1912 /* Front Pin: to output mode */
1885 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 1913 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1886 /* Front Pin: mute amp left and right (no volume) */ 1914 /* Front Pin: mute amp left and right (no volume) */
1887 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, 1915 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1888 /* select Front mixer (0x0c, index 0) */ 1916 /* select Front mixer (0x0c, index 0) */
1889 {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, 1917 {0x14, AC_VERB_SET_CONNECT_SEL, 0x00},
1890 /* Rear Pin */ 1918 /* Rear Pin */
1891 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 1919 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1892 /* Rear Pin: mute amp left and right (no volume) */ 1920 /* Rear Pin: mute amp left and right (no volume) */
1893 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, 1921 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1894 /* select Rear mixer (0x0d, index 1) */ 1922 /* select Rear mixer (0x0d, index 1) */
1895 {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, 1923 {0x15, AC_VERB_SET_CONNECT_SEL, 0x01},
1896 /* CLFE Pin */ 1924 /* CLFE Pin */
1897 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 1925 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1898 /* CLFE Pin: mute amp left and right (no volume) */ 1926 /* CLFE Pin: mute amp left and right (no volume) */
1899 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, 1927 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1900 /* select CLFE mixer (0x0e, index 2) */ 1928 /* select CLFE mixer (0x0e, index 2) */
1901 {0x16, AC_VERB_SET_CONNECT_SEL, 0x02}, 1929 {0x16, AC_VERB_SET_CONNECT_SEL, 0x02},
1902 /* Side Pin */ 1930 /* Side Pin */
1903 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 1931 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1904 /* Side Pin: mute amp left and right (no volume) */ 1932 /* Side Pin: mute amp left and right (no volume) */
1905 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, 1933 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1906 /* select Side mixer (0x0f, index 3) */ 1934 /* select Side mixer (0x0f, index 3) */
1907 {0x17, AC_VERB_SET_CONNECT_SEL, 0x03}, 1935 {0x17, AC_VERB_SET_CONNECT_SEL, 0x03},
1908 /* Headphone Pin */ 1936 /* Headphone Pin */
1909 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 1937 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
1910 /* Headphone Pin: mute amp left and right (no volume) */ 1938 /* Headphone Pin: mute amp left and right (no volume) */
1911 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, 1939 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1912 /* select Front mixer (0x0c, index 0) */ 1940 /* select Front mixer (0x0c, index 0) */
1913 {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, 1941 {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00},
1914 /* Mic (rear) pin widget for input and vref at 80% */ 1942 /* Mic (rear) pin widget for input and vref at 80% */
1915 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, 1943 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF},
1916 /* Front Mic pin widget for input and vref at 80% */ 1944 /* Front Mic pin widget for input and vref at 80% */
1917 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, 1945 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF},
1918 /* Line In pin widget for input */ 1946 /* Line In pin widget for input */
1919 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, 1947 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
1920 /* CD pin widget for input */ 1948 /* CD pin widget for input */
1921 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, 1949 {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
1922 1950
1923 /* FIXME: use matrix-type input source selection */ 1951 /* FIXME: use matrix-type input source selection */
1924 /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */ 1952 /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */
1925 /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */ 1953 /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */
1926 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 1954 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
1927 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x03 << 8))}, 1955 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
1928 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8))}, 1956 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
1929 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x04 << 8))}, 1957 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
1930 /* Input mixer2 */ 1958 /* Input mixer2 */
1931 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 1959 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
1932 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x03 << 8))}, 1960 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
1933 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8))}, 1961 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
1934 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x04 << 8))}, 1962 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
1935 /* Input mixer3 */ 1963 /* Input mixer3 */
1936 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, 1964 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
1937 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x03 << 8))}, 1965 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
1938 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8))}, 1966 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
1939 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x04 << 8))}, 1967 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
1940 /* ADC1: unmute amp left and right */ 1968 /* ADC1: mute amp left and right */
1941 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 1969 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1942 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00}, 1970 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00},
1943 /* ADC2: unmute amp left and right */ 1971 /* ADC2: mute amp left and right */
1944 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 1972 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1945 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, 1973 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
1946 /* ADC3: unmute amp left and right */ 1974 /* ADC3: mute amp left and right */
1947 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, 1975 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1948 {0x09, AC_VERB_SET_CONNECT_SEL, 0x00}, 1976 {0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
1949 /* Unmute front loopback */
1950 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))},
1951 /* Unmute rear loopback */
1952 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))},
1953 /* Mute CLFE loopback */
1954 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x01 << 8))},
1955 /* Unmute side loopback */
1956 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))},
1957 1977
1958 { } 1978 { }
1959}; 1979};