[PATCH] [UBUNTU:sound/pci/hda/] (1) Use hp model for all HP laptops with AD1981HD codec; (2) Fix support for Thinkpad *60s (patch_analog.c)
crimsun at fungus.sh.nu
crimsun at fungus.sh.nu
Sat May 13 00:18:31 UTC 2006
Subject: [PATCH] [UBUNTU:sound/pci/hda/] (1) Use hp model for all HP laptops with AD1981HD codec; (2) Fix support for Thinkpad *60s (patch_analog.c)
UpstreamStatus: Added in upstream hg changesets e7197a17a14a [0] and
b44d2749ad15 [1], respectively
Takashi Iwai committed the above changesets that simplify support for
HP laptops using the AD1981HD codec and properly support the new
Thinkpad X60/T60/Z60 laptops. This commit reverts our own git commit
ba42a99e564f63b2d5506a6df0da0b37b2e4774f.
This commit closes Malone #42361, #43934.
[0] http://hg-mirror.alsa-project.org/alsa-kernel?cmd=changeset;node=e7197a17a14a9152de7e9f207792dd2b4e506292;style=gitweb
[1] http://hg-mirror.alsa-project.org/alsa-kernel?cmd=changeset;node=b44d2749ad15d0d5f5d2a0d0c7b0ed36dd0e2daa;style=gitweb
Signed-off-by: Daniel T Chen <crimsun at ubuntu.com>
---
sound/pci/hda/patch_analog.c | 54 +++++++++++++++++++++++++++++++++++-------
1 files changed, 45 insertions(+), 9 deletions(-)
2776788dd2a2dae984796fc969acab702fb0c9ee
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index dd5808a..cbeb08f 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -805,8 +805,6 @@ static struct hda_board_config ad1986a_c
.config = AD1986A_LAPTOP_EAPD }, /* ASUS U5A */
{ .pci_subvendor = 0x103c, .pci_subdevice = 0x30af,
.config = AD1986A_LAPTOP_EAPD }, /* HP Compaq Presario B2800 */
- { .pci_subvendor = 0x17aa, .pci_subdevice = 0x2066,
- .config = AD1986A_LAPTOP_EAPD }, /* Lenovo 3000 N100-07684JU */
{}
};
@@ -1327,17 +1325,50 @@ static int ad1981_hp_init(struct hda_cod
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 },
- { .pci_subvendor = 0x103c, .pci_subdevice = 0x30aa,
- .config = AD1981_HP }, /* HP nx6320 */
- { .pci_subvendor = 0x103c, .pci_subdevice = 0x309f,
- .config = AD1981_HP }, /* HP nx9420 AngelFire */
- { .pci_subvendor = 0x103c, .pci_subdevice = 0x30a2,
- .config = AD1981_HP }, /* HP nx9420 AngelFire */
+ /* 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 },
{}
};
@@ -1383,6 +1414,11 @@ static int patch_ad1981(struct hda_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;
--
1.1.3
--
Daniel T. Chen crimsun at ubuntu.com
GPG key: www.sh.nu/~crimsun/pubkey.gpg.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20060512/aab019f7/attachment.sig>
More information about the kernel-team
mailing list