Bug 90491 - no sound after plugging in headphones/speakers, "Speaker+LO" volume is lowered to 0
Summary: no sound after plugging in headphones/speakers, "Speaker+LO" volume is lowere...
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: alsa (show other bugs)
Version: unspecified
Hardware: Other All
: medium major
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-17 10:06 UTC by Kamil Páral
Modified: 2015-06-09 04:14 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
no headphones (44.54 KB, image/png)
2015-05-17 10:07 UTC, Kamil Páral
Details
headphones (45.05 KB, image/png)
2015-05-17 10:07 UTC, Kamil Páral
Details
headphones fixed (44.62 KB, image/png)
2015-05-17 10:08 UTC, Kamil Páral
Details
alsa-info output (17.43 KB, text/plain)
2015-05-17 10:49 UTC, Kamil Páral
Details
lspci output (24.93 KB, text/plain)
2015-05-17 10:49 UTC, Kamil Páral
Details
pulseaudio log from PA 5 (152.76 KB, text/plain)
2015-05-17 11:05 UTC, Kamil Páral
Details
pulseaudio log from PA 6 (224.34 KB, text/plain)
2015-05-17 11:06 UTC, Kamil Páral
Details

Description Kamil Páral 2015-05-17 10:06:38 UTC
After upgrading from PulseAudio 5.0 to PulseAudio 6.0 on Fedora 21, our notebook can no longer play audio from headphones/speakers. Integrated speakers work fine.

After playing for a while with alsamixer, I figured out that every time I connect headphones/speakers, "Speaker+LO" bar is lowered to zero volume. If I manually increase it, headphones/speakers start to play fine. But I need to make this adjustment every single time I plug in headphones/speakers.


working configuration:
alsa-plugins-pulseaudio-1.0.28-3.fc21.x86_64
pulseaudio-gdm-hooks-5.0-25.fc21.x86_64
pulseaudio-libs-glib2-5.0-25.fc21.x86_64
pulseaudio-libs-5.0-25.fc21.x86_64
pulseaudio-module-bluetooth-5.0-25.fc21.x86_64
pulseaudio-module-x11-5.0-25.fc21.x86_64
pulseaudio-utils-5.0-25.fc21.x86_64
pulseaudio-5.0-25.fc21.x86_64

broken configuration:
alsa-plugins-pulseaudio-1.0.28-3.fc21.x86_64
pulseaudio-gdm-hooks-6.0-2.fc21.1.x86_64
pulseaudio-libs-glib2-6.0-2.fc21.1.x86_64
pulseaudio-libs-6.0-2.fc21.1.x86_64
pulseaudio-module-bluetooth-6.0-2.fc21.1.x86_64
pulseaudio-module-x11-6.0-2.fc21.1.x86_64
pulseaudio-utils-6.0-2.fc21.1.x86_64
pulseaudio-6.0-2.fc21.1.x86_64
Comment 1 Kamil Páral 2015-05-17 10:07:24 UTC
Created attachment 115847 [details]
no headphones

This is how alsamixer looks like before connecting headphones (internal speakers are playing fine).
Comment 2 Kamil Páral 2015-05-17 10:07:52 UTC
Created attachment 115848 [details]
headphones

This is how alsamixer looks like after connecting headphones (no sound can be heard).
Comment 3 Kamil Páral 2015-05-17 10:08:44 UTC
Created attachment 115849 [details]
headphones fixed

This is how alsamixer looks like after I fix the "Speaker+LO" bar (increase the volume, and finally hear headphones to produce sound).
Comment 4 Kamil Páral 2015-05-17 10:49:38 UTC
Created attachment 115850 [details]
alsa-info output
Comment 5 Kamil Páral 2015-05-17 10:49:55 UTC
Created attachment 115851 [details]
lspci output
Comment 6 Kamil Páral 2015-05-17 11:05:08 UTC
Created attachment 115852 [details]
pulseaudio log from PA 5

This is a debug log of pulseaudio 5.0, where everything works correctly. What I did:

1. Clicked twice on a gnome volume slider (top right screen corner) to hear 'pop' sound twice, to ensure sound is working.
2. Plugged in headphones.
3. Clicked twice again on the volume slider.

There seem to be some Czech messages inside, I guess I forgot to run it with LC_ALL=en_US, I'm sorry. I can re-create that file using English if needed.
Comment 7 Kamil Páral 2015-05-17 11:06:46 UTC
Created attachment 115853 [details]
pulseaudio log from PA 6

This is a debug log of pulseaudio 6.0, affected by this issue. What I did:

1. Clicked twice on a gnome volume slider (top right screen corner) to hear 'pop' sound twice, to ensure sound is working.
2. Plugged in headphones.
3. Clicked twice again on the gnome volume slider, but did not hear any sound.
4. Bumped "Speaker+LO" volume bar to 100% in alsamixer.
5. Clicked twice again on the gnome volume slider, heard sound correctly.
Comment 8 Raymond 2015-05-17 11:43:27 UTC
Seem headphone and dock headohone but driver change to Line Out

Node 0x15 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
  Control: name="Line Out Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Headphone Jack", index=0, device=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0001001c: OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x03211020: [Jack] HP Out at Ext Left
    Conn = 1/8, Color = Black
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=02, enabled=1
  Connection: 2
     0x0c* 0x0d

Node 0x1a [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Dock Headphone Jack", index=0, device=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x2121101f: [Jack] HP Out at Sep Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0xc0: OUT HP VREF_HIZ
  Unsolicited: tag=01, enabled=1
  Connection: 2
     0x0c 0x0d*
Comment 10 Raymond 2015-05-17 11:55:10 UTC
the patch was supposed to fix "PCM" for OptiPlex 745 with ad1983

https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1436252

 autoconfig: line_outs=1 (0x5/0x0/0x0/0x0/0x0) type:line
 speaker_outs=1 (0x7/0x0/0x0/0x0/0x0)
  hp_outs=1 (0x6/0x0/0x0/0x0/0x0)
  mono: mono_out=0x0
  inputs:
 Mic=0x8
  Line=0x9
Comment 11 Raymond 2015-05-17 12:01:53 UTC
(In reply to Kamil Páral from comment #4)
> Created attachment 115850 [details]
> alsa-info output

only codec info is not enough for debugging

you have to post the output of alsa-info.sh
Comment 13 Raymond 2015-05-18 05:10:59 UTC
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/hda_codec.c?id=5832fcf8b55cfdbd7d8511f747d15fd20ed4703d

why not using Ext and Sep to differentiate dock hp and hp instead of using special sequence number ?
Comment 14 Kamil Páral 2015-05-18 14:35:59 UTC
Thanks, Raymond, for looking into this. I'm not sure which comments are targeted at me :-) I'll gather full alsa-info.sh output. Anything else I can supply?
Comment 15 Raymond 2015-05-18 16:11:28 UTC
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/log/sound/pci/hda/patch_realtek.c?qt=grep&q=lifebook

ALC269_FIXUP_LIFEBOOK_HP_PIN

00:1b.0 0403: 8086:3b56 (rev 05)
	Subsystem: 10cf:159f



you need to add snd pci quirk for your lifebook since the driver expect 	

/* The real HPs should have the sequence 0x0f */

When multiple HPs are defined
and no line-outs is found, the configurator tries to re-assign some pins
from HP list to line-out, judging from the sequence number.


you can try hdajackretask 

advanced override 


http://git.alsa-project.org/?p=alsa-tools.git;a=blob;f=hdajackretask/README;hb=HEAD
Comment 16 Raymond 2015-05-18 16:21:41 UTC
http://support.fujitsupc.com/CS/Portal/supportsearch.do?srch=TECHSPECS

LIFEBOOK E780 Notebook PC
Technical Specifications
LifeBook® E780 Notebook

Realtek™ codec ALC269 with 2-channel High Definition (HD) audio
Headphone: Stereo headphone/line-out/SPDIF jack
Microphone: Stereo microphone/line-in jack
built-in stereo digital array microphone 
built-in stereo speakers, 20 mm diameter
Comment 17 Kamil Páral 2015-05-18 18:39:04 UTC
(In reply to Raymond from comment #11)
> (In reply to Kamil Páral from comment #4)
> > Created attachment 115850 [details]
> > alsa-info output
> 
> only codec info is not enough for debugging
> 
> you have to post the output of alsa-info.sh

This seems to be the full output when running `alsa-info --output file` and saying "no" to uploading. What exactly would you like to see in addition? Thanks.
Comment 18 Raymond 2015-05-19 01:13:48 UTC
Headphone: Stereo headphone/line-out/SPDIF jack
Microphone: Stereo microphone/line-in jack



https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/plain/Documentation/sound/alsa/HD-Audio-Controls.txt

* Mic Jack Mode, Line Jack Mode, etc
  These enum controls the direction and the bias of the input jack
  pins.  Depending on the jack type, it can set as "Mic In" and "Line 
  In",


https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/plain/Documentation/sound/alsa/HD-Audio.txt


- add_jack_modes (bool): add "xxx Jack Mode" enum controls to each
  I/O jack for allowing to change the headphone amp and mic bias VREF
  capabilities
Comment 19 Raymond 2015-05-19 01:21:41 UTC
it is driver bug which change HP at Ext Left to Line Out as HP should not share volume control with Speaker for notebook

Node 0x15 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
  Control: name="Line Out Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Headphone Jack", index=0, device=0


  Pin Default 0x03211020: [Jack] HP Out at Ext Left
    Conn = 1/8, Color = Black
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=02, enabled=1
  Connection: 2
     0x0c* 0x0d

Node 0x1a [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Dock Headphone Jack", index=0, device=0

  Pin Default 0x2121101f: [Jack] HP Out at Sep Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0x1, Sequence = 0xf
Comment 20 Raymond 2015-05-19 02:13:35 UTC
https://bugzilla.kernel.org/enter_bug.cgi?product=Drivers

you should file bug report (Sound/ALSA)
Comment 21 Kamil Páral 2015-05-19 08:53:12 UTC
(In reply to Raymond from comment #20)
> https://bugzilla.kernel.org/enter_bug.cgi?product=Drivers
> 
> you should file bug report (Sound/ALSA)

OK, so it's an ALSA bug. Thank you for debugging. I'll file it in the kernel bugzilla. Should this be closed?
Comment 22 Raymond 2015-05-19 10:13:34 UTC
it depens on whether driver create Dock Headphone Playback Switch


Node 0x1a [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Dock Headphone Jack", index=0, device=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x2121101f: [Jack] HP Out at Sep Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0xc0: OUT HP VREF_HIZ
  Unsolicited: tag=01, enabled=1
  Connection: 2
     0x0c 0x0d*


http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths

there is dock-mic.conf
Comment 23 Raymond 2015-05-19 11:01:06 UTC
(In reply to Kamil Páral from comment #17)
> (In reply to Raymond from comment #11)
> > (In reply to Kamil Páral from comment #4)
> > > Created attachment 115850 [details]
> > > alsa-info output
> > 
> > only codec info is not enough for debugging
> > 
> > you have to post the output of alsa-info.sh
> 
> This seems to be the full output when running `alsa-info --output file` and
> saying "no" to uploading. What exactly would you like to see in addition?
> Thanks.

to know whether HP jack is really node 0x15

jack detection kctl of those jacks in alsactl asound.state
Comment 24 Kamil Páral 2015-05-19 12:11:08 UTC
(In reply to Raymond from comment #23)
> to know whether HP jack is really node 0x15
> 
> jack detection kctl of those jacks in alsactl asound.state

I don't know anything about alsa/pulseaudio and have troubles understanding your instructions. Can you please give me an exact command I should run, or more detailed description of what to look for? Thank you.
Comment 25 Raymond 2015-05-19 13:54:13 UTC
> Can you please give me an exact command I should run

when you plug and unplug headphone and mic jacks

amixer -c 0 contents

hdajacksensetest -a




http://www.alsa-project.org/db/?f=92f3b8c7105bf307739c9a2cc0e453e1b9494631




does your lifebook has dock station since there is no dock mic ?

hda_codec: ALC269: BIOS auto-probing.
ALSA hda_codec.c:4895 autoconfig: line_outs=1 (0x15/0x0/0x0/0x0/0x0) type:line
ALSA hda_codec.c:4899    speaker_outs=1 (0x14/0x0/0x0/0x0/0x0)
ALSA hda_codec.c:4903    hp_outs=1 (0x1a/0x0/0x0/0x0/0x0)
ALSA hda_codec.c:4904    mono: mono_out=0x0
ALSA hda_codec.c:4907    dig-out=0x1e/0x0
ALSA hda_codec.c:4908    inputs:
ALSA hda_codec.c:4912  Internal Mic=0x12
ALSA hda_codec.c:4912  Mic=0x18
ALSA hda_codec.c:4912  Rear Mic=0x1b
Comment 26 Raymond 2015-05-20 07:51:11 UTC
port replicator


https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_realtek.c?id=5d9fab2d84963ec598810c54a67332decdd922a8

 /*
  * fujitsu model
- *  0x14 = headphone/spdif-out, 0x15 = internal speaker
+ *  0x14 = headphone/spdif-out, 0x15 = internal speaker,
+ *  0x1b = port replicator headphone out
  */



https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_realtek.c?id=24519911673eb5ef3eafcee5d247a52f36347f79


+	[ALC269_FIXUP_LIFEBOOK] = {
+		.type = ALC_FIXUP_PINS,
+		.v.pins = (const struct alc_pincfg[]) {
+			{ 0x1a, 0x2101103f }, /* dock line-out */
+			{ 0x1b, 0x23a11040 }, /* dock mic-in */
+			{ }
+		},
+		.chained = true,
+		.chain_id = ALC269_FIXUP_QUANTA_MUTE
+	},
Comment 27 Tanu Kaskinen 2015-05-27 10:20:59 UTC
Closing, this is a driver bug, not a PA bug.
Comment 28 Kamil Páral 2015-05-27 11:46:23 UTC
Thanks for your work, Raymond and Tanu. I still haven't created the kernel bug, but will get to it soon. Do you still need the output of these commands?

(In reply to Raymond from comment #25)
> when you plug and unplug headphone and mic jacks
> 
> amixer -c 0 contents
> 
> hdajacksensetest -a
> 
>
Comment 29 Tanu Kaskinen 2015-05-30 10:03:57 UTC
(In reply to Kamil Páral from comment #28)
> Thanks for your work, Raymond and Tanu. I still haven't created the kernel
> bug, but will get to it soon. Do you still need the output of these commands?
> 
> (In reply to Raymond from comment #25)
> > when you plug and unplug headphone and mic jacks
> > 
> > amixer -c 0 contents
> > 
> > hdajacksensetest -a

At least I don't plan doing anything based on the output of those commands. I don't know about Raymond.
Comment 30 Kamil Páral 2015-06-09 04:14:41 UTC
For the record, the ALSA bug has been reported here:
https://bugzilla.kernel.org/show_bug.cgi?id=99681


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.