aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt1
-rw-r--r--sound/pci/hda/alc260_quirks.c146
-rw-r--r--sound/pci/hda/patch_realtek.c7
3 files changed, 7 insertions, 147 deletions
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index fd09f050c808..5cc76090f5d6 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -30,7 +30,6 @@ ALC880
30ALC260 30ALC260
31====== 31======
32 fujitsu Fujitsu S7020 32 fujitsu Fujitsu S7020
33 acer Acer TravelMate
34 replacer Replacer 672V 33 replacer Replacer 672V
35 favorit100 Maxdata Favorit 100XS 34 favorit100 Maxdata Favorit 100XS
36 basic fixed pin assignment (old default model) 35 basic fixed pin assignment (old default model)
diff --git a/sound/pci/hda/alc260_quirks.c b/sound/pci/hda/alc260_quirks.c
index 79aaae8e0d9c..2f1594b3d4bd 100644
--- a/sound/pci/hda/alc260_quirks.c
+++ b/sound/pci/hda/alc260_quirks.c
@@ -8,7 +8,6 @@ enum {
8 ALC260_AUTO, 8 ALC260_AUTO,
9 ALC260_BASIC, 9 ALC260_BASIC,
10 ALC260_FUJITSU_S702X, 10 ALC260_FUJITSU_S702X,
11 ALC260_ACER,
12 ALC260_REPLACER_672V, 11 ALC260_REPLACER_672V,
13 ALC260_FAVORIT100, 12 ALC260_FAVORIT100,
14#ifdef CONFIG_SND_DEBUG 13#ifdef CONFIG_SND_DEBUG
@@ -181,48 +180,6 @@ static const struct snd_kcontrol_new alc260_fujitsu_mixer[] = {
181 { } /* end */ 180 { } /* end */
182}; 181};
183 182
184/* Mixer for Acer TravelMate(/Extensa/Aspire) notebooks. Note that current
185 * versions of the ALC260 don't act on requests to enable mic bias from NID
186 * 0x0f (used to drive the headphone jack in these laptops). The ALC260
187 * datasheet doesn't mention this restriction. At this stage it's not clear
188 * whether this behaviour is intentional or is a hardware bug in chip
189 * revisions available in early 2006. Therefore for now allow the
190 * "Headphone Jack Mode" control to span all choices, but if it turns out
191 * that the lack of mic bias for this NID is intentional we could change the
192 * mode from ALC_PIN_DIR_INOUT to ALC_PIN_DIR_INOUT_NOMICBIAS.
193 *
194 * In addition, Acer TravelMate(/Extensa/Aspire) notebooks in early 2006
195 * don't appear to make the mic bias available from the "line" jack, even
196 * though the NID used for this jack (0x14) can supply it. The theory is
197 * that perhaps Acer have included blocking capacitors between the ALC260
198 * and the output jack. If this turns out to be the case for all such
199 * models the "Line Jack Mode" mode could be changed from ALC_PIN_DIR_INOUT
200 * to ALC_PIN_DIR_INOUT_NOMICBIAS.
201 *
202 * The C20x Tablet series have a mono internal speaker which is controlled
203 * via the chip's Mono sum widget and pin complex, so include the necessary
204 * controls for such models. On models without a "mono speaker" the control
205 * won't do anything.
206 */
207static const struct snd_kcontrol_new alc260_acer_mixer[] = {
208 HDA_CODEC_VOLUME("Master Playback Volume", 0x08, 0x0, HDA_OUTPUT),
209 HDA_BIND_MUTE("Master Playback Switch", 0x08, 2, HDA_INPUT),
210 ALC_PIN_MODE("Headphone Jack Mode", 0x0f, ALC_PIN_DIR_INOUT),
211 HDA_CODEC_VOLUME_MONO("Speaker Playback Volume", 0x0a, 1, 0x0,
212 HDA_OUTPUT),
213 HDA_BIND_MUTE_MONO("Speaker Playback Switch", 0x0a, 1, 2,
214 HDA_INPUT),
215 HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT),
216 HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT),
217 HDA_CODEC_VOLUME("Mic Playback Volume", 0x07, 0x0, HDA_INPUT),
218 HDA_CODEC_MUTE("Mic Playback Switch", 0x07, 0x0, HDA_INPUT),
219 ALC_PIN_MODE("Mic Jack Mode", 0x12, ALC_PIN_DIR_IN),
220 HDA_CODEC_VOLUME("Line Playback Volume", 0x07, 0x02, HDA_INPUT),
221 HDA_CODEC_MUTE("Line Playback Switch", 0x07, 0x02, HDA_INPUT),
222 ALC_PIN_MODE("Line Jack Mode", 0x14, ALC_PIN_DIR_INOUT),
223 { } /* end */
224};
225
226/* Maxdata Favorit 100XS: one output and one input (0x12) jack 183/* Maxdata Favorit 100XS: one output and one input (0x12) jack
227 */ 184 */
228static const struct snd_kcontrol_new alc260_favorit100_mixer[] = { 185static const struct snd_kcontrol_new alc260_favorit100_mixer[] = {
@@ -401,94 +358,6 @@ static const struct hda_verb alc260_fujitsu_init_verbs[] = {
401 { } 358 { }
402}; 359};
403 360
404/* Initialisation sequence for ALC260 as configured in Acer TravelMate and
405 * similar laptops (adapted from Fujitsu init verbs).
406 */
407static const struct hda_verb alc260_acer_init_verbs[] = {
408 /* On TravelMate laptops, GPIO 0 enables the internal speaker and
409 * the headphone jack. Turn this on and rely on the standard mute
410 * methods whenever the user wants to turn these outputs off.
411 */
412 {0x01, AC_VERB_SET_GPIO_MASK, 0x01},
413 {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x01},
414 {0x01, AC_VERB_SET_GPIO_DATA, 0x01},
415 /* Internal speaker/Headphone jack is connected to Line-out pin */
416 {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
417 /* Internal microphone/Mic jack is connected to Mic1 pin */
418 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50},
419 /* Line In jack is connected to Line1 pin */
420 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
421 /* Some Acers (eg: C20x Tablets) use Mono pin for internal speaker */
422 {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
423 /* Ensure all other unused pins are disabled and muted. */
424 {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
425 {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
426 {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
427 {0x13, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
428 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
429 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
430 /* Disable digital (SPDIF) pins */
431 {0x03, AC_VERB_SET_DIGI_CONVERT_1, 0},
432 {0x06, AC_VERB_SET_DIGI_CONVERT_1, 0},
433
434 /* Ensure Mic1 and Line1 pin widgets take input from the OUT1 sum
435 * bus when acting as outputs.
436 */
437 {0x0b, AC_VERB_SET_CONNECT_SEL, 0},
438 {0x0d, AC_VERB_SET_CONNECT_SEL, 0},
439
440 /* Start with output sum widgets muted and their output gains at min */
441 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
442 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
443 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
444 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
445 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
446 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
447 {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
448 {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
449 {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
450
451 /* Unmute Line-out pin widget amp left and right
452 * (no equiv mixer ctrl)
453 */
454 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
455 /* Unmute mono pin widget amp output (no equiv mixer ctrl) */
456 {0x11, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
457 /* Unmute Mic1 and Line1 pin widget input buffers since they start as
458 * inputs. If the pin mode is changed by the user the pin mode control
459 * will take care of enabling the pin's input/output buffers as needed.
460 * Therefore there's no need to enable the input buffer at this
461 * stage.
462 */
463 {0x12, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
464 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
465
466 /* Mute capture amp left and right */
467 {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
468 /* Set ADC connection select to match default mixer setting - mic
469 * (on mic1 pin)
470 */
471 {0x04, AC_VERB_SET_CONNECT_SEL, 0x00},
472
473 /* Do similar with the second ADC: mute capture input amp and
474 * set ADC connection to mic to match ALSA's default state.
475 */
476 {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
477 {0x05, AC_VERB_SET_CONNECT_SEL, 0x00},
478
479 /* Mute all inputs to mixer widget (even unconnected ones) */
480 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, /* mic1 pin */
481 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, /* mic2 pin */
482 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, /* line1 pin */
483 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, /* line2 pin */
484 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, /* CD pin */
485 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(5)}, /* Beep-gen pin */
486 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(6)}, /* Line-out pin */
487 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(7)}, /* HP-pin pin */
488
489 { }
490};
491
492/* Initialisation sequence for Maxdata Favorit 100XS 361/* Initialisation sequence for Maxdata Favorit 100XS
493 * (adapted from Acer init verbs). 362 * (adapted from Acer init verbs).
494 */ 363 */
@@ -822,7 +691,6 @@ static const struct hda_verb alc260_test_init_verbs[] = {
822static const char * const alc260_models[ALC260_MODEL_LAST] = { 691static const char * const alc260_models[ALC260_MODEL_LAST] = {
823 [ALC260_BASIC] = "basic", 692 [ALC260_BASIC] = "basic",
824 [ALC260_FUJITSU_S702X] = "fujitsu", 693 [ALC260_FUJITSU_S702X] = "fujitsu",
825 [ALC260_ACER] = "acer",
826 [ALC260_REPLACER_672V] = "replacer", 694 [ALC260_REPLACER_672V] = "replacer",
827 [ALC260_FAVORIT100] = "favorit100", 695 [ALC260_FAVORIT100] = "favorit100",
828#ifdef CONFIG_SND_DEBUG 696#ifdef CONFIG_SND_DEBUG
@@ -832,8 +700,6 @@ static const char * const alc260_models[ALC260_MODEL_LAST] = {
832}; 700};
833 701
834static const struct snd_pci_quirk alc260_cfg_tbl[] = { 702static const struct snd_pci_quirk alc260_cfg_tbl[] = {
835 SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_ACER),
836 SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER),
837 SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FAVORIT100), 703 SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FAVORIT100),
838 SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_BASIC), 704 SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_BASIC),
839 SND_PCI_QUIRK(0x104d, 0x81cc, "Sony VAIO", ALC260_BASIC), 705 SND_PCI_QUIRK(0x104d, 0x81cc, "Sony VAIO", ALC260_BASIC),
@@ -869,18 +735,6 @@ static const struct alc_config_preset alc260_presets[] = {
869 .num_mux_defs = ARRAY_SIZE(alc260_fujitsu_capture_sources), 735 .num_mux_defs = ARRAY_SIZE(alc260_fujitsu_capture_sources),
870 .input_mux = alc260_fujitsu_capture_sources, 736 .input_mux = alc260_fujitsu_capture_sources,
871 }, 737 },
872 [ALC260_ACER] = {
873 .mixers = { alc260_acer_mixer },
874 .init_verbs = { alc260_acer_init_verbs },
875 .num_dacs = ARRAY_SIZE(alc260_dac_nids),
876 .dac_nids = alc260_dac_nids,
877 .num_adc_nids = ARRAY_SIZE(alc260_dual_adc_nids),
878 .adc_nids = alc260_dual_adc_nids,
879 .num_channel_mode = ARRAY_SIZE(alc260_modes),
880 .channel_mode = alc260_modes,
881 .num_mux_defs = ARRAY_SIZE(alc260_acer_capture_sources),
882 .input_mux = alc260_acer_capture_sources,
883 },
884 [ALC260_FAVORIT100] = { 738 [ALC260_FAVORIT100] = {
885 .mixers = { alc260_favorit100_mixer }, 739 .mixers = { alc260_favorit100_mixer },
886 .init_verbs = { alc260_favorit100_init_verbs }, 740 .init_verbs = { alc260_favorit100_init_verbs },
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index f5f371036234..95ef722e4075 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4210,6 +4210,7 @@ enum {
4210 ALC260_FIXUP_HP_DC5750, 4210 ALC260_FIXUP_HP_DC5750,
4211 ALC260_FIXUP_HP_PIN_0F, 4211 ALC260_FIXUP_HP_PIN_0F,
4212 ALC260_FIXUP_COEF, 4212 ALC260_FIXUP_COEF,
4213 ALC260_FIXUP_GPIO1,
4213}; 4214};
4214 4215
4215static const struct alc_fixup alc260_fixups[] = { 4216static const struct alc_fixup alc260_fixups[] = {
@@ -4237,10 +4238,16 @@ static const struct alc_fixup alc260_fixups[] = {
4237 .chained = true, 4238 .chained = true,
4238 .chain_id = ALC260_FIXUP_HP_PIN_0F, 4239 .chain_id = ALC260_FIXUP_HP_PIN_0F,
4239 }, 4240 },
4241 [ALC260_FIXUP_GPIO1] = {
4242 .type = ALC_FIXUP_VERBS,
4243 .v.verbs = alc_gpio1_init_verbs,
4244 },
4240}; 4245};
4241 4246
4242static const struct snd_pci_quirk alc260_fixup_tbl[] = { 4247static const struct snd_pci_quirk alc260_fixup_tbl[] = {
4248 SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_FIXUP_GPIO1),
4243 SND_PCI_QUIRK(0x1025, 0x007f, "Acer Aspire 9500", ALC260_FIXUP_COEF), 4249 SND_PCI_QUIRK(0x1025, 0x007f, "Acer Aspire 9500", ALC260_FIXUP_COEF),
4250 SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_FIXUP_GPIO1),
4244 SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750), 4251 SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750),
4245 SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_FIXUP_COEF), 4252 SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_FIXUP_COEF),
4246 {} 4253 {}