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.c44
1 files changed, 20 insertions, 24 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 4e715fefebef..470f6f286e81 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -95,6 +95,7 @@ enum {
95 STAC_92HD83XXX_REF, 95 STAC_92HD83XXX_REF,
96 STAC_92HD83XXX_PWR_REF, 96 STAC_92HD83XXX_PWR_REF,
97 STAC_DELL_S14, 97 STAC_DELL_S14,
98 STAC_DELL_VOSTRO_3500,
98 STAC_92HD83XXX_HP, 99 STAC_92HD83XXX_HP,
99 STAC_92HD83XXX_HP_cNB11_INTQUAD, 100 STAC_92HD83XXX_HP_cNB11_INTQUAD,
100 STAC_HP_DV7_4000, 101 STAC_HP_DV7_4000,
@@ -226,7 +227,6 @@ struct sigmatel_spec {
226 227
227 /* power management */ 228 /* power management */
228 unsigned int num_pwrs; 229 unsigned int num_pwrs;
229 const unsigned int *pwr_mapping;
230 const hda_nid_t *pwr_nids; 230 const hda_nid_t *pwr_nids;
231 const hda_nid_t *dac_list; 231 const hda_nid_t *dac_list;
232 232
@@ -373,18 +373,15 @@ static const unsigned long stac92hd73xx_capvols[] = {
373 373
374#define STAC92HD83_DAC_COUNT 3 374#define STAC92HD83_DAC_COUNT 3
375 375
376static const hda_nid_t stac92hd83xxx_pwr_nids[4] = { 376static const hda_nid_t stac92hd83xxx_pwr_nids[7] = {
377 0xa, 0xb, 0xd, 0xe, 377 0x0a, 0x0b, 0x0c, 0xd, 0x0e,
378 0x0f, 0x10
378}; 379};
379 380
380static const hda_nid_t stac92hd83xxx_slave_dig_outs[2] = { 381static const hda_nid_t stac92hd83xxx_slave_dig_outs[2] = {
381 0x1e, 0, 382 0x1e, 0,
382}; 383};
383 384
384static const unsigned int stac92hd83xxx_pwr_mapping[4] = {
385 0x03, 0x0c, 0x20, 0x40,
386};
387
388static const hda_nid_t stac92hd83xxx_dmic_nids[] = { 385static const hda_nid_t stac92hd83xxx_dmic_nids[] = {
389 0x11, 0x20, 386 0x11, 0x20,
390}; 387};
@@ -1659,6 +1656,12 @@ static const unsigned int dell_s14_pin_configs[10] = {
1659 0x40f000f0, 0x40f000f0, 1656 0x40f000f0, 0x40f000f0,
1660}; 1657};
1661 1658
1659static const unsigned int dell_vostro_3500_pin_configs[10] = {
1660 0x02a11020, 0x0221101f, 0x400000f0, 0x90170110,
1661 0x400000f1, 0x400000f2, 0x400000f3, 0x90a60160,
1662 0x400000f4, 0x400000f5,
1663};
1664
1662static const unsigned int hp_dv7_4000_pin_configs[10] = { 1665static const unsigned int hp_dv7_4000_pin_configs[10] = {
1663 0x03a12050, 0x0321201f, 0x40f000f0, 0x90170110, 1666 0x03a12050, 0x0321201f, 0x40f000f0, 0x90170110,
1664 0x40f000f0, 0x40f000f0, 0x90170110, 0xd5a30140, 1667 0x40f000f0, 0x40f000f0, 0x90170110, 0xd5a30140,
@@ -1675,6 +1678,7 @@ static const unsigned int *stac92hd83xxx_brd_tbl[STAC_92HD83XXX_MODELS] = {
1675 [STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs, 1678 [STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs,
1676 [STAC_92HD83XXX_PWR_REF] = ref92hd83xxx_pin_configs, 1679 [STAC_92HD83XXX_PWR_REF] = ref92hd83xxx_pin_configs,
1677 [STAC_DELL_S14] = dell_s14_pin_configs, 1680 [STAC_DELL_S14] = dell_s14_pin_configs,
1681 [STAC_DELL_VOSTRO_3500] = dell_vostro_3500_pin_configs,
1678 [STAC_92HD83XXX_HP_cNB11_INTQUAD] = hp_cNB11_intquad_pin_configs, 1682 [STAC_92HD83XXX_HP_cNB11_INTQUAD] = hp_cNB11_intquad_pin_configs,
1679 [STAC_HP_DV7_4000] = hp_dv7_4000_pin_configs, 1683 [STAC_HP_DV7_4000] = hp_dv7_4000_pin_configs,
1680}; 1684};
@@ -1684,6 +1688,7 @@ static const char * const stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = {
1684 [STAC_92HD83XXX_REF] = "ref", 1688 [STAC_92HD83XXX_REF] = "ref",
1685 [STAC_92HD83XXX_PWR_REF] = "mic-ref", 1689 [STAC_92HD83XXX_PWR_REF] = "mic-ref",
1686 [STAC_DELL_S14] = "dell-s14", 1690 [STAC_DELL_S14] = "dell-s14",
1691 [STAC_DELL_VOSTRO_3500] = "dell-vostro-3500",
1687 [STAC_92HD83XXX_HP] = "hp", 1692 [STAC_92HD83XXX_HP] = "hp",
1688 [STAC_92HD83XXX_HP_cNB11_INTQUAD] = "hp_cNB11_intquad", 1693 [STAC_92HD83XXX_HP_cNB11_INTQUAD] = "hp_cNB11_intquad",
1689 [STAC_HP_DV7_4000] = "hp-dv7-4000", 1694 [STAC_HP_DV7_4000] = "hp-dv7-4000",
@@ -1697,6 +1702,8 @@ static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {
1697 "DFI LanParty", STAC_92HD83XXX_REF), 1702 "DFI LanParty", STAC_92HD83XXX_REF),
1698 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ba, 1703 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ba,
1699 "unknown Dell", STAC_DELL_S14), 1704 "unknown Dell", STAC_DELL_S14),
1705 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x1028,
1706 "Dell Vostro 3500", STAC_DELL_VOSTRO_3500),
1700 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x3600, 1707 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x3600,
1701 "HP", STAC_92HD83XXX_HP), 1708 "HP", STAC_92HD83XXX_HP),
1702 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1656, 1709 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1656,
@@ -4459,8 +4466,12 @@ static int stac92xx_init(struct hda_codec *codec)
4459 stac_toggle_power_map(codec, nid, 1); 4466 stac_toggle_power_map(codec, nid, 1);
4460 continue; 4467 continue;
4461 } 4468 }
4462 if (enable_pin_detect(codec, nid, STAC_PWR_EVENT)) 4469 if (enable_pin_detect(codec, nid, STAC_PWR_EVENT)) {
4463 stac_issue_unsol_event(codec, nid); 4470 stac_issue_unsol_event(codec, nid);
4471 continue;
4472 }
4473 /* none of the above, turn the port OFF */
4474 stac_toggle_power_map(codec, nid, 0);
4464 } 4475 }
4465 4476
4466 /* sync mute LED */ 4477 /* sync mute LED */
@@ -4716,11 +4727,7 @@ static void stac_toggle_power_map(struct hda_codec *codec, hda_nid_t nid,
4716 if (idx >= spec->num_pwrs) 4727 if (idx >= spec->num_pwrs)
4717 return; 4728 return;
4718 4729
4719 /* several codecs have two power down bits */ 4730 idx = 1 << idx;
4720 if (spec->pwr_mapping)
4721 idx = spec->pwr_mapping[idx];
4722 else
4723 idx = 1 << idx;
4724 4731
4725 val = snd_hda_codec_read(codec, codec->afg, 0, 0x0fec, 0x0) & 0xff; 4732 val = snd_hda_codec_read(codec, codec->afg, 0, 0x0fec, 0x0) & 0xff;
4726 if (enable) 4733 if (enable)
@@ -5618,9 +5625,6 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
5618 snd_hda_codec_set_pincfg(codec, 0xf, 0x2181205e); 5625 snd_hda_codec_set_pincfg(codec, 0xf, 0x2181205e);
5619 } 5626 }
5620 5627
5621 /* reset pin power-down; Windows may leave these bits after reboot */
5622 snd_hda_codec_write_cache(codec, codec->afg, 0, 0x7EC, 0);
5623 snd_hda_codec_write_cache(codec, codec->afg, 0, 0x7ED, 0);
5624 codec->no_trigger_sense = 1; 5628 codec->no_trigger_sense = 1;
5625 codec->spec = spec; 5629 codec->spec = spec;
5626 5630
@@ -5630,7 +5634,6 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
5630 codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs; 5634 codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs;
5631 spec->digbeep_nid = 0x21; 5635 spec->digbeep_nid = 0x21;
5632 spec->pwr_nids = stac92hd83xxx_pwr_nids; 5636 spec->pwr_nids = stac92hd83xxx_pwr_nids;
5633 spec->pwr_mapping = stac92hd83xxx_pwr_mapping;
5634 spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids); 5637 spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids);
5635 spec->multiout.dac_nids = spec->dac_nids; 5638 spec->multiout.dac_nids = spec->dac_nids;
5636 spec->init = stac92hd83xxx_core_init; 5639 spec->init = stac92hd83xxx_core_init;
@@ -5647,9 +5650,6 @@ again:
5647 stac92xx_set_config_regs(codec, 5650 stac92xx_set_config_regs(codec,
5648 stac92hd83xxx_brd_tbl[spec->board_config]); 5651 stac92hd83xxx_brd_tbl[spec->board_config]);
5649 5652
5650 if (spec->board_config != STAC_92HD83XXX_PWR_REF)
5651 spec->num_pwrs = 0;
5652
5653 codec->patch_ops = stac92xx_patch_ops; 5653 codec->patch_ops = stac92xx_patch_ops;
5654 5654
5655 if (find_mute_led_gpio(codec, 0)) 5655 if (find_mute_led_gpio(codec, 0))
@@ -5858,8 +5858,6 @@ again:
5858 (codec->revision_id & 0xf) == 1) 5858 (codec->revision_id & 0xf) == 1)
5859 spec->stream_delay = 40; /* 40 milliseconds */ 5859 spec->stream_delay = 40; /* 40 milliseconds */
5860 5860
5861 /* no output amps */
5862 spec->num_pwrs = 0;
5863 /* disable VSW */ 5861 /* disable VSW */
5864 spec->init = stac92hd71bxx_core_init; 5862 spec->init = stac92hd71bxx_core_init;
5865 unmute_init++; 5863 unmute_init++;
@@ -5874,8 +5872,6 @@ again:
5874 if ((codec->revision_id & 0xf) == 1) 5872 if ((codec->revision_id & 0xf) == 1)
5875 spec->stream_delay = 40; /* 40 milliseconds */ 5873 spec->stream_delay = 40; /* 40 milliseconds */
5876 5874
5877 /* no output amps */
5878 spec->num_pwrs = 0;
5879 /* fallthru */ 5875 /* fallthru */
5880 default: 5876 default:
5881 spec->init = stac92hd71bxx_core_init; 5877 spec->init = stac92hd71bxx_core_init;