[ltp] thinkpad t60p

Chris Hanson linux-thinkpad@linux-thinkpad.org
Thu, 6 Jul 2006 13:57:30 -0400


This is a multi-part message in MIME format.
--=_ThJCGxQ2hpM7alu7LAOvAkSbjziGlMkw

[Sorry for resend -- I forgot the attachment.]

   Date: Thu, 06 Jul 2006 13:16:42 +0200
   From: "Prof. Dr. Jobst Hoffmann" <j.hoffmann@fh-aachen.de>

   A) I've added a second DIMM to have 2GB memory, the t60p detects the
   memory and works fine, but only for one and a half hour, then it hangs.
   The working interval goes down to 5 minutes, if I reboot the machine
   directly. The two DIMMS come from Samsung (builtin from the beginning)
   and Lenovo, under Windows the problem didn't arise (but I'm not sure, I
   only worked once on Windows for about that time).

I've been having a very similar problem, although usually my computer
fails the power-on self test.  Flexing the computer slightly often
allows it to get past that point, but sometimes it locks up later.  With
only a single DIMM the machine works fine.

Here's what I understand about this problem so far.  There's a metal
ground plate attached to the touchpad inside the case.  The top edge of
the metal plate is curved 90 degrees down, presumably to make the
assembly stiffer.  But the curved edge is long enough that it comes very
close to the top DIMM.

At first I thought that the metal plate was touching the DIMM and
causing a short, but insulating the plate didn't solve the problem --
however it did make the problem much less frequent.  My current theory
is that the plate is close enough to the DIMM that there is significant
stray capacitance, and that this capacitance is overloading the memory
circuitry.  Since the capacitance varies with the distance between the
plate and the DIMM, minor changes in the distance can have a large
effect, which is why flexing the case slightly is able to fix the problem.

I haven't yet confirmed this theory -- I've been too busy _using_ the
computer to deal with it.  But if true the correct fix is to machine the
edge of the metal plate so that it doesn't get so close to the DIMM.

I believe this is a design flaw, and therefore the simple solution
should be for Lenovo to modify the design and replace the part of the
case that's at fault.  I expect that by now they should know there's a
problem, but I haven't yet called them to see whether they understand it
and know what to do.

   C) Until now, I get no sound on my machine: I have to blacklist the
   soundcard in /etc/modprobe.d/blacklist, otherwise the machine hangs on
   starting udev

I had several problems with sound.  When using kernel 2.6.16 I had to
patch the sound driver to get it to work at all.  Kernel 2.6.17 fixed
these problems, but I am still using a patch (attached) to get the
correct mixer configuration.

I hope this is helpful.

Chris

--=_ThJCGxQ2hpM7alu7LAOvAkSbjziGlMkw
Content-Type: text/plain; charset="iso-8859-1"; name="hda-t60-patch-2.6"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="hda-t60-patch-2.6.17"

diff -rup linux-2.6.17-orig/Documentation/sound/alsa/ALSA-Configuration.txt=
 linux-2.6.17/Documentation/sound/alsa/ALSA-Configuration.txt
--- linux-2.6.17-orig/Documentation/sound/alsa/ALSA-Configuration.txt	2006-=
06-17 21:49:35.000000000 -0400
+++ linux-2.6.17/Documentation/sound/alsa/ALSA-Configuration.txt	2006-06-20=
 00:20:39.000000000 -0400
@@ -778,6 +778,7 @@ Prior to version 0.9.0rc4 options had a=20
 	AD1981
 	  basic		3-jack (default)
 	  hp		HP nx6320
+	  thinkpad	Lenovo Thinkpad T60/X60/Z60
=20
 	AD1986A
 	  6stack	6-jack, separate surrounds (default)
diff -rup linux-2.6.17-orig/sound/pci/hda/patch_analog.c linux-2.6.17/sound=
/pci/hda/patch_analog.c
--- linux-2.6.17-orig/sound/pci/hda/patch_analog.c	2006-06-17 21:49:35.0000=
00000 -0400
+++ linux-2.6.17/sound/pci/hda/patch_analog.c	2006-06-20 00:23:01.000000000=
 -0400
@@ -1329,13 +1329,50 @@ static int ad1981_hp_init(struct hda_cod
 	return 0;
 }
=20
+/* configuration for Lenovo Thinkpad T60 */
+static struct snd_kcontrol_new ad1981_thinkpad_mixers[] =3D {
+	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 =3D SNDRV_CTL_ELEM_IFACE_MIXER,
+		.name =3D "Capture Source",
+		.info =3D ad198x_mux_enum_info,
+		.get =3D ad198x_mux_enum_get,
+		.put =3D ad198x_mux_enum_put,
+	},
+	{ } /* end */
+};
+
+static struct hda_input_mux ad1981_thinkpad_capture_source =3D {
+	.num_items =3D 3,
+	.items =3D {
+		{ "Mic", 0x0 },
+		{ "Mix", 0x2 },
+		{ "CD", 0x4 },
+	},
+};
+
 /* models */
-enum { AD1981_BASIC, AD1981_HP };
+enum { AD1981_BASIC, AD1981_HP, AD1981_THINKPAD };
=20
 static struct hda_board_config ad1981_cfg_tbl[] =3D {
 	{ .modelname =3D "hp", .config =3D AD1981_HP },
 	/* All HP models */
 	{ .pci_subvendor =3D 0x103c, .config =3D AD1981_HP },
+	{ .modelname =3D "thinkpad", .config =3D AD1981_THINKPAD },
+	/* Lenovo Thinkpad T60/X60/Z6xx */
+	{ .pci_subvendor =3D 0x17aa, .config =3D AD1981_THINKPAD },
+	{ .pci_subvendor =3D 0x1014, .pci_subdevice =3D 0x0597,
+	  .config =3D AD1981_THINKPAD }, /* Z60m/t */
 	{ .modelname =3D "basic", .config =3D AD1981_BASIC },
 	{}
 };
@@ -1381,6 +1418,11 @@ static int patch_ad1981(struct hda_codec
 		codec->patch_ops.init =3D ad1981_hp_init;
 		codec->patch_ops.unsol_event =3D ad1981_hp_unsol_event;
 		break;
+	case AD1981_THINKPAD:
+		spec->mixers[0] =3D ad1981_thinkpad_mixers;
+		spec->multiout.dig_out_nid =3D 0;
+		spec->input_mux =3D &ad1981_thinkpad_capture_source;
+		break;
 	}
=20
 	return 0;

--=_ThJCGxQ2hpM7alu7LAOvAkSbjziGlMkw--