aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-11-24 11:07:44 -0500
committerJaroslav Kysela <perex@suse.cz>2007-02-09 03:02:04 -0500
commitf5fcc13c2fc62da6f75d80189a51c2492afb39c0 (patch)
treea08340173113cd5f64653b81b656f58ecb27a091 /sound/pci/hda/patch_realtek.c
parent0b830bac35dd6e3996bee675c3893857da8a4d0a (diff)
[ALSA] hda-codec - Use snd_pci_quirk_lookup() for board config lookup
Use snd_pci_quirk_lookup() for looking up a board config table. The config table is sorted in numerical order of PCI SSIDs. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c550
1 files changed, 235 insertions, 315 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 02c465147d98..415a6db4c909 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2328,162 +2328,108 @@ static struct hda_verb alc880_test_init_verbs[] = {
2328/* 2328/*
2329 */ 2329 */
2330 2330
2331static struct hda_board_config alc880_cfg_tbl[] = { 2331static const char *alc880_models[ALC880_MODEL_LAST] = {
2332 /* Back 3 jack, front 2 jack */ 2332 [ALC880_3ST] = "3stack",
2333 { .modelname = "3stack", .config = ALC880_3ST }, 2333 [ALC880_TCL_S700] = "tcl",
2334 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe200, .config = ALC880_3ST }, 2334 [ALC880_3ST_DIG] = "3stack-digout",
2335 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe201, .config = ALC880_3ST }, 2335 [ALC880_CLEVO] = "clevo",
2336 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe202, .config = ALC880_3ST }, 2336 [ALC880_5ST] = "5stack",
2337 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe203, .config = ALC880_3ST }, 2337 [ALC880_5ST_DIG] = "5stack-digout",
2338 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe204, .config = ALC880_3ST }, 2338 [ALC880_W810] = "w810",
2339 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe205, .config = ALC880_3ST }, 2339 [ALC880_Z71V] = "z71v",
2340 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe206, .config = ALC880_3ST }, 2340 [ALC880_6ST] = "6stack",
2341 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe207, .config = ALC880_3ST }, 2341 [ALC880_6ST_DIG] = "6stack-digout",
2342 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe208, .config = ALC880_3ST }, 2342 [ALC880_ASUS] = "asus",
2343 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe209, .config = ALC880_3ST }, 2343 [ALC880_ASUS_W1V] = "asus-w1v",
2344 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe20a, .config = ALC880_3ST }, 2344 [ALC880_ASUS_DIG] = "asus-dig",
2345 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe20b, .config = ALC880_3ST }, 2345 [ALC880_ASUS_DIG2] = "asus-dig2",
2346 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe20c, .config = ALC880_3ST }, 2346 [ALC880_UNIWILL_DIG] = "uniwill",
2347 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe20d, .config = ALC880_3ST }, 2347 [ALC880_F1734] = "F1734",
2348 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe20e, .config = ALC880_3ST }, 2348 [ALC880_LG] = "lg",
2349 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe20f, .config = ALC880_3ST }, 2349 [ALC880_LG_LW] = "lg-lw",
2350 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe210, .config = ALC880_3ST },
2351 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe211, .config = ALC880_3ST },
2352 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe212, .config = ALC880_3ST },
2353 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe213, .config = ALC880_3ST },
2354 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe214, .config = ALC880_3ST },
2355 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe234, .config = ALC880_3ST },
2356 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe302, .config = ALC880_3ST },
2357 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe303, .config = ALC880_3ST },
2358 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe304, .config = ALC880_3ST },
2359 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe306, .config = ALC880_3ST },
2360 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe307, .config = ALC880_3ST },
2361 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe404, .config = ALC880_3ST },
2362 { .pci_subvendor = 0x8086, .pci_subdevice = 0xa101, .config = ALC880_3ST },
2363 { .pci_subvendor = 0x107b, .pci_subdevice = 0x3031, .config = ALC880_3ST },
2364 { .pci_subvendor = 0x107b, .pci_subdevice = 0x4036, .config = ALC880_3ST },
2365 { .pci_subvendor = 0x107b, .pci_subdevice = 0x4037, .config = ALC880_3ST },
2366 { .pci_subvendor = 0x107b, .pci_subdevice = 0x4038, .config = ALC880_3ST },
2367 { .pci_subvendor = 0x107b, .pci_subdevice = 0x4040, .config = ALC880_3ST },
2368 { .pci_subvendor = 0x107b, .pci_subdevice = 0x4041, .config = ALC880_3ST },
2369 /* TCL S700 */
2370 { .modelname = "tcl", .config = ALC880_TCL_S700 },
2371 { .pci_subvendor = 0x19db, .pci_subdevice = 0x4188, .config = ALC880_TCL_S700 },
2372
2373 /* Back 3 jack, front 2 jack (Internal add Aux-In) */
2374 { .pci_subvendor = 0x1025, .pci_subdevice = 0xe310, .config = ALC880_3ST },
2375 { .pci_subvendor = 0x104d, .pci_subdevice = 0x81d6, .config = ALC880_3ST },
2376 { .pci_subvendor = 0x104d, .pci_subdevice = 0x81a0, .config = ALC880_3ST },
2377
2378 /* Back 3 jack plus 1 SPDIF out jack, front 2 jack */
2379 { .modelname = "3stack-digout", .config = ALC880_3ST_DIG },
2380 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe308, .config = ALC880_3ST_DIG },
2381 { .pci_subvendor = 0x1025, .pci_subdevice = 0x0070, .config = ALC880_3ST_DIG },
2382
2383 /* Clevo laptops */
2384 { .modelname = "clevo", .config = ALC880_CLEVO },
2385 { .pci_subvendor = 0x1558, .pci_subdevice = 0x0520,
2386 .config = ALC880_CLEVO }, /* Clevo m520G NB */
2387 { .pci_subvendor = 0x1558, .pci_subdevice = 0x0660,
2388 .config = ALC880_CLEVO }, /* Clevo m665n */
2389
2390 /* Back 3 jack plus 1 SPDIF out jack, front 2 jack (Internal add Aux-In)*/
2391 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe305, .config = ALC880_3ST_DIG },
2392 { .pci_subvendor = 0x8086, .pci_subdevice = 0xd402, .config = ALC880_3ST_DIG },
2393 { .pci_subvendor = 0x1025, .pci_subdevice = 0xe309, .config = ALC880_3ST_DIG },
2394
2395 /* Back 5 jack, front 2 jack */
2396 { .modelname = "5stack", .config = ALC880_5ST },
2397 { .pci_subvendor = 0x107b, .pci_subdevice = 0x3033, .config = ALC880_5ST },
2398 { .pci_subvendor = 0x107b, .pci_subdevice = 0x4039, .config = ALC880_5ST },
2399 { .pci_subvendor = 0x107b, .pci_subdevice = 0x3032, .config = ALC880_5ST },
2400 { .pci_subvendor = 0x103c, .pci_subdevice = 0x2a09, .config = ALC880_5ST },
2401 { .pci_subvendor = 0x1043, .pci_subdevice = 0x814e, .config = ALC880_5ST },
2402
2403 /* Back 5 jack plus 1 SPDIF out jack, front 2 jack */
2404 { .modelname = "5stack-digout", .config = ALC880_5ST_DIG },
2405 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe224, .config = ALC880_5ST_DIG },
2406 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe400, .config = ALC880_5ST_DIG },
2407 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe401, .config = ALC880_5ST_DIG },
2408 { .pci_subvendor = 0x8086, .pci_subdevice = 0xe402, .config = ALC880_5ST_DIG },
2409 { .pci_subvendor = 0x8086, .pci_subdevice = 0xd400, .config = ALC880_5ST_DIG },
2410 { .pci_subvendor = 0x8086, .pci_subdevice = 0xd401, .config = ALC880_5ST_DIG },
2411 { .pci_subvendor = 0x8086, .pci_subdevice = 0xa100, .config = ALC880_5ST_DIG },
2412 { .pci_subvendor = 0x1565, .pci_subdevice = 0x8202, .config = ALC880_5ST_DIG },
2413 { .pci_subvendor = 0x1019, .pci_subdevice = 0xa880, .config = ALC880_5ST_DIG },
2414 { .pci_subvendor = 0xa0a0, .pci_subdevice = 0x0560,
2415 .config = ALC880_5ST_DIG }, /* Aopen i915GMm-HFS */
2416 /* { .pci_subvendor = 0x1019, .pci_subdevice = 0xa884, .config = ALC880_5ST_DIG }, */ /* conflict with 6stack */
2417 { .pci_subvendor = 0x1695, .pci_subdevice = 0x400d, .config = ALC880_5ST_DIG },
2418 /* note subvendor = 0 below */
2419 /* { .pci_subvendor = 0x0000, .pci_subdevice = 0x8086, .config = ALC880_5ST_DIG }, */
2420
2421 { .modelname = "w810", .config = ALC880_W810 },
2422 { .pci_subvendor = 0x161f, .pci_subdevice = 0x203d, .config = ALC880_W810 },
2423
2424 { .modelname = "z71v", .config = ALC880_Z71V },
2425 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1964, .config = ALC880_Z71V },
2426
2427 { .modelname = "6stack", .config = ALC880_6ST },
2428 { .pci_subvendor = 0x1043, .pci_subdevice = 0x8196, .config = ALC880_6ST }, /* ASUS P5GD1-HVM */
2429 { .pci_subvendor = 0x1043, .pci_subdevice = 0x81b4, .config = ALC880_6ST },
2430 { .pci_subvendor = 0x1019, .pci_subdevice = 0xa884, .config = ALC880_6ST }, /* Acer APFV */
2431
2432 { .modelname = "6stack-digout", .config = ALC880_6ST_DIG },
2433 { .pci_subvendor = 0x2668, .pci_subdevice = 0x8086, .config = ALC880_6ST_DIG },
2434 { .pci_subvendor = 0x8086, .pci_subdevice = 0x2668, .config = ALC880_6ST_DIG },
2435 { .pci_subvendor = 0x1462, .pci_subdevice = 0x1150, .config = ALC880_6ST_DIG },
2436 { .pci_subvendor = 0xe803, .pci_subdevice = 0x1019, .config = ALC880_6ST_DIG },
2437 { .pci_subvendor = 0x1039, .pci_subdevice = 0x1234, .config = ALC880_6ST_DIG },
2438 { .pci_subvendor = 0x1025, .pci_subdevice = 0x0077, .config = ALC880_6ST_DIG },
2439 { .pci_subvendor = 0x1025, .pci_subdevice = 0x0078, .config = ALC880_6ST_DIG },
2440 { .pci_subvendor = 0x1025, .pci_subdevice = 0x0087, .config = ALC880_6ST_DIG },
2441 { .pci_subvendor = 0x1297, .pci_subdevice = 0xc790, .config = ALC880_6ST_DIG }, /* Shuttle ST20G5 */
2442 { .pci_subvendor = 0x1509, .pci_subdevice = 0x925d, .config = ALC880_6ST_DIG }, /* FIC P4M-915GD1 */
2443 { .pci_subvendor = 0x1695, .pci_subdevice = 0x4012, .config = ALC880_5ST_DIG }, /* Epox EP-5LDA+ GLi */
2444 { .pci_subvendor = 0x1458, .pci_subdevice = 0xa102, .config = ALC880_6ST_DIG }, /* Gigabyte K8N51 */
2445
2446 { .modelname = "asus", .config = ALC880_ASUS },
2447 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1964, .config = ALC880_ASUS_DIG },
2448 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1973, .config = ALC880_ASUS_DIG },
2449 { .pci_subvendor = 0x1043, .pci_subdevice = 0x19b3, .config = ALC880_ASUS_DIG },
2450 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1113, .config = ALC880_ASUS_DIG },
2451 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1173, .config = ALC880_ASUS_DIG },
2452 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1993, .config = ALC880_ASUS },
2453 { .pci_subvendor = 0x1043, .pci_subdevice = 0x10c2, .config = ALC880_ASUS_DIG }, /* Asus W6A */
2454 { .pci_subvendor = 0x1043, .pci_subdevice = 0x10c3, .config = ALC880_ASUS_DIG },
2455 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1133, .config = ALC880_ASUS },
2456 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1123, .config = ALC880_ASUS_DIG },
2457 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1143, .config = ALC880_ASUS },
2458 { .modelname = "asus-w1v", .config = ALC880_ASUS_W1V },
2459 { .pci_subvendor = 0x1043, .pci_subdevice = 0x10b3, .config = ALC880_ASUS_W1V },
2460 { .modelname = "asus-dig", .config = ALC880_ASUS_DIG },
2461 { .pci_subvendor = 0x1043, .pci_subdevice = 0x8181, .config = ALC880_ASUS_DIG }, /* ASUS P4GPL-X */
2462 { .modelname = "asus-dig2", .config = ALC880_ASUS_DIG2 },
2463 { .pci_subvendor = 0x1558, .pci_subdevice = 0x5401, .config = ALC880_ASUS_DIG2 },
2464
2465 { .modelname = "uniwill", .config = ALC880_UNIWILL_DIG },
2466 { .pci_subvendor = 0x1584, .pci_subdevice = 0x9050, .config = ALC880_UNIWILL_DIG },
2467 { .pci_subvendor = 0x1584, .pci_subdevice = 0x9070, .config = ALC880_UNIWILL },
2468 { .pci_subvendor = 0x1734, .pci_subdevice = 0x10ac, .config = ALC880_UNIWILL },
2469 { .pci_subvendor = 0x1584, .pci_subdevice = 0x9077, .config = ALC880_UNIWILL_P53 },
2470
2471 { .modelname = "F1734", .config = ALC880_F1734 },
2472 { .pci_subvendor = 0x1734, .pci_subdevice = 0x107c, .config = ALC880_F1734 },
2473 { .pci_subvendor = 0x1584, .pci_subdevice = 0x9054, .config = ALC880_F1734 },
2474
2475 { .modelname = "lg", .config = ALC880_LG },
2476 { .pci_subvendor = 0x1854, .pci_subdevice = 0x003b, .config = ALC880_LG },
2477 { .pci_subvendor = 0x1854, .pci_subdevice = 0x0068, .config = ALC880_LG },
2478
2479 { .modelname = "lg-lw", .config = ALC880_LG_LW },
2480 { .pci_subvendor = 0x1854, .pci_subdevice = 0x0018, .config = ALC880_LG_LW },
2481 { .pci_subvendor = 0x1854, .pci_subdevice = 0x0077, .config = ALC880_LG_LW },
2482
2483#ifdef CONFIG_SND_DEBUG 2350#ifdef CONFIG_SND_DEBUG
2484 { .modelname = "test", .config = ALC880_TEST }, 2351 [ALC880_TEST] = "test",
2485#endif 2352#endif
2486 { .modelname = "auto", .config = ALC880_AUTO }, 2353 [ALC880_AUTO] = "auto",
2354};
2355
2356static struct snd_pci_quirk alc880_cfg_tbl[] = {
2357 /* Broken BIOS configuration */
2358 SND_PCI_QUIRK(0x2668, 0x8086, NULL, ALC880_6ST_DIG),
2359 SND_PCI_QUIRK(0x8086, 0x2668, NULL, ALC880_6ST_DIG),
2360
2361 SND_PCI_QUIRK(0x1019, 0xa880, "ECS", ALC880_5ST_DIG),
2362 SND_PCI_QUIRK(0x1019, 0xa884, "Acer APFV", ALC880_6ST),
2363 SND_PCI_QUIRK(0x1025, 0x0070, "ULI", ALC880_3ST_DIG),
2364 SND_PCI_QUIRK(0x1025, 0x0077, "ULI", ALC880_6ST_DIG),
2365 SND_PCI_QUIRK(0x1025, 0x0078, "ULI", ALC880_6ST_DIG),
2366 SND_PCI_QUIRK(0x1025, 0x0087, "ULI", ALC880_6ST_DIG),
2367 SND_PCI_QUIRK(0x1025, 0xe309, "ULI", ALC880_3ST_DIG),
2368 SND_PCI_QUIRK(0x1025, 0xe310, "ULI", ALC880_3ST),
2369
2370 SND_PCI_QUIRK(0x1039, 0x1234, NULL, ALC880_6ST_DIG),
2371 SND_PCI_QUIRK(0x103c, 0x2a09, "HP", ALC880_5ST),
2372
2373 SND_PCI_QUIRK(0x1043, 0x10b3, "ASUS W1V", ALC880_ASUS_W1V),
2374 SND_PCI_QUIRK(0x1043, 0x10c2, "ASUS W6A", ALC880_ASUS_DIG),
2375 SND_PCI_QUIRK(0x1043, 0x10c3, "ASUS Wxx", ALC880_ASUS_DIG),
2376 SND_PCI_QUIRK(0x1043, 0x1113, "ASUS", ALC880_ASUS_DIG),
2377 SND_PCI_QUIRK(0x1043, 0x1123, "ASUS", ALC880_ASUS_DIG),
2378 SND_PCI_QUIRK(0x1043, 0x1173, "ASUS", ALC880_ASUS_DIG),
2379 SND_PCI_QUIRK(0x1043, 0x1964, "ASUS Z71V", ALC880_Z71V),
2380 /* SND_PCI_QUIRK(0x1043, 0x1964, "ASUS", ALC880_ASUS_DIG), */
2381 SND_PCI_QUIRK(0x1043, 0x1973, "ASUS", ALC880_ASUS_DIG),
2382 SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS", ALC880_ASUS_DIG),
2383 SND_PCI_QUIRK(0x1043, 0x814e, "ASUS", ALC880_5ST),
2384 SND_PCI_QUIRK(0x1043, 0x8181, "ASUS P4GPL", ALC880_ASUS_DIG),
2385 SND_PCI_QUIRK(0x1043, 0x8196, "ASUS P5GD1", ALC880_6ST),
2386 SND_PCI_QUIRK(0x1043, 0x81b4, "ASUS", ALC880_6ST),
2387 SND_PCI_QUIRK(0x1043, 0, "ASUS", ALC880_ASUS),
2388
2389 SND_PCI_QUIRK(0x104d, 0x81d6, "Sony", ALC880_3ST),
2390 SND_PCI_QUIRK(0x104d, 0x81a0, "Sony", ALC880_3ST),
2391 SND_PCI_QUIRK(0x107b, 0x3033, "Gateway", ALC880_5ST),
2392 SND_PCI_QUIRK(0x107b, 0x4039, "Gateway", ALC880_5ST),
2393 SND_PCI_QUIRK(0x107b, 0x3032, "Gateway", ALC880_5ST),
2394 SND_PCI_QUIRK(0x1558, 0x0520, "Clevo m520G", ALC880_CLEVO),
2395 SND_PCI_QUIRK(0x1558, 0x0660, "Clevo m655n", ALC880_CLEVO),
2396 SND_PCI_QUIRK(0x1565, 0x8202, "Biostar", ALC880_5ST_DIG),
2397 SND_PCI_QUIRK(0x161f, 0x203d, "W810", ALC880_W810),
2398 SND_PCI_QUIRK(0x1695, 0x400d, "EPoX", ALC880_5ST_DIG),
2399 SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_TCL_S700),
2400 SND_PCI_QUIRK(0xa0a0, 0x0560, "AOpen i915GMm-HFS", ALC880_5ST_DIG),
2401 SND_PCI_QUIRK(0xe803, 0x1019, NULL, ALC880_6ST_DIG),
2402 SND_PCI_QUIRK(0x1297, 0xc790, "Shuttle ST20G5", ALC880_6ST_DIG),
2403 SND_PCI_QUIRK(0x1458, 0xa102, "Gigabyte K8", ALC880_6ST_DIG),
2404 SND_PCI_QUIRK(0x1462, 0x1150, "MSI", ALC880_6ST_DIG),
2405 SND_PCI_QUIRK(0x1509, 0x925d, "FIC P4M", ALC880_6ST_DIG),
2406 SND_PCI_QUIRK(0x1558, 0x5401, "ASUS", ALC880_ASUS_DIG2),
2407
2408 SND_PCI_QUIRK(0x1584, 0x9050, "Uniwill", ALC880_UNIWILL_DIG),
2409 SND_PCI_QUIRK(0x1584, 0x9070, "Uniwill", ALC880_UNIWILL),
2410 SND_PCI_QUIRK(0x1584, 0x9077, "Uniwill P53", ALC880_UNIWILL_P53),
2411 SND_PCI_QUIRK(0x1584, 0x9054, "Uniwlll", ALC880_F1734),
2412
2413 SND_PCI_QUIRK(0x1695, 0x4012, "EPox EP-5LDA", ALC880_5ST_DIG),
2414 SND_PCI_QUIRK(0x1734, 0x10ac, "FSC", ALC880_UNIWILL),
2415 SND_PCI_QUIRK(0x1734, 0x107c, "FSC F1734", ALC880_F1734),
2416
2417 SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_LG),
2418 SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_LG),
2419 SND_PCI_QUIRK(0x1854, 0x0018, "LG LW20", ALC880_LG_LW),
2420 SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_LG_LW),
2421
2422 SND_PCI_QUIRK(0x8086, 0xe308, "Intel mobo", ALC880_3ST_DIG),
2423 SND_PCI_QUIRK(0x8086, 0xe305, "Intel mobo", ALC880_3ST_DIG),
2424 SND_PCI_QUIRK(0x8086, 0xd402, "Intel mobo", ALC880_3ST_DIG),
2425 SND_PCI_QUIRK(0x8086, 0xd400, "Intel mobo", ALC880_5ST_DIG),
2426 SND_PCI_QUIRK(0x8086, 0xd401, "Intel mobo", ALC880_5ST_DIG),
2427 SND_PCI_QUIRK(0x8086, 0xe224, "Intel mobo", ALC880_5ST_DIG),
2428 SND_PCI_QUIRK(0x8086, 0xe400, "Intel mobo", ALC880_5ST_DIG),
2429 SND_PCI_QUIRK(0x8086, 0xe401, "Intel mobo", ALC880_5ST_DIG),
2430 SND_PCI_QUIRK(0x8086, 0xe402, "Intel mobo", ALC880_5ST_DIG),
2431 SND_PCI_QUIRK(0x8086, 0xa100, "Intel mobo", ALC880_5ST_DIG),
2432 SND_PCI_QUIRK(0x8086, 0, "Intel mobo", ALC880_3ST),
2487 2433
2488 {} 2434 {}
2489}; 2435};
@@ -3074,8 +3020,10 @@ static int patch_alc880(struct hda_codec *codec)
3074 3020
3075 codec->spec = spec; 3021 codec->spec = spec;
3076 3022
3077 board_config = snd_hda_check_board_config(codec, alc880_cfg_tbl); 3023 board_config = snd_hda_check_board_config(codec, ALC880_MODEL_LAST,
3078 if (board_config < 0 || board_config >= ALC880_MODEL_LAST) { 3024 alc880_models,
3025 alc880_cfg_tbl);
3026 if (board_config < 0) {
3079 printk(KERN_INFO "hda_codec: Unknown model for ALC880, " 3027 printk(KERN_INFO "hda_codec: Unknown model for ALC880, "
3080 "trying auto-probe from BIOS...\n"); 3028 "trying auto-probe from BIOS...\n");
3081 board_config = ALC880_AUTO; 3029 board_config = ALC880_AUTO;
@@ -4161,33 +4109,32 @@ static void alc260_auto_init(struct hda_codec *codec)
4161/* 4109/*
4162 * ALC260 configurations 4110 * ALC260 configurations
4163 */ 4111 */
4164static struct hda_board_config alc260_cfg_tbl[] = { 4112static const char *alc260_models[ALC260_MODEL_LAST] = {
4165 { .modelname = "basic", .config = ALC260_BASIC }, 4113 [ALC260_BASIC] = "basic",
4166 { .pci_subvendor = 0x104d, .pci_subdevice = 0x81bb, 4114 [ALC260_HP] = "hp",
4167 .config = ALC260_BASIC }, /* Sony VAIO */ 4115 [ALC260_HP_3013] = "hp-3013",
4168 { .pci_subvendor = 0x104d, .pci_subdevice = 0x81cc, 4116 [ALC260_FUJITSU_S702X] = "fujitsu",
4169 .config = ALC260_BASIC }, /* Sony VAIO VGN-S3HP */ 4117 [ALC260_ACER] = "acer",
4170 { .pci_subvendor = 0x104d, .pci_subdevice = 0x81cd,
4171 .config = ALC260_BASIC }, /* Sony VAIO */
4172 { .pci_subvendor = 0x152d, .pci_subdevice = 0x0729,
4173 .config = ALC260_BASIC }, /* CTL Travel Master U553W */
4174 { .modelname = "hp", .config = ALC260_HP },
4175 { .modelname = "hp-3013", .config = ALC260_HP_3013 },
4176 { .pci_subvendor = 0x103c, .pci_subdevice = 0x3010, .config = ALC260_HP_3013 },
4177 { .pci_subvendor = 0x103c, .pci_subdevice = 0x3011, .config = ALC260_HP },
4178 { .pci_subvendor = 0x103c, .pci_subdevice = 0x3012, .config = ALC260_HP_3013 },
4179 { .pci_subvendor = 0x103c, .pci_subdevice = 0x3013, .config = ALC260_HP_3013 },
4180 { .pci_subvendor = 0x103c, .pci_subdevice = 0x3014, .config = ALC260_HP },
4181 { .pci_subvendor = 0x103c, .pci_subdevice = 0x3015, .config = ALC260_HP },
4182 { .pci_subvendor = 0x103c, .pci_subdevice = 0x3016, .config = ALC260_HP },
4183 { .modelname = "fujitsu", .config = ALC260_FUJITSU_S702X },
4184 { .pci_subvendor = 0x10cf, .pci_subdevice = 0x1326, .config = ALC260_FUJITSU_S702X },
4185 { .modelname = "acer", .config = ALC260_ACER },
4186 { .pci_subvendor = 0x1025, .pci_subdevice = 0x008f, .config = ALC260_ACER },
4187#ifdef CONFIG_SND_DEBUG 4118#ifdef CONFIG_SND_DEBUG
4188 { .modelname = "test", .config = ALC260_TEST }, 4119 [ALC260_TEST] = "test",
4189#endif 4120#endif
4190 { .modelname = "auto", .config = ALC260_AUTO }, 4121 [ALC260_AUTO] = "auto",
4122};
4123
4124static struct snd_pci_quirk alc260_cfg_tbl[] = {
4125 SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER),
4126 SND_PCI_QUIRK(0x103c, 0x3010, "HP", ALC260_HP_3013),
4127 SND_PCI_QUIRK(0x103c, 0x3011, "HP", ALC260_HP),
4128 SND_PCI_QUIRK(0x103c, 0x3012, "HP", ALC260_HP_3013),
4129 SND_PCI_QUIRK(0x103c, 0x3013, "HP", ALC260_HP_3013),
4130 SND_PCI_QUIRK(0x103c, 0x3014, "HP", ALC260_HP),
4131 SND_PCI_QUIRK(0x103c, 0x3015, "HP", ALC260_HP),
4132 SND_PCI_QUIRK(0x103c, 0x3016, "HP", ALC260_HP),
4133 SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_BASIC),
4134 SND_PCI_QUIRK(0x104d, 0x81cc, "Sony VAIO", ALC260_BASIC),
4135 SND_PCI_QUIRK(0x104d, 0x81cd, "Sony VAIO", ALC260_BASIC),
4136 SND_PCI_QUIRK(0x10cf, 0x1326, "Fujitsu S702X", ALC260_FUJITSU_S702X),
4137 SND_PCI_QUIRK(0x152d, 0x0729, "CTL U553W", ALC260_BASIC),
4191 {} 4138 {}
4192}; 4139};
4193 4140
@@ -4286,8 +4233,10 @@ static int patch_alc260(struct hda_codec *codec)
4286 4233
4287 codec->spec = spec; 4234 codec->spec = spec;
4288 4235
4289 board_config = snd_hda_check_board_config(codec, alc260_cfg_tbl); 4236 board_config = snd_hda_check_board_config(codec, ALC260_MODEL_LAST,
4290 if (board_config < 0 || board_config >= ALC260_MODEL_LAST) { 4237 alc260_models,
4238 alc260_cfg_tbl);
4239 if (board_config < 0) {
4291 snd_printd(KERN_INFO "hda_codec: Unknown model for ALC260, " 4240 snd_printd(KERN_INFO "hda_codec: Unknown model for ALC260, "
4292 "trying auto-probe from BIOS...\n"); 4241 "trying auto-probe from BIOS...\n");
4293 board_config = ALC260_AUTO; 4242 board_config = ALC260_AUTO;
@@ -4668,19 +4617,18 @@ static struct snd_kcontrol_new alc882_capture_mixer[] = {
4668/* 4617/*
4669 * configuration and preset 4618 * configuration and preset
4670 */ 4619 */
4671static struct hda_board_config alc882_cfg_tbl[] = { 4620static const char *alc882_models[ALC882_MODEL_LAST] = {
4672 { .modelname = "3stack-dig", .config = ALC882_3ST_DIG }, 4621 [ALC882_3ST_DIG] = "3stack-dig",
4673 { .modelname = "6stack-dig", .config = ALC882_6ST_DIG }, 4622 [ALC882_6ST_DIG] = "6stack-dig",
4674 { .pci_subvendor = 0x1462, .pci_subdevice = 0x6668, 4623 [ALC882_ARIMA] = "arima",
4675 .config = ALC882_6ST_DIG }, /* MSI */ 4624 [ALC882_AUTO] = "auto",
4676 { .pci_subvendor = 0x105b, .pci_subdevice = 0x6668, 4625};
4677 .config = ALC882_6ST_DIG }, /* Foxconn */ 4626
4678 { .pci_subvendor = 0x1019, .pci_subdevice = 0x6668, 4627static struct snd_pci_quirk alc882_cfg_tbl[] = {
4679 .config = ALC882_6ST_DIG }, /* ECS to Intel*/ 4628 SND_PCI_QUIRK(0x1019, 0x6668, "ECS", ALC882_6ST_DIG),
4680 { .modelname = "arima", .config = ALC882_ARIMA }, 4629 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC882_6ST_DIG),
4681 { .pci_subvendor = 0x161f, .pci_subdevice = 0x2054, 4630 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG),
4682 .config = ALC882_ARIMA }, /* Arima W820Di1 */ 4631 SND_PCI_QUIRK(0x161f, 0x2054, "Arima W820", ALC882_ARIMA),
4683 { .modelname = "auto", .config = ALC882_AUTO },
4684 {} 4632 {}
4685}; 4633};
4686 4634
@@ -4817,7 +4765,9 @@ static int patch_alc882(struct hda_codec *codec)
4817 4765
4818 codec->spec = spec; 4766 codec->spec = spec;
4819 4767
4820 board_config = snd_hda_check_board_config(codec, alc882_cfg_tbl); 4768 board_config = snd_hda_check_board_config(codec, ALC882_MODEL_LAST,
4769 alc882_models,
4770 alc882_cfg_tbl);
4821 4771
4822 if (board_config < 0 || board_config >= ALC882_MODEL_LAST) { 4772 if (board_config < 0 || board_config >= ALC882_MODEL_LAST) {
4823 printk(KERN_INFO "hda_codec: Unknown model for ALC882, " 4773 printk(KERN_INFO "hda_codec: Unknown model for ALC882, "
@@ -5427,65 +5377,41 @@ static struct snd_kcontrol_new alc883_capture_mixer[] = {
5427/* 5377/*
5428 * configuration and preset 5378 * configuration and preset
5429 */ 5379 */
5430static struct hda_board_config alc883_cfg_tbl[] = { 5380static const char *alc883_models[ALC883_MODEL_LAST] = {
5431 { .modelname = "3stack-dig", .config = ALC883_3ST_2ch_DIG }, 5381 [ALC883_3ST_2ch_DIG] = "3stack-dig",
5432 { .modelname = "3stack-6ch-dig", .config = ALC883_3ST_6ch_DIG }, 5382 [ALC883_3ST_6ch_DIG] = "3stack-6ch-dig",
5433 { .pci_subvendor = 0x1019, .pci_subdevice = 0x6668, 5383 [ALC883_3ST_6ch] = "3stack-6ch",
5434 .config = ALC883_3ST_6ch_DIG }, /* ECS to Intel*/ 5384 [ALC883_6ST_DIG] = "6stack-dig",
5435 { .modelname = "3stack-6ch", .config = ALC883_3ST_6ch }, 5385 [ALC883_TARGA_DIG] = "targa-dig",
5436 { .pci_subvendor = 0x108e, .pci_subdevice = 0x534d, 5386 [ALC883_TARGA_2ch_DIG] = "targa-2ch-dig",
5437 .config = ALC883_3ST_6ch }, 5387 [ALC888_DEMO_BOARD] = "6stack-dig-demo",
5438 { .pci_subvendor = 0x8086, .pci_subdevice = 0xd601, 5388 [ALC883_ACER] = "acer",
5439 .config = ALC883_3ST_6ch }, /* D102GGC */ 5389 [ALC883_MEDION] = "medion",
5440 { .modelname = "6stack-dig", .config = ALC883_6ST_DIG }, 5390 [ALC883_LAPTOP_EAPD] = "laptop-eapd",
5441 { .pci_subvendor = 0x1462, .pci_subdevice = 0x6668, 5391 [ALC883_AUTO] = "auto",
5442 .config = ALC883_6ST_DIG }, /* MSI */ 5392};
5443 { .pci_subvendor = 0x1462, .pci_subdevice = 0x7280, 5393
5444 .config = ALC883_6ST_DIG }, /* MSI K9A Platinum (MS-7280) */ 5394static struct snd_pci_quirk alc883_cfg_tbl[] = {
5445 { .pci_subvendor = 0x105b, .pci_subdevice = 0x6668, 5395 SND_PCI_QUIRK(0x1019, 0x6668, "ECS", ALC883_3ST_6ch_DIG),
5446 .config = ALC883_6ST_DIG }, /* Foxconn */ 5396 SND_PCI_QUIRK(0x108e, 0x534d, NULL, ALC883_3ST_6ch),
5447 { .pci_subvendor = 0x1462, .pci_subdevice = 0x7187, 5397 SND_PCI_QUIRK(0x1558, 0, "Clevo laptop", ALC883_LAPTOP_EAPD),
5448 .config = ALC883_6ST_DIG }, /* MSI */ 5398 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG),
5449 { .modelname = "targa-dig", .config = ALC883_TARGA_DIG }, 5399 SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC883_6ST_DIG),
5450 { .pci_subvendor = 0x1462, .pci_subdevice = 0x4314, 5400 SND_PCI_QUIRK(0x1462, 0x7187, "MSI", ALC883_6ST_DIG),
5451 .config = ALC883_TARGA_DIG }, /* MSI */ 5401 SND_PCI_QUIRK(0x1462, 0x0579, "MSI", ALC883_TARGA_2ch_DIG),
5452 { .pci_subvendor = 0x1462, .pci_subdevice = 0x3fcc, 5402 SND_PCI_QUIRK(0x1462, 0x3ef9, "MSI", ALC883_TARGA_DIG),
5453 .config = ALC883_TARGA_DIG }, /* MSI */ 5403 SND_PCI_QUIRK(0x1462, 0x3b7f, "MSI", ALC883_TARGA_2ch_DIG),
5454 { .pci_subvendor = 0x1462, .pci_subdevice = 0x3fc1, 5404 SND_PCI_QUIRK(0x1462, 0x3fcc, "MSI", ALC883_TARGA_DIG),
5455 .config = ALC883_TARGA_DIG }, /* MSI */ 5405 SND_PCI_QUIRK(0x1462, 0x3fc1, "MSI", ALC883_TARGA_DIG),
5456 { .pci_subvendor = 0x1462, .pci_subdevice = 0x3fc3, 5406 SND_PCI_QUIRK(0x1462, 0x3fc3, "MSI", ALC883_TARGA_DIG),
5457 .config = ALC883_TARGA_DIG }, /* MSI */ 5407 SND_PCI_QUIRK(0x1462, 0x4314, "MSI", ALC883_TARGA_DIG),
5458 { .pci_subvendor = 0x1462, .pci_subdevice = 0x4314, 5408 SND_PCI_QUIRK(0x1462, 0x4319, "MSI", ALC883_TARGA_DIG),
5459 .config = ALC883_TARGA_DIG }, /* MSI */ 5409 SND_PCI_QUIRK(0x1462, 0x4324, "MSI", ALC883_TARGA_DIG),
5460 { .pci_subvendor = 0x1462, .pci_subdevice = 0x4319, 5410 SND_PCI_QUIRK(0x1462, 0xa422, "MSI", ALC883_TARGA_2ch_DIG),
5461 .config = ALC883_TARGA_DIG }, /* MSI */ 5411 SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER),
5462 { .pci_subvendor = 0x1462, .pci_subdevice = 0x3ef9, 5412 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION),
5463 .config = ALC883_TARGA_DIG }, /* MSI */ 5413 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD),
5464 { .pci_subvendor = 0x1462, .pci_subdevice = 0x4324, 5414 SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch),
5465 .config = ALC883_TARGA_DIG }, /* MSI */
5466 { .modelname = "targa-2ch-dig", .config = ALC883_TARGA_2ch_DIG },
5467 { .pci_subvendor = 0x1462, .pci_subdevice = 0x0579,
5468 .config = ALC883_TARGA_2ch_DIG }, /* MSI */
5469 { .pci_subvendor = 0x1462, .pci_subdevice = 0xa422,
5470 .config = ALC883_TARGA_2ch_DIG }, /* MSI */
5471 { .pci_subvendor = 0x1462, .pci_subdevice = 0x3b7f,
5472 .config = ALC883_TARGA_2ch_DIG }, /* MSI */
5473 { .modelname = "6stack-dig-demo", .config = ALC888_DEMO_BOARD },
5474 { .modelname = "acer", .config = ALC883_ACER },
5475 { .pci_subvendor = 0x1025, .pci_subdevice = 0/*0x0102*/,
5476 .config = ALC883_ACER },
5477 { .pci_subvendor = 0x1025, .pci_subdevice = 0x0102,
5478 .config = ALC883_ACER },
5479 { .pci_subvendor = 0x1025, .pci_subdevice = 0x009f,
5480 .config = ALC883_ACER },
5481 { .pci_subvendor = 0x161f, .pci_subdevice = 0x2054,
5482 .modelname = "medion", .config = ALC883_MEDION },
5483 { .modelname = "laptop-eapd", .config = ALC883_LAPTOP_EAPD },
5484 { .pci_subvendor = 0x1071, .pci_subdevice = 0x8258,
5485 .config = ALC883_LAPTOP_EAPD }, /* Evesham Voyager C530RD */
5486 { .pci_subvendor = 0x1558, .pci_subdevice = 0,
5487 .config = ALC883_LAPTOP_EAPD }, /* Clevo */
5488 { .modelname = "auto", .config = ALC883_AUTO },
5489 {} 5415 {}
5490}; 5416};
5491 5417
@@ -5734,8 +5660,10 @@ static int patch_alc883(struct hda_codec *codec)
5734 5660
5735 codec->spec = spec; 5661 codec->spec = spec;
5736 5662
5737 board_config = snd_hda_check_board_config(codec, alc883_cfg_tbl); 5663 board_config = snd_hda_check_board_config(codec, ALC883_MODEL_LAST,
5738 if (board_config < 0 || board_config >= ALC883_MODEL_LAST) { 5664 alc883_models,
5665 alc883_cfg_tbl);
5666 if (board_config < 0) {
5739 printk(KERN_INFO "hda_codec: Unknown model for ALC883, " 5667 printk(KERN_INFO "hda_codec: Unknown model for ALC883, "
5740 "trying auto-probe from BIOS...\n"); 5668 "trying auto-probe from BIOS...\n");
5741 board_config = ALC883_AUTO; 5669 board_config = ALC883_AUTO;
@@ -6438,35 +6366,27 @@ static void alc262_auto_init(struct hda_codec *codec)
6438/* 6366/*
6439 * configuration and preset 6367 * configuration and preset
6440 */ 6368 */
6441static struct hda_board_config alc262_cfg_tbl[] = { 6369static const char *alc262_models[ALC262_MODEL_LAST] = {
6442 { .modelname = "basic", .config = ALC262_BASIC }, 6370 [ALC262_BASIC] = "basic",
6443 { .modelname = "hippo", 6371 [ALC262_HIPPO] = "hippo",
6444 .pci_subvendor =0x1002, .pci_subdevice = 0x437b, 6372 [ALC262_HIPPO_1] = "hippo_1",
6445 .config = ALC262_HIPPO}, 6373 [ALC262_FUJITSU] = "fujitsu",
6446 { .modelname = "hippo", 6374 [ALC262_HP_BPC] = "hp-bpc",
6447 .pci_subvendor = 0x104d, .pci_subdevice = 0x8203, 6375 [ALC262_BENQ_ED8] = "benq",
6448 .config = ALC262_HIPPO }, /* Sony UX-90s */ 6376 [ALC262_AUTO] = "auto",
6449 { .modelname = "hippo_1", 6377};
6450 .pci_subvendor =0x17ff, .pci_subdevice = 0x058f, 6378
6451 .config = ALC262_HIPPO_1}, 6379static struct snd_pci_quirk alc262_cfg_tbl[] = {
6452 { .modelname = "fujitsu", .config = ALC262_FUJITSU }, 6380 SND_PCI_QUIRK(0x1002, 0x437b, "Hippo", ALC262_HIPPO),
6453 { .pci_subvendor = 0x10cf, .pci_subdevice = 0x1397, 6381 SND_PCI_QUIRK(0x103c, 0x12fe, "HP xw9400", ALC262_HP_BPC),
6454 .config = ALC262_FUJITSU }, 6382 SND_PCI_QUIRK(0x103c, 0x280c, "HP xw4400", ALC262_HP_BPC),
6455 { .modelname = "hp-bpc", .config = ALC262_HP_BPC }, 6383 SND_PCI_QUIRK(0x103c, 0x2801, "HP q954", ALC262_HP_BPC),
6456 { .pci_subvendor = 0x103c, .pci_subdevice = 0x280c, 6384 SND_PCI_QUIRK(0x103c, 0x3014, "HP xw6400", ALC262_HP_BPC),
6457 .config = ALC262_HP_BPC }, /* xw4400 */ 6385 SND_PCI_QUIRK(0x103c, 0x3015, "HP xw8400", ALC262_HP_BPC),
6458 { .pci_subvendor = 0x103c, .pci_subdevice = 0x2801, 6386 SND_PCI_QUIRK(0x104d, 0x8203, "Sony UX-90", ALC262_HIPPO),
6459 .config = ALC262_HP_BPC }, /* q965 */ 6387 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU),
6460 { .pci_subvendor = 0x103c, .pci_subdevice = 0x3014, 6388 SND_PCI_QUIRK(0x17ff, 0x058f, "Benq Hippo", ALC262_HIPPO_1),
6461 .config = ALC262_HP_BPC }, /* xw6400 */ 6389 SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_BENQ_ED8),
6462 { .pci_subvendor = 0x103c, .pci_subdevice = 0x3015,
6463 .config = ALC262_HP_BPC }, /* xw8400 */
6464 { .pci_subvendor = 0x103c, .pci_subdevice = 0x12fe,
6465 .config = ALC262_HP_BPC }, /* xw9400 */
6466 { .modelname = "benq", .config = ALC262_BENQ_ED8 },
6467 { .pci_subvendor = 0x17ff, .pci_subdevice = 0x0560,
6468 .config = ALC262_BENQ_ED8 },
6469 { .modelname = "auto", .config = ALC262_AUTO },
6470 {} 6390 {}
6471}; 6391};
6472 6392
@@ -6561,9 +6481,11 @@ static int patch_alc262(struct hda_codec *codec)
6561 } 6481 }
6562#endif 6482#endif
6563 6483
6564 board_config = snd_hda_check_board_config(codec, alc262_cfg_tbl); 6484 board_config = snd_hda_check_board_config(codec, ALC262_MODEL_LAST,
6485 alc262_models,
6486 alc262_cfg_tbl);
6565 6487
6566 if (board_config < 0 || board_config >= ALC262_MODEL_LAST) { 6488 if (board_config < 0) {
6567 printk(KERN_INFO "hda_codec: Unknown model for ALC262, " 6489 printk(KERN_INFO "hda_codec: Unknown model for ALC262, "
6568 "trying auto-probe from BIOS...\n"); 6490 "trying auto-probe from BIOS...\n");
6569 board_config = ALC262_AUTO; 6491 board_config = ALC262_AUTO;
@@ -7527,30 +7449,26 @@ static void alc861_auto_init(struct hda_codec *codec)
7527/* 7449/*
7528 * configuration and preset 7450 * configuration and preset
7529 */ 7451 */
7530static struct hda_board_config alc861_cfg_tbl[] = { 7452static const char *alc861_models[ALC861_MODEL_LAST] = {
7531 { .modelname = "3stack", .config = ALC861_3ST }, 7453 [ALC861_3ST] = "3stack",
7532 { .pci_subvendor = 0x8086, .pci_subdevice = 0xd600, 7454 [ALC660_3ST] = "3stack-660",
7533 .config = ALC861_3ST }, 7455 [ALC861_3ST_DIG] = "3stack-dig",
7534 { .modelname = "3stack-660", .config = ALC660_3ST }, 7456 [ALC861_6ST_DIG] = "6stack-dig",
7535 { .pci_subvendor = 0x1043, .pci_subdevice = 0x81e7, 7457 [ALC861_UNIWILL_M31] = "uniwill-m31",
7536 .config = ALC660_3ST }, 7458 [ALC861_TOSHIBA] = "toshiba",
7537 { .modelname = "3stack-dig", .config = ALC861_3ST_DIG }, 7459 [ALC861_ASUS] = "asus",
7538 { .modelname = "6stack-dig", .config = ALC861_6ST_DIG }, 7460 [ALC861_ASUS_LAPTOP] = "asus-laptop",
7539 { .modelname = "uniwill-m31", .config = ALC861_UNIWILL_M31}, 7461 [ALC861_AUTO] = "auto",
7540 { .pci_subvendor = 0x1584, .pci_subdevice = 0x9072, 7462};
7541 .config = ALC861_UNIWILL_M31 }, 7463
7542 { .modelname = "toshiba", .config = ALC861_TOSHIBA }, 7464static struct snd_pci_quirk alc861_cfg_tbl[] = {
7543 { .pci_subvendor = 0x1179, .pci_subdevice = 0xff10, 7465 SND_PCI_QUIRK(0x1043, 0x1335, "ASUS F2/3", ALC861_ASUS_LAPTOP),
7544 .config = ALC861_TOSHIBA }, 7466 SND_PCI_QUIRK(0x1043, 0x1338, "ASUS F2/3", ALC861_ASUS_LAPTOP),
7545 { .modelname = "asus", .config = ALC861_ASUS}, 7467 SND_PCI_QUIRK(0x1043, 0x1393, "ASUS", ALC861_ASUS),
7546 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1393, 7468 SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS", ALC660_3ST),
7547 .config = ALC861_ASUS }, 7469 SND_PCI_QUIRK(0x1179, 0xff10, "Toshiba", ALC861_TOSHIBA),
7548 { .modelname = "asus-laptop", .config = ALC861_ASUS_LAPTOP }, 7470 SND_PCI_QUIRK(0x1584, 0x9072, "Uniwill m31", ALC861_UNIWILL_M31),
7549 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1335, 7471 SND_PCI_QUIRK(0x8086, 0xd600, "Intel", ALC861_3ST),
7550 .config = ALC861_ASUS_LAPTOP }, /* ASUS F2/F3 */
7551 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1338,
7552 .config = ALC861_ASUS_LAPTOP }, /* ASUS F2/F3 */
7553 { .modelname = "auto", .config = ALC861_AUTO },
7554 {} 7472 {}
7555}; 7473};
7556 7474
@@ -7673,9 +7591,11 @@ static int patch_alc861(struct hda_codec *codec)
7673 7591
7674 codec->spec = spec; 7592 codec->spec = spec;
7675 7593
7676 board_config = snd_hda_check_board_config(codec, alc861_cfg_tbl); 7594 board_config = snd_hda_check_board_config(codec, ALC861_MODEL_LAST,
7595 alc861_models,
7596 alc861_cfg_tbl);
7677 7597
7678 if (board_config < 0 || board_config >= ALC861_MODEL_LAST) { 7598 if (board_config < 0) {
7679 printk(KERN_INFO "hda_codec: Unknown model for ALC861, " 7599 printk(KERN_INFO "hda_codec: Unknown model for ALC861, "
7680 "trying auto-probe from BIOS...\n"); 7600 "trying auto-probe from BIOS...\n");
7681 board_config = ALC861_AUTO; 7601 board_config = ALC861_AUTO;