summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-04-18 12:54:11 +0200
committerJaroslav Kysela <perex@suse.cz>2006-06-22 21:32:44 +0200
commit01686c5fce4682350849f9f2c262fcaf67ec73c3 (patch)
treebaa73c310d68bbc12b3f212326ab3fd5003bb5e6
parent7152447df98b3981d621224be947a2c8d77aed06 (diff)
[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>
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt1
-rw-r--r--sound/pci/hda/patch_analog.c44
2 files changed, 44 insertions, 1 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 0ee2c7dfc482..3c09d9b8cd30 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -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)
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)
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;