mirror of
https://github.com/adulau/aha.git
synced 2024-12-30 20:56:23 +00:00
[ALSA] hda-codec - Add Thinkpad X60/T60/Z60 support
Added the support for Thinkpad X60/T60/Z60 laptops with AD1981HD codec. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
7152447df9
commit
01686c5fce
2 changed files with 44 additions and 1 deletions
|
@ -778,6 +778,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
AD1981
|
||||
basic 3-jack (default)
|
||||
hp HP nx6320
|
||||
thinkpad Lenovo Thinkpad T60/X60/Z60
|
||||
|
||||
AD1986A
|
||||
6stack 6-jack, separate surrounds (default)
|
||||
|
|
|
@ -1329,13 +1329,50 @@ static int ad1981_hp_init(struct hda_codec *codec)
|
|||
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 */
|
||||
enum { AD1981_BASIC, AD1981_HP };
|
||||
enum { AD1981_BASIC, AD1981_HP, AD1981_THINKPAD };
|
||||
|
||||
static struct hda_board_config ad1981_cfg_tbl[] = {
|
||||
{ .modelname = "hp", .config = AD1981_HP },
|
||||
/* All HP models */
|
||||
{ .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 },
|
||||
{}
|
||||
};
|
||||
|
@ -1381,6 +1418,11 @@ static int patch_ad1981(struct hda_codec *codec)
|
|||
codec->patch_ops.init = ad1981_hp_init;
|
||||
codec->patch_ops.unsol_event = ad1981_hp_unsol_event;
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue