77enum {
88 ALC260_AUTO ,
99 ALC260_BASIC ,
10- ALC260_HP ,
11- ALC260_HP_DC7600 ,
12- ALC260_HP_3013 ,
1310 ALC260_FUJITSU_S702X ,
1411 ALC260_ACER ,
1512 ALC260_WILL ,
@@ -142,8 +139,6 @@ static const struct hda_channel_mode alc260_modes[1] = {
142139/* Mixer combinations
143140 *
144141 * basic: base_output + input + pc_beep + capture
145- * HP: base_output + input + capture_alt
146- * HP_3013: hp_3013 + input + capture
147142 * fujitsu: fujitsu + capture
148143 * acer: acer + capture
149144 */
@@ -170,145 +165,6 @@ static const struct snd_kcontrol_new alc260_input_mixer[] = {
170165 { } /* end */
171166};
172167
173- /* update HP, line and mono out pins according to the master switch */
174- static void alc260_hp_master_update (struct hda_codec * codec )
175- {
176- update_speakers (codec );
177- }
178-
179- static int alc260_hp_master_sw_get (struct snd_kcontrol * kcontrol ,
180- struct snd_ctl_elem_value * ucontrol )
181- {
182- struct hda_codec * codec = snd_kcontrol_chip (kcontrol );
183- struct alc_spec * spec = codec -> spec ;
184- * ucontrol -> value .integer .value = !spec -> master_mute ;
185- return 0 ;
186- }
187-
188- static int alc260_hp_master_sw_put (struct snd_kcontrol * kcontrol ,
189- struct snd_ctl_elem_value * ucontrol )
190- {
191- struct hda_codec * codec = snd_kcontrol_chip (kcontrol );
192- struct alc_spec * spec = codec -> spec ;
193- int val = !* ucontrol -> value .integer .value ;
194-
195- if (val == spec -> master_mute )
196- return 0 ;
197- spec -> master_mute = val ;
198- alc260_hp_master_update (codec );
199- return 1 ;
200- }
201-
202- static const struct snd_kcontrol_new alc260_hp_output_mixer [] = {
203- {
204- .iface = SNDRV_CTL_ELEM_IFACE_MIXER ,
205- .name = "Master Playback Switch" ,
206- .subdevice = HDA_SUBDEV_NID_FLAG | 0x11 ,
207- .info = snd_ctl_boolean_mono_info ,
208- .get = alc260_hp_master_sw_get ,
209- .put = alc260_hp_master_sw_put ,
210- },
211- HDA_CODEC_VOLUME ("Front Playback Volume" , 0x08 , 0x0 , HDA_OUTPUT ),
212- HDA_BIND_MUTE ("Front Playback Switch" , 0x08 , 2 , HDA_INPUT ),
213- HDA_CODEC_VOLUME ("Headphone Playback Volume" , 0x09 , 0x0 , HDA_OUTPUT ),
214- HDA_BIND_MUTE ("Headphone Playback Switch" , 0x09 , 2 , HDA_INPUT ),
215- HDA_CODEC_VOLUME_MONO ("Speaker Playback Volume" , 0x0a , 1 , 0x0 ,
216- HDA_OUTPUT ),
217- HDA_BIND_MUTE_MONO ("Speaker Playback Switch" , 0x0a , 1 , 2 , HDA_INPUT ),
218- { } /* end */
219- };
220-
221- static const struct hda_verb alc260_hp_unsol_verbs [] = {
222- {0x10 , AC_VERB_SET_UNSOLICITED_ENABLE , AC_USRSP_EN | ALC_HP_EVENT },
223- {},
224- };
225-
226- static void alc260_hp_setup (struct hda_codec * codec )
227- {
228- struct alc_spec * spec = codec -> spec ;
229-
230- spec -> autocfg .hp_pins [0 ] = 0x0f ;
231- spec -> autocfg .speaker_pins [0 ] = 0x10 ;
232- spec -> autocfg .speaker_pins [1 ] = 0x11 ;
233- spec -> automute = 1 ;
234- spec -> automute_mode = ALC_AUTOMUTE_PIN ;
235- }
236-
237- static const struct snd_kcontrol_new alc260_hp_3013_mixer [] = {
238- {
239- .iface = SNDRV_CTL_ELEM_IFACE_MIXER ,
240- .name = "Master Playback Switch" ,
241- .subdevice = HDA_SUBDEV_NID_FLAG | 0x11 ,
242- .info = snd_ctl_boolean_mono_info ,
243- .get = alc260_hp_master_sw_get ,
244- .put = alc260_hp_master_sw_put ,
245- },
246- HDA_CODEC_VOLUME ("Front Playback Volume" , 0x09 , 0x0 , HDA_OUTPUT ),
247- HDA_CODEC_MUTE ("Front Playback Switch" , 0x10 , 0x0 , HDA_OUTPUT ),
248- HDA_CODEC_VOLUME ("Aux-In Playback Volume" , 0x07 , 0x06 , HDA_INPUT ),
249- HDA_CODEC_MUTE ("Aux-In Playback Switch" , 0x07 , 0x06 , HDA_INPUT ),
250- HDA_CODEC_VOLUME ("Headphone Playback Volume" , 0x08 , 0x0 , HDA_OUTPUT ),
251- HDA_CODEC_MUTE ("Headphone Playback Switch" , 0x15 , 0x0 , HDA_OUTPUT ),
252- HDA_CODEC_VOLUME_MONO ("Speaker Playback Volume" , 0x0a , 1 , 0x0 , HDA_OUTPUT ),
253- HDA_CODEC_MUTE_MONO ("Speaker Playback Switch" , 0x11 , 1 , 0x0 , HDA_OUTPUT ),
254- { } /* end */
255- };
256-
257- static void alc260_hp_3013_setup (struct hda_codec * codec )
258- {
259- struct alc_spec * spec = codec -> spec ;
260-
261- spec -> autocfg .hp_pins [0 ] = 0x15 ;
262- spec -> autocfg .speaker_pins [0 ] = 0x10 ;
263- spec -> autocfg .speaker_pins [1 ] = 0x11 ;
264- spec -> automute = 1 ;
265- spec -> automute_mode = ALC_AUTOMUTE_PIN ;
266- }
267-
268- static const struct hda_bind_ctls alc260_dc7600_bind_master_vol = {
269- .ops = & snd_hda_bind_vol ,
270- .values = {
271- HDA_COMPOSE_AMP_VAL (0x08 , 3 , 0 , HDA_OUTPUT ),
272- HDA_COMPOSE_AMP_VAL (0x09 , 3 , 0 , HDA_OUTPUT ),
273- HDA_COMPOSE_AMP_VAL (0x0a , 3 , 0 , HDA_OUTPUT ),
274- 0
275- },
276- };
277-
278- static const struct hda_bind_ctls alc260_dc7600_bind_switch = {
279- .ops = & snd_hda_bind_sw ,
280- .values = {
281- HDA_COMPOSE_AMP_VAL (0x11 , 3 , 0 , HDA_OUTPUT ),
282- HDA_COMPOSE_AMP_VAL (0x15 , 3 , 0 , HDA_OUTPUT ),
283- 0
284- },
285- };
286-
287- static const struct snd_kcontrol_new alc260_hp_dc7600_mixer [] = {
288- HDA_BIND_VOL ("Master Playback Volume" , & alc260_dc7600_bind_master_vol ),
289- HDA_BIND_SW ("LineOut Playback Switch" , & alc260_dc7600_bind_switch ),
290- HDA_CODEC_MUTE ("Speaker Playback Switch" , 0x0f , 0x0 , HDA_OUTPUT ),
291- HDA_CODEC_MUTE ("Headphone Playback Switch" , 0x10 , 0x0 , HDA_OUTPUT ),
292- { } /* end */
293- };
294-
295- static const struct hda_verb alc260_hp_3013_unsol_verbs [] = {
296- {0x15 , AC_VERB_SET_UNSOLICITED_ENABLE , AC_USRSP_EN | ALC_HP_EVENT },
297- {},
298- };
299-
300- static void alc260_hp_3012_setup (struct hda_codec * codec )
301- {
302- struct alc_spec * spec = codec -> spec ;
303-
304- spec -> autocfg .hp_pins [0 ] = 0x10 ;
305- spec -> autocfg .speaker_pins [0 ] = 0x0f ;
306- spec -> autocfg .speaker_pins [1 ] = 0x11 ;
307- spec -> autocfg .speaker_pins [2 ] = 0x15 ;
308- spec -> automute = 1 ;
309- spec -> automute_mode = ALC_AUTOMUTE_PIN ;
310- }
311-
312168/* Fujitsu S702x series laptops. ALC260 pin usage: Mic/Line jack = 0x12,
313169 * HP jack = 0x14, CD audio = 0x16, internal speaker = 0x10.
314170 */
@@ -480,106 +336,6 @@ static const struct hda_verb alc260_init_verbs[] = {
480336 { }
481337};
482338
483- #if 0 /* should be identical with alc260_init_verbs? */
484- static const struct hda_verb alc260_hp_init_verbs [] = {
485- /* Headphone and output */
486- {0x10 , AC_VERB_SET_PIN_WIDGET_CONTROL , 0xc0 },
487- /* mono output */
488- {0x11 , AC_VERB_SET_PIN_WIDGET_CONTROL , 0x40 },
489- /* Mic1 (rear panel) pin widget for input and vref at 80% */
490- {0x12 , AC_VERB_SET_PIN_WIDGET_CONTROL , 0x24 },
491- /* Mic2 (front panel) pin widget for input and vref at 80% */
492- {0x13 , AC_VERB_SET_PIN_WIDGET_CONTROL , 0x24 },
493- /* Line In pin widget for input */
494- {0x14 , AC_VERB_SET_PIN_WIDGET_CONTROL , 0x20 },
495- /* Line-2 pin widget for output */
496- {0x15 , AC_VERB_SET_PIN_WIDGET_CONTROL , 0x40 },
497- /* CD pin widget for input */
498- {0x16 , AC_VERB_SET_PIN_WIDGET_CONTROL , 0x20 },
499- /* unmute amp left and right */
500- {0x04 , AC_VERB_SET_AMP_GAIN_MUTE , 0x7000 },
501- /* set connection select to line in (default select for this ADC) */
502- {0x04 , AC_VERB_SET_CONNECT_SEL , 0x02 },
503- /* unmute Line-Out mixer amp left and right (volume = 0) */
504- {0x08 , AC_VERB_SET_AMP_GAIN_MUTE , 0xb000 },
505- /* mute pin widget amp left and right (no gain on this amp) */
506- {0x15 , AC_VERB_SET_AMP_GAIN_MUTE , 0x0000 },
507- /* unmute HP mixer amp left and right (volume = 0) */
508- {0x09 , AC_VERB_SET_AMP_GAIN_MUTE , 0xb000 },
509- /* mute pin widget amp left and right (no gain on this amp) */
510- {0x10 , AC_VERB_SET_AMP_GAIN_MUTE , 0x0000 },
511- /* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 &
512- * Line In 2 = 0x03
513- */
514- /* mute analog inputs */
515- {0x07 , AC_VERB_SET_AMP_GAIN_MUTE , AMP_IN_MUTE (0 )},
516- {0x07 , AC_VERB_SET_AMP_GAIN_MUTE , AMP_IN_MUTE (1 )},
517- {0x07 , AC_VERB_SET_AMP_GAIN_MUTE , AMP_IN_MUTE (2 )},
518- {0x07 , AC_VERB_SET_AMP_GAIN_MUTE , AMP_IN_MUTE (3 )},
519- {0x07 , AC_VERB_SET_AMP_GAIN_MUTE , AMP_IN_MUTE (4 )},
520- /* Amp Indexes: DAC = 0x01 & mixer = 0x00 */
521- /* Unmute Front out path */
522- {0x08 , AC_VERB_SET_AMP_GAIN_MUTE , (0x7000 | (0x00 << 8 ))},
523- {0x08 , AC_VERB_SET_AMP_GAIN_MUTE , (0x7000 | (0x01 << 8 ))},
524- /* Unmute Headphone out path */
525- {0x09 , AC_VERB_SET_AMP_GAIN_MUTE , (0x7000 | (0x00 << 8 ))},
526- {0x09 , AC_VERB_SET_AMP_GAIN_MUTE , (0x7000 | (0x01 << 8 ))},
527- /* Unmute Mono out path */
528- {0x0a , AC_VERB_SET_AMP_GAIN_MUTE , (0x7000 | (0x00 << 8 ))},
529- {0x0a , AC_VERB_SET_AMP_GAIN_MUTE , (0x7000 | (0x01 << 8 ))},
530- { }
531- };
532- #endif
533-
534- static const struct hda_verb alc260_hp_3013_init_verbs [] = {
535- /* Line out and output */
536- {0x10 , AC_VERB_SET_PIN_WIDGET_CONTROL , 0x40 },
537- /* mono output */
538- {0x11 , AC_VERB_SET_PIN_WIDGET_CONTROL , 0x40 },
539- /* Mic1 (rear panel) pin widget for input and vref at 80% */
540- {0x12 , AC_VERB_SET_PIN_WIDGET_CONTROL , 0x24 },
541- /* Mic2 (front panel) pin widget for input and vref at 80% */
542- {0x13 , AC_VERB_SET_PIN_WIDGET_CONTROL , 0x24 },
543- /* Line In pin widget for input */
544- {0x14 , AC_VERB_SET_PIN_WIDGET_CONTROL , 0x20 },
545- /* Headphone pin widget for output */
546- {0x15 , AC_VERB_SET_PIN_WIDGET_CONTROL , 0xc0 },
547- /* CD pin widget for input */
548- {0x16 , AC_VERB_SET_PIN_WIDGET_CONTROL , 0x20 },
549- /* unmute amp left and right */
550- {0x04 , AC_VERB_SET_AMP_GAIN_MUTE , 0x7000 },
551- /* set connection select to line in (default select for this ADC) */
552- {0x04 , AC_VERB_SET_CONNECT_SEL , 0x02 },
553- /* unmute Line-Out mixer amp left and right (volume = 0) */
554- {0x08 , AC_VERB_SET_AMP_GAIN_MUTE , 0xb000 },
555- /* mute pin widget amp left and right (no gain on this amp) */
556- {0x15 , AC_VERB_SET_AMP_GAIN_MUTE , 0x0000 },
557- /* unmute HP mixer amp left and right (volume = 0) */
558- {0x09 , AC_VERB_SET_AMP_GAIN_MUTE , 0xb000 },
559- /* mute pin widget amp left and right (no gain on this amp) */
560- {0x10 , AC_VERB_SET_AMP_GAIN_MUTE , 0x0000 },
561- /* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 &
562- * Line In 2 = 0x03
563- */
564- /* mute analog inputs */
565- {0x07 , AC_VERB_SET_AMP_GAIN_MUTE , AMP_IN_MUTE (0 )},
566- {0x07 , AC_VERB_SET_AMP_GAIN_MUTE , AMP_IN_MUTE (1 )},
567- {0x07 , AC_VERB_SET_AMP_GAIN_MUTE , AMP_IN_MUTE (2 )},
568- {0x07 , AC_VERB_SET_AMP_GAIN_MUTE , AMP_IN_MUTE (3 )},
569- {0x07 , AC_VERB_SET_AMP_GAIN_MUTE , AMP_IN_MUTE (4 )},
570- /* Amp Indexes: DAC = 0x01 & mixer = 0x00 */
571- /* Unmute Front out path */
572- {0x08 , AC_VERB_SET_AMP_GAIN_MUTE , (0x7000 | (0x00 << 8 ))},
573- {0x08 , AC_VERB_SET_AMP_GAIN_MUTE , (0x7000 | (0x01 << 8 ))},
574- /* Unmute Headphone out path */
575- {0x09 , AC_VERB_SET_AMP_GAIN_MUTE , (0x7000 | (0x00 << 8 ))},
576- {0x09 , AC_VERB_SET_AMP_GAIN_MUTE , (0x7000 | (0x01 << 8 ))},
577- /* Unmute Mono out path */
578- {0x0a , AC_VERB_SET_AMP_GAIN_MUTE , (0x7000 | (0x00 << 8 ))},
579- {0x0a , AC_VERB_SET_AMP_GAIN_MUTE , (0x7000 | (0x01 << 8 ))},
580- { }
581- };
582-
583339/* Initialisation sequence for ALC260 as configured in Fujitsu S702x
584340 * laptops. ALC260 pin usage: Mic/Line jack = 0x12, HP jack = 0x14, CD
585341 * audio = 0x16, internal speaker = 0x10.
@@ -1093,9 +849,6 @@ static const struct hda_verb alc260_test_init_verbs[] = {
1093849 */
1094850static const char * const alc260_models [ALC260_MODEL_LAST ] = {
1095851 [ALC260_BASIC ] = "basic" ,
1096- [ALC260_HP ] = "hp" ,
1097- [ALC260_HP_3013 ] = "hp-3013" ,
1098- [ALC260_HP_DC7600 ] = "hp-dc7600" ,
1099852 [ALC260_FUJITSU_S702X ] = "fujitsu" ,
1100853 [ALC260_ACER ] = "acer" ,
1101854 [ALC260_WILL ] = "will" ,
@@ -1112,15 +865,6 @@ static const struct snd_pci_quirk alc260_cfg_tbl[] = {
1112865 SND_PCI_QUIRK (0x1025 , 0x007f , "Acer" , ALC260_WILL ),
1113866 SND_PCI_QUIRK (0x1025 , 0x008f , "Acer" , ALC260_ACER ),
1114867 SND_PCI_QUIRK (0x1509 , 0x4540 , "Favorit 100XS" , ALC260_FAVORIT100 ),
1115- SND_PCI_QUIRK (0x103c , 0x2808 , "HP d5700" , ALC260_HP_3013 ),
1116- SND_PCI_QUIRK (0x103c , 0x280a , "HP d5750" , ALC260_AUTO ), /* no quirk */
1117- SND_PCI_QUIRK (0x103c , 0x3010 , "HP" , ALC260_HP_3013 ),
1118- SND_PCI_QUIRK (0x103c , 0x3011 , "HP" , ALC260_HP_3013 ),
1119- SND_PCI_QUIRK (0x103c , 0x3012 , "HP" , ALC260_HP_DC7600 ),
1120- SND_PCI_QUIRK (0x103c , 0x3013 , "HP" , ALC260_HP_3013 ),
1121- SND_PCI_QUIRK (0x103c , 0x3014 , "HP" , ALC260_HP ),
1122- SND_PCI_QUIRK (0x103c , 0x3015 , "HP" , ALC260_HP ),
1123- SND_PCI_QUIRK (0x103c , 0x3016 , "HP" , ALC260_HP ),
1124868 SND_PCI_QUIRK (0x104d , 0x81bb , "Sony VAIO" , ALC260_BASIC ),
1125869 SND_PCI_QUIRK (0x104d , 0x81cc , "Sony VAIO" , ALC260_BASIC ),
1126870 SND_PCI_QUIRK (0x104d , 0x81cd , "Sony VAIO" , ALC260_BASIC ),
@@ -1144,54 +888,6 @@ static const struct alc_config_preset alc260_presets[] = {
1144888 .channel_mode = alc260_modes ,
1145889 .input_mux = & alc260_capture_source ,
1146890 },
1147- [ALC260_HP ] = {
1148- .mixers = { alc260_hp_output_mixer ,
1149- alc260_input_mixer },
1150- .init_verbs = { alc260_init_verbs ,
1151- alc260_hp_unsol_verbs },
1152- .num_dacs = ARRAY_SIZE (alc260_dac_nids ),
1153- .dac_nids = alc260_dac_nids ,
1154- .num_adc_nids = ARRAY_SIZE (alc260_adc_nids_alt ),
1155- .adc_nids = alc260_adc_nids_alt ,
1156- .num_channel_mode = ARRAY_SIZE (alc260_modes ),
1157- .channel_mode = alc260_modes ,
1158- .input_mux = & alc260_capture_source ,
1159- .unsol_event = alc_sku_unsol_event ,
1160- .setup = alc260_hp_setup ,
1161- .init_hook = alc_inithook ,
1162- },
1163- [ALC260_HP_DC7600 ] = {
1164- .mixers = { alc260_hp_dc7600_mixer ,
1165- alc260_input_mixer },
1166- .init_verbs = { alc260_init_verbs ,
1167- alc260_hp_dc7600_verbs },
1168- .num_dacs = ARRAY_SIZE (alc260_dac_nids ),
1169- .dac_nids = alc260_dac_nids ,
1170- .num_adc_nids = ARRAY_SIZE (alc260_adc_nids_alt ),
1171- .adc_nids = alc260_adc_nids_alt ,
1172- .num_channel_mode = ARRAY_SIZE (alc260_modes ),
1173- .channel_mode = alc260_modes ,
1174- .input_mux = & alc260_capture_source ,
1175- .unsol_event = alc_sku_unsol_event ,
1176- .setup = alc260_hp_3012_setup ,
1177- .init_hook = alc_inithook ,
1178- },
1179- [ALC260_HP_3013 ] = {
1180- .mixers = { alc260_hp_3013_mixer ,
1181- alc260_input_mixer },
1182- .init_verbs = { alc260_hp_3013_init_verbs ,
1183- alc260_hp_3013_unsol_verbs },
1184- .num_dacs = ARRAY_SIZE (alc260_dac_nids ),
1185- .dac_nids = alc260_dac_nids ,
1186- .num_adc_nids = ARRAY_SIZE (alc260_adc_nids_alt ),
1187- .adc_nids = alc260_adc_nids_alt ,
1188- .num_channel_mode = ARRAY_SIZE (alc260_modes ),
1189- .channel_mode = alc260_modes ,
1190- .input_mux = & alc260_capture_source ,
1191- .unsol_event = alc_sku_unsol_event ,
1192- .setup = alc260_hp_3013_setup ,
1193- .init_hook = alc_inithook ,
1194- },
1195891 [ALC260_FUJITSU_S702X ] = {
1196892 .mixers = { alc260_fujitsu_mixer },
1197893 .init_verbs = { alc260_fujitsu_init_verbs },
0 commit comments