[Dell Inspiron 17] Headphone jack outputs no sound

Bug #994685 reported by Daniel Manrique
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
High
Unassigned
Precise
Fix Released
High
Herton R. Krzesinski
Quantal
Fix Released
High
Unassigned

Bug Description

CID 201101-6957

Steps to reproduce:

- plug in headphones
- Go to Sound settings
- Confirm that "play sound through" shows headphones (it does, and shows nothing else; if I unplug headphones, then it shows "speakers").
- Click "test sound" then "test".

Expected result:
- Sound through headphones

Actual result:
- Nothing :(

This seems to be a regression from Oneiric. I'll test both mainline kernels and Oneiric to better establish behavior.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: linux-image-3.2.0-23-generic 3.2.0-23.36
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 2.0.1-0ubuntu5
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: ubuntu 1423 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'PCH'/'HDA Intel PCH at 0x91700000 irq 49'
   Mixer name : 'Intel CougarPoint HDMI'
   Components : 'HDA:10ec0269,102804d8,00100100 HDA:80862805,80860101,00100000'
   Controls : 25
   Simple ctrls : 12
Date: Fri May 4 12:09:38 2012
HibernationDevice: RESUME=UUID=f52a55f7-b77d-4a84-b3a7-8c037d93f3cc
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MachineType: Dell Inc. Dell System Inspiron N7110
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-23-generic root=UUID=01988b56-73dd-47f9-8b82-9a2ae5cac9cb ro quiet splash initcall_debug
RelatedPackageVersions:
 linux-restricted-modules-3.2.0-23-generic N/A
 linux-backports-modules-3.2.0-23-generic N/A
 linux-firmware 1.79
SourcePackage: linux
StagingDrivers: mei
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/18/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: X23
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: Emerald Lake
dmi.board.vendor: Dell Inc.
dmi.board.version: FAB1
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.chassis.version: 0.1
dmi.modalias: dmi:bvnDellInc.:bvrX23:bd01/18/2011:svnDellInc.:pnDellSystemInspironN7110:pvr:rvnDellInc.:rnEmeraldLake:rvrFAB1:cvnDellInc.:ct8:cvr0.1:
dmi.product.name: Dell System Inspiron N7110
dmi.sys.vendor: Dell Inc.

Revision history for this message
Daniel Manrique (roadmr) wrote :
Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel Manrique (roadmr) wrote :

I installed 11.10 on this system and in this, headphone audio works fine. So it is a regression. I then installed the Precise kernel on 11.10, rebooted, and again there's no audio.

My next test will be installing Precise and trying a mainline kernel (3.4).

I'll tag for the regression and mark blocks-hwcert.

tags: added: blocks-hwcert regression-release
Revision history for this message
Daniel Letzeisen (dtl131) wrote :

Please run the following command to gather audio information (from precise install):
apport-collect 994865

affects: linux (Ubuntu) → alsa-driver (Ubuntu)
Changed in alsa-driver (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Daniel Manrique (roadmr) wrote :

Precise audio data upcoming.

Just to update, I tested the 3.4-rc5 kernel on Precise and with that one, I *do* get audio. So it's "fixed upstream" apparently.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Dave,

Running apport-collect on the terminal results in an error dump, and the graphical apport window that pops up stalls with a twirly indicator.

ubuntu@201101-6957:~$ apport-collect 994685
No packages found matching alsa-driver.
Traceback (most recent call last):
  File "/usr/share/apport/apport-gtk", line 494, in <lambda>
    GLib.idle_add(lambda: self.collect_info(on_finished=self.ui_update_view))
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 861, in collect_info
    icthread.exc_raise()
  File "/usr/lib/python2.7/dist-packages/apport/REThread.py", line 34, in run
    self._retval = self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 74, in thread_collect_info
    report.add_package_info(package)
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 225, in add_package_info
    self['SourcePackage'] = packaging.get_source(package)
  File "/usr/lib/python2.7/dist-packages/apport/packaging_impl.py", line 116, in get_source
    if self._apt_pkg(package).installed:
  File "/usr/lib/python2.7/dist-packages/apport/packaging_impl.py", line 87, in _apt_pkg
    raise ValueError('package does not exist')
ValueError: package does not exist

Daniel Manrique (roadmr)
Changed in alsa-driver (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Daniel Letzeisen (dtl131) wrote :

Daniel, I'm sorry that apport didn't work, but for the purpose of this bug, could you paste the link from your alsa-info? https://wiki.ubuntu.com/Audio/AlsaInfo

Thanks.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Here's alsa-info output from the Inspiron 17R.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.4kernel[1] (Not a kernel in the daily directory). Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag(Only that one tag, please leave the other tags). This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-rc7-precise/

Changed in alsa-driver (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
tags: added: needs-upstream-testing
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :
Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Joseph,

I can certainly test rc6, but first I want to confirm that it's indeed necessary; in comment #4 I state that the problem seems fixed in rc4.

Changed in alsa-driver (Ubuntu):
status: Incomplete → Triaged
tags: added: kernel-fixed-upstream
removed: needs-upstream-testing
Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Joseph,

I went testing mainline kernels, here are my findings. Basically the first "fixed" version is 3.4-rc1. The entire 3.3-rcX series (1 to 7) is bad, as is the 3.3 kernel.

I'm assuming the ordering is 3.3-rcX -> 3.3 -> 3.4-rc1; let me know if there's something wrong with my chronology :)

Thanks!

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Hi Daniel,

Thanks for testing. I'm going to build a few test kernels to bisect this issue. I'll post a link shortly.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Hi Daniel,

I posted a test kernel at:
http://people.canonical.com/~jsalisbury/lp994685/

Can you test that kernel and report back if it has the bug or not?

The test kernel is built up to commit:
b2094ef840697bc8ca5d17a83b7e30fad5f1e9fa

tags: added: kernel-da-key
Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Joseph,

Yes, I tested the kernel you sent, it tests as GOOD; audio comes through the headphones fine. I tested by plugging in headphones and going to "sound", and using the "test sound" button.

Kernel version string (/proc/version) is :

Linux version 3.3.0-030300-generic (jsalisbury@tangerine) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #201206011655 SMP Fri Jun 1 15:57:27 UTC 2012

I may not be able to test the next one until Monday, but I'll keep an eye out for it. Thanks!

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Hi Daniel,

I posted the next test kernel. It can be downloaded from:
http://people.canonical.com/~jsalisbury/lp994685/

This test kernel is built up to commit:
bbdb32cb5b73597386913d052165423b9d736145

Can you test this kernel and report back if it has the bug or not.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Joseph,

Yes, the latest test kernel is BAD, there's no sound from the headphones (though the internal speakers work fine).

/proc/version has this:

Linux version 3.3.0-030300-generic (jsalisbury@tangerine) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #201206012118 SMP Fri Jun 1 20:19:55 UTC 2012

Thanks! Awaiting the next one...

tags: added: kernel-bisecting
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Hi Daniel,

I posted the next test kernel. It can be downloaded from:
http://people.canonical.com/~jsalisbury/lp994685/

This test kernel is built up to commit:
5f0e685f316a1de6d3af8b23eaf46651faca32ab

Can you test this kernel and report back if it has the bug or not.

tags: added: performing-bisect
removed: kernel-bisecting
Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Joseph,

Sure, the third test kernel tests BAD, there's no audio coming through headphones. I used the usual test procedure, and still no go (speakers work fine).

/proc/version has this:

Linux version 3.3.0-030300-generic (jsalisbury@tangerine) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #201206041711 SMP Mon Jun 4 16:13:36 UTC 2012

Thanks!

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Hi Daniel,

I posted the next test kernel. It can be downloaded from:
http://people.canonical.com/~jsalisbury/lp994685/

This test kernel is built up to commit:
02c502566ef505d0469fa27567f48766c1f5f7af

Can you test this kernel and report back if it has the bug or not?

Thanks again for testing!

Revision history for this message
Daniel Manrique (roadmr) wrote :

Joseph,

Fourth test kernel tests BAD, no audio from headphones. Speakers work well.

Version string is:

Linux version 3.3.0-030300-generic (jsalisbury@tangerine) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #201206042006 SMP Mon Jun 4 19:08:03 UTC 2012

Thanks!

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I posted the next test kernel. It can be downloaded from:
http://people.canonical.com/~jsalisbury/lp994685/

This test kernel is built up to commit:
828006de1bddf83b6ecf03ec459c15f7c7c22db7

Can you test this kernel and report back if it has the bug or not?

Revision history for this message
Daniel Manrique (roadmr) wrote :

Good morning!

The fifth test kernel is also BAD. No audio from headphones, but speakers work fine.

I'm always a bit concerned when I get too many BADs in a row when doing a bisect but hey, that's binary search for you.

Anyway, kernel version string is:

Linux version 3.3.0-030300rc4-generic (jsalisbury@tangerine) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #201206042230 SMP Mon Jun 4 22:21:53 UTC 2012

Thanks!

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I posted the next test kernel. It can be downloaded from:
http://people.canonical.com/~jsalisbury/lp994685/

This test kernel is built up to commit:
cd8df932d894f3128c884e3ae1b2b484540513db

Yeah, I'm kind of surprised at so many BADs. There are 8 steps left in the bisect, so we should get a GOOD soon.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Joseph,

Well, this wasn't it, as the 6th test kernel tested BAD as well, no sound from headphones (speakers are OK).

Version string is

Linux version 3.3.0-030300rc3-generic (jsalisbury@tangerine) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #201206051843 SMP Tue Jun 5 17:45:07 UTC 2012

Thanks!

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I posted the next test kernel. It can be downloaded from:
http://people.canonical.com/~jsalisbury/lp994685/

This test kernel is built up to commit:
1ab142d499294b844ecc81e8004db4ce029b0b61

Revision history for this message
David Henningsson (diwic) wrote :

I think that the problem might be that node 0x02 of the codec has a volume control labeled "Speaker playback volume", and the headphone path goes through that node for output. When headphones are plugged in, PulseAudio turns "Speaker playback volume" off, which mutes the headphones.

If the theory is correct, the offending/fixing patch messes around with volume control names so that "Speaker playback volume" will be named something else.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Joseph,

7th test kernel also tested BAD (?), with no audio from headphones, though speakers continue to work well.

Version string:

Linux version 3.3.0-030300-generic (jsalisbury@tangerine) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #201206062232 SMP Wed Jun 6 21:33:47 UTC 2012

Thanks!

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Thanks for testing, Daniel. I have the next kernel building now. It will be built up to commit:
5556e147083fb4d473d5c1a82f73205b8b145cd9

Eventually we have to get a GOOD kernel ;-)

Thanks for the info, David. I'll take a look at the remaining commits in the bisect and see if any indicate changes to volume, etc.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Hmm, The only commit you tested that was good so far was:
b2094ef840697bc8ca5d17a83b7e30fad5f1e9fa

Interestingly enough, that is a huge commit to fix sound stuff:

commit b2094ef840697bc8ca5d17a83b7e30fad5f1e9fa
Merge: 424a6f6 6681bc0
Author: Linus Torvalds <email address hidden>
Date: Thu Mar 22 13:00:13 2012 -0700

    Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

    Pull updates of sound stuff from Takashi Iwai:
     "Here is the first big update chunk of sound stuff for 3.4-rc1.

It could be that our bisect will just bring us back to this commit :-) I'm going to short circuit the bisect, and build a test kernel up to the commit right before b2094ef840697bc8ca5d17a83b7e30fad5f1e9fa. If that kernel is bad, then we know where the fix is. However, that commit is a merge with allot of fixes, so we may have to bisect down through that merge.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Hi Daniel,

I built a test kernel up to commit:
424a6f6ef990b7e9f56f6627bfc6c46b493faeb4

It is posted at:
http://people.canonical.com/~jsalisbury/lp994685/

This is the commit right *before* the commit "Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound"

If this test kernel is BAD then we will know the fix is in commit:
b2094ef840697bc8ca5d17a83b7e30fad5f1e9fa

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Joseph,

So I tested the kernel from comment #30, and as you suspected it tested BAD (no audio from headphones, speakers work well). I guess we'll have to go down the rabbit hole for that merge with the audio changes.

Kernel version is:

Linux version 3.3.0-030300-generic (jsalisbury@tangerine) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #201206071741 SMP Thu Jun 7 16:42:48 UTC 2012

Thanks!

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I started a bisect between commits
424a6f6ef990b7e9f56f6627bfc6c46b493faeb4 BAD
and
b2094ef840697bc8ca5d17a83b7e30fad5f1e9fa GOOD

(Since this is a reverse bisect, I actually tell git the opposite of whether a commit is good or bad).

The first test kernel is built up to commit:
8949490f70cf2cda615fb0fd0ddc299b531e6e48

It is posted at:
http://people.canonical.com/~jsalisbury/lp994685/

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Joseph,

OK, strangely, the latest test kernel is still faulty, there's NO audio from headphones. It may just be how the binary search is progressing, still I installed a 3.4-rc1 kernel to validate and that one works fine (audio from headphones works). I then rebooted into the test kernel and it's indeed NOT working, so the results are valid.

I'm not saying BAD or GOOD due to the reverse commit thing, I don't want to confuse things.

Version string is:

Linux version 3.3.0-030300rc4-generic (jsalisbury@tangerine) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #201206072102 SMP Thu Jun 7 20:03:48 UTC 2012

Thanks!

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I posted the next test kernel. It can be downloaded from:
http://people.canonical.com/~jsalisbury/lp994685/

This test kernel is built up to commit:
5556e147083fb4d473d5c1a82f73205b8b145cd9

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Joseph:

\o/ The latest test kernel WORKS, headphones are correctly recognized and sound comes out of them. Speakers also work fine, as usual.

Version string is

Linux version 3.3.0-030300rc1-generic (jsalisbury@tangerine) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #201206071714 SMP Thu Jun 7 16:16:20 UTC 2012

I noticed that the dates seem a bit off on the kernel (Thu Jun 7 16:16:20 UTC 2012, I received and tested this on Fri Jun 8 at about 19:00 UTC), I hope it's just clock skew on the build machine.

Thanks!

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I posted the next test kernel. It can be downloaded from:
http://people.canonical.com/~jsalisbury/lp994685/

This test kernel is built up to commit:
6f4530409199e7c3f8a4bdbd1391b7b25951e397

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Joseph,

Latest test kernel works well, there is audio coming from headphones (speakers also continue to work).

Version string is:

Linux version 3.3.0-030300rc1-generic (jsalisbury@tangerine) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #201206082109 SMP Fri Jun 8 20:11:00 UTC 2012.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I posted the next test kernel. It can be downloaded from:
http://people.canonical.com/~jsalisbury/lp994685/

This test kernel is built up to commit:
e652f4c861fb7f1f59ff0828db0d85578471932d

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Joseph,

Latest test kernel has NO sound coming from the headphones (hey, some variation at least!). Speakers work fine as usual.

Version string is:

Linux version 3.3.0-030300rc1-generic (jsalisbury@tangerine) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #201206112032 SMP Mon Jun 11 19:34:31 UTC 2012

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I posted the next test kernel. It can be downloaded from:
http://people.canonical.com/~jsalisbury/lp994685/

This test kernel is built up to commit:
c29b3f6dd7798964d77199af4925be72a3a48349

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Joseph,

Latest test kernel does NOT work, no sound coming from headphones (though speakers, as usual, work fine).

Version string is:

Linux version 3.3.0-030300rc1-generic (jsalisbury@tangerine) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #201206120131 SMP Tue Jun 12 00:33:04 UTC 2012

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I posted the next test kernel. It can be downloaded from:
http://people.canonical.com/~jsalisbury/lp994685/

This test kernel is built up to commit:
00bc0ce9130551ef193c3f5db0b7b6e70dff28ac

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Joseph,

Latest test kernel again does NOT work, no sound coming from headphones (though speakers are OK).

Version string is:

Linux version 3.3.0-030300rc1-generic (jsalisbury@tangerine) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #201206121829 SMP Tue Jun 12 17:31:30 UTC 2012

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I posted the next test kernel. It can be downloaded from:
http://people.canonical.com/~jsalisbury/lp994685/

This test kernel is built up to commit:
1c4a54b4513c175ba1a56d0aba8d9cf8f231d407

There should be only a couple more kernels to test.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Joseph,

The most recent test kernel WORKS, audio DOES come out of the headphones, and speakers also work well.

Version string:

Linux version 3.3.0-030300rc1-generic (jsalisbury@tangerine) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #201206131620 SMP Wed Jun 13 15:21:40 UTC 2012

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I posted the next test kernel. It can be downloaded from:
http://people.canonical.com/~jsalisbury/lp994685/

This test kernel is built up to commit:
140547ef4ee9ad5f9ee9e6546f6027e8737c4149

Revision history for this message
Daniel Manrique (roadmr) wrote :

Good morning!

So the latest test kernel does NOT work, there's NO audio from the headphones, though speakers work as usual.

Version string:

Linux version 3.3.0-030300rc1-generic (jsalisbury@tangerine) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #201206132110 SMP Wed Jun 13 20:12:00 UTC 2012

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I think this is the commit that fixes this bug:
1c4a54b4513c175ba1a56d0aba8d9cf8f231d407

I'll build a test kernel patched with that commit and post it shortly.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Awesome! I'll be awaiting the test kernel :) Thanks so much for your help on this problem.

It'd be interesting to also know which commit broke things between the Oneiric 3.0.0 kernel and Precise's 3.2 series, but the interest would be purely academical I think :)

This is the commit description:

commit 1c4a54b4513c175ba1a56d0aba8d9cf8f231d407
Author: Takashi Iwai <email address hidden>
Date: Thu Feb 16 16:45:59 2012 +0100

    ALSA: hda/realtek - Finer tuning of auto-parser with badness evaluation

    This patch improves the Realtek auto-parser for assigning the DACs and
    mixers in more suitable ways by evaluating the assignment with "badness"
    calculations.

    When assigning a DAC hinders the assignment of individual DACs for
    other pins, some badness point is given. Similarly, when it blocks the
    assignment of unique mixer controls, another badness point is added.
    Also, if no DAC, even shared DAC, can be assigned, more badness is
    pointed. Finally, comparing the accumulated badness, the best route is
    chosen among several trials.

    Signed-off-by: Takashi Iwai <email address hidden>

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

@Daniel,

Sorry for the delay. The patch that resolves this bug does not apply cleanly to Precise. I'm working on fixing up the patch, so it does apply. I should have an update for you shortly.

tags: added: rls-mgr-p-tracking
Revision history for this message
David Henningsson (diwic) wrote :

Ouch, "ALSA: hda/realtek - Finer tuning of auto-parser with badness evaluation" is a relatively big patch with some complex logic in it. Cross your fingers that it doesn't regress anything else...

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

@David,

Yes, there is a considerable amount of diffs versus precise. I'm not sure if it will be accepted as an SRU or not due to the amount of diffs.

 I was able to backport the patch and got it to apply to precise. However, I'm having some issues getting the kernel to compile, but I'll continue to work on it.

Changed in alsa-driver (Ubuntu Precise):
importance: Undecided → Medium
Revision history for this message
Ara Pulido (ara) wrote :

Joseph, shall you assign the bug to yourself?

Changed in alsa-driver (Ubuntu Precise):
status: New → In Progress
assignee: nobody → Joseph Salisbury (jsalisbury)
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

@Daniel,

I also needed to backport commit 07b18f69a766375736a5313c29d808e59b1e13e9 to get commit 1c4a54b4513c175ba1a56d0aba8d9cf8f231d407 to compile properly. Commit 07b18f6 adds some function definitions that were missing.

I should have an update for you shortly.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

@Daniel,

I created a Precise test kernel with the following commits backported and applied:
07b18f69a766375736a5313c29d808e59b1e13e9
1c4a54b4513c175ba1a56d0aba8d9cf8f231d407

The test kernel can be downloaded from:
http://people.canonical.com/~jsalisbury/lp994685/

Can you test this kernel and report back if it fixes this bug or not. Please also report if this kernel introduces any new issues.

Thanks in advance!

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

@David and @Daniel,

The patches I backported for this bug may have too many changes to be accepted as an SRU. If that is the case, we can approach the bug from the other direction. We can try to find the commit that caused this regression and see if it can be reverted.

Lets see how it goes with the backported patches first.

Changed in alsa-driver (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Joseph,

I confirmed that the patched kernel works fine:

Linux version 3.2.0-26-generic (root@tangerine) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #41 SMP Tue Jun 26 19:57:55 UTC 2012

I tested internal speakers and microphone, as well as headphones and external microphone, both before and after suspending, and everything seems to work fine.

However, as you say, if it's not a good candidate for SRU, I could certainly try to pinpoint the introduction of this problem between kernels 3.0 and 3.2, hopefully that'll make for a SRUable patch.

I'll get working on it and report when I get something. Meanwhile I'll set this back to Triaged. Thanks!

Changed in alsa-driver (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

I think this should stay as incomplete until the patch is located, as I reminder that someone needs to provide this information.

Revision history for this message
Herton R. Krzesinski (herton) wrote :

Hi Daniel, so Joe proposed the patches for Precise, but looking at the patch it is too intrusive for an stable release. And looking at the patch, seems it should have little effect, and current Precise kernel should at least output something through head phones.

Did you try to use something else besides using Sound settings test? (do other audio applications also fail to output sound in head phones when it's connected?). Also if you play with volumes using alsamixer -D hw, do you get any difference?

Revision history for this message
Herton R. Krzesinski (herton) wrote :

David Henningson also suggested we can collect alsa-info, with headphones plugged, both from the working and no working kernel, can you do that and attach here on the bug as well? That can help verify also if really the kernel is ok or not (even though with hda-emu it seems ok), or if it is something else.

Changed in alsa-driver (Ubuntu Precise):
status: In Progress → Incomplete
assignee: Joseph Salisbury (jsalisbury) → nobody
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

@Herton,

Thanks for working on this bug. The bug is also a regression from Oneiric. Do you think it would be worthwhile for us to perform a bisect to identify the commit that caused this regression?

Revision history for this message
Herton R. Krzesinski (herton) wrote :

@Joseph, a bisect could be useful, but first lets wait feedback from Daniel (seem he is on holidays, not sure somebody else can look into it). The issue may be influenced by the kernel, but lets see if we can get more data before, we may end not need to bisect anymore.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi,

I'll be able to test this in a couple of days (July 2nd). And yes, it's due to it being a long weekend where I live :)

Ara Pulido (ara)
Changed in alsa-driver (Ubuntu):
importance: Medium → High
Revision history for this message
Daniel Manrique (roadmr) wrote :

OK, here's a quick update. I collected alsa-info data, for Joseph's fixed 3.2.0-26 kernel as well as for a failing 3.2.0-23 Precise stock kernel. For each kernel I did a collection with the headphones plugged in, and one without them. I'll attach them in a bit.

I also tested Herton's request to use alsa-info -D hw and play with the volume settings, with no change; indeed, as can be seen in the screenshot I'll also attach, the headphone volume isn't even controllable. The screenshot was taken with the headphones plugged in (this is why the speakers are "muted", so it looks like the kernel detects headphone insertion at least).

I'll next try to find kernels from which to start a bisect for the 3.0-3.2 transition.

Revision history for this message
Daniel Manrique (roadmr) wrote :
Revision history for this message
Daniel Manrique (roadmr) wrote :
Revision history for this message
Daniel Manrique (roadmr) wrote :
Revision history for this message
Daniel Manrique (roadmr) wrote :
Revision history for this message
Daniel Manrique (roadmr) wrote :
Revision history for this message
Herton R. Krzesinski (herton) wrote :

Daniel, the difference from the bad kernel without and with headphones, is that with headphones, besides the kernel muting the speakers, it seems something set the 'Speaker Playback Volume' to 0. After you plug the headphones with the bad kernel, can you go to alsamixer and raise the Speaker Playback Volume slider, check if there is sound.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Herton,

Yes, I started up alsamixer, plugged in the headphones, then changed the speaker volume (hadn't tried that before, didn't think it'd apply to headphones), and sound does indeed come out of the headphones.

Just for kicks, I booted up Joseph's patched kernel and fired up alsamixer, then plugged in the headphones, and I notice that the headphone section does have a volume setting (unlike with the bad kernel). Also, with the fixed kernel, moving the speaker volume doesn't affect the headphones.

I'm attaching a screenshot of alxamixer with the good kernel and headphones plugged in.

Revision history for this message
Herton R. Krzesinski (herton) wrote :

Yes, that's expected. The "fixed" kernel in fact uses a different DAC in the codec to output sound to first connected speakers, not sharing with headphone, so you get two volume controls. On the "bad" kernel, one DAC is used, and the volume control controls the Amp in the DAC (Speaker Volume slider controls this DAC), which is shared between the headphone and speaker pins, but the name of the slider is misleading.

This behaviour confirms what I had found earlier when playing with codec file in hda-emu. Just the lack of sound was weird, as the kernel isn't touching volumes. So when you plug the headphone, something else (pulse?) goes there and turns down the volume all the way down, probably thinking it just controls the speaker volume. When the new kernel starts to use a new DAC, and creates for it also a new volume slider, this problem is avoided. Problem is that the commit for the kernel which results in a new headphone slider/dac used is a bit too intrusive for an stable release.

At least there is a workaround with using alsamixer. But not sure what to do or the best solution here yet, have to think/investigate more about it. The kernel certainly doesn't touch the volume sliders, when checking this with hda-emu, and I always wonder why something else wants to touch this when kernel usually is doing or should do automute properly already...

Revision history for this message
David Henningsson (diwic) wrote :

@Herton, as you can see (and modify) in /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf, PulseAudio sets "Speaker" to off when the headphones path is activated, which it automatically is, based on the jack detection.

I think the only sane solution here is to create a bugfix patch based on the 3.2 code, something that's smaller than applying the entire "ALSA: hda/realtek - Finer tuning of auto-parser" commit.
This can be done either by using separate DACs for speaker and headphones, or by renaming "Speaker" to "Master", whichever is simplest.

Revision history for this message
Herton R. Krzesinski (herton) wrote :

@David, thanks for pointing that out.

Yes, seems the better solution with less disruption would be trying to do something on patch_realtek.c to deal with this case. Since it's auto config code, must be something that also don't have potential to cause issues on other machines, a specific quirk just for this could be a solution.

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

@David, @Herton,

Can this bug now be considered 'In Progress'? If so can we change the status - we'd prefer the Incomplete state to mean that information is needed from the reporter (us)

Changed in alsa-driver (Ubuntu Precise):
status: Incomplete → Triaged
Revision history for this message
Herton R. Krzesinski (herton) wrote :

This is a proposed change for the kernel, which workarounds this issue. It adds a new fixup (quirk) for this machine. Seems to do what is intended checking under hda-emu. On Monday I'll build and provide some testing packages, just attaching the patch here first for any desired review or if anyone wants to build early.

The patch should only should affect the Dell machine here and has also some sanity checks, so should be safe for an SRU.

tags: added: patch
Revision history for this message
Herton R. Krzesinski (herton) wrote :

@Daniel, can you download the testing packages from http://people.canonical.com/~herton/lp994685/

Check if the problem is fixed, and there is no side effects. If you confirm it works, I plan to do an SRU for this.

Revision history for this message
David Henningsson (diwic) wrote :

Quick patch review: Nothing comes out as being buggy about the patch, so I'm okay with acking it. I would probably have gone for trying to correct the generic problem (if I had the time) rather than a fixup/workaround for this particular machine, as I suspect this isn't the only machine with this problem.

I doubt it'll go in upstream (for the same reason), but we should at least send it there. Once it is tested, do you want to send it upstream or do you want me to do it?

Revision history for this message
Herton R. Krzesinski (herton) wrote :

It should be fine upstream, since the newer auto config code copes with the machine well, just 3.2 and I think 3.3 kernels will experience issues (the newer kernels than this have the commit Joseph had backported earlier and chooses a configuration which allows for an independent headphone volume slider, so it's fine), so yes, it will not go upstream I expect, but feel free to send it. The intention for Precise (3.2) was indeed to address this specific machine, since backporting the commit Joseph found would be too intrusive, and this I think avoids a lot of potential for regressions, although it's not generic enough to potentially fix more machines. I felt more confortable with quirking only for this machine, but may be it could be checked manually for ALC269 in the code where speakers are etc. to force choosing a config that makes a headphone slider separated from speaker possible.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Herton,

I tested the patched kernel and it works well, audio does come from the headphones and speakers continue to work correctly too.

I didn't notice any strange behaviors or other problems with it.

I also verified alsamixer, and the headphone volume control is available, unlike what we had with the bad kernel.

Running kernel version is:

Linux 201101-6957 3.2.0-27-generic #43~lp994685r1 SMP Mon Jul 9 20:36:26 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

I'm attaching alsainfo for the patched kernel, both with headphones and without them.

Thanks!

Revision history for this message
Daniel Manrique (roadmr) wrote :
Revision history for this message
Daniel Manrique (roadmr) wrote :
Tim Gardner (timg-tpi)
affects: alsa-driver (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
status: Triaged → Fix Committed
Changed in linux (Ubuntu Quantal):
status: Fix Committed → Fix Released
Changed in linux (Ubuntu Precise):
status: Triaged → Fix Committed
assignee: nobody → Herton R. Krzesinski (herton)
Revision history for this message
Kate Stewart (kate.stewart) wrote :

bumping precise importance to high, based on it being on top 3 list of want to get fixed for 12.04.1 from hardware certification.

Changed in linux (Ubuntu Precise):
milestone: none → ubuntu-12.04.1
importance: Medium → High
Revision history for this message
David Henningsson (diwic) wrote :

bug 921397 has a few more people, with similar problem on other machines.

Revision history for this message
Luis Henriques (henrix) wrote :

This bug is awaiting verification that the kernel for Precise in -proposed solves the problem (3.2.0-29.46). Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-precise' to 'verification-done-precise'.

If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-precise
Revision history for this message
Daniel Manrique (roadmr) wrote :

I installed the proposed kernel, this is the version I tested with;

Linux 201101-6957 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

With this kernel audio works well, headphones output works, I tested both internal/external microphone, speakers and headphone jack.

I'll mark verification-done-precise.

Thanks!

tags: added: verification-done-precise
removed: verification-needed-precise
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (16.5 KiB)

This bug was fixed in the package linux - 3.2.0-29.46

---------------
linux (3.2.0-29.46) precise-proposed; urgency=low

  [ Tim Gardner ]

  * No change upload to fix armel/armhf FTBS caused by
    'UBUNTU: [Config] SND_OMAP_SOC, SND_OMAP_SOC_MCBSP and SND_OMAP_SOC_OMAP3_BEAGLE =y'
    Added ignore and ignore.module files to ABI directories.

  [Luis Henriques]

  * Release Tracking Bug
    - LP: #1029507

linux (3.2.0-29.45) precise-proposed; urgency=low

  [Luis Henriques]

  * Release Tracking Bug
    - LP: #1029507

  [ Andy Whitcroft ]

  * SAUCE: rds_ib_send() -- prevent local pings triggering BUG_ON()
    - LP: #1016299
    - CVE-2012-2372

  [ Upstream Kernel Changes ]

  * Revert "samsung-laptop: make the dmi check less strict"
    - LP: #1029431
  * samsung-laptop: make the dmi check less strict
    - LP: #1029431
  * raid5: delayed stripe fix
    - LP: #1029431
  * tcp: drop SYN+FIN messages
    - LP: #1029431
  * tg3: Apply short DMA frag workaround to 5906
    - LP: #1029431
  * rtl8187: ->brightness_set can not sleep
    - LP: #1029431
  * net/wireless: ipw2x00: add supported cipher suites to wiphy
    initialization
    - LP: #1029431
  * kbuild: do not check for ancient modutils tools
    - LP: #1029431
  * brcmsmac: "INTERMEDIATE but not AMPDU" only when tracing
    - LP: #1029431
  * ext4: Report max_batch_time option correctly
    - LP: #1029431
  * NFSv4: Reduce the footprint of the idmapper
    - LP: #1029431
  * NFSv4: Further reduce the footprint of the idmapper
    - LP: #1029431
  * macvtap: zerocopy: fix offset calculation when building skb
    - LP: #1029431
  * macvtap: zerocopy: fix truesize underestimation
    - LP: #1029431
  * macvtap: zerocopy: put page when fail to get all requested user pages
    - LP: #1029431
  * macvtap: zerocopy: set SKBTX_DEV_ZEROCOPY only when skb is built
    successfully
    - LP: #1029431
  * macvtap: zerocopy: validate vectors before building skb
    - LP: #1029431
  * KVM: Fix buffer overflow in kvm_set_irq()
    - LP: #1029431
  * scsi: Silence unnecessary warnings about ioctl to partition
    - LP: #1029431
  * iommu/amd: Fix missing iommu_shutdown initialization in passthrough
    mode
    - LP: #1029431
  * iommu/amd: Initialize dma_ops for hotplug and sriov devices
    - LP: #1029431
  * usb: Add support for root hub port status CAS
    - LP: #1029431
  * gpiolib: wm8994: Pay attention to the value set when enabling as output
    - LP: #1029431
  * sched/nohz: Rewrite and fix load-avg computation -- again
    - LP: #1029431
  * USB: option: add ZTE MF60
    - LP: #1029431
  * USB: option: Add MEDIATEK product ids
    - LP: #1029431
  * USB: cdc-wdm: fix lockup on error in wdm_read
    - LP: #1029431
  * mtd: nandsim: don't open code a do_div helper
    - LP: #1029431
  * dvb-core: Release semaphore on error path dvb_register_device()
    - LP: #1029431
  * hwspinlock/core: use global ID to register hwspinlocks on multiple
    devices
    - LP: #1029431
  * libsas: fix taskfile corruption in sas_ata_qc_fill_rtf
    - LP: #1029431
  * md/raid1: fix use-after-free bug in RAID1 data-check code.
    - LP: #1029431
  * PCI: EHCI: fix crash during suspend on ASUS computers
    - L...

Changed in linux (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Removing blocks-hwcert since this fix is now in updates \o/

tags: removed: blocks-hwcert
Revision history for this message
enboig (enboig) wrote :

I discovered that when plugin headphones, there is no audio; but going to mixer and choosing speakers as output sound comes out from headphones.

tags: removed: performing-bisect
To post a comment you must log in.