aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobin Davis <tdavis@dsl-only.net>2007-05-17 03:36:34 -0400
committerJaroslav Kysela <perex@suse.cz>2007-05-31 03:06:01 -0400
commit2c11f955b27edaf0270185781391abe6f39b7ed0 (patch)
tree80f0c14fe854150d70204d05216f859588af0131
parent3f0a6766e0cc5a577805732e5adb50a585c58175 (diff)
[ALSA] HDA: Add support for Gateway NX860
This patch adds support for the Gateway NX860 system. Signed-off-by: Tobin Davis <tdavis@dsl-only.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt1
-rw-r--r--sound/pci/hda/patch_sigmatel.c30
2 files changed, 29 insertions, 2 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 57b878cc393c..355ff0a2bb7c 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -917,6 +917,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
917 ref Reference board, base config 917 ref Reference board, base config
918 m2-2 Some Gateway MX series laptops 918 m2-2 Some Gateway MX series laptops
919 m6 Some Gateway NX series laptops 919 m6 Some Gateway NX series laptops
920 pa6 Gateway NX860 series
920 921
921 STAC9227/9228/9229/927x 922 STAC9227/9228/9229/927x
922 ref Reference board 923 ref Reference board
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index a6a0a80edc3b..6e6818c8db18 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -51,6 +51,7 @@ enum {
51 STAC_925x_REF, 51 STAC_925x_REF,
52 STAC_M2_2, 52 STAC_M2_2,
53 STAC_MA6, 53 STAC_MA6,
54 STAC_PA6,
54 STAC_925x_MODELS 55 STAC_925x_MODELS
55}; 56};
56 57
@@ -152,6 +153,10 @@ static hda_nid_t stac925x_dac_nids[1] = {
152 0x02, 153 0x02,
153}; 154};
154 155
156static hda_nid_t stac925x_dmic_nids[1] = {
157 0x15,
158};
159
155static hda_nid_t stac922x_adc_nids[2] = { 160static hda_nid_t stac922x_adc_nids[2] = {
156 0x06, 0x07, 161 0x06, 0x07,
157}; 162};
@@ -482,6 +487,11 @@ static unsigned int stac925x_MA6_pin_configs[8] = {
482 0x90a70320, 0x90100211, 0x400003f1, 0x9033032e, 487 0x90a70320, 0x90100211, 0x400003f1, 0x9033032e,
483}; 488};
484 489
490static unsigned int stac925x_PA6_pin_configs[8] = {
491 0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021,
492 0x50a103f0, 0x90100211, 0x400003f1, 0x9033032e,
493};
494
485static unsigned int stac925xM2_2_pin_configs[8] = { 495static unsigned int stac925xM2_2_pin_configs[8] = {
486 0x40c003f3, 0x424503f2, 0x041800f4, 0x02a19020, 496 0x40c003f3, 0x424503f2, 0x041800f4, 0x02a19020,
487 0x50a103F0, 0x90100210, 0x400003f1, 0x9033032e, 497 0x50a103F0, 0x90100210, 0x400003f1, 0x9033032e,
@@ -491,20 +501,24 @@ static unsigned int *stac925x_brd_tbl[STAC_925x_MODELS] = {
491 [STAC_REF] = ref925x_pin_configs, 501 [STAC_REF] = ref925x_pin_configs,
492 [STAC_M2_2] = stac925xM2_2_pin_configs, 502 [STAC_M2_2] = stac925xM2_2_pin_configs,
493 [STAC_MA6] = stac925x_MA6_pin_configs, 503 [STAC_MA6] = stac925x_MA6_pin_configs,
504 [STAC_PA6] = stac925x_PA6_pin_configs,
494}; 505};
495 506
496static const char *stac925x_models[STAC_925x_MODELS] = { 507static const char *stac925x_models[STAC_925x_MODELS] = {
497 [STAC_REF] = "ref", 508 [STAC_REF] = "ref",
498 [STAC_M2_2] = "m2-2", 509 [STAC_M2_2] = "m2-2",
499 [STAC_MA6] = "m6", 510 [STAC_MA6] = "m6",
511 [STAC_PA6] = "pa6",
500}; 512};
501 513
502static struct snd_pci_quirk stac925x_cfg_tbl[] = { 514static struct snd_pci_quirk stac925x_cfg_tbl[] = {
503 /* SigmaTel reference board */ 515 /* SigmaTel reference board */
504 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF), 516 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF),
517 SND_PCI_QUIRK(0x8384, 0x7632, "Stac9202 Reference Board", STAC_REF),
505 SND_PCI_QUIRK(0x107b, 0x0316, "Gateway M255", STAC_REF), 518 SND_PCI_QUIRK(0x107b, 0x0316, "Gateway M255", STAC_REF),
506 SND_PCI_QUIRK(0x107b, 0x0366, "Gateway MP6954", STAC_REF), 519 SND_PCI_QUIRK(0x107b, 0x0366, "Gateway MP6954", STAC_REF),
507 SND_PCI_QUIRK(0x107b, 0x0461, "Gateway NX560XL", STAC_MA6), 520 SND_PCI_QUIRK(0x107b, 0x0461, "Gateway NX560XL", STAC_MA6),
521 SND_PCI_QUIRK(0x107b, 0x0681, "Gateway NX860", STAC_PA6),
508 SND_PCI_QUIRK(0x1002, 0x437b, "Gateway MX6453", STAC_M2_2), 522 SND_PCI_QUIRK(0x1002, 0x437b, "Gateway MX6453", STAC_M2_2),
509 {} /* terminator */ 523 {} /* terminator */
510}; 524};
@@ -1911,7 +1925,8 @@ static int patch_stac925x(struct hda_codec *codec)
1911 stac925x_cfg_tbl); 1925 stac925x_cfg_tbl);
1912 again: 1926 again:
1913 if (spec->board_config < 0) { 1927 if (spec->board_config < 0) {
1914 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC925x, using BIOS defaults\n"); 1928 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC925x,"
1929 "using BIOS defaults\n");
1915 err = stac92xx_save_bios_config_regs(codec); 1930 err = stac92xx_save_bios_config_regs(codec);
1916 if (err < 0) { 1931 if (err < 0) {
1917 stac92xx_free(codec); 1932 stac92xx_free(codec);
@@ -1929,7 +1944,18 @@ static int patch_stac925x(struct hda_codec *codec)
1929 spec->adc_nids = stac925x_adc_nids; 1944 spec->adc_nids = stac925x_adc_nids;
1930 spec->mux_nids = stac925x_mux_nids; 1945 spec->mux_nids = stac925x_mux_nids;
1931 spec->num_muxes = 1; 1946 spec->num_muxes = 1;
1932 spec->num_dmics = 0; 1947 switch (codec->vendor_id) {
1948 case 0x83847632: /* STAC9202 */
1949 case 0x83847633: /* STAC9202D */
1950 case 0x83847636: /* STAC9251 */
1951 case 0x83847637: /* STAC9251D */
1952 spec->num_dmics = 1;
1953 spec->dmic_nids = stac925x_dmic_nids;
1954 break;
1955 default:
1956 spec->num_dmics = 0;
1957 break;
1958 }
1933 1959
1934 spec->init = stac925x_core_init; 1960 spec->init = stac925x_core_init;
1935 spec->mixer = stac925x_mixer; 1961 spec->mixer = stac925x_mixer;