aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_codec.h3
-rw-r--r--sound/pci/hda/hda_eld.c6
-rw-r--r--sound/pci/hda/hda_proc.c13
-rw-r--r--sound/pci/hda/patch_conexant.c108
-rw-r--r--sound/pci/hda/patch_hdmi.c9
-rw-r--r--sound/pci/hda/patch_realtek.c36
6 files changed, 87 insertions, 88 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 9a9f372e1be..56b4f74c0b1 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -851,6 +851,9 @@ struct hda_codec {
851 unsigned int pin_amp_workaround:1; /* pin out-amp takes index 851 unsigned int pin_amp_workaround:1; /* pin out-amp takes index
852 * (e.g. Conexant codecs) 852 * (e.g. Conexant codecs)
853 */ 853 */
854 unsigned int single_adc_amp:1; /* adc in-amp takes no index
855 * (e.g. CX20549 codec)
856 */
854 unsigned int no_sticky_stream:1; /* no sticky-PCM stream assignment */ 857 unsigned int no_sticky_stream:1; /* no sticky-PCM stream assignment */
855 unsigned int pins_shutup:1; /* pins are shut up */ 858 unsigned int pins_shutup:1; /* pins are shut up */
856 unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */ 859 unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c
index b58b4b1687f..4c054f4486b 100644
--- a/sound/pci/hda/hda_eld.c
+++ b/sound/pci/hda/hda_eld.c
@@ -418,7 +418,7 @@ static void hdmi_show_short_audio_desc(struct cea_sad *a)
418 else 418 else
419 buf2[0] = '\0'; 419 buf2[0] = '\0';
420 420
421 printk(KERN_INFO "HDMI: supports coding type %s:" 421 _snd_printd(SND_PR_VERBOSE, "HDMI: supports coding type %s:"
422 " channels = %d, rates =%s%s\n", 422 " channels = %d, rates =%s%s\n",
423 cea_audio_coding_type_names[a->format], 423 cea_audio_coding_type_names[a->format],
424 a->channels, 424 a->channels,
@@ -442,14 +442,14 @@ void snd_hdmi_show_eld(struct hdmi_eld *e)
442{ 442{
443 int i; 443 int i;
444 444
445 printk(KERN_INFO "HDMI: detected monitor %s at connection type %s\n", 445 _snd_printd(SND_PR_VERBOSE, "HDMI: detected monitor %s at connection type %s\n",
446 e->monitor_name, 446 e->monitor_name,
447 eld_connection_type_names[e->conn_type]); 447 eld_connection_type_names[e->conn_type]);
448 448
449 if (e->spk_alloc) { 449 if (e->spk_alloc) {
450 char buf[SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE]; 450 char buf[SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE];
451 snd_print_channel_allocation(e->spk_alloc, buf, sizeof(buf)); 451 snd_print_channel_allocation(e->spk_alloc, buf, sizeof(buf));
452 printk(KERN_INFO "HDMI: available speakers:%s\n", buf); 452 _snd_printd(SND_PR_VERBOSE, "HDMI: available speakers:%s\n", buf);
453 } 453 }
454 454
455 for (i = 0; i < e->sad_count; i++) 455 for (i = 0; i < e->sad_count; i++)
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index 254ab520460..e59e2f059b6 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -651,9 +651,16 @@ static void print_codec_info(struct snd_info_entry *entry,
651 snd_iprintf(buffer, " Amp-In caps: "); 651 snd_iprintf(buffer, " Amp-In caps: ");
652 print_amp_caps(buffer, codec, nid, HDA_INPUT); 652 print_amp_caps(buffer, codec, nid, HDA_INPUT);
653 snd_iprintf(buffer, " Amp-In vals: "); 653 snd_iprintf(buffer, " Amp-In vals: ");
654 print_amp_vals(buffer, codec, nid, HDA_INPUT, 654 if (wid_type == AC_WID_PIN ||
655 wid_caps & AC_WCAP_STEREO, 655 (codec->single_adc_amp &&
656 wid_type == AC_WID_PIN ? 1 : conn_len); 656 wid_type == AC_WID_AUD_IN))
657 print_amp_vals(buffer, codec, nid, HDA_INPUT,
658 wid_caps & AC_WCAP_STEREO,
659 1);
660 else
661 print_amp_vals(buffer, codec, nid, HDA_INPUT,
662 wid_caps & AC_WCAP_STEREO,
663 conn_len);
657 } 664 }
658 if (wid_caps & AC_WCAP_OUT_AMP) { 665 if (wid_caps & AC_WCAP_OUT_AMP) {
659 snd_iprintf(buffer, " Amp-Out caps: "); 666 snd_iprintf(buffer, " Amp-Out caps: ");
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 8c6523bbc79..a36488d94aa 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -141,7 +141,6 @@ struct conexant_spec {
141 unsigned int hp_laptop:1; 141 unsigned int hp_laptop:1;
142 unsigned int asus:1; 142 unsigned int asus:1;
143 unsigned int pin_eapd_ctrls:1; 143 unsigned int pin_eapd_ctrls:1;
144 unsigned int single_adc_amp:1;
145 144
146 unsigned int adc_switching:1; 145 unsigned int adc_switching:1;
147 146
@@ -687,27 +686,26 @@ static const struct hda_channel_mode cxt5045_modes[1] = {
687static const struct hda_input_mux cxt5045_capture_source = { 686static const struct hda_input_mux cxt5045_capture_source = {
688 .num_items = 2, 687 .num_items = 2,
689 .items = { 688 .items = {
690 { "IntMic", 0x1 }, 689 { "Internal Mic", 0x1 },
691 { "ExtMic", 0x2 }, 690 { "Mic", 0x2 },
692 } 691 }
693}; 692};
694 693
695static const struct hda_input_mux cxt5045_capture_source_benq = { 694static const struct hda_input_mux cxt5045_capture_source_benq = {
696 .num_items = 5, 695 .num_items = 4,
697 .items = { 696 .items = {
698 { "IntMic", 0x1 }, 697 { "Internal Mic", 0x1 },
699 { "ExtMic", 0x2 }, 698 { "Mic", 0x2 },
700 { "LineIn", 0x3 }, 699 { "Line", 0x3 },
701 { "CD", 0x4 }, 700 { "Mixer", 0x0 },
702 { "Mixer", 0x0 },
703 } 701 }
704}; 702};
705 703
706static const struct hda_input_mux cxt5045_capture_source_hp530 = { 704static const struct hda_input_mux cxt5045_capture_source_hp530 = {
707 .num_items = 2, 705 .num_items = 2,
708 .items = { 706 .items = {
709 { "ExtMic", 0x1 }, 707 { "Mic", 0x1 },
710 { "IntMic", 0x2 }, 708 { "Internal Mic", 0x2 },
711 } 709 }
712}; 710};
713 711
@@ -798,10 +796,8 @@ static void cxt5045_hp_unsol_event(struct hda_codec *codec,
798} 796}
799 797
800static const struct snd_kcontrol_new cxt5045_mixers[] = { 798static const struct snd_kcontrol_new cxt5045_mixers[] = {
801 HDA_CODEC_VOLUME("Internal Mic Capture Volume", 0x1a, 0x01, HDA_INPUT), 799 HDA_CODEC_VOLUME("Capture Volume", 0x1a, 0x00, HDA_INPUT),
802 HDA_CODEC_MUTE("Internal Mic Capture Switch", 0x1a, 0x01, HDA_INPUT), 800 HDA_CODEC_MUTE("Capture Switch", 0x1a, 0x0, HDA_INPUT),
803 HDA_CODEC_VOLUME("Mic Capture Volume", 0x1a, 0x02, HDA_INPUT),
804 HDA_CODEC_MUTE("Mic Capture Switch", 0x1a, 0x02, HDA_INPUT),
805 HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT), 801 HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT),
806 HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT), 802 HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT),
807 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0x1, HDA_INPUT), 803 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0x1, HDA_INPUT),
@@ -822,27 +818,15 @@ static const struct snd_kcontrol_new cxt5045_mixers[] = {
822}; 818};
823 819
824static const struct snd_kcontrol_new cxt5045_benq_mixers[] = { 820static const struct snd_kcontrol_new cxt5045_benq_mixers[] = {
825 HDA_CODEC_VOLUME("CD Capture Volume", 0x1a, 0x04, HDA_INPUT), 821 HDA_CODEC_VOLUME("Line Playback Volume", 0x17, 0x3, HDA_INPUT),
826 HDA_CODEC_MUTE("CD Capture Switch", 0x1a, 0x04, HDA_INPUT), 822 HDA_CODEC_MUTE("Line Playback Switch", 0x17, 0x3, HDA_INPUT),
827 HDA_CODEC_VOLUME("CD Playback Volume", 0x17, 0x4, HDA_INPUT),
828 HDA_CODEC_MUTE("CD Playback Switch", 0x17, 0x4, HDA_INPUT),
829
830 HDA_CODEC_VOLUME("Line In Capture Volume", 0x1a, 0x03, HDA_INPUT),
831 HDA_CODEC_MUTE("Line In Capture Switch", 0x1a, 0x03, HDA_INPUT),
832 HDA_CODEC_VOLUME("Line In Playback Volume", 0x17, 0x3, HDA_INPUT),
833 HDA_CODEC_MUTE("Line In Playback Switch", 0x17, 0x3, HDA_INPUT),
834
835 HDA_CODEC_VOLUME("Mixer Capture Volume", 0x1a, 0x0, HDA_INPUT),
836 HDA_CODEC_MUTE("Mixer Capture Switch", 0x1a, 0x0, HDA_INPUT),
837 823
838 {} 824 {}
839}; 825};
840 826
841static const struct snd_kcontrol_new cxt5045_mixers_hp530[] = { 827static const struct snd_kcontrol_new cxt5045_mixers_hp530[] = {
842 HDA_CODEC_VOLUME("Internal Mic Capture Volume", 0x1a, 0x02, HDA_INPUT), 828 HDA_CODEC_VOLUME("Capture Volume", 0x1a, 0x00, HDA_INPUT),
843 HDA_CODEC_MUTE("Internal Mic Capture Switch", 0x1a, 0x02, HDA_INPUT), 829 HDA_CODEC_MUTE("Capture Switch", 0x1a, 0x0, HDA_INPUT),
844 HDA_CODEC_VOLUME("Mic Capture Volume", 0x1a, 0x01, HDA_INPUT),
845 HDA_CODEC_MUTE("Mic Capture Switch", 0x1a, 0x01, HDA_INPUT),
846 HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT), 830 HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT),
847 HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT), 831 HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT),
848 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0x2, HDA_INPUT), 832 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0x2, HDA_INPUT),
@@ -946,10 +930,10 @@ static const struct snd_kcontrol_new cxt5045_test_mixer[] = {
946 /* Output controls */ 930 /* Output controls */
947 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x10, 0x0, HDA_OUTPUT), 931 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x10, 0x0, HDA_OUTPUT),
948 HDA_CODEC_MUTE("Speaker Playback Switch", 0x10, 0x0, HDA_OUTPUT), 932 HDA_CODEC_MUTE("Speaker Playback Switch", 0x10, 0x0, HDA_OUTPUT),
949 HDA_CODEC_VOLUME("Node 11 Playback Volume", 0x11, 0x0, HDA_OUTPUT), 933 HDA_CODEC_VOLUME("HP-OUT Playback Volume", 0x11, 0x0, HDA_OUTPUT),
950 HDA_CODEC_MUTE("Node 11 Playback Switch", 0x11, 0x0, HDA_OUTPUT), 934 HDA_CODEC_MUTE("HP-OUT Playback Switch", 0x11, 0x0, HDA_OUTPUT),
951 HDA_CODEC_VOLUME("Node 12 Playback Volume", 0x12, 0x0, HDA_OUTPUT), 935 HDA_CODEC_VOLUME("LINE1 Playback Volume", 0x12, 0x0, HDA_OUTPUT),
952 HDA_CODEC_MUTE("Node 12 Playback Switch", 0x12, 0x0, HDA_OUTPUT), 936 HDA_CODEC_MUTE("LINE1 Playback Switch", 0x12, 0x0, HDA_OUTPUT),
953 937
954 /* Modes for retasking pin widgets */ 938 /* Modes for retasking pin widgets */
955 CXT_PIN_MODE("HP-OUT pin mode", 0x11, CXT_PIN_DIR_INOUT), 939 CXT_PIN_MODE("HP-OUT pin mode", 0x11, CXT_PIN_DIR_INOUT),
@@ -960,16 +944,16 @@ static const struct snd_kcontrol_new cxt5045_test_mixer[] = {
960 944
961 /* Loopback mixer controls */ 945 /* Loopback mixer controls */
962 946
963 HDA_CODEC_VOLUME("Mixer-1 Volume", 0x17, 0x0, HDA_INPUT), 947 HDA_CODEC_VOLUME("PCM Volume", 0x17, 0x0, HDA_INPUT),
964 HDA_CODEC_MUTE("Mixer-1 Switch", 0x17, 0x0, HDA_INPUT), 948 HDA_CODEC_MUTE("PCM Switch", 0x17, 0x0, HDA_INPUT),
965 HDA_CODEC_VOLUME("Mixer-2 Volume", 0x17, 0x1, HDA_INPUT), 949 HDA_CODEC_VOLUME("MIC1 pin Volume", 0x17, 0x1, HDA_INPUT),
966 HDA_CODEC_MUTE("Mixer-2 Switch", 0x17, 0x1, HDA_INPUT), 950 HDA_CODEC_MUTE("MIC1 pin Switch", 0x17, 0x1, HDA_INPUT),
967 HDA_CODEC_VOLUME("Mixer-3 Volume", 0x17, 0x2, HDA_INPUT), 951 HDA_CODEC_VOLUME("LINE1 pin Volume", 0x17, 0x2, HDA_INPUT),
968 HDA_CODEC_MUTE("Mixer-3 Switch", 0x17, 0x2, HDA_INPUT), 952 HDA_CODEC_MUTE("LINE1 pin Switch", 0x17, 0x2, HDA_INPUT),
969 HDA_CODEC_VOLUME("Mixer-4 Volume", 0x17, 0x3, HDA_INPUT), 953 HDA_CODEC_VOLUME("HP-OUT pin Volume", 0x17, 0x3, HDA_INPUT),
970 HDA_CODEC_MUTE("Mixer-4 Switch", 0x17, 0x3, HDA_INPUT), 954 HDA_CODEC_MUTE("HP-OUT pin Switch", 0x17, 0x3, HDA_INPUT),
971 HDA_CODEC_VOLUME("Mixer-5 Volume", 0x17, 0x4, HDA_INPUT), 955 HDA_CODEC_VOLUME("CD pin Volume", 0x17, 0x4, HDA_INPUT),
972 HDA_CODEC_MUTE("Mixer-5 Switch", 0x17, 0x4, HDA_INPUT), 956 HDA_CODEC_MUTE("CD pin Switch", 0x17, 0x4, HDA_INPUT),
973 { 957 {
974 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 958 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
975 .name = "Input Source", 959 .name = "Input Source",
@@ -978,16 +962,8 @@ static const struct snd_kcontrol_new cxt5045_test_mixer[] = {
978 .put = conexant_mux_enum_put, 962 .put = conexant_mux_enum_put,
979 }, 963 },
980 /* Audio input controls */ 964 /* Audio input controls */
981 HDA_CODEC_VOLUME("Input-1 Volume", 0x1a, 0x0, HDA_INPUT), 965 HDA_CODEC_VOLUME("Capture Volume", 0x1a, 0x0, HDA_INPUT),
982 HDA_CODEC_MUTE("Input-1 Switch", 0x1a, 0x0, HDA_INPUT), 966 HDA_CODEC_MUTE("Capture Switch", 0x1a, 0x0, HDA_INPUT),
983 HDA_CODEC_VOLUME("Input-2 Volume", 0x1a, 0x1, HDA_INPUT),
984 HDA_CODEC_MUTE("Input-2 Switch", 0x1a, 0x1, HDA_INPUT),
985 HDA_CODEC_VOLUME("Input-3 Volume", 0x1a, 0x2, HDA_INPUT),
986 HDA_CODEC_MUTE("Input-3 Switch", 0x1a, 0x2, HDA_INPUT),
987 HDA_CODEC_VOLUME("Input-4 Volume", 0x1a, 0x3, HDA_INPUT),
988 HDA_CODEC_MUTE("Input-4 Switch", 0x1a, 0x3, HDA_INPUT),
989 HDA_CODEC_VOLUME("Input-5 Volume", 0x1a, 0x4, HDA_INPUT),
990 HDA_CODEC_MUTE("Input-5 Switch", 0x1a, 0x4, HDA_INPUT),
991 { } /* end */ 967 { } /* end */
992}; 968};
993 969
@@ -1009,10 +985,6 @@ static const struct hda_verb cxt5045_test_init_verbs[] = {
1009 {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 985 {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1010 {0x18, AC_VERB_SET_DIGI_CONVERT_1, 0}, 986 {0x18, AC_VERB_SET_DIGI_CONVERT_1, 0},
1011 987
1012 /* Start with output sum widgets muted and their output gains at min */
1013 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1014 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
1015
1016 /* Unmute retasking pin widget output buffers since the default 988 /* Unmute retasking pin widget output buffers since the default
1017 * state appears to be output. As the pin mode is changed by the 989 * state appears to be output. As the pin mode is changed by the
1018 * user the pin mode control will take care of enabling the pin's 990 * user the pin mode control will take care of enabling the pin's
@@ -1027,11 +999,11 @@ static const struct hda_verb cxt5045_test_init_verbs[] = {
1027 /* Set ADC connection select to match default mixer setting (mic1 999 /* Set ADC connection select to match default mixer setting (mic1
1028 * pin) 1000 * pin)
1029 */ 1001 */
1030 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x00}, 1002 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01},
1031 {0x17, AC_VERB_SET_CONNECT_SEL, 0x00}, 1003 {0x17, AC_VERB_SET_CONNECT_SEL, 0x01},
1032 1004
1033 /* Mute all inputs to mixer widget (even unconnected ones) */ 1005 /* Mute all inputs to mixer widget (even unconnected ones) */
1034 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, /* Mixer pin */ 1006 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, /* Mixer */
1035 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, /* Mic1 pin */ 1007 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, /* Mic1 pin */
1036 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, /* Line pin */ 1008 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, /* Line pin */
1037 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, /* HP pin */ 1009 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, /* HP pin */
@@ -1110,7 +1082,7 @@ static int patch_cxt5045(struct hda_codec *codec)
1110 if (!spec) 1082 if (!spec)
1111 return -ENOMEM; 1083 return -ENOMEM;
1112 codec->spec = spec; 1084 codec->spec = spec;
1113 codec->pin_amp_workaround = 1; 1085 codec->single_adc_amp = 1;
1114 1086
1115 spec->multiout.max_channels = 2; 1087 spec->multiout.max_channels = 2;
1116 spec->multiout.num_dacs = ARRAY_SIZE(cxt5045_dac_nids); 1088 spec->multiout.num_dacs = ARRAY_SIZE(cxt5045_dac_nids);
@@ -4220,7 +4192,7 @@ static int cx_auto_add_capture_volume(struct hda_codec *codec, hda_nid_t nid,
4220 int idx = get_input_connection(codec, adc_nid, nid); 4192 int idx = get_input_connection(codec, adc_nid, nid);
4221 if (idx < 0) 4193 if (idx < 0)
4222 continue; 4194 continue;
4223 if (spec->single_adc_amp) 4195 if (codec->single_adc_amp)
4224 idx = 0; 4196 idx = 0;
4225 return cx_auto_add_volume_idx(codec, label, pfx, 4197 return cx_auto_add_volume_idx(codec, label, pfx,
4226 cidx, adc_nid, HDA_INPUT, idx); 4198 cidx, adc_nid, HDA_INPUT, idx);
@@ -4275,7 +4247,7 @@ static int cx_auto_build_input_controls(struct hda_codec *codec)
4275 if (cidx < 0) 4247 if (cidx < 0)
4276 continue; 4248 continue;
4277 input_conn[i] = spec->imux_info[i].adc; 4249 input_conn[i] = spec->imux_info[i].adc;
4278 if (!spec->single_adc_amp) 4250 if (!codec->single_adc_amp)
4279 input_conn[i] |= cidx << 8; 4251 input_conn[i] |= cidx << 8;
4280 if (i > 0 && input_conn[i] != input_conn[0]) 4252 if (i > 0 && input_conn[i] != input_conn[0])
4281 multi_connection = 1; 4253 multi_connection = 1;
@@ -4466,15 +4438,17 @@ static int patch_conexant_auto(struct hda_codec *codec)
4466 if (!spec) 4438 if (!spec)
4467 return -ENOMEM; 4439 return -ENOMEM;
4468 codec->spec = spec; 4440 codec->spec = spec;
4469 codec->pin_amp_workaround = 1;
4470 4441
4471 switch (codec->vendor_id) { 4442 switch (codec->vendor_id) {
4472 case 0x14f15045: 4443 case 0x14f15045:
4473 spec->single_adc_amp = 1; 4444 codec->single_adc_amp = 1;
4474 break; 4445 break;
4475 case 0x14f15051: 4446 case 0x14f15051:
4476 add_cx5051_fake_mutes(codec); 4447 add_cx5051_fake_mutes(codec);
4448 codec->pin_amp_workaround = 1;
4477 break; 4449 break;
4450 default:
4451 codec->pin_amp_workaround = 1;
4478 } 4452 }
4479 4453
4480 apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl); 4454 apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl);
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 540cd13f7f1..83f345f3c96 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -757,8 +757,6 @@ static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res)
757 struct hdmi_spec *spec = codec->spec; 757 struct hdmi_spec *spec = codec->spec;
758 int tag = res >> AC_UNSOL_RES_TAG_SHIFT; 758 int tag = res >> AC_UNSOL_RES_TAG_SHIFT;
759 int pin_nid; 759 int pin_nid;
760 int pd = !!(res & AC_UNSOL_RES_PD);
761 int eldv = !!(res & AC_UNSOL_RES_ELDV);
762 int pin_idx; 760 int pin_idx;
763 struct hda_jack_tbl *jack; 761 struct hda_jack_tbl *jack;
764 762
@@ -768,9 +766,10 @@ static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res)
768 pin_nid = jack->nid; 766 pin_nid = jack->nid;
769 jack->jack_dirty = 1; 767 jack->jack_dirty = 1;
770 768
771 printk(KERN_INFO 769 _snd_printd(SND_PR_VERBOSE,
772 "HDMI hot plug event: Codec=%d Pin=%d Presence_Detect=%d ELD_Valid=%d\n", 770 "HDMI hot plug event: Codec=%d Pin=%d Presence_Detect=%d ELD_Valid=%d\n",
773 codec->addr, pin_nid, pd, eldv); 771 codec->addr, pin_nid,
772 !!(res & AC_UNSOL_RES_PD), !!(res & AC_UNSOL_RES_ELDV));
774 773
775 pin_idx = pin_nid_to_pin_index(spec, pin_nid); 774 pin_idx = pin_nid_to_pin_index(spec, pin_nid);
776 if (pin_idx < 0) 775 if (pin_idx < 0)
@@ -992,7 +991,7 @@ static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll)
992 if (eld->monitor_present) 991 if (eld->monitor_present)
993 eld_valid = !!(present & AC_PINSENSE_ELDV); 992 eld_valid = !!(present & AC_PINSENSE_ELDV);
994 993
995 printk(KERN_INFO 994 _snd_printd(SND_PR_VERBOSE,
996 "HDMI status: Codec=%d Pin=%d Presence_Detect=%d ELD_Valid=%d\n", 995 "HDMI status: Codec=%d Pin=%d Presence_Detect=%d ELD_Valid=%d\n",
997 codec->addr, pin_nid, eld->monitor_present, eld_valid); 996 codec->addr, pin_nid, eld->monitor_present, eld_valid);
998 997
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 9917e55d6f1..2508f8109f1 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3398,8 +3398,10 @@ static int alc_auto_fill_dac_nids(struct hda_codec *codec)
3398 for (;;) { 3398 for (;;) {
3399 badness = fill_and_eval_dacs(codec, fill_hardwired, 3399 badness = fill_and_eval_dacs(codec, fill_hardwired,
3400 fill_mio_first); 3400 fill_mio_first);
3401 if (badness < 0) 3401 if (badness < 0) {
3402 kfree(best_cfg);
3402 return badness; 3403 return badness;
3404 }
3403 debug_badness("==> lo_type=%d, wired=%d, mio=%d, badness=0x%x\n", 3405 debug_badness("==> lo_type=%d, wired=%d, mio=%d, badness=0x%x\n",
3404 cfg->line_out_type, fill_hardwired, fill_mio_first, 3406 cfg->line_out_type, fill_hardwired, fill_mio_first,
3405 badness); 3407 badness);
@@ -3434,7 +3436,7 @@ static int alc_auto_fill_dac_nids(struct hda_codec *codec)
3434 cfg->line_out_type = AUTO_PIN_SPEAKER_OUT; 3436 cfg->line_out_type = AUTO_PIN_SPEAKER_OUT;
3435 fill_hardwired = true; 3437 fill_hardwired = true;
3436 continue; 3438 continue;
3437 } 3439 }
3438 if (cfg->hp_outs > 0 && 3440 if (cfg->hp_outs > 0 &&
3439 cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) { 3441 cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) {
3440 cfg->speaker_outs = cfg->line_outs; 3442 cfg->speaker_outs = cfg->line_outs;
@@ -3448,7 +3450,7 @@ static int alc_auto_fill_dac_nids(struct hda_codec *codec)
3448 cfg->line_out_type = AUTO_PIN_HP_OUT; 3450 cfg->line_out_type = AUTO_PIN_HP_OUT;
3449 fill_hardwired = true; 3451 fill_hardwired = true;
3450 continue; 3452 continue;
3451 } 3453 }
3452 break; 3454 break;
3453 } 3455 }
3454 3456
@@ -4423,7 +4425,7 @@ static int alc_parse_auto_config(struct hda_codec *codec,
4423static int alc880_parse_auto_config(struct hda_codec *codec) 4425static int alc880_parse_auto_config(struct hda_codec *codec)
4424{ 4426{
4425 static const hda_nid_t alc880_ignore[] = { 0x1d, 0 }; 4427 static const hda_nid_t alc880_ignore[] = { 0x1d, 0 };
4426 static const hda_nid_t alc880_ssids[] = { 0x15, 0x1b, 0x14, 0 }; 4428 static const hda_nid_t alc880_ssids[] = { 0x15, 0x1b, 0x14, 0 };
4427 return alc_parse_auto_config(codec, alc880_ignore, alc880_ssids); 4429 return alc_parse_auto_config(codec, alc880_ignore, alc880_ssids);
4428} 4430}
4429 4431
@@ -5269,7 +5271,9 @@ static const struct alc_fixup alc882_fixups[] = {
5269 { 0x16, 0x99130111 }, /* CLFE speaker */ 5271 { 0x16, 0x99130111 }, /* CLFE speaker */
5270 { 0x17, 0x99130112 }, /* surround speaker */ 5272 { 0x17, 0x99130112 }, /* surround speaker */
5271 { } 5273 { }
5272 } 5274 },
5275 .chained = true,
5276 .chain_id = ALC882_FIXUP_GPIO1,
5273 }, 5277 },
5274 [ALC882_FIXUP_ACER_ASPIRE_8930G] = { 5278 [ALC882_FIXUP_ACER_ASPIRE_8930G] = {
5275 .type = ALC_FIXUP_PINS, 5279 .type = ALC_FIXUP_PINS,
@@ -5312,7 +5316,9 @@ static const struct alc_fixup alc882_fixups[] = {
5312 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 5316 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
5313 { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 }, 5317 { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 },
5314 { } 5318 { }
5315 } 5319 },
5320 .chained = true,
5321 .chain_id = ALC882_FIXUP_GPIO1,
5316 }, 5322 },
5317 [ALC885_FIXUP_MACPRO_GPIO] = { 5323 [ALC885_FIXUP_MACPRO_GPIO] = {
5318 .type = ALC_FIXUP_FUNC, 5324 .type = ALC_FIXUP_FUNC,
@@ -5359,6 +5365,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
5359 ALC882_FIXUP_ACER_ASPIRE_4930G), 5365 ALC882_FIXUP_ACER_ASPIRE_4930G),
5360 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210), 5366 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210),
5361 SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE), 5367 SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE),
5368 SND_PCI_QUIRK(0x1025, 0x026b, "Acer Aspire 8940G", ALC882_FIXUP_ACER_ASPIRE_8930G),
5362 SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736), 5369 SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736),
5363 SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD), 5370 SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD),
5364 SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V), 5371 SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V),
@@ -5384,6 +5391,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
5384 SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC889_FIXUP_IMAC91_VREF), 5391 SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC889_FIXUP_IMAC91_VREF),
5385 SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF), 5392 SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF),
5386 SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF), 5393 SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF),
5394 SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 5,1", ALC885_FIXUP_MACPRO_GPIO),
5387 SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF), 5395 SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF),
5388 SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF), 5396 SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF),
5389 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF), 5397 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF),
@@ -5399,6 +5407,13 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
5399 {} 5407 {}
5400}; 5408};
5401 5409
5410static const struct alc_model_fixup alc882_fixup_models[] = {
5411 {.id = ALC882_FIXUP_ACER_ASPIRE_4930G, .name = "acer-aspire-4930g"},
5412 {.id = ALC882_FIXUP_ACER_ASPIRE_8930G, .name = "acer-aspire-8930g"},
5413 {.id = ALC883_FIXUP_ACER_EAPD, .name = "acer-aspire"},
5414 {}
5415};
5416
5402/* 5417/*
5403 * BIOS auto configuration 5418 * BIOS auto configuration
5404 */ 5419 */
@@ -5439,7 +5454,8 @@ static int patch_alc882(struct hda_codec *codec)
5439 if (err < 0) 5454 if (err < 0)
5440 goto error; 5455 goto error;
5441 5456
5442 alc_pick_fixup(codec, NULL, alc882_fixup_tbl, alc882_fixups); 5457 alc_pick_fixup(codec, alc882_fixup_models, alc882_fixup_tbl,
5458 alc882_fixups);
5443 alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); 5459 alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
5444 5460
5445 alc_auto_parse_customize_define(codec); 5461 alc_auto_parse_customize_define(codec);
@@ -6079,7 +6095,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
6079 * Basically the device should work as is without the fixup table. 6095 * Basically the device should work as is without the fixup table.
6080 * If BIOS doesn't give a proper info, enable the corresponding 6096 * If BIOS doesn't give a proper info, enable the corresponding
6081 * fixup entry. 6097 * fixup entry.
6082 */ 6098 */
6083 SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A", 6099 SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A",
6084 ALC269_FIXUP_AMIC), 6100 ALC269_FIXUP_AMIC),
6085 SND_PCI_QUIRK(0x1043, 0x1013, "ASUS N61Da", ALC269_FIXUP_AMIC), 6101 SND_PCI_QUIRK(0x1043, 0x1013, "ASUS N61Da", ALC269_FIXUP_AMIC),
@@ -6296,7 +6312,7 @@ static void alc_fixup_no_jack_detect(struct hda_codec *codec,
6296{ 6312{
6297 if (action == ALC_FIXUP_ACT_PRE_PROBE) 6313 if (action == ALC_FIXUP_ACT_PRE_PROBE)
6298 codec->no_jack_detect = 1; 6314 codec->no_jack_detect = 1;
6299} 6315}
6300 6316
6301static const struct alc_fixup alc861_fixups[] = { 6317static const struct alc_fixup alc861_fixups[] = {
6302 [ALC861_FIXUP_FSC_AMILO_PI1505] = { 6318 [ALC861_FIXUP_FSC_AMILO_PI1505] = {
@@ -6714,7 +6730,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
6714 * Basically the device should work as is without the fixup table. 6730 * Basically the device should work as is without the fixup table.
6715 * If BIOS doesn't give a proper info, enable the corresponding 6731 * If BIOS doesn't give a proper info, enable the corresponding
6716 * fixup entry. 6732 * fixup entry.
6717 */ 6733 */
6718 SND_PCI_QUIRK(0x1043, 0x1000, "ASUS N50Vm", ALC662_FIXUP_ASUS_MODE1), 6734 SND_PCI_QUIRK(0x1043, 0x1000, "ASUS N50Vm", ALC662_FIXUP_ASUS_MODE1),
6719 SND_PCI_QUIRK(0x1043, 0x1092, "ASUS NB", ALC662_FIXUP_ASUS_MODE3), 6735 SND_PCI_QUIRK(0x1043, 0x1092, "ASUS NB", ALC662_FIXUP_ASUS_MODE3),
6720 SND_PCI_QUIRK(0x1043, 0x1173, "ASUS K73Jn", ALC662_FIXUP_ASUS_MODE1), 6736 SND_PCI_QUIRK(0x1043, 0x1173, "ASUS K73Jn", ALC662_FIXUP_ASUS_MODE1),