Commit 01686c5f authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] hda-codec - Add Thinkpad X60/T60/Z60 support

Added the support for Thinkpad X60/T60/Z60 laptops with AD1981HD codec.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 7152447d
...@@ -778,6 +778,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. ...@@ -778,6 +778,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
AD1981 AD1981
basic 3-jack (default) basic 3-jack (default)
hp HP nx6320 hp HP nx6320
thinkpad Lenovo Thinkpad T60/X60/Z60
AD1986A AD1986A
6stack 6-jack, separate surrounds (default) 6stack 6-jack, separate surrounds (default)
......
...@@ -1329,13 +1329,50 @@ static int ad1981_hp_init(struct hda_codec *codec) ...@@ -1329,13 +1329,50 @@ static int ad1981_hp_init(struct hda_codec *codec)
return 0; return 0;
} }
/* configuration for Lenovo Thinkpad T60 */
static struct snd_kcontrol_new ad1981_thinkpad_mixers[] = {
HDA_CODEC_VOLUME("Master Playback Volume", 0x05, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE("Master Playback Switch", 0x05, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME("PCM Playback Volume", 0x11, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE("PCM Playback Switch", 0x11, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME("Mic Playback Volume", 0x12, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE("Mic Playback Switch", 0x12, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME("CD Playback Volume", 0x1d, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE("CD Playback Switch", 0x1d, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME("Mic Boost", 0x08, 0x0, HDA_INPUT),
HDA_CODEC_VOLUME("Capture Volume", 0x15, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE("Capture Switch", 0x15, 0x0, HDA_OUTPUT),
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Capture Source",
.info = ad198x_mux_enum_info,
.get = ad198x_mux_enum_get,
.put = ad198x_mux_enum_put,
},
{ } /* end */
};
static struct hda_input_mux ad1981_thinkpad_capture_source = {
.num_items = 3,
.items = {
{ "Mic", 0x0 },
{ "Mix", 0x2 },
{ "CD", 0x4 },
},
};
/* models */ /* models */
enum { AD1981_BASIC, AD1981_HP }; enum { AD1981_BASIC, AD1981_HP, AD1981_THINKPAD };
static struct hda_board_config ad1981_cfg_tbl[] = { static struct hda_board_config ad1981_cfg_tbl[] = {
{ .modelname = "hp", .config = AD1981_HP }, { .modelname = "hp", .config = AD1981_HP },
/* All HP models */ /* All HP models */
{ .pci_subvendor = 0x103c, .config = AD1981_HP }, { .pci_subvendor = 0x103c, .config = AD1981_HP },
{ .modelname = "thinkpad", .config = AD1981_THINKPAD },
/* Lenovo Thinkpad T60/X60/Z6xx */
{ .pci_subvendor = 0x17aa, .config = AD1981_THINKPAD },
{ .pci_subvendor = 0x1014, .pci_subsystem = 0x0597,
.config = AD1981_THINKPAD }, /* Z60m/t */
{ .modelname = "basic", .config = AD1981_BASIC }, { .modelname = "basic", .config = AD1981_BASIC },
{} {}
}; };
...@@ -1381,6 +1418,11 @@ static int patch_ad1981(struct hda_codec *codec) ...@@ -1381,6 +1418,11 @@ static int patch_ad1981(struct hda_codec *codec)
codec->patch_ops.init = ad1981_hp_init; codec->patch_ops.init = ad1981_hp_init;
codec->patch_ops.unsol_event = ad1981_hp_unsol_event; codec->patch_ops.unsol_event = ad1981_hp_unsol_event;
break; break;
case AD1981_THINKPAD:
spec->mixers[0] = ad1981_thinkpad_mixers;
spec->multiout.dig_out_nid = 0;
spec->input_mux = &ad1981_thinkpad_capture_source;
break;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment