aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-01-23 02:13:52 -0500
committerTakashi Iwai <tiwai@suse.de>2009-01-23 02:13:52 -0500
commit092ebf7a01aa8020501986ab9a2f481a01bb541a (patch)
tree16c352224df6d5c475fef5ba9179765a198724ed /sound/pci
parentdd501d94b5df820305363d504f51115b45e23e4f (diff)
parent32ed3f4640631ab7a4c0bc0f1463cf019d510341 (diff)
Merge branch 'fix/hda' into for-linus
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_sigmatel.c39
1 files changed, 26 insertions, 13 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index a4d4afe6b4fc..3dd4eee70b7c 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -81,6 +81,7 @@ enum {
81 81
82enum { 82enum {
83 STAC_92HD83XXX_REF, 83 STAC_92HD83XXX_REF,
84 STAC_92HD83XXX_PWR_REF,
84 STAC_92HD83XXX_MODELS 85 STAC_92HD83XXX_MODELS
85}; 86};
86 87
@@ -334,7 +335,7 @@ static hda_nid_t stac92hd83xxx_slave_dig_outs[2] = {
334}; 335};
335 336
336static unsigned int stac92hd83xxx_pwr_mapping[4] = { 337static unsigned int stac92hd83xxx_pwr_mapping[4] = {
337 0x03, 0x0c, 0x20, 0x80, 338 0x03, 0x0c, 0x20, 0x40,
338}; 339};
339 340
340static hda_nid_t stac92hd83xxx_amp_nids[1] = { 341static hda_nid_t stac92hd83xxx_amp_nids[1] = {
@@ -841,10 +842,6 @@ static struct hda_verb stac92hd73xx_10ch_core_init[] = {
841}; 842};
842 843
843static struct hda_verb stac92hd83xxx_core_init[] = { 844static struct hda_verb stac92hd83xxx_core_init[] = {
844 /* start of config #1 */
845 { 0xe, AC_VERB_SET_CONNECT_SEL, 0x3},
846
847 /* start of config #2 */
848 { 0xa, AC_VERB_SET_CONNECT_SEL, 0x0}, 845 { 0xa, AC_VERB_SET_CONNECT_SEL, 0x0},
849 { 0xb, AC_VERB_SET_CONNECT_SEL, 0x0}, 846 { 0xb, AC_VERB_SET_CONNECT_SEL, 0x0},
850 { 0xd, AC_VERB_SET_CONNECT_SEL, 0x1}, 847 { 0xd, AC_VERB_SET_CONNECT_SEL, 0x1},
@@ -1738,10 +1735,12 @@ static unsigned int ref92hd83xxx_pin_configs[14] = {
1738 1735
1739static unsigned int *stac92hd83xxx_brd_tbl[STAC_92HD83XXX_MODELS] = { 1736static unsigned int *stac92hd83xxx_brd_tbl[STAC_92HD83XXX_MODELS] = {
1740 [STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs, 1737 [STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs,
1738 [STAC_92HD83XXX_PWR_REF] = ref92hd83xxx_pin_configs,
1741}; 1739};
1742 1740
1743static const char *stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = { 1741static const char *stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = {
1744 [STAC_92HD83XXX_REF] = "ref", 1742 [STAC_92HD83XXX_REF] = "ref",
1743 [STAC_92HD83XXX_PWR_REF] = "mic-ref",
1745}; 1744};
1746 1745
1747static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { 1746static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {
@@ -1801,6 +1800,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {
1801 "HP dv5", STAC_HP_M4), 1800 "HP dv5", STAC_HP_M4),
1802 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f4, 1801 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f4,
1803 "HP dv7", STAC_HP_M4), 1802 "HP dv7", STAC_HP_M4),
1803 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f7,
1804 "HP dv4", STAC_HP_DV5),
1804 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc, 1805 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc,
1805 "HP dv7", STAC_HP_M4), 1806 "HP dv7", STAC_HP_M4),
1806 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3603, 1807 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3603,
@@ -4754,7 +4755,9 @@ static struct hda_input_mux stac92hd83xxx_dmux = {
4754static int patch_stac92hd83xxx(struct hda_codec *codec) 4755static int patch_stac92hd83xxx(struct hda_codec *codec)
4755{ 4756{
4756 struct sigmatel_spec *spec; 4757 struct sigmatel_spec *spec;
4758 hda_nid_t conn[STAC92HD83_DAC_COUNT + 1];
4757 int err; 4759 int err;
4760 int num_dacs;
4758 4761
4759 spec = kzalloc(sizeof(*spec), GFP_KERNEL); 4762 spec = kzalloc(sizeof(*spec), GFP_KERNEL);
4760 if (spec == NULL) 4763 if (spec == NULL)
@@ -4773,15 +4776,16 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
4773 spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids); 4776 spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids);
4774 spec->multiout.dac_nids = spec->dac_nids; 4777 spec->multiout.dac_nids = spec->dac_nids;
4775 4778
4776 spec->init = stac92hd83xxx_core_init;
4777 switch (codec->vendor_id) {
4778 case 0x111d7605:
4779 break;
4780 default:
4781 spec->num_pwrs--;
4782 spec->init++; /* switch to config #2 */
4783 }
4784 4779
4780 /* set port 0xe to select the last DAC
4781 */
4782 num_dacs = snd_hda_get_connections(codec, 0x0e,
4783 conn, STAC92HD83_DAC_COUNT + 1) - 1;
4784
4785 snd_hda_codec_write_cache(codec, 0xe, 0,
4786 AC_VERB_SET_CONNECT_SEL, num_dacs);
4787
4788 spec->init = stac92hd83xxx_core_init;
4785 spec->mixer = stac92hd83xxx_mixer; 4789 spec->mixer = stac92hd83xxx_mixer;
4786 spec->num_pins = ARRAY_SIZE(stac92hd83xxx_pin_nids); 4790 spec->num_pins = ARRAY_SIZE(stac92hd83xxx_pin_nids);
4787 spec->num_dmuxes = ARRAY_SIZE(stac92hd83xxx_dmux_nids); 4791 spec->num_dmuxes = ARRAY_SIZE(stac92hd83xxx_dmux_nids);
@@ -4807,6 +4811,15 @@ again:
4807 return err; 4811 return err;
4808 } 4812 }
4809 4813
4814 switch (codec->vendor_id) {
4815 case 0x111d7604:
4816 case 0x111d7605:
4817 if (spec->board_config == STAC_92HD83XXX_PWR_REF)
4818 break;
4819 spec->num_pwrs = 0;
4820 break;
4821 }
4822
4810 err = stac92xx_parse_auto_config(codec, 0x1d, 0); 4823 err = stac92xx_parse_auto_config(codec, 0x1d, 0);
4811 if (!err) { 4824 if (!err) {
4812 if (spec->board_config < 0) { 4825 if (spec->board_config < 0) {