Bug 291911

Summary: Headphone automute not working on Acer TravelMate 3260
Product: [Fedora] Fedora Reporter: Rohan Dhruva <rohandhruva>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-2.6.23.1-42.fc8.i686 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-12 06:26:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
lspci -nv output
none
amixer output after model=auto
none
Contents of /proc/asound/card0/codec* after model=auto
none
dmesg output after model=auto
none
amixer on default boot of fc8t2 gnome live cd
none
Contents of /proc/asound/card0/codec* on default boot
none
amixer on Arch Linux where headphone automute works perfectly
none
Contents of /proc/asound/card0/codec* on Arch Linux
none
Patch no. 1 against kernel 2.6.22.6 which fixes this bug.
none
Patch no. 2 against kernel 2.6.22.6 which fixes this bug. none

Description Rohan Dhruva 2007-09-15 07:21:24 UTC
Description of problem:
I have an Acer TravelMmate 3260 laptop. It has a sound card that uses
snd_intel_hda. The problem is, unlike windows, sound from speakers is not
automatically muted when I insert the headphone in the jack. This feature is
perfectly working on Arch Linux, but not on Ubuntu Feisty. I think this implies
that the driver for my sound card has been updated, but not synced in the fedora
repos. I am writing this from the F8Test2 7.91 live cd for gnome. In ubuntu as
well as in fedora by default when I start alsamixer I get channels like
Surround, Center, LFE, Front etc .. In arch where headphone automute is working,
I get just Headphone, PCM and Front (of course the Mic etc are always there).
From the live cd, I unloaded snd_hda_intel, and reloaded it by passing the
argument "modprobe snd_hda_intel model=auto". After that when I run alsamixer I
get the same channels as Arch Linux, yet headphone automute is not working. 

Please find all the info for the laptop I have attached here -
https://bugs.launchpad.net/bugs/109882
If I still need to attach any more info, or repaste the info from within fedora
live cd, please tell me, I'll be glad to do so. It'll be great to see sound in
fedora working out of box without any config on my laptop. Thanks !

Version-Release number of selected component (if applicable):
2.6.23-0.164.rc5.fc8

How reproducible:
Always

Steps to Reproduce:
1. Play any sound file
2. Insert the headphone in the jack
  
Actual results:
The speaker and headphones both play sound.

Expected results:
Only the headphone must play sound, and not the speakers. (as in windows and
arch linux)


Additional info:
Please find all the logs and files attached here --
https://bugs.launchpad.net/bugs/109882

Comment 1 Rohan Dhruva 2007-09-15 07:29:45 UTC
Created attachment 196311 [details]
lspci -nv output

lspci -nv output from the fedora 8 test 2 gnome live cd.

Comment 2 Rohan Dhruva 2007-09-15 07:30:54 UTC
Created attachment 196321 [details]
amixer output after model=auto

Comment 3 Rohan Dhruva 2007-09-15 07:32:45 UTC
Created attachment 196331 [details]
Contents of /proc/asound/card0/codec* after model=auto

Comment 4 Rohan Dhruva 2007-09-15 07:34:58 UTC
Created attachment 196341 [details]
dmesg output after model=auto

Comment 5 Rohan Dhruva 2007-09-15 08:22:24 UTC
All the above info has been posted from the Fedora 8 test 2 live cd. I will post
more info (the above files before model=auto and also amixer output from arch
linux where this feature works). Please bear with me :) Thanks !

Comment 6 Rohan Dhruva 2007-09-15 12:24:27 UTC
Created attachment 196361 [details]
amixer on default boot of fc8t2 gnome live cd

Comment 7 Rohan Dhruva 2007-09-15 12:26:52 UTC
Created attachment 196371 [details]
Contents of /proc/asound/card0/codec* on default boot

Comment 8 Rohan Dhruva 2007-09-15 12:33:00 UTC
Created attachment 196381 [details]
amixer on Arch Linux where headphone automute works perfectly

Comment 9 Rohan Dhruva 2007-09-15 12:34:23 UTC
Created attachment 196391 [details]
Contents of /proc/asound/card0/codec* on Arch Linux

Comment 10 Rohan Dhruva 2007-09-15 12:37:20 UTC
Ahh, now I think I have provided maximum possible information required for this
bug :) For the record, I'm using Arch Linux -current, not some frozen stable
branch. Arch uses kernel 2.6.22.6 .. The patches applied to Arch's kernel can be
found here -
http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/kernels/kernel26/?cvsroot=Current&only_with_tag=CURRENT

If some more information is needed, please tell me. I think this bug has been
fixed upstream, but is pending a sync in the fedora repo.. Thanks once again !

Comment 11 Rohan Dhruva 2007-09-22 21:46:32 UTC
Ok the URL to arch repo has changed, it's now -
http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/base/kernel26/?cvsroot=Core&only_with_tag=CURRENT

Comment 12 Rohan Dhruva 2007-09-24 19:44:38 UTC

OK after some more diagnosis it seems that it works on Arch Linux because it
uses ALSA patches which are newer than either kernel 2.6.22 or 2.6.23-rcX. The
newer patches which arch applies to kernel 2.6.22 (which fixes this bug) are -

http://www.archlinux.org/~tpowa/alsa-patches/alsa-20070818.patch.bz2
http://www.archlinux.org/~tpowa/alsa-patches/alsa-include-20070818.patch.bz2

I am attaching those two patches individually here too, for convenience.


Comment 13 Rohan Dhruva 2007-09-24 19:46:58 UTC
Created attachment 204491 [details]
Patch no. 1 against kernel 2.6.22.6 which fixes this bug.

Comment 14 Rohan Dhruva 2007-09-24 19:48:34 UTC
Created attachment 204501 [details]
Patch no. 2 against kernel 2.6.22.6 which fixes this bug.

Comment 15 Rohan Dhruva 2007-09-24 19:55:01 UTC
Ok, doing some digging upstream, I'm positively sure that this commit in alsa
repo fixes the bug. Though I've yet to try it myself, there is no other commit
upto now which seems to have fixed the bug.

Commit - http://hg.alsa-project.org/alsa-kernel/rev/2c9a8e76669e

The complete revision history of patch_realtek.c can be seen at
http://hg.alsa-project.org/alsa-kernel/log/3a300e020eca/pci/hda/patch_realtek.c


Comment 16 Rohan Dhruva 2007-09-24 20:11:12 UTC
Ok, this has GOT to be the patch that fixes it -
http://hg.alsa-project.org/alsa-kernel/rev/c9f96ebed522
and it's dependency seems to be
http://hg.alsa-project.org/alsa-kernel/rev/2c9a8e76669e


I'll try and build a kernel which incorporates the patches, and report back :-)

Comment 17 Rohan Dhruva 2007-09-25 06:43:17 UTC
OMG THAT FIXES IT ! Applying the above 2 patches to kernel 2.6.23-rc7-git5 fixes
the bug without anything else required ! No other dependencies. Can we please
have the bug fixed in fedora rawhide for fedora 8 release now ? Thanks :-)

Comment 18 Chuck Ebbert 2007-09-25 18:58:16 UTC
Which patches were applied? c9f96ebed522 from comment #16 does not apply, with
or without the other patch from that comment applied.

Comment 19 Rohan Dhruva 2007-09-25 19:17:36 UTC
The 2c9a8e76669e modifies some non-existent documentation file. Just removing
that much part from the head of the patch allows the patch to apply cleanly. The
c9f96ebed522 has some rejects, but when merged in manually by me, the patch
applied cleanly. The problem occurs because of other patches in between these 2
and the upstream kernel version of the same file :(

Comment 20 Rohan Dhruva 2007-11-12 06:26:41 UTC
As Fedora 8 uses alsa 1.0.15, the bug is resolved ! Thank you very much !!

Comment 21 Varadarajan 2008-05-26 07:23:15 UTC
I've a HP Pavilion DV6605us and Fedora 8 installed in it. I'm getting sound 
from both Speakers and Headphone. Does the above mentioned patch will work for 
HP laptop too? If so, please tell me how to apply this patch?

Comment 22 Rohan Dhruva 2008-05-26 08:00:39 UTC
The above mentioned patch was taken from the development tree. It is no longer
relevant, as that patch has already been merged upstream.

For your laptop, you should check the ALSA database for the corresponding sound
card - http://alsa-project.org/main/index.php/Matrix:Main
HTH.