aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/patch_realtek.c21
-rw-r--r--sound/pci/hda/patch_sigmatel.c65
2 files changed, 51 insertions, 35 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 7ed47f66ddd1..129605819560 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -7927,8 +7927,9 @@ static struct snd_kcontrol_new alc883_fivestack_mixer[] = {
7927 7927
7928static struct snd_kcontrol_new alc883_targa_mixer[] = { 7928static struct snd_kcontrol_new alc883_targa_mixer[] = {
7929 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 7929 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
7930 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
7930 HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT), 7931 HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT),
7931 HDA_CODEC_MUTE("Front Playback Switch", 0x1b, 0x0, HDA_OUTPUT), 7932 HDA_CODEC_MUTE("Speaker Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
7932 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), 7933 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
7933 HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), 7934 HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT),
7934 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT), 7935 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT),
@@ -7947,8 +7948,9 @@ static struct snd_kcontrol_new alc883_targa_mixer[] = {
7947 7948
7948static struct snd_kcontrol_new alc883_targa_2ch_mixer[] = { 7949static struct snd_kcontrol_new alc883_targa_2ch_mixer[] = {
7949 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 7950 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
7951 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
7950 HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT), 7952 HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT),
7951 HDA_CODEC_MUTE("Front Playback Switch", 0x1b, 0x0, HDA_OUTPUT), 7953 HDA_CODEC_MUTE("Speaker Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
7952 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), 7954 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
7953 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), 7955 HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
7954 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), 7956 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
@@ -7960,6 +7962,15 @@ static struct snd_kcontrol_new alc883_targa_2ch_mixer[] = {
7960 { } /* end */ 7962 { } /* end */
7961}; 7963};
7962 7964
7965static struct snd_kcontrol_new alc883_targa_8ch_mixer[] = {
7966 HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
7967 HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT),
7968 HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
7969 HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT),
7970 HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
7971 { } /* end */
7972};
7973
7963static struct snd_kcontrol_new alc883_lenovo_101e_2ch_mixer[] = { 7974static struct snd_kcontrol_new alc883_lenovo_101e_2ch_mixer[] = {
7964 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 7975 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
7965 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), 7976 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
@@ -9167,7 +9178,8 @@ static struct alc_config_preset alc882_presets[] = {
9167 .init_hook = alc882_targa_automute, 9178 .init_hook = alc882_targa_automute,
9168 }, 9179 },
9169 [ALC883_TARGA_8ch_DIG] = { 9180 [ALC883_TARGA_8ch_DIG] = {
9170 .mixers = { alc883_base_mixer, alc883_chmode_mixer }, 9181 .mixers = { alc883_targa_mixer, alc883_targa_8ch_mixer,
9182 alc883_chmode_mixer },
9171 .init_verbs = { alc883_init_verbs, alc880_gpio3_init_verbs, 9183 .init_verbs = { alc883_init_verbs, alc880_gpio3_init_verbs,
9172 alc883_targa_verbs }, 9184 alc883_targa_verbs },
9173 .num_dacs = ARRAY_SIZE(alc883_dac_nids), 9185 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
@@ -13370,7 +13382,8 @@ static const char *alc269_models[ALC269_MODEL_LAST] = {
13370 [ALC269_ASUS_EEEPC_P703] = "eeepc-p703", 13382 [ALC269_ASUS_EEEPC_P703] = "eeepc-p703",
13371 [ALC269_ASUS_EEEPC_P901] = "eeepc-p901", 13383 [ALC269_ASUS_EEEPC_P901] = "eeepc-p901",
13372 [ALC269_FUJITSU] = "fujitsu", 13384 [ALC269_FUJITSU] = "fujitsu",
13373 [ALC269_LIFEBOOK] = "lifebook" 13385 [ALC269_LIFEBOOK] = "lifebook",
13386 [ALC269_AUTO] = "auto",
13374}; 13387};
13375 13388
13376static struct snd_pci_quirk alc269_cfg_tbl[] = { 13389static struct snd_pci_quirk alc269_cfg_tbl[] = {
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index e31e53dc6962..826137ec3002 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -864,10 +864,6 @@ static struct hda_verb stac92hd73xx_core_init[] = {
864}; 864};
865 865
866static struct hda_verb stac92hd83xxx_core_init[] = { 866static struct hda_verb stac92hd83xxx_core_init[] = {
867 { 0xa, AC_VERB_SET_CONNECT_SEL, 0x1},
868 { 0xb, AC_VERB_SET_CONNECT_SEL, 0x1},
869 { 0xd, AC_VERB_SET_CONNECT_SEL, 0x0},
870
871 /* power state controls amps */ 867 /* power state controls amps */
872 { 0x01, AC_VERB_SET_EAPD, 1 << 2}, 868 { 0x01, AC_VERB_SET_EAPD, 1 << 2},
873 {} 869 {}
@@ -1590,8 +1586,8 @@ static unsigned int ref92hd83xxx_pin_configs[10] = {
1590}; 1586};
1591 1587
1592static unsigned int dell_s14_pin_configs[10] = { 1588static unsigned int dell_s14_pin_configs[10] = {
1593 0x02214030, 0x02211010, 0x02a19020, 0x01014050, 1589 0x0221403f, 0x0221101f, 0x02a19020, 0x90170110,
1594 0x40f000f0, 0x01819040, 0x40f000f0, 0x90a60160, 1590 0x40f000f0, 0x40f000f0, 0x40f000f0, 0x90a60160,
1595 0x40f000f0, 0x40f000f0, 1591 0x40f000f0, 0x40f000f0,
1596}; 1592};
1597 1593
@@ -1690,6 +1686,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {
1690 "HP mini 1000", STAC_HP_M4), 1686 "HP mini 1000", STAC_HP_M4),
1691 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361b, 1687 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361b,
1692 "HP HDX", STAC_HP_HDX), /* HDX16 */ 1688 "HP HDX", STAC_HP_HDX), /* HDX16 */
1689 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3620,
1690 "HP dv6", STAC_HP_DV5),
1693 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x7010, 1691 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x7010,
1694 "HP", STAC_HP_DV5), 1692 "HP", STAC_HP_DV5),
1695 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233, 1693 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233,
@@ -4166,7 +4164,10 @@ static int stac92xx_init(struct hda_codec *codec)
4166 stac92xx_auto_set_pinctl(codec, spec->autocfg.line_out_pins[0], 4164 stac92xx_auto_set_pinctl(codec, spec->autocfg.line_out_pins[0],
4167 AC_PINCTL_OUT_EN); 4165 AC_PINCTL_OUT_EN);
4168 /* fake event to set up pins */ 4166 /* fake event to set up pins */
4169 stac_issue_unsol_event(codec, spec->autocfg.hp_pins[0]); 4167 if (cfg->hp_pins[0])
4168 stac_issue_unsol_event(codec, cfg->hp_pins[0]);
4169 else if (cfg->line_out_pins[0])
4170 stac_issue_unsol_event(codec, cfg->line_out_pins[0]);
4170 } else { 4171 } else {
4171 stac92xx_auto_init_multi_out(codec); 4172 stac92xx_auto_init_multi_out(codec);
4172 stac92xx_auto_init_hp_out(codec); 4173 stac92xx_auto_init_hp_out(codec);
@@ -4688,8 +4689,13 @@ static int stac92xx_resume(struct hda_codec *codec)
4688 snd_hda_codec_resume_amp(codec); 4689 snd_hda_codec_resume_amp(codec);
4689 snd_hda_codec_resume_cache(codec); 4690 snd_hda_codec_resume_cache(codec);
4690 /* fake event to set up pins again to override cached values */ 4691 /* fake event to set up pins again to override cached values */
4691 if (spec->hp_detect) 4692 if (spec->hp_detect) {
4692 stac_issue_unsol_event(codec, spec->autocfg.hp_pins[0]); 4693 if (spec->autocfg.hp_pins[0])
4694 stac_issue_unsol_event(codec, spec->autocfg.hp_pins[0]);
4695 else if (spec->autocfg.line_out_pins[0])
4696 stac_issue_unsol_event(codec,
4697 spec->autocfg.line_out_pins[0]);
4698 }
4693 return 0; 4699 return 0;
4694} 4700}
4695 4701
@@ -5016,7 +5022,7 @@ again:
5016 spec->eapd_switch = 1; 5022 spec->eapd_switch = 1;
5017 break; 5023 break;
5018 } 5024 }
5019 if (spec->board_config > STAC_92HD73XX_REF) { 5025 if (spec->board_config != STAC_92HD73XX_REF) {
5020 /* GPIO0 High = Enable EAPD */ 5026 /* GPIO0 High = Enable EAPD */
5021 spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1; 5027 spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1;
5022 spec->gpio_data = 0x01; 5028 spec->gpio_data = 0x01;
@@ -5066,7 +5072,6 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
5066 5072
5067 codec->spec = spec; 5073 codec->spec = spec;
5068 codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs; 5074 codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs;
5069 spec->mono_nid = 0x19;
5070 spec->digbeep_nid = 0x21; 5075 spec->digbeep_nid = 0x21;
5071 spec->mux_nids = stac92hd83xxx_mux_nids; 5076 spec->mux_nids = stac92hd83xxx_mux_nids;
5072 spec->num_muxes = ARRAY_SIZE(stac92hd83xxx_mux_nids); 5077 spec->num_muxes = ARRAY_SIZE(stac92hd83xxx_mux_nids);
@@ -5242,7 +5247,7 @@ again:
5242 stac92xx_set_config_regs(codec, 5247 stac92xx_set_config_regs(codec,
5243 stac92hd71bxx_brd_tbl[spec->board_config]); 5248 stac92hd71bxx_brd_tbl[spec->board_config]);
5244 5249
5245 if (spec->board_config > STAC_92HD71BXX_REF) { 5250 if (spec->board_config != STAC_92HD71BXX_REF) {
5246 /* GPIO0 = EAPD */ 5251 /* GPIO0 = EAPD */
5247 spec->gpio_mask = 0x01; 5252 spec->gpio_mask = 0x01;
5248 spec->gpio_dir = 0x01; 5253 spec->gpio_dir = 0x01;
@@ -5375,6 +5380,11 @@ again:
5375 case STAC_HP_DV5: 5380 case STAC_HP_DV5:
5376 snd_hda_codec_set_pincfg(codec, 0x0d, 0x90170010); 5381 snd_hda_codec_set_pincfg(codec, 0x0d, 0x90170010);
5377 stac92xx_auto_set_pinctl(codec, 0x0d, AC_PINCTL_OUT_EN); 5382 stac92xx_auto_set_pinctl(codec, 0x0d, AC_PINCTL_OUT_EN);
5383 /* HP dv6 gives the headphone pin as a line-out. Thus we
5384 * need to set hp_detect flag here to force to enable HP
5385 * detection.
5386 */
5387 spec->hp_detect = 1;
5378 break; 5388 break;
5379 case STAC_HP_HDX: 5389 case STAC_HP_HDX:
5380 spec->num_dmics = 1; 5390 spec->num_dmics = 1;
@@ -5557,14 +5567,17 @@ static int patch_stac927x(struct hda_codec *codec)
5557 spec->dac_list = stac927x_dac_nids; 5567 spec->dac_list = stac927x_dac_nids;
5558 spec->multiout.dac_nids = spec->dac_nids; 5568 spec->multiout.dac_nids = spec->dac_nids;
5559 5569
5570 if (spec->board_config != STAC_D965_REF) {
5571 /* GPIO0 High = Enable EAPD */
5572 spec->eapd_mask = spec->gpio_mask = 0x01;
5573 spec->gpio_dir = spec->gpio_data = 0x01;
5574 }
5575
5560 switch (spec->board_config) { 5576 switch (spec->board_config) {
5561 case STAC_D965_3ST: 5577 case STAC_D965_3ST:
5562 case STAC_D965_5ST: 5578 case STAC_D965_5ST:
5563 /* GPIO0 High = Enable EAPD */ 5579 /* GPIO0 High = Enable EAPD */
5564 spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x01;
5565 spec->gpio_data = 0x01;
5566 spec->num_dmics = 0; 5580 spec->num_dmics = 0;
5567
5568 spec->init = d965_core_init; 5581 spec->init = d965_core_init;
5569 break; 5582 break;
5570 case STAC_DELL_BIOS: 5583 case STAC_DELL_BIOS:
@@ -5583,16 +5596,11 @@ static int patch_stac927x(struct hda_codec *codec)
5583 snd_hda_codec_set_pincfg(codec, 0x0e, 0x02a79130); 5596 snd_hda_codec_set_pincfg(codec, 0x0e, 0x02a79130);
5584 /* fallthru */ 5597 /* fallthru */
5585 case STAC_DELL_3ST: 5598 case STAC_DELL_3ST:
5586 /* GPIO2 High = Enable EAPD */ 5599 if (codec->subsystem_id != 0x1028022f) {
5587 spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x04; 5600 /* GPIO2 High = Enable EAPD */
5588 spec->gpio_data = 0x04; 5601 spec->eapd_mask = spec->gpio_mask = 0x04;
5589 switch (codec->subsystem_id) { 5602 spec->gpio_dir = spec->gpio_data = 0x04;
5590 case 0x1028022f: 5603 }
5591 /* correct EAPD to be GPIO0 */
5592 spec->eapd_mask = spec->gpio_mask = 0x01;
5593 spec->gpio_dir = spec->gpio_data = 0x01;
5594 break;
5595 };
5596 spec->dmic_nids = stac927x_dmic_nids; 5604 spec->dmic_nids = stac927x_dmic_nids;
5597 spec->num_dmics = STAC927X_NUM_DMICS; 5605 spec->num_dmics = STAC927X_NUM_DMICS;
5598 5606
@@ -5601,14 +5609,9 @@ static int patch_stac927x(struct hda_codec *codec)
5601 spec->num_dmuxes = ARRAY_SIZE(stac927x_dmux_nids); 5609 spec->num_dmuxes = ARRAY_SIZE(stac927x_dmux_nids);
5602 break; 5610 break;
5603 default: 5611 default:
5604 if (spec->board_config > STAC_D965_REF) {
5605 /* GPIO0 High = Enable EAPD */
5606 spec->eapd_mask = spec->gpio_mask = 0x01;
5607 spec->gpio_dir = spec->gpio_data = 0x01;
5608 }
5609 spec->num_dmics = 0; 5612 spec->num_dmics = 0;
5610
5611 spec->init = stac927x_core_init; 5613 spec->init = stac927x_core_init;
5614 break;
5612 } 5615 }
5613 5616
5614 spec->num_caps = STAC927X_NUM_CAPS; 5617 spec->num_caps = STAC927X_NUM_CAPS;