Speaker audio channel goes mute after plugging in the headphone

Bug #921397 reported by Henrique Sant'Anna
64
This bug affects 14 people
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Speaker audio channel goes mute after plugging in the headphone and unmute after the headphone is plugged out. By consequence there is no sound when trying to listen the sound by headphones.

This is a pulseaudio problem and can be circumvent by just editing /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf and commenting the line as here:

[Jack_InputDevice]
#code = Headphone

This will avoid pulseaudio to change profiles when headphone is plugged in.

Some people affected by this bug don't get the headphones muted, but only a very low volume, this workaround could help too. But to some computer models this workaround could let the sound play by headphones and speaker by the same time (most people don't desire that).

On my computer model ( HP Pavilion DV-4 2080br ) the workaround works well and the sound goes only by the headphone, as expected.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: linux-image-3.0.0-15-generic 3.0.0-15.26
ProcVersionSignature: Ubuntu 3.0.0-15.26-generic 3.0.13
Uname: Linux 3.0.0-15-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: henrique 16836 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xe8500000 irq 45'
   Mixer name : 'IDT 92HD81B1X5'
   Components : 'HDA:111d7605,103c1409,00100402'
   Controls : 18
   Simple ctrls : 10
Date: Wed Jan 25 02:58:14 2012
GvfsMonitorLog: Monitoring events. Press Ctrl+C to quit.
HotplugNewDevices:

HotplugNewMounts:

InstallationMedia: Kubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100427)
MachineType: Hewlett-Packard HP Pavilion dv4 Notebook PC
ProcEnviron:
 LANGUAGE=pt_BR:pt:en
 LANG=pt_BR.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-15-generic root=UUID=32414ec2-9ef6-46d9-a944-7715529ebc08 ro
RelatedPackageVersions:
 linux-restricted-modules-3.0.0-15-generic N/A
 linux-backports-modules-3.0.0-15-generic N/A
 linux-firmware 1.60
SourcePackage: linux
StagingDrivers: mei
Symptom: storage
UdevMonitorLog:
 monitor will print the received events for:
 UDEV - the event which udev sends out after rule processing
UdisksMonitorLog: Monitoring activity from the disks daemon. Press Ctrl+C to cancel.
UpgradeStatus: Upgraded to oneiric on 2011-10-14 (102 days ago)
dmi.bios.date: 03/30/2010
dmi.bios.vendor: Insyde
dmi.bios.version: F.0C
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: 1409
dmi.board.vendor: Hewlett-Packard
dmi.board.version: 50.17
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnInsyde:bvrF.0C:bd03/30/2010:svnHewlett-Packard:pnHPPaviliondv4NotebookPC:pvr049C200000241220000030000:rvnHewlett-Packard:rn1409:rvr50.17:cvnHewlett-Packard:ct10:cvrN/A:
dmi.product.name: HP Pavilion dv4 Notebook PC
dmi.product.version: 049C200000241220000030000
dmi.sys.vendor: Hewlett-Packard

Revision history for this message
Henrique Sant'Anna (hsantanna) wrote :
Revision history for this message
David Henningsson (diwic) wrote :

> Speaker audio channel goes mute after plugging in the headphone

If you mean the "Speaker" volume in alsamixer, that should not affect the headphone volume. You should be able to have sound through headphones even though "Speaker" is muted.

Could you clarify?

Changed in pulseaudio (Ubuntu):
status: New → Incomplete
Revision history for this message
Daniel Letzeisen (dtl131) wrote :

David H, I believe OP is talking about jack sensing auto-muting the speaker and does not find this desirable.

Revision history for this message
Henrique Sant'Anna (hsantanna) wrote :

Sorry about not being clear, my english is not that much good =)

By "Speaker audio channel" yes, I mean "Speaker" volume in alsamixer. It also mute the headphone output.

Seems that headphone ans speakers are muted/unmuted together by the sound card, by the same volume control.

The strange thing is that only the mute/unmute affects the headphone, but the volume itself at the Speaker control does not affect the headphone. The headphone's volume is controlled by it's own control in alsamixer.

I did more tests and here are some more curiosities:

When the Speaker control goes mute in alsamixer, the mute led goes mute/orange (even if the master volume control is not muted). When I plug in the headphone only the Speaker control gets muted but not the master volume (witch is expected).

If I go to the alsamixer and manually unmute the speaker volume, I get sound to headphone, but not to the speakers (witch is desired).

Now there is no muted volume/channel in alsamixer.

If I manually mute the Headphone volume while the headphone is plugged in, the master volume also gets muted and the led goes muted/orange. If then I unmute just the Headphone volume, the master volume don't get unmuted, there is no sound and mute led still mute/orange. Then if I unmute the master volume the led gets unmuted/gray ( witch is expected) but there is no sound to headphone, even with no channel muted: only when I change the Headphone's volume in alsamixer UP or LOW the sound comes back.

If I can do more tests or get more hardware info please just tell me what to do.

Thanks!

Revision history for this message
Henrique Sant'Anna (hsantanna) wrote :

So here is a clarification that I should have done when reported the bug...

Unespected behavior:

When plugging the headphone, speakers AND headphone output goes muted.

Expected behavior:

Only speakers goes muted, but not headphone output. After plugging headphones there should be sound at the headphones.

More details:

After plugging the headphone, at alsamixer the Speaker volume control gets muted (only this control) and it's volume goes to level zero: 0 <> 0
If I manually unmute Speaker volume at alsamixer, it's volume still at level zero and there is no sound to headphones. If I level UP the Speaker volume level I get sound to headphones and no sound at the speakers (wich is the expected behavior).

Jorge Castro (jorge)
Changed in pulseaudio (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
David Henningsson (diwic) wrote :

So what you're saying that if you currently have adjusted alsamixer so that you have sound coming out of your headphones:

 * if the "Speaker" volume is turned all the way down to -48 dB (without muting it, just turning the volume all the way down), suddenly your headphones mute.
 * if the "Speaker" is -47 dB your headphones are unmuted
 * if the "Speaker" is 0 dB your headphones are unmuted
 * regardless of "Speaker" is -47 dB or 0 dB, headphones have the same volume.

Is this correct?

Revision history for this message
Henrique Sant'Anna (hsantanna) wrote :

Yes, one workaround is*:

    1) plug the headphone
    2) open alsamixer
    3) and unmute (press M) at the Speaker control.

    * This have to be done every time after plugging the headphone.

Another workaround is**:

    1) Open in text editor the file /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf
    2) Comment the line as here:
        [Jack_InputDevice]
        #code = Headphone
    3) Save the file
    4) Restart pulseaudio with:
        pulseaudio -k

    ** This have to be done just once.

Answering your questions:

> * if the "Speaker" volume is turned all the way down to -48 dB (without muting it, just turning the volume all the way down), suddenly your headphones mute.

No, Skeaker volume level at alsamixer does not affect headphone at all. I was wrong when I said it before (about the -48 db), really sorry about that. The headphone output is affected by mutting/unmutting the Speaker control, but the volume level at this control does no affect headphone, not even at -48 db. Tested it again right now.

> * if the "Speaker" is -47 dB your headphones are unmuted

Yes.

> * if the "Speaker" is 0 dB your headphones are unmuted

Yes.

 * regardless of "Speaker" is -47 dB or 0 dB, headphones have the same volume.

Yes. Headphone volume is affected by it's own volume control at alsamixer, but not affected by the volume level at Speaker's control.

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

Actually a slightly better workaround would be to open
/usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf

And change:

[Element Speaker]
switch = off

to

[Element Speaker]
switch = mute

...that way the port will switch, which means you can have different volumes for speaker and headphones, but "Speaker playback switch" will not mute when "headphones" is selected.

I have analyzed your issue a bit, but I'm unsure whether this is actually a bug in the codec hardware, or if it's related to the GPIOs. Marking as triaged for now.

affects: pulseaudio (Ubuntu) → alsa-driver (Ubuntu)
Changed in alsa-driver (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Ondergetekende (kvdveer) wrote :

I, too am affected by this issue, or at least an issue which quacks like this one.

I am using a samsung 7 series (700Z5A-S01), with a 3.2 kernel. For me, slightly different alsamixer values are reported (see attached file). Most notably, it reports my headphone as a sliderless control. For me too, headphone volume is controlled with the 'speaker' slider.

My workaround required a little bit more magic:

in analog-output-headphones
[Element Speaker]
; link to muting
switch = mute
; set volume to zero, so only the master slider controls playback volume. This gives better linearity.
volume = zero

Revision history for this message
Alexander Adam (7ql6) wrote :

The solution Ondergetekende (kvdveer) wrote also works for me on a similar model (700Z3A-S01) ubuntu 12.04 / 3.2.0-26-generic.

Revision history for this message
KernelPanic (jfrusciante) wrote :

Happens to me after last update. ALSA 1.0.24 on Ubuntu 11.10. Before updating it was all fine (when the earphones are plugged the speakers get mute). After last system update, when I plug the earphones everything is mute, both speakers and earphones.

The first workaround I read (commenting code = Headphone) worked only the first time. After rebooting, it does not work anymore (I tried rebooting pulseaudio, disabling respawn, toggling the comment, etc.). Happens also when pulseaudio is off.

This is very annoying to me as I can't use VOIP (unless I use it with speakers, which of course produces echo in mic).

My laptop is a vaio VPCS11E7E
lspci: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)
Codec: Realtek ALC275

Revision history for this message
KernelPanic (jfrusciante) wrote :

Whoops: my headphone broke somewhen during the tests. So please ignore the " does not work anymore" part.

Revision history for this message
Martin Roos (kulminaator) wrote :
Download full text (3.4 KiB)

Getting the same effect on 12.04 , started happening after some update in 2013 january

When i plug in headphones or pull them out then the machine goes on mute and i have to restore the sound from alsamixer

$ dpkg -l | grep alsa
ii alsa-base 1.0.25+dfsg-0ubuntu1 ALSA driver configuration files
ii alsa-utils 1.0.25-1ubuntu5 Utilities for configuring and using ALSA

$ dpkg -l | grep pulse
ii gstreamer0.10-pulseaudio 0.10.31-1ubuntu1 GStreamer plugin for PulseAudio
ii libcanberra-pulse 0.28-3ubuntu3 PulseAudio backend for libcanberra
ii libpulse-mainloop-glib0 1:1.1-0ubuntu15.2 PulseAudio client libraries (glib support)
ii libpulse-mainloop-glib0:i386 1:1.1-0ubuntu15.2 PulseAudio client libraries (glib support)
ii libpulse0 1:1.1-0ubuntu15.2 PulseAudio client libraries
ii libpulse0:i386 1:1.1-0ubuntu15.2 PulseAudio client libraries
ii libpulsedsp 1:1.1-0ubuntu15.2 PulseAudio OSS pre-load library
ii libpulsedsp:i386 1:1.1-0ubuntu15.2 PulseAudio OSS pre-load library
rc libsdl1.2debian-pulseaudio 1.2.14-6.1ubuntu4 Simple DirectMedia Layer (with X11 and PulseAudio options)
ii pulseaudio 1:1.1-0ubuntu15.2 PulseAudio sound server
ii pulseaudio-esound-compat 1:1.1-0ubuntu15.2 PulseAudio ESD compatibility layer
ii pulseaudio-module-bluetooth 1:1.1-0ubuntu15.2 Bluetooth module for PulseAudio sound server
ii pulseaudio-module-gconf 1:1.1-0ubuntu15.2 GConf module for PulseAudio sound server
ii pulseaudio-module-x11 1:1.1-0ubuntu15.2 X11 module for PulseAudio sound server
ii pulseaudio-utils 1:1.1-0ubuntu15.2 Command line tools for the PulseAudio sound server
ii vlc-plugin-pulse 2.0.5-0ubuntu0.12.04.1 PulseAudio plugin for VLC

$ cat /proc/asound/cards
 0 [Generic ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xf0444000 irq 53
 1 [Generic_1 ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xf0440000 irq 16

it seems that card 0 is my ati hdmi and card 1 is the actual soundcard on the motherboard

Laptop : HP Pavilion dv6

$ lspci -v | grep Audio -A2
00:01.1 Audio device: Advanced Micro Devices [AMD] nee ATI BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series]
 Subsystem: Hewlett-Packard Company Device 358d
 ...

Read more...

Revision history for this message
Raymond (superquad-vortex2) wrote :

IDT codecs have analog-loopback mixer widgets, but we haven't cared
 about it, so far. Let's set them. This will avoid also possible
 wrong routes for the input paths.

http://git.kernel.org/?p=linux/kernel/git/tiwai/sound.git;a=commitdiff;h=2748746f40da674cd6ba405fd3ef83e12a94b8ed;hp=6efcc52653676fde888bf7837d01468d4f846465

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

@Martin Roos, could you please submit your alsa-info according to
https://wiki.ubuntu.com/Audio/AlsaInfo ? Thanks!

Revision history for this message
Raymond (superquad-vortex2) wrote :

do your HP Pavilion DV-4 2080br have two headphone jacks ?

Revision history for this message
Raybuntu (raybuntu) wrote :

@Martin Roos: I also have a HP dv6 and all of the sudden this problem hit me too.

@David Henningsson: See my alsa-info attached since Martin didn't provide one yet.

Revision history for this message
Wim Goeman (wimgoeman) wrote :

I am having the exact same issue, and am also on an HP device. Problem started happening somewhere in the last month. Anyway I solved it with the following values for the Speaker Element:

[Element Speaker]
switch = mute
volume = zero

(note the 'volume = zero', which was not suggested in the comments above)

Revision history for this message
Raymond (superquad-vortex2) wrote :

>> Alsa-info Edit (26.5 KiB, text/plain)

Try latest alsa driver

https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS

Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 0 [0%] [-48.00dB] [off]
  Front Right: Playback 0 [0%] [-48.00dB] [off]
Simple mixer control 'Speaker',1
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 64 [100%] [0.00dB] [on]
  Front Right: Playback 64 [100%] [0.00dB] [on]

Node 0x0d [Pin Complex] wcaps 0x400501: Stereo
  Pincap 0x00010050: OUT EAPD Balanced
  EAPD 0x2: EAPD
  Pin Default 0x92170110: [Fixed] Speaker at Int Front
    Conn = Analog, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x00:
  Power: setting=D0, actual=D0
  Connection: 3
     0x13* 0x14 0x1c

/sys/class/sound/hwC0D0/init_pin_configs:
0x0a 0x40f000f0
0x0b 0x0221101f
0x0c 0x02a11020
0x0d 0x40f000f0
0x0e 0x40f000f0
0x0f 0x92170110
0x10 0x40f000f0
0x11 0xd5a30130
0x1f 0x40f000f0
0x20 0x40f000f0

/sys/class/sound/hwC0D0/driver_pin_configs:
0x0a 0x40f000f0
0x0b 0x0221101f
0x0c 0x02a11020
0x0d 0x92170110
0x0e 0x40f000f0
0x0f 0x92170110
0x10 0x40f000f0
0x11 0xd5a30130
0x1f 0x40f000f0
0x20 0x40f000f0

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in alsa-driver (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for alsa-driver (Ubuntu) because there has been no activity for 60 days.]

Changed in alsa-driver (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.