aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c65
1 files changed, 34 insertions, 31 deletions
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;