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.c406
1 files changed, 184 insertions, 222 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index c8696ddc03ac..cbaa00aa5b92 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -37,14 +37,30 @@
37#define NUM_CONTROL_ALLOC 32 37#define NUM_CONTROL_ALLOC 32
38#define STAC_HP_EVENT 0x37 38#define STAC_HP_EVENT 0x37
39 39
40#define STAC_REF 0 40enum {
41#define STAC_D945GTP3 1 41 STAC_REF,
42#define STAC_D945GTP5 2 42 STAC_9200_MODELS
43#define STAC_MACMINI 3 43};
44#define STAC_922X_MODELS 4 /* number of 922x models */ 44
45#define STAC_D965_3ST 4 45enum {
46#define STAC_D965_5ST 5 46 STAC_9205_REF,
47#define STAC_927X_MODELS 6 /* number of 927x models */ 47 STAC_9205_MODELS
48};
49
50enum {
51 STAC_D945_REF,
52 STAC_D945GTP3,
53 STAC_D945GTP5,
54 STAC_MACMINI,
55 STAC_922X_MODELS
56};
57
58enum {
59 STAC_D965_REF,
60 STAC_D965_3ST,
61 STAC_D965_5ST,
62 STAC_927X_MODELS
63};
48 64
49struct sigmatel_spec { 65struct sigmatel_spec {
50 struct snd_kcontrol_new *mixers[4]; 66 struct snd_kcontrol_new *mixers[4];
@@ -373,22 +389,25 @@ static unsigned int ref9200_pin_configs[8] = {
373 0x02a19020, 0x01a19021, 0x90100140, 0x01813122, 389 0x02a19020, 0x01a19021, 0x90100140, 0x01813122,
374}; 390};
375 391
376static unsigned int *stac9200_brd_tbl[] = { 392static unsigned int *stac9200_brd_tbl[STAC_9200_MODELS] = {
377 ref9200_pin_configs, 393 [STAC_REF] = ref9200_pin_configs,
378}; 394};
379 395
380static struct hda_board_config stac9200_cfg_tbl[] = { 396static const char *stac9200_models[STAC_9200_MODELS] = {
381 { .modelname = "ref", 397 [STAC_REF] = "ref",
382 .pci_subvendor = PCI_VENDOR_ID_INTEL, 398};
383 .pci_subdevice = 0x2668, /* DFI LanParty */ 399
384 .config = STAC_REF }, 400static struct snd_pci_quirk stac9200_cfg_tbl[] = {
401 /* SigmaTel reference board */
402 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
403 "DFI LanParty", STAC_REF),
385 /* Dell laptops have BIOS problem */ 404 /* Dell laptops have BIOS problem */
386 { .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01b5, 405 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01b5,
387 .config = STAC_REF }, /* Dell Inspiron 630m */ 406 "Dell Inspiron 630m", STAC_REF),
388 { .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01c2, 407 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01c2,
389 .config = STAC_REF }, /* Dell Latitude D620 */ 408 "Dell Latitude D620", STAC_REF),
390 { .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01cb, 409 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01cb,
391 .config = STAC_REF }, /* Dell Latitude 120L */ 410 "Dell Latitude 120L", STAC_REF),
392 {} /* terminator */ 411 {} /* terminator */
393}; 412};
394 413
@@ -411,100 +430,80 @@ static unsigned int d945gtp5_pin_configs[10] = {
411}; 430};
412 431
413static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = { 432static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = {
414 [STAC_REF] = ref922x_pin_configs, 433 [STAC_D945_REF] = ref922x_pin_configs,
415 [STAC_D945GTP3] = d945gtp3_pin_configs, 434 [STAC_D945GTP3] = d945gtp3_pin_configs,
416 [STAC_D945GTP5] = d945gtp5_pin_configs, 435 [STAC_D945GTP5] = d945gtp5_pin_configs,
417 [STAC_MACMINI] = d945gtp5_pin_configs, 436 [STAC_MACMINI] = d945gtp5_pin_configs,
418}; 437};
419 438
420static struct hda_board_config stac922x_cfg_tbl[] = { 439static const char *stac922x_models[STAC_922X_MODELS] = {
421 { .modelname = "5stack", .config = STAC_D945GTP5 }, 440 [STAC_D945_REF] = "ref",
422 { .modelname = "3stack", .config = STAC_D945GTP3 }, 441 [STAC_D945GTP5] = "5stack",
423 { .modelname = "ref", 442 [STAC_D945GTP3] = "3stack",
424 .pci_subvendor = PCI_VENDOR_ID_INTEL, 443 [STAC_MACMINI] = "macmini",
425 .pci_subdevice = 0x2668, /* DFI LanParty */ 444};
426 .config = STAC_REF }, /* SigmaTel reference board */ 445
427 /* Intel 945G based systems */ 446static struct snd_pci_quirk stac922x_cfg_tbl[] = {
428 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 447 /* SigmaTel reference board */
429 .pci_subdevice = 0x0101, 448 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
430 .config = STAC_D945GTP3 }, /* Intel D945GTP - 3 Stack */ 449 "DFI LanParty", STAC_D945_REF),
431 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 450 /* Intel 945G based systems */
432 .pci_subdevice = 0x0202, 451 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0101,
433 .config = STAC_D945GTP3 }, /* Intel D945GNT - 3 Stack */ 452 "Intel D945G", STAC_D945GTP3),
434 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 453 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0202,
435 .pci_subdevice = 0x0606, 454 "Intel D945G", STAC_D945GTP3),
436 .config = STAC_D945GTP3 }, /* Intel D945GTP - 3 Stack */ 455 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0606,
437 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 456 "Intel D945G", STAC_D945GTP3),
438 .pci_subdevice = 0x0601, 457 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0601,
439 .config = STAC_D945GTP3 }, /* Intel D945GTP - 3 Stack */ 458 "Intel D945G", STAC_D945GTP3),
440 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 459 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0111,
441 .pci_subdevice = 0x0111, 460 "Intel D945G", STAC_D945GTP3),
442 .config = STAC_D945GTP3 }, /* Intel D945GZP - 3 Stack */ 461 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x1115,
443 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 462 "Intel D945G", STAC_D945GTP3),
444 .pci_subdevice = 0x1115, 463 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x1116,
445 .config = STAC_D945GTP3 }, /* Intel D945GPM - 3 Stack */ 464 "Intel D945G", STAC_D945GTP3),
446 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 465 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x1117,
447 .pci_subdevice = 0x1116, 466 "Intel D945G", STAC_D945GTP3),
448 .config = STAC_D945GTP3 }, /* Intel D945GBO - 3 Stack */ 467 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x1118,
449 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 468 "Intel D945G", STAC_D945GTP3),
450 .pci_subdevice = 0x1117, 469 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x1119,
451 .config = STAC_D945GTP3 }, /* Intel D945GPM - 3 Stack */ 470 "Intel D945G", STAC_D945GTP3),
452 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 471 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x8826,
453 .pci_subdevice = 0x1118, 472 "Intel D945G", STAC_D945GTP3),
454 .config = STAC_D945GTP3 }, /* Intel D945GPM - 3 Stack */ 473 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x5049,
455 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 474 "Intel D945G", STAC_D945GTP3),
456 .pci_subdevice = 0x1119, 475 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x5055,
457 .config = STAC_D945GTP3 }, /* Intel D945GPM - 3 Stack */ 476 "Intel D945G", STAC_D945GTP3),
458 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 477 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x5048,
459 .pci_subdevice = 0x8826, 478 "Intel D945G", STAC_D945GTP3),
460 .config = STAC_D945GTP3 }, /* Intel D945GPM - 3 Stack */ 479 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0110,
461 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 480 "Intel D945G", STAC_D945GTP3),
462 .pci_subdevice = 0x5049, 481 /* Intel D945G 5-stack systems */
463 .config = STAC_D945GTP3 }, /* Intel D945GCZ - 3 Stack */ 482 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0404,
464 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 483 "Intel D945G", STAC_D945GTP5),
465 .pci_subdevice = 0x5055, 484 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0303,
466 .config = STAC_D945GTP3 }, /* Intel D945GCZ - 3 Stack */ 485 "Intel D945G", STAC_D945GTP5),
467 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 486 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0013,
468 .pci_subdevice = 0x5048, 487 "Intel D945G", STAC_D945GTP5),
469 .config = STAC_D945GTP3 }, /* Intel D945GPB - 3 Stack */ 488 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0417,
470 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 489 "Intel D945G", STAC_D945GTP5),
471 .pci_subdevice = 0x0110, 490 /* Intel 945P based systems */
472 .config = STAC_D945GTP3 }, /* Intel D945GLR - 3 Stack */ 491 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0b0b,
473 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 492 "Intel D945P", STAC_D945GTP3),
474 .pci_subdevice = 0x0404, 493 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0112,
475 .config = STAC_D945GTP5 }, /* Intel D945GTP - 5 Stack */ 494 "Intel D945P", STAC_D945GTP3),
476 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 495 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0d0d,
477 .pci_subdevice = 0x0303, 496 "Intel D945P", STAC_D945GTP3),
478 .config = STAC_D945GTP5 }, /* Intel D945GNT - 5 Stack */ 497 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0909,
479 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 498 "Intel D945P", STAC_D945GTP3),
480 .pci_subdevice = 0x0013, 499 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0505,
481 .config = STAC_D945GTP5 }, /* Intel D955XBK - 5 Stack */ 500 "Intel D945P", STAC_D945GTP3),
482 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 501 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0707,
483 .pci_subdevice = 0x0417, 502 "Intel D945P", STAC_D945GTP5),
484 .config = STAC_D945GTP5 }, /* Intel D975XBK - 5 Stack */ 503 /* other systems */
485 /* Intel 945P based systems */ 504 /* Apple Mac Mini (early 2006) */
486 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 505 SND_PCI_QUIRK(0x8384, 0x7680,
487 .pci_subdevice = 0x0b0b, 506 "Mac Mini", STAC_MACMINI),
488 .config = STAC_D945GTP3 }, /* Intel D945PSN - 3 Stack */
489 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
490 .pci_subdevice = 0x0112,
491 .config = STAC_D945GTP3 }, /* Intel D945PLN - 3 Stack */
492 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
493 .pci_subdevice = 0x0d0d,
494 .config = STAC_D945GTP3 }, /* Intel D945PLM - 3 Stack */
495 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
496 .pci_subdevice = 0x0909,
497 .config = STAC_D945GTP3 }, /* Intel D945PAW - 3 Stack */
498 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
499 .pci_subdevice = 0x0505,
500 .config = STAC_D945GTP3 }, /* Intel D945PLM - 3 Stack */
501 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
502 .pci_subdevice = 0x0707,
503 .config = STAC_D945GTP5 }, /* Intel D945PSV - 5 Stack */
504 /* other systems */
505 { .pci_subvendor = 0x8384,
506 .pci_subdevice = 0x7680,
507 .config = STAC_MACMINI }, /* Apple Mac Mini (early 2006) */
508 {} /* terminator */ 507 {} /* terminator */
509}; 508};
510 509
@@ -530,102 +529,51 @@ static unsigned int d965_5st_pin_configs[14] = {
530}; 529};
531 530
532static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = { 531static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = {
533 [STAC_REF] = ref927x_pin_configs, 532 [STAC_D965_REF] = ref927x_pin_configs,
534 [STAC_D965_3ST] = d965_3st_pin_configs, 533 [STAC_D965_3ST] = d965_3st_pin_configs,
535 [STAC_D965_5ST] = d965_5st_pin_configs, 534 [STAC_D965_5ST] = d965_5st_pin_configs,
536}; 535};
537 536
538static struct hda_board_config stac927x_cfg_tbl[] = { 537static const char *stac927x_models[STAC_927X_MODELS] = {
539 { .modelname = "5stack", .config = STAC_D965_5ST }, 538 [STAC_D965_REF] = "ref",
540 { .modelname = "3stack", .config = STAC_D965_3ST }, 539 [STAC_D965_3ST] = "3stack",
541 { .modelname = "ref", 540 [STAC_D965_5ST] = "5stack",
542 .pci_subvendor = PCI_VENDOR_ID_INTEL, 541};
543 .pci_subdevice = 0x2668, /* DFI LanParty */ 542
544 .config = STAC_REF }, /* SigmaTel reference board */ 543static struct snd_pci_quirk stac927x_cfg_tbl[] = {
544 /* SigmaTel reference board */
545 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
546 "DFI LanParty", STAC_D965_REF),
545 /* Intel 946 based systems */ 547 /* Intel 946 based systems */
546 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 548 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x3d01, "Intel D946", STAC_D965_3ST),
547 .pci_subdevice = 0x3d01, 549 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0xa301, "Intel D946", STAC_D965_3ST),
548 .config = STAC_D965_3ST }, /* D946 configuration */
549 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
550 .pci_subdevice = 0xa301,
551 .config = STAC_D965_3ST }, /* Intel D946GZT - 3 stack */
552 /* 965 based 3 stack systems */ 550 /* 965 based 3 stack systems */
553 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 551 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2116, "Intel D965", STAC_D965_3ST),
554 .pci_subdevice = 0x2116, 552 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2115, "Intel D965", STAC_D965_3ST),
555 .config = STAC_D965_3ST }, /* Intel D965 3Stack config */ 553 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2114, "Intel D965", STAC_D965_3ST),
556 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 554 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2113, "Intel D965", STAC_D965_3ST),
557 .pci_subdevice = 0x2115, 555 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2112, "Intel D965", STAC_D965_3ST),
558 .config = STAC_D965_3ST }, /* Intel DQ965WC - 3 Stack */ 556 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2111, "Intel D965", STAC_D965_3ST),
559 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 557 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2110, "Intel D965", STAC_D965_3ST),
560 .pci_subdevice = 0x2114, 558 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2009, "Intel D965", STAC_D965_3ST),
561 .config = STAC_D965_3ST }, /* Intel D965 3Stack config */ 559 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2008, "Intel D965", STAC_D965_3ST),
562 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 560 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2007, "Intel D965", STAC_D965_3ST),
563 .pci_subdevice = 0x2113, 561 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2006, "Intel D965", STAC_D965_3ST),
564 .config = STAC_D965_3ST }, /* Intel D965 3Stack config */ 562 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2005, "Intel D965", STAC_D965_3ST),
565 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 563 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2004, "Intel D965", STAC_D965_3ST),
566 .pci_subdevice = 0x2112, 564 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2003, "Intel D965", STAC_D965_3ST),
567 .config = STAC_D965_3ST }, /* Intel DG965MS - 3 Stack */ 565 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2002, "Intel D965", STAC_D965_3ST),
568 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 566 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2001, "Intel D965", STAC_D965_3ST),
569 .pci_subdevice = 0x2111,
570 .config = STAC_D965_3ST }, /* Intel D965 3Stack config */
571 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
572 .pci_subdevice = 0x2110,
573 .config = STAC_D965_3ST }, /* Intel D965 3Stack config */
574 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
575 .pci_subdevice = 0x2009,
576 .config = STAC_D965_3ST }, /* Intel D965 3Stack config */
577 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
578 .pci_subdevice = 0x2008,
579 .config = STAC_D965_3ST }, /* Intel DQ965GF - 3 Stack */
580 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
581 .pci_subdevice = 0x2007,
582 .config = STAC_D965_3ST }, /* Intel D965 3Stack config */
583 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
584 .pci_subdevice = 0x2006,
585 .config = STAC_D965_3ST }, /* Intel D965 3Stack config */
586 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
587 .pci_subdevice = 0x2005,
588 .config = STAC_D965_3ST }, /* Intel D965 3Stack config */
589 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
590 .pci_subdevice = 0x2004,
591 .config = STAC_D965_3ST }, /* Intel D965 3Stack config */
592 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
593 .pci_subdevice = 0x2003,
594 .config = STAC_D965_3ST }, /* Intel D965 3Stack config */
595 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
596 .pci_subdevice = 0x2002,
597 .config = STAC_D965_3ST }, /* Intel D965 3Stack config */
598 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
599 .pci_subdevice = 0x2001,
600 .config = STAC_D965_3ST }, /* Intel DQ965GF - 3 Stack */
601 /* 965 based 5 stack systems */ 567 /* 965 based 5 stack systems */
602 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 568 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2301, "Intel D965", STAC_D965_5ST),
603 .pci_subdevice = 0x2301, 569 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2302, "Intel D965", STAC_D965_5ST),
604 .config = STAC_D965_5ST }, /* Intel DG965 - 5 Stack */ 570 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2303, "Intel D965", STAC_D965_5ST),
605 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 571 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2304, "Intel D965", STAC_D965_5ST),
606 .pci_subdevice = 0x2302, 572 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2305, "Intel D965", STAC_D965_5ST),
607 .config = STAC_D965_5ST }, /* Intel DG965 - 5 Stack */ 573 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2501, "Intel D965", STAC_D965_5ST),
608 { .pci_subvendor = PCI_VENDOR_ID_INTEL, 574 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2502, "Intel D965", STAC_D965_5ST),
609 .pci_subdevice = 0x2303, 575 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2503, "Intel D965", STAC_D965_5ST),
610 .config = STAC_D965_5ST }, /* Intel DG965 - 5 Stack */ 576 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2504, "Intel D965", STAC_D965_5ST),
611 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
612 .pci_subdevice = 0x2304,
613 .config = STAC_D965_5ST }, /* Intel DG965 - 5 Stack */
614 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
615 .pci_subdevice = 0x2305,
616 .config = STAC_D965_5ST }, /* Intel DG965 - 5 Stack */
617 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
618 .pci_subdevice = 0x2501,
619 .config = STAC_D965_5ST }, /* Intel DG965MQ - 5 Stack */
620 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
621 .pci_subdevice = 0x2502,
622 .config = STAC_D965_5ST }, /* Intel DG965 - 5 Stack */
623 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
624 .pci_subdevice = 0x2503,
625 .config = STAC_D965_5ST }, /* Intel DG965 - 5 Stack */
626 { .pci_subvendor = PCI_VENDOR_ID_INTEL,
627 .pci_subdevice = 0x2504,
628 .config = STAC_D965_5ST }, /* Intel DQ965GF - 5 Stack */
629 {} /* terminator */ 577 {} /* terminator */
630}; 578};
631 579
@@ -635,15 +583,18 @@ static unsigned int ref9205_pin_configs[12] = {
635 0x90a000f0, 0x90a000f0, 0x01441030, 0x01c41030 583 0x90a000f0, 0x90a000f0, 0x01441030, 0x01c41030
636}; 584};
637 585
638static unsigned int *stac9205_brd_tbl[] = { 586static unsigned int *stac9205_brd_tbl[STAC_9205_MODELS] = {
639 ref9205_pin_configs, 587 ref9205_pin_configs,
640}; 588};
641 589
642static struct hda_board_config stac9205_cfg_tbl[] = { 590static const char *stac9205_models[STAC_9205_MODELS] = {
643 { .modelname = "ref", 591 [STAC_9205_REF] = "ref",
644 .pci_subvendor = PCI_VENDOR_ID_INTEL, 592};
645 .pci_subdevice = 0x2668, /* DFI LanParty */ 593
646 .config = STAC_REF }, /* SigmaTel reference board */ 594static struct snd_pci_quirk stac9205_cfg_tbl[] = {
595 /* SigmaTel reference board */
596 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
597 "DFI LanParty", STAC_9205_REF),
647 {} /* terminator */ 598 {} /* terminator */
648}; 599};
649 600
@@ -1710,7 +1661,9 @@ static int patch_stac9200(struct hda_codec *codec)
1710 codec->spec = spec; 1661 codec->spec = spec;
1711 spec->num_pins = 8; 1662 spec->num_pins = 8;
1712 spec->pin_nids = stac9200_pin_nids; 1663 spec->pin_nids = stac9200_pin_nids;
1713 spec->board_config = snd_hda_check_board_config(codec, stac9200_cfg_tbl); 1664 spec->board_config = snd_hda_check_board_config(codec, STAC_9200_MODELS,
1665 stac9200_models,
1666 stac9200_cfg_tbl);
1714 if (spec->board_config < 0) { 1667 if (spec->board_config < 0) {
1715 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC9200, using BIOS defaults\n"); 1668 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC9200, using BIOS defaults\n");
1716 err = stac92xx_save_bios_config_regs(codec); 1669 err = stac92xx_save_bios_config_regs(codec);
@@ -1758,7 +1711,9 @@ static int patch_stac922x(struct hda_codec *codec)
1758 codec->spec = spec; 1711 codec->spec = spec;
1759 spec->num_pins = 10; 1712 spec->num_pins = 10;
1760 spec->pin_nids = stac922x_pin_nids; 1713 spec->pin_nids = stac922x_pin_nids;
1761 spec->board_config = snd_hda_check_board_config(codec, stac922x_cfg_tbl); 1714 spec->board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS,
1715 stac922x_models,
1716 stac922x_cfg_tbl);
1762 if (spec->board_config < 0) { 1717 if (spec->board_config < 0) {
1763 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC922x, " 1718 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC922x, "
1764 "using BIOS defaults\n"); 1719 "using BIOS defaults\n");
@@ -1809,7 +1764,9 @@ static int patch_stac927x(struct hda_codec *codec)
1809 codec->spec = spec; 1764 codec->spec = spec;
1810 spec->num_pins = 14; 1765 spec->num_pins = 14;
1811 spec->pin_nids = stac927x_pin_nids; 1766 spec->pin_nids = stac927x_pin_nids;
1812 spec->board_config = snd_hda_check_board_config(codec, stac927x_cfg_tbl); 1767 spec->board_config = snd_hda_check_board_config(codec, STAC_927X_MODELS,
1768 stac927x_models,
1769 stac927x_cfg_tbl);
1813 if (spec->board_config < 0) { 1770 if (spec->board_config < 0) {
1814 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC927x, using BIOS defaults\n"); 1771 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC927x, using BIOS defaults\n");
1815 err = stac92xx_save_bios_config_regs(codec); 1772 err = stac92xx_save_bios_config_regs(codec);
@@ -1874,7 +1831,9 @@ static int patch_stac9205(struct hda_codec *codec)
1874 codec->spec = spec; 1831 codec->spec = spec;
1875 spec->num_pins = 14; 1832 spec->num_pins = 14;
1876 spec->pin_nids = stac9205_pin_nids; 1833 spec->pin_nids = stac9205_pin_nids;
1877 spec->board_config = snd_hda_check_board_config(codec, stac9205_cfg_tbl); 1834 spec->board_config = snd_hda_check_board_config(codec, STAC_9205_MODELS,
1835 stac9205_models,
1836 stac9205_cfg_tbl);
1878 if (spec->board_config < 0) { 1837 if (spec->board_config < 0) {
1879 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC9205, using BIOS defaults\n"); 1838 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC9205, using BIOS defaults\n");
1880 err = stac92xx_save_bios_config_regs(codec); 1839 err = stac92xx_save_bios_config_regs(codec);
@@ -2083,18 +2042,19 @@ enum { /* FE and SZ series. id=0x83847661 and subsys=0x104D0700 or 104D1000. */
2083 /* Unknown. id=0x83847661 and subsys=0x104D1200. */ 2042 /* Unknown. id=0x83847661 and subsys=0x104D1200. */
2084 STAC9872K_VAIO, 2043 STAC9872K_VAIO,
2085 /* AR Series. id=0x83847664 and subsys=104D1300 */ 2044 /* AR Series. id=0x83847664 and subsys=104D1300 */
2086 CXD9872AKD_VAIO 2045 CXD9872AKD_VAIO,
2087 }; 2046 STAC_9872_MODELS,
2088 2047};
2089static struct hda_board_config stac9872_cfg_tbl[] = { 2048
2090 { .modelname = "vaio", .config = CXD9872RD_VAIO }, 2049static const char *stac9872_models[STAC_9872_MODELS] = {
2091 { .modelname = "vaio-ar", .config = CXD9872AKD_VAIO }, 2050 [CXD9872RD_VAIO] = "vaio",
2092 { .pci_subvendor = 0x104d, .pci_subdevice = 0x81e6, 2051 [CXD9872AKD_VAIO] = "vaio-ar",
2093 .config = CXD9872RD_VAIO }, 2052};
2094 { .pci_subvendor = 0x104d, .pci_subdevice = 0x81ef, 2053
2095 .config = CXD9872RD_VAIO }, 2054static struct snd_pci_quirk stac9872_cfg_tbl[] = {
2096 { .pci_subvendor = 0x104d, .pci_subdevice = 0x81fd, 2055 SND_PCI_QUIRK(0x104d, 0x81e6, "Sony VAIO F/S", CXD9872RD_VAIO),
2097 .config = CXD9872AKD_VAIO }, 2056 SND_PCI_QUIRK(0x104d, 0x81ef, "Sony VAIO F/S", CXD9872RD_VAIO),
2057 SND_PCI_QUIRK(0x104d, 0x81fd, "Sony VAIO AR", CXD9872AKD_VAIO),
2098 {} 2058 {}
2099}; 2059};
2100 2060
@@ -2103,7 +2063,9 @@ static int patch_stac9872(struct hda_codec *codec)
2103 struct sigmatel_spec *spec; 2063 struct sigmatel_spec *spec;
2104 int board_config; 2064 int board_config;
2105 2065
2106 board_config = snd_hda_check_board_config(codec, stac9872_cfg_tbl); 2066 board_config = snd_hda_check_board_config(codec, STAC_9872_MODELS,
2067 stac9872_models,
2068 stac9872_cfg_tbl);
2107 if (board_config < 0) 2069 if (board_config < 0)
2108 /* unknown config, let generic-parser do its job... */ 2070 /* unknown config, let generic-parser do its job... */
2109 return snd_hda_parse_generic_codec(codec); 2071 return snd_hda_parse_generic_codec(codec);