Kernel Patch for Damaged HP dv6000 Laptop

| quozl@us.netrek.org | up |

2009-05-17

After an upgrade to Ubuntu 9.04 the patch needed a rewrite against a later version of the driver. It required downloading the latest ALSA driver source from the project web site, unpacking, configuring, editing, and then a make, and make install.

2008-12-19

Odd symptom on a friend's laptop. Right channel of headphones works. Left channel does not. It had been plugged into a church sound system. Maybe it received electrical damage.

But now the speakers on the laptop don't work. Testing this with a Knoppix CD though showed they can work, if an old enough driver is used. Kubuntu 8.10 didn't work the speakers. Why would a later driver disable the speakers?

Turns out the electrical headphone presence detection was also damaged ... the codec attached to the Intel HDA reports the headphones present all the time, despite them not being plugged in.

So I changed the kernel driver for the codec, forcing the kernel to believe the headphones were not attached, and thus enabling the amplifier for the speakers.

Only Open Source can do this. The chances of rebuilding a proprietary driver are very slim.

--- alsa-driver-1.0.20/alsa-kernel/pci/hda/patch_conexant.c.~1~	2009-05-06 17:06:04.000000000 +1000
+++ alsa-driver-1.0.20/alsa-kernel/pci/hda/patch_conexant.c	2009-05-17 14:00:32.000000000 +1000
@@ -762,6 +762,7 @@
 
 	spec->hp_present = snd_hda_codec_read(codec, 0x11, 0,
 				     AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
+	spec->hp_present = 0;
 
 	bits = (spec->hp_present || !spec->cur_eapd) ? HDA_AMP_MUTE : 0; 
 	snd_hda_codec_amp_stereo(codec, 0x10, HDA_OUTPUT, 0,
@@ -1232,6 +1233,7 @@
 
 	spec->hp_present = snd_hda_codec_read(codec, 0x13, 0,
 				     AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
+	spec->hp_present = 0;
 
 	bits = (spec->hp_present || !spec->cur_eapd) ? HDA_AMP_MUTE : 0;
 	/* See the note in cxt5047_hp_master_sw_put */
@@ -1651,6 +1653,7 @@
 	spec->hp_present = snd_hda_codec_read(codec, 0x16, 0,
 				     AC_VERB_GET_PIN_SENSE, 0) &
 		AC_PINSENSE_PRESENCE;
+	spec->hp_present = 0;
 	cxt5051_update_speaker(codec);
 }
 
raw patch file.
| quozl@us.netrek.org | up |