aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-04-07 06:26:55 -0400
committerTakashi Iwai <tiwai@suse.de>2012-04-07 06:26:55 -0400
commit5ff5c3a4ab0d638fa63e939e75727c233b681e8d (patch)
treea62c2f95c31130c74beef53910cf66023765f355 /sound/pci
parent18dcd3044e4c4b3ab6341c98e8d0e81e0d58d5e3 (diff)
parent250f32747e62cb415b85083e247184188f24e566 (diff)
Merge branch 'fix/hda' into topic/hda
Conflicts: sound/pci/hda/patch_conexant.c
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/asihpi/hpi_internal.h4
-rw-r--r--sound/pci/asihpi/hpios.c10
-rw-r--r--sound/pci/hda/hda_codec.h3
-rw-r--r--sound/pci/hda/hda_proc.c13
-rw-r--r--sound/pci/hda/patch_conexant.c108
5 files changed, 61 insertions, 77 deletions
diff --git a/sound/pci/asihpi/hpi_internal.h b/sound/pci/asihpi/hpi_internal.h
index 8c63200cf339..bc86cb726d79 100644
--- a/sound/pci/asihpi/hpi_internal.h
+++ b/sound/pci/asihpi/hpi_internal.h
@@ -1,7 +1,7 @@
1/****************************************************************************** 1/******************************************************************************
2 2
3 AudioScience HPI driver 3 AudioScience HPI driver
4 Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com> 4 Copyright (C) 1997-2012 AudioScience Inc. <support@audioscience.com>
5 5
6 This program is free software; you can redistribute it and/or modify 6 This program is free software; you can redistribute it and/or modify
7 it under the terms of version 2 of the GNU General Public License as 7 it under the terms of version 2 of the GNU General Public License as
@@ -42,7 +42,7 @@ On error *pLockedMemHandle marked invalid, non-zero returned.
42If this function succeeds, then HpiOs_LockedMem_GetVirtAddr() and 42If this function succeeds, then HpiOs_LockedMem_GetVirtAddr() and
43HpiOs_LockedMem_GetPyhsAddr() will always succed on the returned handle. 43HpiOs_LockedMem_GetPyhsAddr() will always succed on the returned handle.
44*/ 44*/
45int hpios_locked_mem_alloc(struct consistent_dma_area *p_locked_mem_handle, 45u16 hpios_locked_mem_alloc(struct consistent_dma_area *p_locked_mem_handle,
46 /**< memory handle */ 46 /**< memory handle */
47 u32 size, /**< Size in bytes to allocate */ 47 u32 size, /**< Size in bytes to allocate */
48 struct pci_dev *p_os_reference 48 struct pci_dev *p_os_reference
diff --git a/sound/pci/asihpi/hpios.c b/sound/pci/asihpi/hpios.c
index 87f4385fe8c7..5ef4fe964366 100644
--- a/sound/pci/asihpi/hpios.c
+++ b/sound/pci/asihpi/hpios.c
@@ -1,7 +1,7 @@
1/****************************************************************************** 1/******************************************************************************
2 2
3 AudioScience HPI driver 3 AudioScience HPI driver
4 Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com> 4 Copyright (C) 1997-2012 AudioScience Inc. <support@audioscience.com>
5 5
6 This program is free software; you can redistribute it and/or modify 6 This program is free software; you can redistribute it and/or modify
7 it under the terms of version 2 of the GNU General Public License as 7 it under the terms of version 2 of the GNU General Public License as
@@ -39,11 +39,11 @@ void hpios_delay_micro_seconds(u32 num_micro_sec)
39 39
40} 40}
41 41
42/** Allocated an area of locked memory for bus master DMA operations. 42/** Allocate an area of locked memory for bus master DMA operations.
43 43
44On error, return -ENOMEM, and *pMemArea.size = 0 44If allocation fails, return 1, and *pMemArea.size = 0
45*/ 45*/
46int hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size, 46u16 hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size,
47 struct pci_dev *pdev) 47 struct pci_dev *pdev)
48{ 48{
49 /*?? any benefit in using managed dmam_alloc_coherent? */ 49 /*?? any benefit in using managed dmam_alloc_coherent? */
@@ -62,7 +62,7 @@ int hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size,
62 HPI_DEBUG_LOG(WARNING, 62 HPI_DEBUG_LOG(WARNING,
63 "failed to allocate %d bytes locked memory\n", size); 63 "failed to allocate %d bytes locked memory\n", size);
64 p_mem_area->size = 0; 64 p_mem_area->size = 0;
65 return -ENOMEM; 65 return 1;
66 } 66 }
67} 67}
68 68
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 9a9f372e1be4..56b4f74c0b13 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_proc.c b/sound/pci/hda/hda_proc.c
index 254ab5204603..e59e2f059b6e 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 213fb80c11f5..cbe115b6c80c 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 unsigned int fixup_stereo_dmic:1; 144 unsigned int fixup_stereo_dmic:1;
146 145
147 unsigned int adc_switching:1; 146 unsigned int adc_switching:1;
@@ -688,27 +687,26 @@ static const struct hda_channel_mode cxt5045_modes[1] = {
688static const struct hda_input_mux cxt5045_capture_source = { 687static const struct hda_input_mux cxt5045_capture_source = {
689 .num_items = 2, 688 .num_items = 2,
690 .items = { 689 .items = {
691 { "IntMic", 0x1 }, 690 { "Internal Mic", 0x1 },
692 { "ExtMic", 0x2 }, 691 { "Mic", 0x2 },
693 } 692 }
694}; 693};
695 694
696static const struct hda_input_mux cxt5045_capture_source_benq = { 695static const struct hda_input_mux cxt5045_capture_source_benq = {
697 .num_items = 5, 696 .num_items = 4,
698 .items = { 697 .items = {
699 { "IntMic", 0x1 }, 698 { "Internal Mic", 0x1 },
700 { "ExtMic", 0x2 }, 699 { "Mic", 0x2 },
701 { "LineIn", 0x3 }, 700 { "Line", 0x3 },
702 { "CD", 0x4 }, 701 { "Mixer", 0x0 },
703 { "Mixer", 0x0 },
704 } 702 }
705}; 703};
706 704
707static const struct hda_input_mux cxt5045_capture_source_hp530 = { 705static const struct hda_input_mux cxt5045_capture_source_hp530 = {
708 .num_items = 2, 706 .num_items = 2,
709 .items = { 707 .items = {
710 { "ExtMic", 0x1 }, 708 { "Mic", 0x1 },
711 { "IntMic", 0x2 }, 709 { "Internal Mic", 0x2 },
712 } 710 }
713}; 711};
714 712
@@ -799,10 +797,8 @@ static void cxt5045_hp_unsol_event(struct hda_codec *codec,
799} 797}
800 798
801static const struct snd_kcontrol_new cxt5045_mixers[] = { 799static const struct snd_kcontrol_new cxt5045_mixers[] = {
802 HDA_CODEC_VOLUME("Internal Mic Capture Volume", 0x1a, 0x01, HDA_INPUT), 800 HDA_CODEC_VOLUME("Capture Volume", 0x1a, 0x00, HDA_INPUT),
803 HDA_CODEC_MUTE("Internal Mic Capture Switch", 0x1a, 0x01, HDA_INPUT), 801 HDA_CODEC_MUTE("Capture Switch", 0x1a, 0x0, HDA_INPUT),
804 HDA_CODEC_VOLUME("Mic Capture Volume", 0x1a, 0x02, HDA_INPUT),
805 HDA_CODEC_MUTE("Mic Capture Switch", 0x1a, 0x02, HDA_INPUT),
806 HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT), 802 HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT),
807 HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT), 803 HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT),
808 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0x1, HDA_INPUT), 804 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0x1, HDA_INPUT),
@@ -823,27 +819,15 @@ static const struct snd_kcontrol_new cxt5045_mixers[] = {
823}; 819};
824 820
825static const struct snd_kcontrol_new cxt5045_benq_mixers[] = { 821static const struct snd_kcontrol_new cxt5045_benq_mixers[] = {
826 HDA_CODEC_VOLUME("CD Capture Volume", 0x1a, 0x04, HDA_INPUT), 822 HDA_CODEC_VOLUME("Line Playback Volume", 0x17, 0x3, HDA_INPUT),
827 HDA_CODEC_MUTE("CD Capture Switch", 0x1a, 0x04, HDA_INPUT), 823 HDA_CODEC_MUTE("Line Playback Switch", 0x17, 0x3, HDA_INPUT),
828 HDA_CODEC_VOLUME("CD Playback Volume", 0x17, 0x4, HDA_INPUT),
829 HDA_CODEC_MUTE("CD Playback Switch", 0x17, 0x4, HDA_INPUT),
830
831 HDA_CODEC_VOLUME("Line In Capture Volume", 0x1a, 0x03, HDA_INPUT),
832 HDA_CODEC_MUTE("Line In Capture Switch", 0x1a, 0x03, HDA_INPUT),
833 HDA_CODEC_VOLUME("Line In Playback Volume", 0x17, 0x3, HDA_INPUT),
834 HDA_CODEC_MUTE("Line In Playback Switch", 0x17, 0x3, HDA_INPUT),
835
836 HDA_CODEC_VOLUME("Mixer Capture Volume", 0x1a, 0x0, HDA_INPUT),
837 HDA_CODEC_MUTE("Mixer Capture Switch", 0x1a, 0x0, HDA_INPUT),
838 824
839 {} 825 {}
840}; 826};
841 827
842static const struct snd_kcontrol_new cxt5045_mixers_hp530[] = { 828static const struct snd_kcontrol_new cxt5045_mixers_hp530[] = {
843 HDA_CODEC_VOLUME("Internal Mic Capture Volume", 0x1a, 0x02, HDA_INPUT), 829 HDA_CODEC_VOLUME("Capture Volume", 0x1a, 0x00, HDA_INPUT),
844 HDA_CODEC_MUTE("Internal Mic Capture Switch", 0x1a, 0x02, HDA_INPUT), 830 HDA_CODEC_MUTE("Capture Switch", 0x1a, 0x0, HDA_INPUT),
845 HDA_CODEC_VOLUME("Mic Capture Volume", 0x1a, 0x01, HDA_INPUT),
846 HDA_CODEC_MUTE("Mic Capture Switch", 0x1a, 0x01, HDA_INPUT),
847 HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT), 831 HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT),
848 HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT), 832 HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT),
849 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0x2, HDA_INPUT), 833 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0x2, HDA_INPUT),
@@ -947,10 +931,10 @@ static const struct snd_kcontrol_new cxt5045_test_mixer[] = {
947 /* Output controls */ 931 /* Output controls */
948 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x10, 0x0, HDA_OUTPUT), 932 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x10, 0x0, HDA_OUTPUT),
949 HDA_CODEC_MUTE("Speaker Playback Switch", 0x10, 0x0, HDA_OUTPUT), 933 HDA_CODEC_MUTE("Speaker Playback Switch", 0x10, 0x0, HDA_OUTPUT),
950 HDA_CODEC_VOLUME("Node 11 Playback Volume", 0x11, 0x0, HDA_OUTPUT), 934 HDA_CODEC_VOLUME("HP-OUT Playback Volume", 0x11, 0x0, HDA_OUTPUT),
951 HDA_CODEC_MUTE("Node 11 Playback Switch", 0x11, 0x0, HDA_OUTPUT), 935 HDA_CODEC_MUTE("HP-OUT Playback Switch", 0x11, 0x0, HDA_OUTPUT),
952 HDA_CODEC_VOLUME("Node 12 Playback Volume", 0x12, 0x0, HDA_OUTPUT), 936 HDA_CODEC_VOLUME("LINE1 Playback Volume", 0x12, 0x0, HDA_OUTPUT),
953 HDA_CODEC_MUTE("Node 12 Playback Switch", 0x12, 0x0, HDA_OUTPUT), 937 HDA_CODEC_MUTE("LINE1 Playback Switch", 0x12, 0x0, HDA_OUTPUT),
954 938
955 /* Modes for retasking pin widgets */ 939 /* Modes for retasking pin widgets */
956 CXT_PIN_MODE("HP-OUT pin mode", 0x11, CXT_PIN_DIR_INOUT), 940 CXT_PIN_MODE("HP-OUT pin mode", 0x11, CXT_PIN_DIR_INOUT),
@@ -961,16 +945,16 @@ static const struct snd_kcontrol_new cxt5045_test_mixer[] = {
961 945
962 /* Loopback mixer controls */ 946 /* Loopback mixer controls */
963 947
964 HDA_CODEC_VOLUME("Mixer-1 Volume", 0x17, 0x0, HDA_INPUT), 948 HDA_CODEC_VOLUME("PCM Volume", 0x17, 0x0, HDA_INPUT),
965 HDA_CODEC_MUTE("Mixer-1 Switch", 0x17, 0x0, HDA_INPUT), 949 HDA_CODEC_MUTE("PCM Switch", 0x17, 0x0, HDA_INPUT),
966 HDA_CODEC_VOLUME("Mixer-2 Volume", 0x17, 0x1, HDA_INPUT), 950 HDA_CODEC_VOLUME("MIC1 pin Volume", 0x17, 0x1, HDA_INPUT),
967 HDA_CODEC_MUTE("Mixer-2 Switch", 0x17, 0x1, HDA_INPUT), 951 HDA_CODEC_MUTE("MIC1 pin Switch", 0x17, 0x1, HDA_INPUT),
968 HDA_CODEC_VOLUME("Mixer-3 Volume", 0x17, 0x2, HDA_INPUT), 952 HDA_CODEC_VOLUME("LINE1 pin Volume", 0x17, 0x2, HDA_INPUT),
969 HDA_CODEC_MUTE("Mixer-3 Switch", 0x17, 0x2, HDA_INPUT), 953 HDA_CODEC_MUTE("LINE1 pin Switch", 0x17, 0x2, HDA_INPUT),
970 HDA_CODEC_VOLUME("Mixer-4 Volume", 0x17, 0x3, HDA_INPUT), 954 HDA_CODEC_VOLUME("HP-OUT pin Volume", 0x17, 0x3, HDA_INPUT),
971 HDA_CODEC_MUTE("Mixer-4 Switch", 0x17, 0x3, HDA_INPUT), 955 HDA_CODEC_MUTE("HP-OUT pin Switch", 0x17, 0x3, HDA_INPUT),
972 HDA_CODEC_VOLUME("Mixer-5 Volume", 0x17, 0x4, HDA_INPUT), 956 HDA_CODEC_VOLUME("CD pin Volume", 0x17, 0x4, HDA_INPUT),
973 HDA_CODEC_MUTE("Mixer-5 Switch", 0x17, 0x4, HDA_INPUT), 957 HDA_CODEC_MUTE("CD pin Switch", 0x17, 0x4, HDA_INPUT),
974 { 958 {
975 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 959 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
976 .name = "Input Source", 960 .name = "Input Source",
@@ -979,16 +963,8 @@ static const struct snd_kcontrol_new cxt5045_test_mixer[] = {
979 .put = conexant_mux_enum_put, 963 .put = conexant_mux_enum_put,
980 }, 964 },
981 /* Audio input controls */ 965 /* Audio input controls */
982 HDA_CODEC_VOLUME("Input-1 Volume", 0x1a, 0x0, HDA_INPUT), 966 HDA_CODEC_VOLUME("Capture Volume", 0x1a, 0x0, HDA_INPUT),
983 HDA_CODEC_MUTE("Input-1 Switch", 0x1a, 0x0, HDA_INPUT), 967 HDA_CODEC_MUTE("Capture Switch", 0x1a, 0x0, HDA_INPUT),
984 HDA_CODEC_VOLUME("Input-2 Volume", 0x1a, 0x1, HDA_INPUT),
985 HDA_CODEC_MUTE("Input-2 Switch", 0x1a, 0x1, HDA_INPUT),
986 HDA_CODEC_VOLUME("Input-3 Volume", 0x1a, 0x2, HDA_INPUT),
987 HDA_CODEC_MUTE("Input-3 Switch", 0x1a, 0x2, HDA_INPUT),
988 HDA_CODEC_VOLUME("Input-4 Volume", 0x1a, 0x3, HDA_INPUT),
989 HDA_CODEC_MUTE("Input-4 Switch", 0x1a, 0x3, HDA_INPUT),
990 HDA_CODEC_VOLUME("Input-5 Volume", 0x1a, 0x4, HDA_INPUT),
991 HDA_CODEC_MUTE("Input-5 Switch", 0x1a, 0x4, HDA_INPUT),
992 { } /* end */ 968 { } /* end */
993}; 969};
994 970
@@ -1010,10 +986,6 @@ static const struct hda_verb cxt5045_test_init_verbs[] = {
1010 {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 986 {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1011 {0x18, AC_VERB_SET_DIGI_CONVERT_1, 0}, 987 {0x18, AC_VERB_SET_DIGI_CONVERT_1, 0},
1012 988
1013 /* Start with output sum widgets muted and their output gains at min */
1014 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
1015 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
1016
1017 /* Unmute retasking pin widget output buffers since the default 989 /* Unmute retasking pin widget output buffers since the default
1018 * state appears to be output. As the pin mode is changed by the 990 * state appears to be output. As the pin mode is changed by the
1019 * user the pin mode control will take care of enabling the pin's 991 * user the pin mode control will take care of enabling the pin's
@@ -1028,11 +1000,11 @@ static const struct hda_verb cxt5045_test_init_verbs[] = {
1028 /* Set ADC connection select to match default mixer setting (mic1 1000 /* Set ADC connection select to match default mixer setting (mic1
1029 * pin) 1001 * pin)
1030 */ 1002 */
1031 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x00}, 1003 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01},
1032 {0x17, AC_VERB_SET_CONNECT_SEL, 0x00}, 1004 {0x17, AC_VERB_SET_CONNECT_SEL, 0x01},
1033 1005
1034 /* Mute all inputs to mixer widget (even unconnected ones) */ 1006 /* Mute all inputs to mixer widget (even unconnected ones) */
1035 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, /* Mixer pin */ 1007 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, /* Mixer */
1036 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, /* Mic1 pin */ 1008 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, /* Mic1 pin */
1037 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, /* Line pin */ 1009 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, /* Line pin */
1038 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, /* HP pin */ 1010 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, /* HP pin */
@@ -1111,7 +1083,7 @@ static int patch_cxt5045(struct hda_codec *codec)
1111 if (!spec) 1083 if (!spec)
1112 return -ENOMEM; 1084 return -ENOMEM;
1113 codec->spec = spec; 1085 codec->spec = spec;
1114 codec->pin_amp_workaround = 1; 1086 codec->single_adc_amp = 1;
1115 1087
1116 spec->multiout.max_channels = 2; 1088 spec->multiout.max_channels = 2;
1117 spec->multiout.num_dacs = ARRAY_SIZE(cxt5045_dac_nids); 1089 spec->multiout.num_dacs = ARRAY_SIZE(cxt5045_dac_nids);
@@ -4252,7 +4224,7 @@ static int cx_auto_add_capture_volume(struct hda_codec *codec, hda_nid_t nid,
4252 int idx = get_input_connection(codec, adc_nid, nid); 4224 int idx = get_input_connection(codec, adc_nid, nid);
4253 if (idx < 0) 4225 if (idx < 0)
4254 continue; 4226 continue;
4255 if (spec->single_adc_amp) 4227 if (codec->single_adc_amp)
4256 idx = 0; 4228 idx = 0;
4257 4229
4258 if (cx_auto_get_rightch_label(codec, label, rightch_label, nid)) { 4230 if (cx_auto_get_rightch_label(codec, label, rightch_label, nid)) {
@@ -4327,7 +4299,7 @@ static int cx_auto_build_input_controls(struct hda_codec *codec)
4327 if (cidx < 0) 4299 if (cidx < 0)
4328 continue; 4300 continue;
4329 input_conn[i] = spec->imux_info[i].adc; 4301 input_conn[i] = spec->imux_info[i].adc;
4330 if (!spec->single_adc_amp) 4302 if (!codec->single_adc_amp)
4331 input_conn[i] |= cidx << 8; 4303 input_conn[i] |= cidx << 8;
4332 if (i > 0 && input_conn[i] != input_conn[0]) 4304 if (i > 0 && input_conn[i] != input_conn[0])
4333 multi_connection = 1; 4305 multi_connection = 1;
@@ -4528,15 +4500,17 @@ static int patch_conexant_auto(struct hda_codec *codec)
4528 if (!spec) 4500 if (!spec)
4529 return -ENOMEM; 4501 return -ENOMEM;
4530 codec->spec = spec; 4502 codec->spec = spec;
4531 codec->pin_amp_workaround = 1;
4532 4503
4533 switch (codec->vendor_id) { 4504 switch (codec->vendor_id) {
4534 case 0x14f15045: 4505 case 0x14f15045:
4535 spec->single_adc_amp = 1; 4506 codec->single_adc_amp = 1;
4536 break; 4507 break;
4537 case 0x14f15051: 4508 case 0x14f15051:
4538 add_cx5051_fake_mutes(codec); 4509 add_cx5051_fake_mutes(codec);
4510 codec->pin_amp_workaround = 1;
4539 break; 4511 break;
4512 default:
4513 codec->pin_amp_workaround = 1;
4540 } 4514 }
4541 4515
4542 apply_fixup(codec, cxt_fixups, cxt_pincfg_tbl); 4516 apply_fixup(codec, cxt_fixups, cxt_pincfg_tbl);