Bug 42637

Summary: No more sound on dell Latitude E6410 (3.2.x KO, 3.1.x ok)
Product: Drivers Reporter: Eric Valette (eric.valette)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: CLOSED CODE_FIX    
Severity: high CC: alan, florian, tiwai
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.2.1 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: alsainfo output
Working 3.1.5 script output
Test patch
Another fix in the upstream
A patch to fix the power-widget setup for line-outs

Description Eric Valette 2012-01-23 12:41:46 UTC
Created attachment 72154 [details]
alsainfo output

Can have sound in my audi headphone or speakers on my dell since kernel 3.2.0. The  same user space work with 3.1.x kernel.
Comment 1 Takashi Iwai 2012-01-23 13:24:02 UTC
Could you give alsa-info.sh outputs on both working and non-working kernels so that we can compare directly?
Comment 2 Eric Valette 2012-01-23 13:40:10 UTC
Created attachment 72169 [details]
Working 3.1.5 script output
Comment 3 Takashi Iwai 2012-01-23 13:52:38 UTC
Could you check whether the patch below fixes the problem?
Comment 4 Takashi Iwai 2012-01-23 13:52:55 UTC
Created attachment 72170 [details]
Test patch
Comment 5 Eric Valette 2012-01-23 15:16:04 UTC
After fighting a bit with ketchup (3.2 != 3.2.0) and the fact that I have a bug preventing to boot that I forgot to repapply (DMAR), I can confirm you fix does make sound work again.

Thanks and sorry for the delay.
Comment 6 Takashi Iwai 2012-01-23 15:22:29 UTC
OK, the above patch is no complete one.  It was just for confiming whether the culprit is the power-widget.

Could you revert the patch and check the following?
- Without HP and line-out plugs, check /proc/asound/card0/codec#0 file.
  You'll see the line "Power-Map: 0x012".
  At this state, doesn't the speaker work?

- Plug a HP.  The codec proc file should show "Power-Map: 0x010".
  Doesn't HP output work?

If both don't work well, I'll create a patch to disable the power-widget control specific to Dell laptops.
Comment 7 Eric Valette 2012-01-23 15:35:05 UTC
Could you explain what you mean by "Without HP". The laptop itself as embedded HP that I cannot remove. When docked with a headphone plugged, usually the HP are muted and I get sound only in the headphone. But If I remove the headphone cable, I'm not sure I have sound with 3.1. Must check.
Comment 8 Takashi Iwai 2012-01-23 16:02:15 UTC
I meant the headphone unplugged.

BTW, do you have a docking-station (or is the device capable)?  The docking-station has also a line-out jack, and this should auto-mute the speaker, too.
Comment 9 Eric Valette 2012-01-23 16:14:09 UTC
OK clear. 

Yes the Dell is on a docking station and the headphone is plugged on the dock line-out jack. It did auto mute the speaker too (at least somewhere in pre 3.2 time not sure I did test with 3.1).

Are the hexa value (e.g 0x012) you gave also correct for the dock station line out plug/unplug?
Comment 10 Takashi Iwai 2012-01-23 16:19:24 UTC
No, I supposed the built-in HP jack.  The bit 0x10 should correspond to the docking-station jack.

If you have been testing only with the docking-station jack, this should have been fixed by the recent commit in the upstream f2cbba7602383cd9cdd21f0a5d0b8bd1aad47b33.  That is, 3.3-rc1 should work as is.
This commit is tagged with stable kernel, so it should reach to 3.2.x tree later.
Comment 11 Takashi Iwai 2012-01-23 16:44:03 UTC
Created attachment 72175 [details]
Another fix in the upstream

This is the upstream fix mentioned in comment 10.
Comment 12 Eric Valette 2012-01-23 16:58:00 UTC
Thanks I was searching the linux git tree while I saw your mal. I confirm it partially fixes the problem:
      1) If jack is plugged at boot time on dock station, I have no sound,
      2) If I remove the jack, the internal speaker do emit sound,
      3) If I replug the jack bingo I have sound on the headphone, and the laptop HP are muted,

However, I have to unplug the jack to get sound.
Comment 13 Takashi Iwai 2012-01-23 17:09:37 UTC
Thanks for a quick test.  This must be the overwritten power setup in the init sequence.  Try the fix patch below.
Comment 14 Takashi Iwai 2012-01-23 17:10:24 UTC
Created attachment 72177 [details]
A patch to fix the power-widget setup for line-outs
Comment 15 Eric Valette 2012-01-23 17:22:44 UTC
Congrat. Everything works as expected:
     1) starting XBMC, I have sound directly on the jack on the dock,
     2) removing the jack I get sound on internal speakers,
     3) plugin the jack on the laptop line out directly I also have sound on the headphone,
     4) replugin on dock line out, I get HP sound during the move and then sound in the headphone again.

I wish all people would fix bugs as quickly as you do. Thanks for your time and work.

-- eric
Comment 16 Takashi Iwai 2012-01-23 17:31:08 UTC
Great.  Now I committed the fix patch to the upstream tree.
It should reach to 3.3-rc2 and eventually 3.2.x stable kernel later.
Comment 17 Florian Mickler 2012-02-01 21:00:37 UTC
A patch referencing this bug report has been merged in Linux v3.3-rc2:

commit b4ead019afc201f71c39cd0dfcaafed4a97b3dd2
Author: Takashi Iwai <tiwai@suse.de>
Date:   Mon Jan 23 18:23:36 2012 +0100

    ALSA: hda - Fix silent outputs from docking-station jacks of Dell laptops