aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-08-11 04:18:39 -0400
committerTakashi Iwai <tiwai@suse.de>2008-11-30 05:09:19 -0500
commit9cb36c2afc298a2f2085ae0071924b7e3f55e72d (patch)
treeb9e13c694a59ca571f2ff9c3ed8801dd2805dd37 /sound/pci/hda
parent2eda344546caaf9168e778a4007f4609e95106e0 (diff)
ALSA: patch_sigmatel: Add missing Gateway entries and autodetection
Gateway autodetection and entries are incomplete. This patch adds the entries found at the .INI file for their driver version 5.10.5082.0. It also uses the proper code to seek for notebook ID, since this is based on codec subsystem ID on those devices. This should provide a proper pinup for several gateways notebooks: Gateway M465-E Notebook [Part #1008637] Gateway M465-G Notebook [Part #1008667] Gateway NX260X Notebook [Part #1008794] Gateway NX100X Notebook [Part #1008798] Gateway E-100M Notebook [Part #1008799] Gateway E-100M G Notebook [Part #1008800] Gateway M255-E Notebook [Part #1008801] Gateway M255-G Notebook [Part #1008803] Gateway M285-E Convertible Notebook [Part #1008804] Gateway M285-G Convertible Notebook [Part #1008805] Gateway CX210S Convertible Notebook [Part #1008807] Gateway CX210X Convertible Notebook [Part #1008808] Gateway E-100M SB Notebook [Part #1008973] Gateway M255-E SB Notebook [Part #1008989] Gateway M285-E SB Convertible Notebook [Part #1008990] Gateway M465-E Notebook [Part #1009022] Gateway CX2724 Convertible Notebook [Part #1009036] Gateway MX1025 Notebook [Part #1009046] Gateway CX2720 Convertible Notebook [Part #1009063] Gateway CX2724h Convertible Notebook [Part #1009089] Gateway MX1023 Notebook [Part #1009097] Gateway MX1023h Notebook [Part #1009098] Gateway NX260X Notebook [Part #1009112] Gateway E-100M Notebook [Part #1009126] Gateway MX7533 Notebook [Part #1009146] [Part #1009163] Gateway CX210X Convertible Notebook [Part #1009346] Gateway NX570X Notebook [Part #1009442] Gateway NX570X Notebook [Part #1009448] Gateway NX270S Notebook [Part #1009550] Gateway MX6448 Notebook [Part #1013912R] Gateway MX6453 Notebook [Part #1013913R] Gateway MX6216 Notebook [Part #1013916R] Gateway MX6931 Notebook [Part #1013918R] Gateway CX2726 Convertible Notebook [Part #1013921R] Gateway MP8708 Notebook [Part #1013924R] Gateway MX6446 Notebook [Part #1013927R] Gateway MX6930 Notebook [Part #1013928R] Gateway MX6447 Notebook [Part #1013932R] Gateway MX6454 Notebook [Part #1013943R] Gateway MX6439 Notebook [Part #1013947R] [Part #1013955R] [Part #1013971R] Gateway MX6930h Notebook [Part #1013973R] [Part #1013974R] [Part #1013975R] Gateway MX6955 Notebook [Part #1014028R] Gateway MX6956 Notebook [Part #1014033R] Gateway MX6959 Notebook [Part #1014061R] Gateway MX6957 Notebook [Part #1014065R] Gateway MX6960 Notebook [Part #1014068R] Gateway MX6958 Notebook [Part #1014072R] Gateway NX570X Notebook [Part #1014077R] Gateway NX570XL Notebook [Part #1014078R] Gateway NX570QS Notebook [Part #1014079R] Gateway MX6961 Notebook [Part #1014080R] [Part #1014106R] Gateway MX6961h Notebook [Part #1014112R] Gateway NX270S Notebook [Part #1014120R] Gateway MX6431 Notebook [Part #1014121R] Gateway MX8710 Notebook [Part #2905895R] Gateway MX3702 Notebook [Part #2905898R] Blade-K8F GW UMA Single Core Motherboard w/RS485M and 1394 - Quanta (FRU) [Part #4006133R] Since some entries conflict with existing pinups, I'm providing a separate patch to fix those entries. Tested only with Gateway MX6453. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/patch_sigmatel.c89
1 files changed, 81 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 9e07f44ab28a..e70ef0505304 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -93,7 +93,13 @@ enum {
93 93
94enum { 94enum {
95 STAC_925x_REF, 95 STAC_925x_REF,
96 STAC_M1,
97 STAC_M1_2,
98 STAC_M2,
96 STAC_M2_2, 99 STAC_M2_2,
100 STAC_M3,
101 STAC_M5,
102 STAC_M6,
97 STAC_MA6, 103 STAC_MA6,
98 STAC_PA6, 104 STAC_PA6,
99 STAC_925x_MODELS 105 STAC_925x_MODELS
@@ -1600,11 +1606,40 @@ static unsigned int ref925x_pin_configs[8] = {
1600 0x90a70320, 0x02214210, 0x01019020, 0x9033032e, 1606 0x90a70320, 0x02214210, 0x01019020, 0x9033032e,
1601}; 1607};
1602 1608
1609static unsigned int stac925xM1_pin_configs[8] = {
1610 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
1611 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e,
1612};
1613static unsigned int stac925xM1_2_pin_configs[8] = {
1614 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
1615 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e,
1616};
1617static unsigned int stac925xM2_pin_configs[8] = {
1618 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
1619 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e,
1620};
1621
1622static unsigned int stac925xM3_pin_configs[8] = {
1623 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
1624 0x40a000f0, 0x90100210, 0x400003f1, 0x503303f3,
1625};
1626static unsigned int stac925xM5_pin_configs[8] = {
1627 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
1628 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e,
1629};
1630
1631/* Original M6 entry at .ini file */
1632static unsigned int stac925xM6_pin_configs[8] = {
1633 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
1634 0x40a000f0, 0x90100210, 0x400003f1, 0x90330320,
1635};
1636
1603static unsigned int stac925x_MA6_pin_configs[8] = { 1637static unsigned int stac925x_MA6_pin_configs[8] = {
1604 0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021, 1638 0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021,
1605 0x90a70320, 0x90100211, 0x400003f1, 0x9033032e, 1639 0x90a70320, 0x90100211, 0x400003f1, 0x9033032e,
1606}; 1640};
1607 1641
1642/* This entry should be M2 */
1608static unsigned int stac925x_PA6_pin_configs[8] = { 1643static unsigned int stac925x_PA6_pin_configs[8] = {
1609 0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021, 1644 0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021,
1610 0x50a103f0, 0x90100211, 0x400003f1, 0x9033032e, 1645 0x50a103f0, 0x90100211, 0x400003f1, 0x9033032e,
@@ -1617,27 +1652,55 @@ static unsigned int stac925xM2_2_pin_configs[8] = {
1617 1652
1618static unsigned int *stac925x_brd_tbl[STAC_925x_MODELS] = { 1653static unsigned int *stac925x_brd_tbl[STAC_925x_MODELS] = {
1619 [STAC_REF] = ref925x_pin_configs, 1654 [STAC_REF] = ref925x_pin_configs,
1655 [STAC_M1] = stac925xM1_pin_configs,
1656 [STAC_M1_2] = stac925xM1_2_pin_configs,
1657 [STAC_M2] = stac925xM2_pin_configs,
1620 [STAC_M2_2] = stac925xM2_2_pin_configs, 1658 [STAC_M2_2] = stac925xM2_2_pin_configs,
1659 [STAC_M3] = stac925xM3_pin_configs,
1660 [STAC_M5] = stac925xM5_pin_configs,
1661 [STAC_M6] = stac925xM6_pin_configs,
1621 [STAC_MA6] = stac925x_MA6_pin_configs, 1662 [STAC_MA6] = stac925x_MA6_pin_configs,
1622 [STAC_PA6] = stac925x_PA6_pin_configs, 1663 [STAC_PA6] = stac925x_PA6_pin_configs,
1623}; 1664};
1624 1665
1625static const char *stac925x_models[STAC_925x_MODELS] = { 1666static const char *stac925x_models[STAC_925x_MODELS] = {
1626 [STAC_REF] = "ref", 1667 [STAC_REF] = "ref",
1668 [STAC_M1] = "m1",
1669 [STAC_M1_2] = "m1-2",
1670 [STAC_M2] = "m2",
1627 [STAC_M2_2] = "m2-2", 1671 [STAC_M2_2] = "m2-2",
1628 [STAC_MA6] = "m6", 1672 [STAC_M3] = "m3",
1673 [STAC_M5] = "m5",
1674 [STAC_M6] = "m6",
1675 [STAC_MA6] = "ma6",
1629 [STAC_PA6] = "pa6", 1676 [STAC_PA6] = "pa6",
1630}; 1677};
1631 1678
1632static struct snd_pci_quirk stac925x_cfg_tbl[] = { 1679static struct snd_pci_quirk stac925x_codec_id_cfg_tbl[] = {
1633 /* SigmaTel reference board */
1634 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF),
1635 SND_PCI_QUIRK(0x8384, 0x7632, "Stac9202 Reference Board", STAC_REF),
1636 SND_PCI_QUIRK(0x107b, 0x0316, "Gateway M255", STAC_REF), 1680 SND_PCI_QUIRK(0x107b, 0x0316, "Gateway M255", STAC_REF),
1637 SND_PCI_QUIRK(0x107b, 0x0366, "Gateway MP6954", STAC_REF), 1681 SND_PCI_QUIRK(0x107b, 0x0366, "Gateway MP6954", STAC_REF),
1682
1638 SND_PCI_QUIRK(0x107b, 0x0461, "Gateway NX560XL", STAC_MA6), 1683 SND_PCI_QUIRK(0x107b, 0x0461, "Gateway NX560XL", STAC_MA6),
1639 SND_PCI_QUIRK(0x107b, 0x0681, "Gateway NX860", STAC_PA6), 1684 SND_PCI_QUIRK(0x107b, 0x0681, "Gateway NX860", STAC_PA6),
1640 SND_PCI_QUIRK(0x1002, 0x437b, "Gateway MX6453", STAC_M2_2), 1685 SND_PCI_QUIRK(0x107b, 0x0367, "Gateway MX6453", STAC_M1_2),
1686
1687 /* Not sure about the brand name for those */
1688 SND_PCI_QUIRK(0x107b, 0x0281, "Gateway mobile", STAC_M1),
1689 SND_PCI_QUIRK(0x107b, 0x0507, "Gateway mobile", STAC_M3),
1690 SND_PCI_QUIRK(0x107b, 0x0281, "Gateway mobile", STAC_M6),
1691 SND_PCI_QUIRK(0x107b, 0x0685, "Gateway mobile", STAC_M2_2),
1692
1693 {} /* terminator */
1694};
1695
1696static struct snd_pci_quirk stac925x_cfg_tbl[] = {
1697 /* SigmaTel reference board */
1698 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF),
1699 SND_PCI_QUIRK(0x8384, 0x7632, "Stac9202 Reference Board", STAC_REF),
1700
1701 /* Default table for unknown ID */
1702 SND_PCI_QUIRK(0x1002, 0x437b, "Gateway mobile", STAC_M2_2),
1703
1641 {} /* terminator */ 1704 {} /* terminator */
1642}; 1705};
1643 1706
@@ -4371,12 +4434,22 @@ static int patch_stac925x(struct hda_codec *codec)
4371 codec->spec = spec; 4434 codec->spec = spec;
4372 spec->num_pins = ARRAY_SIZE(stac925x_pin_nids); 4435 spec->num_pins = ARRAY_SIZE(stac925x_pin_nids);
4373 spec->pin_nids = stac925x_pin_nids; 4436 spec->pin_nids = stac925x_pin_nids;
4374 spec->board_config = snd_hda_check_board_config(codec, STAC_925x_MODELS, 4437
4438 /* Check first for codec ID */
4439 spec->board_config = snd_hda_check_board_codec_sid_config(codec,
4440 STAC_925x_MODELS,
4441 stac925x_models,
4442 stac925x_codec_id_cfg_tbl);
4443
4444 /* Now checks for PCI ID, if codec ID is not found */
4445 if (spec->board_config < 0)
4446 spec->board_config = snd_hda_check_board_config(codec,
4447 STAC_925x_MODELS,
4375 stac925x_models, 4448 stac925x_models,
4376 stac925x_cfg_tbl); 4449 stac925x_cfg_tbl);
4377 again: 4450 again:
4378 if (spec->board_config < 0) { 4451 if (spec->board_config < 0) {
4379 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC925x," 4452 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC925x,"
4380 "using BIOS defaults\n"); 4453 "using BIOS defaults\n");
4381 err = stac92xx_save_bios_config_regs(codec); 4454 err = stac92xx_save_bios_config_regs(codec);
4382 } else 4455 } else