diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 151 |
1 files changed, 4 insertions, 147 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index c878dfa369b7..4cce92cf8ead 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -329,11 +329,6 @@ static hda_nid_t stac92hd73xx_adc_nids[2] = { | |||
329 | 0x1a, 0x1b | 329 | 0x1a, 0x1b |
330 | }; | 330 | }; |
331 | 331 | ||
332 | #define DELL_M6_AMP 2 | ||
333 | static hda_nid_t stac92hd73xx_amp_nids[3] = { | ||
334 | 0x0b, 0x0c, 0x0e | ||
335 | }; | ||
336 | |||
337 | #define STAC92HD73XX_NUM_DMICS 2 | 332 | #define STAC92HD73XX_NUM_DMICS 2 |
338 | static hda_nid_t stac92hd73xx_dmic_nids[STAC92HD73XX_NUM_DMICS + 1] = { | 333 | static hda_nid_t stac92hd73xx_dmic_nids[STAC92HD73XX_NUM_DMICS + 1] = { |
339 | 0x13, 0x14, 0 | 334 | 0x13, 0x14, 0 |
@@ -341,8 +336,8 @@ static hda_nid_t stac92hd73xx_dmic_nids[STAC92HD73XX_NUM_DMICS + 1] = { | |||
341 | 336 | ||
342 | #define STAC92HD73_DAC_COUNT 5 | 337 | #define STAC92HD73_DAC_COUNT 5 |
343 | 338 | ||
344 | static hda_nid_t stac92hd73xx_mux_nids[4] = { | 339 | static hda_nid_t stac92hd73xx_mux_nids[2] = { |
345 | 0x28, 0x29, 0x2a, 0x2b, | 340 | 0x20, 0x21, |
346 | }; | 341 | }; |
347 | 342 | ||
348 | static hda_nid_t stac92hd73xx_dmux_nids[2] = { | 343 | static hda_nid_t stac92hd73xx_dmux_nids[2] = { |
@@ -920,84 +915,16 @@ static struct hda_verb stac9200_eapd_init[] = { | |||
920 | {} | 915 | {} |
921 | }; | 916 | }; |
922 | 917 | ||
923 | static struct hda_verb stac92hd73xx_6ch_core_init[] = { | ||
924 | /* set master volume and direct control */ | ||
925 | { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, | ||
926 | /* setup adcs to point to mixer */ | ||
927 | { 0x20, AC_VERB_SET_CONNECT_SEL, 0x0b}, | ||
928 | { 0x21, AC_VERB_SET_CONNECT_SEL, 0x0b}, | ||
929 | { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
930 | { 0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
931 | { 0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
932 | /* setup import muxs */ | ||
933 | { 0x28, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
934 | { 0x29, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
935 | { 0x2a, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
936 | { 0x2b, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
937 | {} | ||
938 | }; | ||
939 | |||
940 | static struct hda_verb dell_eq_core_init[] = { | 918 | static struct hda_verb dell_eq_core_init[] = { |
941 | /* set master volume to max value without distortion | 919 | /* set master volume to max value without distortion |
942 | * and direct control */ | 920 | * and direct control */ |
943 | { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xec}, | 921 | { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xec}, |
944 | /* setup adcs to point to mixer */ | ||
945 | { 0x20, AC_VERB_SET_CONNECT_SEL, 0x0b}, | ||
946 | { 0x21, AC_VERB_SET_CONNECT_SEL, 0x0b}, | ||
947 | /* setup import muxs */ | ||
948 | { 0x28, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
949 | { 0x29, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
950 | { 0x2a, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
951 | { 0x2b, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
952 | {} | ||
953 | }; | ||
954 | |||
955 | static struct hda_verb dell_m6_core_init[] = { | ||
956 | { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, | ||
957 | /* setup adcs to point to mixer */ | ||
958 | { 0x20, AC_VERB_SET_CONNECT_SEL, 0x0b}, | ||
959 | { 0x21, AC_VERB_SET_CONNECT_SEL, 0x0b}, | ||
960 | /* setup import muxs */ | ||
961 | { 0x28, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
962 | { 0x29, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
963 | { 0x2a, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
964 | { 0x2b, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
965 | {} | ||
966 | }; | ||
967 | |||
968 | static struct hda_verb stac92hd73xx_8ch_core_init[] = { | ||
969 | /* set master volume and direct control */ | ||
970 | { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, | ||
971 | /* setup adcs to point to mixer */ | ||
972 | { 0x20, AC_VERB_SET_CONNECT_SEL, 0x0b}, | ||
973 | { 0x21, AC_VERB_SET_CONNECT_SEL, 0x0b}, | ||
974 | { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
975 | { 0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
976 | { 0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
977 | /* setup import muxs */ | ||
978 | { 0x28, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
979 | { 0x29, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
980 | { 0x2a, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
981 | { 0x2b, AC_VERB_SET_CONNECT_SEL, 0x03}, | ||
982 | {} | 922 | {} |
983 | }; | 923 | }; |
984 | 924 | ||
985 | static struct hda_verb stac92hd73xx_10ch_core_init[] = { | 925 | static struct hda_verb stac92hd73xx_core_init[] = { |
986 | /* set master volume and direct control */ | 926 | /* set master volume and direct control */ |
987 | { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, | 927 | { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, |
988 | /* dac3 is connected to import3 mux */ | ||
989 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, 0xb07f}, | ||
990 | /* setup adcs to point to mixer */ | ||
991 | { 0x20, AC_VERB_SET_CONNECT_SEL, 0x0b}, | ||
992 | { 0x21, AC_VERB_SET_CONNECT_SEL, 0x0b}, | ||
993 | { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
994 | { 0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
995 | { 0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
996 | /* setup import muxs */ | ||
997 | { 0x28, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
998 | { 0x29, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
999 | { 0x2a, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
1000 | { 0x2b, AC_VERB_SET_CONNECT_SEL, 0x03}, | ||
1001 | {} | 928 | {} |
1002 | }; | 929 | }; |
1003 | 930 | ||
@@ -1130,28 +1057,6 @@ static struct snd_kcontrol_new stac9200_mixer[] = { | |||
1130 | { } /* end */ | 1057 | { } /* end */ |
1131 | }; | 1058 | }; |
1132 | 1059 | ||
1133 | #define DELL_M6_MIXER 6 | ||
1134 | static struct snd_kcontrol_new stac92hd73xx_6ch_mixer[] = { | ||
1135 | /* start of config #1 */ | ||
1136 | HDA_CODEC_VOLUME("Front Mic Mixer Capture Volume", 0x1d, 0, HDA_INPUT), | ||
1137 | HDA_CODEC_MUTE("Front Mic Mixer Capture Switch", 0x1d, 0, HDA_INPUT), | ||
1138 | |||
1139 | HDA_CODEC_VOLUME("Line In Mixer Capture Volume", 0x1d, 0x2, HDA_INPUT), | ||
1140 | HDA_CODEC_MUTE("Line In Mixer Capture Switch", 0x1d, 0x2, HDA_INPUT), | ||
1141 | |||
1142 | HDA_CODEC_VOLUME("CD Mixer Capture Volume", 0x1d, 0x4, HDA_INPUT), | ||
1143 | HDA_CODEC_MUTE("CD Mixer Capture Switch", 0x1d, 0x4, HDA_INPUT), | ||
1144 | |||
1145 | /* start of config #2 */ | ||
1146 | HDA_CODEC_VOLUME("Mic Mixer Capture Volume", 0x1d, 0x1, HDA_INPUT), | ||
1147 | HDA_CODEC_MUTE("Mic Mixer Capture Switch", 0x1d, 0x1, HDA_INPUT), | ||
1148 | |||
1149 | HDA_CODEC_VOLUME("DAC Mixer Capture Volume", 0x1d, 0x3, HDA_INPUT), | ||
1150 | HDA_CODEC_MUTE("DAC Mixer Capture Switch", 0x1d, 0x3, HDA_INPUT), | ||
1151 | |||
1152 | { } /* end */ | ||
1153 | }; | ||
1154 | |||
1155 | static struct snd_kcontrol_new stac92hd73xx_6ch_loopback[] = { | 1060 | static struct snd_kcontrol_new stac92hd73xx_6ch_loopback[] = { |
1156 | STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 3), | 1061 | STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 3), |
1157 | {} | 1062 | {} |
@@ -1167,42 +1072,6 @@ static struct snd_kcontrol_new stac92hd73xx_10ch_loopback[] = { | |||
1167 | {} | 1072 | {} |
1168 | }; | 1073 | }; |
1169 | 1074 | ||
1170 | static struct snd_kcontrol_new stac92hd73xx_8ch_mixer[] = { | ||
1171 | HDA_CODEC_VOLUME("Front Mic Mixer Capture Volume", 0x1d, 0, HDA_INPUT), | ||
1172 | HDA_CODEC_MUTE("Front Mic Mixer Capture Switch", 0x1d, 0, HDA_INPUT), | ||
1173 | |||
1174 | HDA_CODEC_VOLUME("Mic Mixer Capture Volume", 0x1d, 0x1, HDA_INPUT), | ||
1175 | HDA_CODEC_MUTE("Mic Mixer Capture Switch", 0x1d, 0x1, HDA_INPUT), | ||
1176 | |||
1177 | HDA_CODEC_VOLUME("Line In Mixer Capture Volume", 0x1d, 0x2, HDA_INPUT), | ||
1178 | HDA_CODEC_MUTE("Line In Mixer Capture Switch", 0x1d, 0x2, HDA_INPUT), | ||
1179 | |||
1180 | HDA_CODEC_VOLUME("DAC Mixer Capture Volume", 0x1d, 0x3, HDA_INPUT), | ||
1181 | HDA_CODEC_MUTE("DAC Mixer Capture Switch", 0x1d, 0x3, HDA_INPUT), | ||
1182 | |||
1183 | HDA_CODEC_VOLUME("CD Mixer Capture Volume", 0x1d, 0x4, HDA_INPUT), | ||
1184 | HDA_CODEC_MUTE("CD Mixer Capture Switch", 0x1d, 0x4, HDA_INPUT), | ||
1185 | { } /* end */ | ||
1186 | }; | ||
1187 | |||
1188 | static struct snd_kcontrol_new stac92hd73xx_10ch_mixer[] = { | ||
1189 | HDA_CODEC_VOLUME("Front Mic Mixer Capture Volume", 0x1d, 0, HDA_INPUT), | ||
1190 | HDA_CODEC_MUTE("Front Mic Mixer Capture Switch", 0x1d, 0, HDA_INPUT), | ||
1191 | |||
1192 | HDA_CODEC_VOLUME("Mic Mixer Capture Volume", 0x1d, 0x1, HDA_INPUT), | ||
1193 | HDA_CODEC_MUTE("Mic Mixer Capture Switch", 0x1d, 0x1, HDA_INPUT), | ||
1194 | |||
1195 | HDA_CODEC_VOLUME("Line In Mixer Capture Volume", 0x1d, 0x2, HDA_INPUT), | ||
1196 | HDA_CODEC_MUTE("Line In Mixer Capture Switch", 0x1d, 0x2, HDA_INPUT), | ||
1197 | |||
1198 | HDA_CODEC_VOLUME("DAC Mixer Capture Volume", 0x1d, 0x3, HDA_INPUT), | ||
1199 | HDA_CODEC_MUTE("DAC Mixer Capture Switch", 0x1d, 0x3, HDA_INPUT), | ||
1200 | |||
1201 | HDA_CODEC_VOLUME("CD Mixer Capture Volume", 0x1d, 0x4, HDA_INPUT), | ||
1202 | HDA_CODEC_MUTE("CD Mixer Capture Switch", 0x1d, 0x4, HDA_INPUT), | ||
1203 | { } /* end */ | ||
1204 | }; | ||
1205 | |||
1206 | 1075 | ||
1207 | static struct snd_kcontrol_new stac92hd71bxx_loopback[] = { | 1076 | static struct snd_kcontrol_new stac92hd71bxx_loopback[] = { |
1208 | STAC_ANALOG_LOOPBACK(0xFA0, 0x7A0, 2) | 1077 | STAC_ANALOG_LOOPBACK(0xFA0, 0x7A0, 2) |
@@ -5188,20 +5057,15 @@ again: | |||
5188 | "number of channels defaulting to DAC count\n"); | 5057 | "number of channels defaulting to DAC count\n"); |
5189 | num_dacs = STAC92HD73_DAC_COUNT; | 5058 | num_dacs = STAC92HD73_DAC_COUNT; |
5190 | } | 5059 | } |
5060 | spec->init = stac92hd73xx_core_init; | ||
5191 | switch (num_dacs) { | 5061 | switch (num_dacs) { |
5192 | case 0x3: /* 6 Channel */ | 5062 | case 0x3: /* 6 Channel */ |
5193 | spec->mixer = stac92hd73xx_6ch_mixer; | ||
5194 | spec->init = stac92hd73xx_6ch_core_init; | ||
5195 | spec->aloopback_ctl = stac92hd73xx_6ch_loopback; | 5063 | spec->aloopback_ctl = stac92hd73xx_6ch_loopback; |
5196 | break; | 5064 | break; |
5197 | case 0x4: /* 8 Channel */ | 5065 | case 0x4: /* 8 Channel */ |
5198 | spec->mixer = stac92hd73xx_8ch_mixer; | ||
5199 | spec->init = stac92hd73xx_8ch_core_init; | ||
5200 | spec->aloopback_ctl = stac92hd73xx_8ch_loopback; | 5066 | spec->aloopback_ctl = stac92hd73xx_8ch_loopback; |
5201 | break; | 5067 | break; |
5202 | case 0x5: /* 10 Channel */ | 5068 | case 0x5: /* 10 Channel */ |
5203 | spec->mixer = stac92hd73xx_10ch_mixer; | ||
5204 | spec->init = stac92hd73xx_10ch_core_init; | ||
5205 | spec->aloopback_ctl = stac92hd73xx_10ch_loopback; | 5069 | spec->aloopback_ctl = stac92hd73xx_10ch_loopback; |
5206 | break; | 5070 | break; |
5207 | } | 5071 | } |
@@ -5216,8 +5080,6 @@ again: | |||
5216 | spec->dmic_nids = stac92hd73xx_dmic_nids; | 5080 | spec->dmic_nids = stac92hd73xx_dmic_nids; |
5217 | spec->dmux_nids = stac92hd73xx_dmux_nids; | 5081 | spec->dmux_nids = stac92hd73xx_dmux_nids; |
5218 | spec->smux_nids = stac92hd73xx_smux_nids; | 5082 | spec->smux_nids = stac92hd73xx_smux_nids; |
5219 | spec->amp_nids = stac92hd73xx_amp_nids; | ||
5220 | spec->num_amps = ARRAY_SIZE(stac92hd73xx_amp_nids); | ||
5221 | 5083 | ||
5222 | spec->num_muxes = ARRAY_SIZE(stac92hd73xx_mux_nids); | 5084 | spec->num_muxes = ARRAY_SIZE(stac92hd73xx_mux_nids); |
5223 | spec->num_adcs = ARRAY_SIZE(stac92hd73xx_adc_nids); | 5085 | spec->num_adcs = ARRAY_SIZE(stac92hd73xx_adc_nids); |
@@ -5235,13 +5097,8 @@ again: | |||
5235 | case STAC_DELL_M6_DMIC: | 5097 | case STAC_DELL_M6_DMIC: |
5236 | case STAC_DELL_M6_BOTH: | 5098 | case STAC_DELL_M6_BOTH: |
5237 | spec->num_smuxes = 0; | 5099 | spec->num_smuxes = 0; |
5238 | spec->mixer = &stac92hd73xx_6ch_mixer[DELL_M6_MIXER]; | ||
5239 | spec->amp_nids = &stac92hd73xx_amp_nids[DELL_M6_AMP]; | ||
5240 | spec->eapd_switch = 0; | 5100 | spec->eapd_switch = 0; |
5241 | spec->num_amps = 1; | ||
5242 | 5101 | ||
5243 | if (spec->board_config != STAC_DELL_EQ) | ||
5244 | spec->init = dell_m6_core_init; | ||
5245 | switch (spec->board_config) { | 5102 | switch (spec->board_config) { |
5246 | case STAC_DELL_M6_AMIC: /* Analog Mics */ | 5103 | case STAC_DELL_M6_AMIC: /* Analog Mics */ |
5247 | snd_hda_codec_set_pincfg(codec, 0x0b, 0x90A70170); | 5104 | snd_hda_codec_set_pincfg(codec, 0x0b, 0x90A70170); |