diff options
author | Tobin Davis <tobinx.b.davis@intel.com> | 2006-08-22 13:44:45 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-09-23 04:42:06 -0400 |
commit | 81d3dbde76eedcd3ede8a73eb72790d67fa254a9 (patch) | |
tree | 391d9fb0fd5384f602c0c17239d4e8616d311a99 /sound/pci | |
parent | 948a4db217235ba51c41d8e7c2ffcf9432e57274 (diff) |
[ALSA] hda-codec - Add support for new Intel boards with Stac9227 codec
This patch adds full 5.1 audio support for Intel boards
with the SigmaTel 9227 codec chip (946, 963, 965 series).
Signed-off-by: Tobin Davis <tobinx.b.davis@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 126 |
1 files changed, 92 insertions, 34 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 7b29288690cb..73ca566e9eb7 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -377,18 +377,11 @@ static unsigned int d945gtp5_pin_configs[10] = { | |||
377 | 0x02a19320, 0x40000100, | 377 | 0x02a19320, 0x40000100, |
378 | }; | 378 | }; |
379 | 379 | ||
380 | static unsigned int d965_2112_pin_configs[10] = { | ||
381 | 0x0221401f, 0x40000100, 0x40000100, 0x01014011, | ||
382 | 0x01a19021, 0x01813024, 0x01452130, 0x40000100, | ||
383 | 0x02a19320, 0x40000100, | ||
384 | }; | ||
385 | |||
386 | static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = { | 380 | static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = { |
387 | [STAC_REF] = ref922x_pin_configs, | 381 | [STAC_REF] = ref922x_pin_configs, |
388 | [STAC_D945GTP3] = d945gtp3_pin_configs, | 382 | [STAC_D945GTP3] = d945gtp3_pin_configs, |
389 | [STAC_D945GTP5] = d945gtp5_pin_configs, | 383 | [STAC_D945GTP5] = d945gtp5_pin_configs, |
390 | [STAC_MACMINI] = d945gtp5_pin_configs, | 384 | [STAC_MACMINI] = d945gtp5_pin_configs, |
391 | [STAC_D965_2112] = d965_2112_pin_configs, | ||
392 | }; | 385 | }; |
393 | 386 | ||
394 | static struct hda_board_config stac922x_cfg_tbl[] = { | 387 | static struct hda_board_config stac922x_cfg_tbl[] = { |
@@ -493,8 +486,16 @@ static unsigned int ref927x_pin_configs[14] = { | |||
493 | 0x01c41030, 0x40000100, | 486 | 0x01c41030, 0x40000100, |
494 | }; | 487 | }; |
495 | 488 | ||
489 | static unsigned int d965_2112_pin_configs[14] = { | ||
490 | 0x0221401f, 0x02a19120, 0x40000100, 0x01014011, | ||
491 | 0x01a19021, 0x01813024, 0x40000100, 0x40000100, | ||
492 | 0x40000100, 0x40000100, 0x40000100, 0x40000100, | ||
493 | 0x40000100, 0x40000100 | ||
494 | }; | ||
495 | |||
496 | static unsigned int *stac927x_brd_tbl[] = { | 496 | static unsigned int *stac927x_brd_tbl[] = { |
497 | ref927x_pin_configs, | 497 | [STAC_REF] = ref927x_pin_configs, |
498 | [STAC_D965_2112] = d965_2112_pin_configs, | ||
498 | }; | 499 | }; |
499 | 500 | ||
500 | static struct hda_board_config stac927x_cfg_tbl[] = { | 501 | static struct hda_board_config stac927x_cfg_tbl[] = { |
@@ -502,6 +503,66 @@ static struct hda_board_config stac927x_cfg_tbl[] = { | |||
502 | .pci_subvendor = PCI_VENDOR_ID_INTEL, | 503 | .pci_subvendor = PCI_VENDOR_ID_INTEL, |
503 | .pci_subdevice = 0x2668, /* DFI LanParty */ | 504 | .pci_subdevice = 0x2668, /* DFI LanParty */ |
504 | .config = STAC_REF }, /* SigmaTel reference board */ | 505 | .config = STAC_REF }, /* SigmaTel reference board */ |
506 | /* SigmaTel 9227 reference board */ | ||
507 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
508 | .pci_subdevice = 0x284b, | ||
509 | .config = STAC_D965_284B }, | ||
510 | /* Intel 946 based systems */ | ||
511 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
512 | .pci_subdevice = 0x3d01, | ||
513 | .config = STAC_D965_2112 }, /* D946 configuration */ | ||
514 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
515 | .pci_subdevice = 0xa301, | ||
516 | .config = STAC_D965_2112 }, /* Intel D946GZT - 3 stack */ | ||
517 | /* 965 based systems */ | ||
518 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
519 | .pci_subdevice = 0x2116, | ||
520 | .config = STAC_D965_2112 }, /* Intel D965 3Stack config */ | ||
521 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
522 | .pci_subdevice = 0x2115, | ||
523 | .config = STAC_D965_2112 }, /* Intel DQ965WC - 3 Stack */ | ||
524 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
525 | .pci_subdevice = 0x2114, | ||
526 | .config = STAC_D965_2112 }, /* Intel D965 3Stack config */ | ||
527 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
528 | .pci_subdevice = 0x2113, | ||
529 | .config = STAC_D965_2112 }, /* Intel D965 3Stack config */ | ||
530 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
531 | .pci_subdevice = 0x2112, | ||
532 | .config = STAC_D965_2112 }, /* Intel DG965MS - 3 Stack */ | ||
533 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
534 | .pci_subdevice = 0x2111, | ||
535 | .config = STAC_D965_2112 }, /* Intel D965 3Stack config */ | ||
536 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
537 | .pci_subdevice = 0x2110, | ||
538 | .config = STAC_D965_2112 }, /* Intel D965 3Stack config */ | ||
539 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
540 | .pci_subdevice = 0x2009, | ||
541 | .config = STAC_D965_2112 }, /* Intel D965 3Stack config */ | ||
542 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
543 | .pci_subdevice = 0x2008, | ||
544 | .config = STAC_D965_2112 }, /* Intel DQ965GF - 3 Stack */ | ||
545 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
546 | .pci_subdevice = 0x2007, | ||
547 | .config = STAC_D965_2112 }, /* Intel D965 3Stack config */ | ||
548 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
549 | .pci_subdevice = 0x2006, | ||
550 | .config = STAC_D965_2112 }, /* Intel D965 3Stack config */ | ||
551 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
552 | .pci_subdevice = 0x2005, | ||
553 | .config = STAC_D965_2112 }, /* Intel D965 3Stack config */ | ||
554 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
555 | .pci_subdevice = 0x2004, | ||
556 | .config = STAC_D965_2112 }, /* Intel D965 3Stack config */ | ||
557 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
558 | .pci_subdevice = 0x2003, | ||
559 | .config = STAC_D965_2112 }, /* Intel D965 3Stack config */ | ||
560 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
561 | .pci_subdevice = 0x2002, | ||
562 | .config = STAC_D965_2112 }, /* Intel D965 3Stack config */ | ||
563 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
564 | .pci_subdevice = 0x2001, | ||
565 | .config = STAC_D965_2112 }, /* Intel DQ965GF - 3 Stackg */ | ||
505 | {} /* terminator */ | 566 | {} /* terminator */ |
506 | }; | 567 | }; |
507 | 568 | ||
@@ -1391,25 +1452,6 @@ static int patch_stac922x(struct hda_codec *codec) | |||
1391 | 1452 | ||
1392 | spec->multiout.dac_nids = spec->dac_nids; | 1453 | spec->multiout.dac_nids = spec->dac_nids; |
1393 | 1454 | ||
1394 | switch (spec->board_config) { | ||
1395 | case STAC_D965_2112: | ||
1396 | spec->adc_nids = stac9227_adc_nids; | ||
1397 | spec->mux_nids = stac9227_mux_nids; | ||
1398 | #if 0 | ||
1399 | spec->multiout.dac_nids = d965_2112_dac_nids; | ||
1400 | spec->multiout.num_dacs = ARRAY_SIZE(d965_2112_dac_nids); | ||
1401 | #endif | ||
1402 | spec->init = d965_2112_core_init; | ||
1403 | spec->mixer = stac9227_mixer; | ||
1404 | break; | ||
1405 | case STAC_D965_284B: | ||
1406 | spec->adc_nids = stac9227_adc_nids; | ||
1407 | spec->mux_nids = stac9227_mux_nids; | ||
1408 | spec->init = stac9227_core_init; | ||
1409 | spec->mixer = stac9227_mixer; | ||
1410 | break; | ||
1411 | } | ||
1412 | |||
1413 | err = stac92xx_parse_auto_config(codec, 0x08, 0x09); | 1455 | err = stac92xx_parse_auto_config(codec, 0x08, 0x09); |
1414 | if (err < 0) { | 1456 | if (err < 0) { |
1415 | stac92xx_free(codec); | 1457 | stac92xx_free(codec); |
@@ -1437,19 +1479,35 @@ static int patch_stac927x(struct hda_codec *codec) | |||
1437 | spec->board_config = snd_hda_check_board_config(codec, stac927x_cfg_tbl); | 1479 | spec->board_config = snd_hda_check_board_config(codec, stac927x_cfg_tbl); |
1438 | if (spec->board_config < 0) | 1480 | if (spec->board_config < 0) |
1439 | snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC927x, using BIOS defaults\n"); | 1481 | snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC927x, using BIOS defaults\n"); |
1440 | else { | 1482 | else if (stac927x_brd_tbl[spec->board_config] != NULL) { |
1441 | spec->num_pins = 14; | 1483 | spec->num_pins = 14; |
1442 | spec->pin_nids = stac927x_pin_nids; | 1484 | spec->pin_nids = stac927x_pin_nids; |
1443 | spec->pin_configs = stac927x_brd_tbl[spec->board_config]; | 1485 | spec->pin_configs = stac927x_brd_tbl[spec->board_config]; |
1444 | stac92xx_set_config_regs(codec); | 1486 | stac92xx_set_config_regs(codec); |
1445 | } | 1487 | } |
1446 | 1488 | ||
1447 | spec->adc_nids = stac927x_adc_nids; | 1489 | switch (spec->board_config) { |
1448 | spec->mux_nids = stac927x_mux_nids; | 1490 | case STAC_D965_2112: |
1449 | spec->num_muxes = 3; | 1491 | spec->adc_nids = stac927x_adc_nids; |
1450 | 1492 | spec->mux_nids = stac927x_mux_nids; | |
1451 | spec->init = stac927x_core_init; | 1493 | spec->num_muxes = 3; |
1452 | spec->mixer = stac927x_mixer; | 1494 | spec->init = d965_2112_core_init; |
1495 | spec->mixer = stac9227_mixer; | ||
1496 | break; | ||
1497 | case STAC_D965_284B: | ||
1498 | spec->adc_nids = stac9227_adc_nids; | ||
1499 | spec->mux_nids = stac9227_mux_nids; | ||
1500 | spec->num_muxes = 2; | ||
1501 | spec->init = stac9227_core_init; | ||
1502 | spec->mixer = stac9227_mixer; | ||
1503 | break; | ||
1504 | default: | ||
1505 | spec->adc_nids = stac927x_adc_nids; | ||
1506 | spec->mux_nids = stac927x_mux_nids; | ||
1507 | spec->num_muxes = 3; | ||
1508 | spec->init = stac927x_core_init; | ||
1509 | spec->mixer = stac927x_mixer; | ||
1510 | } | ||
1453 | 1511 | ||
1454 | spec->multiout.dac_nids = spec->dac_nids; | 1512 | spec->multiout.dac_nids = spec->dac_nids; |
1455 | 1513 | ||