Bug 12440 - No sound from speakers in HP dv5, headphones work correctly
No sound from speakers in HP dv5, headphones work correctly
Status: RESOLVED CODE_FIX
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA)
All Linux
: P1 normal
Assigned To: Takashi Iwai
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-12 20:34 UTC by Giuseppe Bilotta
Modified: 2009-01-30 06:52 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.28
Tree: Mainline
Regression: Yes


Attachments
alsa-info output (26.46 KB, text/plain)
2009-01-13 05:47 UTC, Giuseppe Bilotta
Details
lscpi output (1.63 KB, text/plain)
2009-01-13 05:56 UTC, Giuseppe Bilotta
Details
Patch to add the quirk for my system (953 bytes, application/octet-stream)
2009-01-13 06:00 UTC, Giuseppe Bilotta
Details
alsa-info output from working config (24.90 KB, text/plain)
2009-01-13 06:43 UTC, Giuseppe Bilotta
Details
Fix HP dv5 preset model (1.23 KB, patch)
2009-01-13 23:27 UTC, Takashi Iwai
Details | Diff
alsa-info.sh output with the dv5 patch (26.60 KB, text/plain)
2009-01-14 11:37 UTC, Giuseppe Bilotta
Details
alsa-info with patch for dv5 applied (23.14 KB, application/octet-stream)
2009-01-18 08:30 UTC, Errico Prota
Details
alsa-info output with Takashi's patch for dv5 applied (plain text) (23.14 KB, text/plain)
2009-01-18 08:38 UTC, Errico Prota
Details
alsa-info output with Takashi's path applied and model=hp-dv5 option (24.80 KB, text/plain)
2009-01-22 03:53 UTC, Errico Prota
Details

Description Giuseppe Bilotta 2009-01-12 20:34:18 UTC
Between 2.6.27 and 2.6.28 my HP dv5 laptop lost sound output from the integrated speakers. Headphones work correctly.

Bisecting identifies this commit as being the culprit:

b2c4f4d71f7a161630681678cbba84bd695bfd1e is first bad commit
commit b2c4f4d71f7a161630681678cbba84bd695bfd1e
Author: Matthew Ranostay <mranostay@embeddedalley.com>
Date:   Fri Sep 26 10:06:40 2008 -0400

    ALSA: hda: 92xx S/PDIF In support
    
    Add support for S/PDIF IN on reference boards quirks. Also disable the
    IEC958 capture switch on boards with GPIO0 enabled.
    
    Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Jaroslav Kysela <perex@perex.cz>

:040000 040000 51e673046c92498c71a047e5b3c37049f2a79f06 ba6ef53537a3824c860317d135ee2125abd50952 M	sound

I am not sure if this is related to bug 12159, so I'm reporting it separately.
Comment 1 Takashi Iwai 2009-01-13 03:52:12 UTC
Please run alsa-info.sh with --no-upload option, and attach the generated file to here.  The script is found in
    http://www.alsa-project.org/alsa-info.sh

Then, try to pass model=hp-m4.  This will set the GPIO.
Comment 2 Giuseppe Bilotta 2009-01-13 05:47:54 UTC
Created attachment 19768 [details]
alsa-info output

I'm attaching the alsa-info output for 2.6.28. I'll try the option and see if it fixes the problem.
Comment 3 Giuseppe Bilotta 2009-01-13 05:56:20 UTC
Created attachment 19769 [details]
lscpi output

model=hp-m4 does indeed fix the output from the main speakers. I'm attaching the lspci output for my sound card. If I understand the workings correctly, I can probably cook up a patch to fix the problem
Comment 4 Giuseppe Bilotta 2009-01-13 06:00:29 UTC
Created attachment 19771 [details]
Patch to add the quirk for my system

The attached git patch adds a quirk for my machine.
Comment 5 Takashi Iwai 2009-01-13 06:16:39 UTC
Thanks, applied now to sound git tree.

Could you attach alsa-info output on the working status, too?
Comment 6 Giuseppe Bilotta 2009-01-13 06:43:22 UTC
Created attachment 19773 [details]
alsa-info output from working config

Here it is. This is from v2.6.29-rc1-191-g2db8ebb which is latest upstream from Linus plus the patch I attached here.
Comment 7 Takashi Iwai 2009-01-13 07:02:10 UTC
Thanks.  As mentioned, the patch was already applied.
Will be included in the next pull request.
Comment 8 Giuseppe Bilotta 2009-01-13 14:18:52 UTC
Actually, there seems to be a problem: when the model is set to hp-m4, either manually (using the model= option on the module before the patch) or automatically (patched module), the integrated speakers are enabled but the integrated mic is disabled, so I can listen to sounds but I cannot record or use Skype. So this fix is either wrong or not adequate.

Sorry for the noise, I only tested the sound output.

Reopening the bug. So the problem is currently the following:

* without the patch, and without setting hp-m4 as model, the front mic (integrated) is present, can be selected as input source and it works correctly, but the integrated speakers don't produce any sound, although the headphones work correctly

* with the patch, or by setting the hp-m4 model manually, the speakers produce sound but the integrated mic is not seen anymore and it's not offered as input source; I don't have an external mic to test with
Comment 9 Takashi Iwai 2009-01-13 23:25:53 UTC
OK, what about the patch below?
Comment 10 Takashi Iwai 2009-01-13 23:27:05 UTC
Created attachment 19782 [details]
Fix HP dv5 preset model
Comment 11 Giuseppe Bilotta 2009-01-14 11:37:22 UTC
Created attachment 19793 [details]
alsa-info.sh output with the dv5 patch

The patch seems to work correctly (tested on latest git). I'm also attaching the output from alsa-info.sh with this patch applied.
Comment 12 Errico Prota 2009-01-18 08:28:15 UTC
Hi Takashi! I have exacly the same problem of Giuseppe, using a dv4 pavilion series...
I tried your patch for dv5 series without success, internal microphones don't work, instead external mic and speakers work fine for me. I am using 
  "options model=hp-m4  and enable-msi=1"  for the module.
kernel is a vanilla 2.6.28 running in ubuntu 8.10 
I think that a quirk is needed also for dv4 series...
I have added an attachment with alsa-information
Thanks for your attention, Errico
Comment 13 Errico Prota 2009-01-18 08:30:45 UTC
Created attachment 19875 [details]
alsa-info with patch for dv5 applied

Please add a quirk also for DV4 series :-)
Comment 14 Errico Prota 2009-01-18 08:38:41 UTC
Created attachment 19877 [details]
alsa-info output with Takashi's patch for dv5 applied (plain text) 

same attachment in plain text... hi!
Comment 15 Takashi Iwai 2009-01-21 03:57:48 UTC
With my dv5 patch, pass model=hp-dv5 instead of hp-m4, and reboot once after that to restore the BIOS status.

At best, try sound.git tree below:
    git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git master
You can pull master branch onto Linus git tree.
Comment 16 Errico Prota 2009-01-21 12:11:11 UTC
Hi Takashi, I have tried model=hp-dv5 but without success... The behaviour is the same that model=hp-m4 (internal mic don't works). Thanks, Errico
Comment 17 Takashi Iwai 2009-01-22 00:45:09 UTC
Did you switch "Input Source" mixer between Mic and Line?
Also please give alsa-info output with model=hp-dv5.
Comment 18 Errico Prota 2009-01-22 03:46:02 UTC
Hi Takashi, good news after a little troubleshooting... 

Passing model=hp-dv5 it's possible enable "digital input" source in the mixer settings (I use GNOME panel). 

This is not possible with model=hp-m4 option.

Selecting "digital Mic1" in "digital input" integrated mic now works! 
This is the only setting which works, using digital mic2 I have no voice at all. 

In "input source" (without "digital") is selectable only "mic". 
Now "Line" option is no present passing hp-dv5 option.

BTW, the audio-card is usable only with "enable-msi=1", without this, I have a terrible looping audio (with hp-dv5 or hp-m4).

External mic works allways fine.
 
I'am attaching alsa-utils output (model=hp-dv5)

Thanks 
Comment 19 Errico Prota 2009-01-22 03:53:53 UTC
Created attachment 19935 [details]
alsa-info output with Takashi's path applied and model=hp-dv5 option

Internal mic of dv4 works using "Digital input" source, setting "Digital mic 1"
Comment 20 Takashi Iwai 2009-01-22 04:03:49 UTC
Thanks.  Now I committed the patch to set the proper model (hp-dv5) for your device to sound git tree.  It'll be included in the next pull request.

Let's close the bug now.
Comment 21 Howard Chu 2009-01-29 21:26:21 UTC
Fyi, HP makes two parallel lines of laptops, one with Intel CPU and one with AMD. I have a dv5z (AMD) and the audio is also not working on it with kernel 2.6.28.2. I added model=hp-dv5 to my modprobe options and it works now. The PCI ID is 0x3600, not 0x3603:

+	SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3600,
+		      "HP dv5", STAC_HP_DV5),

Comment 22 Takashi Iwai 2009-01-30 06:52:09 UTC
The entry is added now to sound git tree.  Thanks.

Note You need to log in before you can comment on or make changes to this bug.