diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_analog.c | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 40f000ba1362..8ddae0a25ea3 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -1329,13 +1329,50 @@ static int ad1981_hp_init(struct hda_codec *codec) | |||
1329 | return 0; | 1329 | return 0; |
1330 | } | 1330 | } |
1331 | 1331 | ||
1332 | /* configuration for Lenovo Thinkpad T60 */ | ||
1333 | static struct snd_kcontrol_new ad1981_thinkpad_mixers[] = { | ||
1334 | HDA_CODEC_VOLUME("Master Playback Volume", 0x05, 0x0, HDA_OUTPUT), | ||
1335 | HDA_CODEC_MUTE("Master Playback Switch", 0x05, 0x0, HDA_OUTPUT), | ||
1336 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x11, 0x0, HDA_OUTPUT), | ||
1337 | HDA_CODEC_MUTE("PCM Playback Switch", 0x11, 0x0, HDA_OUTPUT), | ||
1338 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x12, 0x0, HDA_OUTPUT), | ||
1339 | HDA_CODEC_MUTE("Mic Playback Switch", 0x12, 0x0, HDA_OUTPUT), | ||
1340 | HDA_CODEC_VOLUME("CD Playback Volume", 0x1d, 0x0, HDA_OUTPUT), | ||
1341 | HDA_CODEC_MUTE("CD Playback Switch", 0x1d, 0x0, HDA_OUTPUT), | ||
1342 | HDA_CODEC_VOLUME("Mic Boost", 0x08, 0x0, HDA_INPUT), | ||
1343 | HDA_CODEC_VOLUME("Capture Volume", 0x15, 0x0, HDA_OUTPUT), | ||
1344 | HDA_CODEC_MUTE("Capture Switch", 0x15, 0x0, HDA_OUTPUT), | ||
1345 | { | ||
1346 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
1347 | .name = "Capture Source", | ||
1348 | .info = ad198x_mux_enum_info, | ||
1349 | .get = ad198x_mux_enum_get, | ||
1350 | .put = ad198x_mux_enum_put, | ||
1351 | }, | ||
1352 | { } /* end */ | ||
1353 | }; | ||
1354 | |||
1355 | static struct hda_input_mux ad1981_thinkpad_capture_source = { | ||
1356 | .num_items = 3, | ||
1357 | .items = { | ||
1358 | { "Mic", 0x0 }, | ||
1359 | { "Mix", 0x2 }, | ||
1360 | { "CD", 0x4 }, | ||
1361 | }, | ||
1362 | }; | ||
1363 | |||
1332 | /* models */ | 1364 | /* models */ |
1333 | enum { AD1981_BASIC, AD1981_HP }; | 1365 | enum { AD1981_BASIC, AD1981_HP, AD1981_THINKPAD }; |
1334 | 1366 | ||
1335 | static struct hda_board_config ad1981_cfg_tbl[] = { | 1367 | static struct hda_board_config ad1981_cfg_tbl[] = { |
1336 | { .modelname = "hp", .config = AD1981_HP }, | 1368 | { .modelname = "hp", .config = AD1981_HP }, |
1337 | /* All HP models */ | 1369 | /* All HP models */ |
1338 | { .pci_subvendor = 0x103c, .config = AD1981_HP }, | 1370 | { .pci_subvendor = 0x103c, .config = AD1981_HP }, |
1371 | { .modelname = "thinkpad", .config = AD1981_THINKPAD }, | ||
1372 | /* Lenovo Thinkpad T60/X60/Z6xx */ | ||
1373 | { .pci_subvendor = 0x17aa, .config = AD1981_THINKPAD }, | ||
1374 | { .pci_subvendor = 0x1014, .pci_subsystem = 0x0597, | ||
1375 | .config = AD1981_THINKPAD }, /* Z60m/t */ | ||
1339 | { .modelname = "basic", .config = AD1981_BASIC }, | 1376 | { .modelname = "basic", .config = AD1981_BASIC }, |
1340 | {} | 1377 | {} |
1341 | }; | 1378 | }; |
@@ -1381,6 +1418,11 @@ static int patch_ad1981(struct hda_codec *codec) | |||
1381 | codec->patch_ops.init = ad1981_hp_init; | 1418 | codec->patch_ops.init = ad1981_hp_init; |
1382 | codec->patch_ops.unsol_event = ad1981_hp_unsol_event; | 1419 | codec->patch_ops.unsol_event = ad1981_hp_unsol_event; |
1383 | break; | 1420 | break; |
1421 | case AD1981_THINKPAD: | ||
1422 | spec->mixers[0] = ad1981_thinkpad_mixers; | ||
1423 | spec->multiout.dig_out_nid = 0; | ||
1424 | spec->input_mux = &ad1981_thinkpad_capture_source; | ||
1425 | break; | ||
1384 | } | 1426 | } |
1385 | 1427 | ||
1386 | return 0; | 1428 | return 0; |