FS#35360 - [linux] 3.9.x - 3.10.x No sound on speakers after using headphones.

Attached to Project: Arch Linux
Opened by Pablo (elfio) - Sunday, 19 May 2013, 12:35 GMT
Last edited by Tobias Powalowski (tpowa) - Wednesday, 14 August 2013, 12:51 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

There is sound on speakers after boot until headphones are plugged and unplugged. At this time only can be sound through headphones.

We've tryed downgrading alsa-utils, alsa-libs and kmix.

Disable auto-mute-mode from alsamixer changes the behaviour: always sound on speakers, even when headphones are plugged in.

It used to work until a week or so, but I'm not sure since when I have the issue. Sorry about that.

I attach the pacman's log for the past weeks.

Similar issues here: https://bbs.archlinux.org/viewtopic.php?id=162027



Additional info:
* package version(s)
alsa-lib 1.0.27-1 (also tryed with 1.0.27-2)
alsa-utils 1.0.27-5 (also tryed with 1.0.27-4 and -3)
pulseaudio 3.0-3 (also tryed without pulseaudio)
kmix 4.10.3-1 (also tryed with 4.10.2-1)
kernel 3.9.2-1 (also tryed with lts 3.0.78-1)



* config and/or log files etc.

* Hardware:

It's a laptop Dell XPS M1330, with system updated.

$ lscpi | grep Audio
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)


Same issue on a Dell Inspiron 1420

$ lspci | grep Audio
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)



Steps to reproduce: plugg in and out the headphones and try the speakers.
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Wednesday, 14 August 2013, 12:51 GMT
Reason for closing:  Fixed
Comment by Gustavo Alvarez (sl1pkn07) - Sunday, 19 May 2013, 14:02 GMT Comment by Pablo (elfio) - Sunday, 19 May 2013, 15:09 GMT
I don't know, but the solution proposed in that report doesn't work for me. Now I only have sound with the headphones, not even just booted through the speakers :S
Comment by Gustavo Alvarez (sl1pkn07) - Sunday, 19 May 2013, 15:23 GMT
I had the same problem in my Asus 1201n (when unplug jack of headphones, the internal speaker is muted). solved my issue with that report

oks, sorry can not help you

greetings
Comment by Vytenis (DisLike) - Monday, 20 May 2013, 17:51 GMT
Have just noticed a similar problem. Inserting headphones do not turn off speakers... Dell Inspiron 6400.

EDIT: I have just found a solution to my problem. In alsamixer i went to "Select sound card" using F6, then found that "Disabled" was next to the column named "Auto-Mute". Turned it on and the problem is now gone. It was turned off during some recent upgrade. I did not touch alsamixer myself.
Comment by Pablo (elfio) - Tuesday, 21 May 2013, 07:02 GMT
That doesn't fix the issue. We tested before reporting.
The system works like yours when auto-mute is disabled, but the issue continues with auto-mute enabled.
Comment by Pablo (elfio) - Friday, 07 June 2013, 15:30 GMT
Some update fixed the issue.

The report can be closed.

EDIT: actually the issue disappears just by using the lts kernel. Any idea?
Comment by Jeff Beu (Jeff-Beu) - Monday, 22 July 2013, 05:25 GMT
I am having the exact same issue. My current alsa configuration has worked for the past 3-4 years.
I cannot pinpoint exactly when this behaviour started occurring.
Disabling Auto-Mute in alsamixer does in effect keep the sound output through the internal laptop speakers, irrespective if the headphones are plugged in but this feature has no effect on the problem once the sound subsystem is in the undesired state.

To get the sound out of the speakers after having headphones plugged in I have to :
1) close applications accessing audio
2) sudo modprobe -r snd_hda_intel // remove the snd_hda_intel module
3) unplug headphones; if plugged
4) sudo modprobe snd_hda_intel // insert the snd_hda_intel module
5) Repeat if headphones are plugged in and want sound out of speakers

Some configuration information -

$ cat /etc/modprobe.d/50-sound.conf
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel
options snd-hda-intel model=auto # try auto to resolve headphone issue
#dell-m42

$ uname -a
Linux jeff 3.9.9-1-ARCH #1 SMP PREEMPT Wed Jul 3 22:45:16 CEST 2013 x86_64 GNU/Linux

$ head -1 /proc/asound/card0/codec#0
Codec: SigmaTel STAC9205

$ lspci
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)

Comment by Tobias Powalowski (tpowa) - Tuesday, 30 July 2013, 10:41 GMT
Status on 3.10.x?
Comment by Jeff Beu (Jeff-Beu) - Wednesday, 31 July 2013, 11:43 GMT
Same for me on 3.10.3

However after analysing files in git.alsa-project.org/alsa-hda-tools.git
The python code below (extracted from above) gets the speaker back up rather than using modprobe.
It is more specific and hopefully enough for a resolution.

import os
import struct
from fcntl import ioctl

def __ioctl_val(val):
# workaround for OverFlow bug in python 2.4
if val & 0x80000000:
return -((val^0xffffffff)+1)
return val


IOCTL_VERB_WRITE = __ioctl_val(0xc0084811)

card = 0
device = 0
fd = os.open("/dev/snd/hwC%sD%s" % (card, device), os.O_RDWR)
nid = 1
verb = 1813 #SET_GPIO_DATA
param = 1
verb = (nid << 24) | (verb << 8) | param
res = ioctl(fd, IOCTL_VERB_WRITE, struct.pack('II', verb, 0))
Comment by Jeff Beu (Jeff-Beu) - Wednesday, 14 August 2013, 11:21 GMT
Today's update (pacman -Syu) have resolved the issue for me.

Loading...