Recently (month back or so) I've discovered that headphone jack handling has started to misbehave: Whenever I plug in my headphone jack: * The Master slider is changed to a stored value specific to headphones * The Headphone slider is unmuted and set to 100 * The Speaker+LO slider is muted and set to 0 And there is no sound output from the headphones, only if I unmute and increase the volume of Speaker+LO do I get output in the headphones, this is something I need to re-do each time plugging in headphones. I've attached alsa-info and amixer output with and without headphones. I originally believed this to be the same as https://bugs.freedesktop.org/show_bug.cgi?id=90491 forwarded to https://bugzilla.kernel.org/show_bug.cgi?id=99681 but after some discussion there it was concluded that this was likely a pulseaudio issue instead.
Created attachment 116479 [details] alsa-info output with headphones
Created attachment 116480 [details] alsa-info output without headphones
Created attachment 116481 [details] amixer -c 0 contents output with headphones
Created attachment 116482 [details] amixer -c 0 contents output without headphones
Since this information does not seem to be present in alsa-info: This is with pulseaudio 6.0-2
how many pulseaudio ports do your onboard sound card ? your computer has internal speaker, headphone and dock line out pactl list sinks do the pulseaudio verbose log show three different ouput paths ?
numid=1,iface=MIXER,name='Speaker+LO Playback Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0 : values=0,0 | dBscale-min=-95.25dB,step=0.75dB,mute=1 Simple mixer control 'Speaker+LO',0 Capabilities: pvolume pswitch Playback channels: Front Left - Front Right Limits: Playback 0 - 127 Mono: Front Left: Playback 0 [0%] [-99999.99dB] [off] Front Right: Playback 0 [0%] [-99999.99dB] [off] state.PCH { control.1 { iface MIXER name 'Speaker+LO Playback Volume' value.0 0 value.1 0 comment { access 'read write' type INTEGER count 2 range '0 - 127' dbmin -9999999 dbmax 0 dbvalue.0 -9999999 dbvalue.1 -9999999 } } it is strange that different dB min reported by amixer and alsactl
you have to post pulseaudio verbose log to find out the value of dB min of speaker path / line out path
(In reply to Raymond from comment #6) > how many pulseaudio ports do your onboard sound card ? > > your computer has internal speaker, headphone and dock line out > > pactl list sinks > > do the pulseaudio verbose log show three different ouput paths ? Physically I have two jacks on this machine, one for headphones (and lineout I am guessing) and one for microphone.
Created attachment 116484 [details] pactl list sinks output with headphones
Created attachment 116485 [details] pactl list sinks output without headphones
Created attachment 116486 [details] LANG=C pulseaudio -vvvv --log-time=1 output starting with no headphones, then plugging in headphones, then unplugging them again
you have to disable loopback mixing since driver assign the first dac node 0x13 to aamix_path internal speaker, dock line out and headphone are using node 0x13 Node 0x0b [Pin Complex] wcaps 0x400581: Stereo Control: name="Headphone Jack", index=0, device=0 Pincap 0x0001001c: OUT HP EAPD Detect EAPD 0x2: EAPD Pin Default 0x0421101f: [Jack] HP Out at Ext Right Conn = 1/8, Color = Black DefAssociation = 0x1, Sequence = 0xf Pin-ctls: 0xc0: OUT HP Unsolicited: tag=01, enabled=1 Power states: Power: setting=D0, actual=D0 Connection: 3 0x13 0x14 0x1c* do you need to add a new conf for dock line out jack for dock line out path ? internal speaker are automuted when the notebook is docked
(In reply to Raymond from comment #13) > you have to disable loopback mixing since driver assign the first dac node > 0x13 to aamix_path How would do I do that? (and should I?) > do you need to add a new conf for dock line out jack for dock line out path ? I do not currently have a laptop dock available and thus have not tested how things work when docked, if that is what the question is? This is the pulseaudio package in Debian without any further config changes.
0.036| 0.000) D: [pulseaudio] alsa-mixer.c: Removing path 'analog-output-lineout' as it is a subset of 'analog-output-speaker'. you need a dock lineout.conf or add jack dock line out to line.conf to prevent Removing path 'analog-output-lineout' 0.036| 0.000) D: [pulseaudio] alsa-mixer.c: Path analog-output-speaker (Speakers), direction=1, priority=100, probed=yes, supported=yes, has_mute=yes, has_volume=yes, has_dB=yes, min_volume=0, max_volume=127, min_dB=-200051, max_dB=0 0.036| 0.000) D: [pulseaudio] alsa-mixer.c: Path analog-output-headphones (Headphones), direction=1, priority=90, probed=yes, supported=yes, has_mute=yes, has_volume=yes, has_dB=yes, min_volume=0, max_volume=127, min_dB=-200051, max_dB=0 -99999.99 dB represent -INF dB this mean -Infinite dB * 2 + 51 dB Softvol PCM playback volume
(In reply to Martin Erik Werner from comment #14) > (In reply to Raymond from comment #13) > > you have to disable loopback mixing since driver assign the first dac node > > 0x13 to aamix_path > > How would do I do that? (and should I?) you can use amixer -c 0 set 'Loopback Mixing' Disabled Simple mixer control 'Loopback Mixing',0 Capabilities: enum Items: 'Disabled' 'Enabled' Item0: 'Enabled' you have to open bug report at kernel bigzilla about the aamix path always use first DAC when aamix mixer can connect to more than one DAC Node 0x1b [Audio Mixer] wcaps 0x20050b: Stereo Amp-In Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1 Amp-In vals: [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x17 0x17] [0x80 0x80] [0x80 0x80] Power states: Power: setting=D0, actual=D0 Connection: 6 0x0c 0x0e 0x0f 0x13 0x14 0x0a the driver need to change amp in vals when headphone is plugged when loopback mixing is enabled Amp-In vals: [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x17 0x17] [0x80 0x80]
the dirty workaround if you need loopback mixing http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa/mixer/paths/analog-output-headphones.conf?id=aec811798cd883a454b9b5cd82c77831906bbd2d remove three lines from headphone.conf since auto mute is performed by driver -[Element Speaker+LO] -switch = off -volume = off
Node 0x0d [Pin Complex] wcaps 0x400501: Stereo Control: name="Speaker Phantom Jack", index=0, device=0 Pincap 0x00010050: OUT EAPD Balanced EAPD 0x2: EAPD Pin Default 0x90170110: [Fixed] Speaker at Int N/A Conn = Analog, Color = Unknown DefAssociation = 0x1, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x00: Power states: Power: setting=D0, actual=D0 Connection: 3 0x13 0x14 0x1c* speaker is muted when driver change pin ctls of speaker pin from OUT to zero it is redundant for pulseaudio to change the volume and switch at the audio output
Node 0x0a [Pin Complex] wcaps 0x400583: Stereo Amp-In Control: name="Dock Line Out Jack", index=0, device=0 Amp-In caps: N/A Amp-In vals: [0x00 0x00] Pincap 0x0001173c: IN OUT HP EAPD Detect Vref caps: HIZ 50 GRD 80 EAPD 0x2: EAPD Pin Default 0x21011030: [Jack] Line Out at Sep Rear Conn = 1/8, Color = Black DefAssociation = 0x3, Sequence = 0x0 Pin-ctls: 0x00: VREF_HIZ Unsolicited: tag=02, enabled=1 Power states: Power: setting=D0, actual=D0 Connection: 3 0x13 0x14 0x1c* dock line out is also muted by driver Simple mixer control 'Auto-Mute Mode',0 Capabilities: enum Items: 'Disabled' 'Speaker Only' 'Line Out+Speaker' Item0: 'Line Out+Speaker' for idt codecs, there is no way for pulseaudio disable driver 's auto mute and use dock line out jack to mute speaker
(In reply to Raymond from comment #16) > you can use > > amixer -c 0 set 'Loopback Mixing' Disabled > > > Simple mixer control 'Loopback Mixing',0 > Capabilities: enum > Items: 'Disabled' 'Enabled' > Item0: 'Enabled' When doing this the result is that there is now no output from headphones even if Speaker+LO is manually unmuted and increased. > > > you have to open bug report at kernel bigzilla about the aamix path always > use first DAC when aamix mixer can connect to more than one DAC > I've opened https://bugzilla.kernel.org/show_bug.cgi?id=99931 for this. (In reply to Raymond from comment #15) > 0.036| 0.000) D: [pulseaudio] alsa-mixer.c: Removing path > 'analog-output-lineout' as it is a subset of 'analog-output-speaker'. > > you need a dock lineout.conf or add jack dock line out to line.conf to > prevent Removing path 'analog-output-lineout' I still do not understand how to follow this instruction, I am guessing I should add something to the files in /usr/share/pulseaudio/alsa-mixer/paths/? Or should I create a new file named "lineout.conf" there, and what is the content to add? (In reply to Raymond from comment #17) > the dirty workaround if you need loopback mixing > > http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa/ > mixer/paths/analog-output-headphones. > conf?id=aec811798cd883a454b9b5cd82c77831906bbd2d > > remove three lines from headphone.conf > > since auto mute is performed by driver > > > -[Element Speaker+LO] > -switch = off > -volume = off Doing this stops the Speaker+LO volume from being lowered and muted thus headphones have sound when plugged in, but if internal speakers are muted before plugging in, it does not unmute Speaker+LO when plugging in. I have tested using instead [Element Speaker+LO] switch = mute volume = merge Which seems to make it work and behave as I expect it to.
(In reply to Martin Erik Werner from comment #20) as your don't have any dock station, you cannot verify any fix about the dock line out is correct or not > > (In reply to Raymond from comment #17) > > the dirty workaround if you need loopback mixing > > > > http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa/ > > mixer/paths/analog-output-headphones. > > conf?id=aec811798cd883a454b9b5cd82c77831906bbd2d > > > > remove three lines from headphone.conf > > > > since auto mute is performed by driver > > > > > > -[Element Speaker+LO] > > -switch = off > > -volume = off > > Doing this stops the Speaker+LO volume from being lowered and muted thus > headphones have sound when plugged in, but if internal speakers are muted > before plugging in, it does not unmute Speaker+LO when plugging in. > > I have tested using instead > > [Element Speaker+LO] > switch = mute > volume = merge > > Which seems to make it work and behave as I expect it to. it is because the driver only use speaker+lo playback volume when loopback mixing is enabled the headphone playback volume is useless until the driver bug is fixed if you really need to use loopback mixing
you better leave the dock line out mystery to the other user who has the dock line out playback switch and speaker playback switch especially you don't have any dick station to test Ports: analog-output-lineout: Line Out (priority: 9900, not available) analog-output-speaker: Speakers (priority: 10000) analog-output-headphones: Headphones (priority: 9000, not available)
When loopback mixing is diabled speakers are connected to node 0x13 headphones are directly connected to node 0x14 Node 0x0b [Pin Complex] wcaps 0x400581: Stereo Control: name="Headphone Jack", index=0, device=0 Pincap 0x0001001c: OUT HP EAPD Detect EAPD 0x2: EAPD Pin Default 0x0421101f: [Jack] HP Out at Ext Right Conn = 1/8, Color = Black DefAssociation = 0x1, Sequence = 0xf Pin-ctls: 0xc0: OUT HP Unsolicited: tag=01, enabled=1 Power states: Power: setting=D0, actual=D0 Connection: 3 0x13 0x14* 0x1c Node 0x0d [Pin Complex] wcaps 0x400501: Stereo Control: name="Speaker Phantom Jack", index=0, device=0 Pincap 0x00010050: OUT EAPD Balanced EAPD 0x2: EAPD Pin Default 0x90170110: [Fixed] Speaker at Int N/A Conn = Analog, Color = Unknown DefAssociation = 0x1, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x00: Power states: Power: setting=D0, actual=D0 Connection: 3 0x13* 0x14 0x1c do you mean this setting still not work ?
Node 0x0a [Pin Complex] wcaps 0x400583: Stereo Amp-In Control: name="Dock Line Out Jack", index=0, device=0 Amp-In caps: N/A Amp-In vals: [0x00 0x00] Pincap 0x0001173c: IN OUT HP EAPD Detect Vref caps: HIZ 50 GRD 80 EAPD 0x2: EAPD Pin Default 0x21011030: [Jack] Line Out at Sep Rear Conn = 1/8, Color = Black DefAssociation = 0x3, Sequence = 0x0 Pin-ctls: 0x00: VREF_HIZ Unsolicited: tag=02, enabled=1 Power states: Power: setting=D0, actual=D0 Connection: 3 0x13* 0x14 0x1c both speaker and dock line out are connected to node 0x13 you have to post alsa-info if disable loopback mixing won't work as expected
(In reply to Raymond from comment #24) > you have to post alsa-info if disable loopback mixing won't work as expected I tested again now disabling loopback mixing and made sure to kill pulseaudio in between, and it seems to be working now, so I guess I did not restart pulse properly the last time. So with this it also works as I expect it to. Then I guess the driver bug is what remains then I guess, and this is not a bug in pulseaudio then? (In the driver bug this is claimed to be "designed behaviour" though, so in that case would then pulseaudio have to be aware if loopback mixing is enabled and switch to using the common node then?)
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/Documentation/sound/alsa/HD-Audio-Controls.txt the topology of codecs of different vendor are different realtek codecs does not has DAC input in aamix some via codecs has only one DAC in aamix some idt codecs has two DAC in aamix desktop user prefer to use line playback volume to connect TV card input to use speakers connected to line out
(In reply to Martin Erik Werner from comment #25) > > Then I guess the driver bug is what remains then I guess, and this is not a > bug in pulseaudio then? > > (In the driver bug this is claimed to be "designed behaviour" though, so in > that case would then pulseaudio have to be aware if loopback mixing is > enabled and switch to using the common node then?) the loopback mixing is disabled by default since driver try to save more power by power down the audio mixer
sound hdaudioC0D0: autoconfig for 92HD81B1X5: line_outs=1 (0xa/0x0/0x0/0x0/0x0) type:line sound hdaudioC0D0: speaker_outs=1 (0xd/0x0/0x0/0x0/0x0) sound hdaudioC0D0: hp_outs=1 (0xb/0x0/0x0/0x0/0x0) sound hdaudioC0D0: mono: mono_out=0x0 sound hdaudioC0D0: inputs: sound hdaudioC0D0: Mic=0xc sound hdaudioC0D0: Internal Mic=0x11 sound hdaudioC0D0: Line=0xf http://www.intel.com/support/motherboards/desktop/sb/CS-034206.htm different audio stream can also sent to dock line out/speaker and headphone https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/Documentation/sound/alsa/HD-Audio.txt independent hp is enabled by default for ADI and VIA codecs for idt/realtek codecs, user can also enabled by hint indep_hp=1 using early patching
A NaN (Not-a-Number) is a symbolic entity encoded in floating-point format. There are two types of NaNs: Signalling NaN signals an invalid operation exception Quiet NaN propagates through almost every arithmetic operation without signalling an exception NaNs are produced by these operations: ∞ − ∞, −∞ + ∞, 0 × ∞, 0 ÷ 0, ∞ ÷ ∞ how do pulseaudio treat −∞ - ∞ ?
(In reply to Martin Erik Werner from comment #25) > (In reply to Raymond from comment #24) > > you have to post alsa-info if disable loopback mixing won't work as expected > > I tested again now disabling loopback mixing and made sure to kill > pulseaudio in between, and it seems to be working now, so I guess I did not > restart pulse properly the last time. > > So with this it also works as I expect it to. in theory, you do not need to restart pulseaudio unless you have changed those pulseaudio conf files
(In reply to Martin Erik Werner from comment #25) > > (In the driver bug this is claimed to be "designed behaviour" though, so in > that case would then pulseaudio have to be aware if loopback mixing is > enabled and switch to using the common node then?) you need to submit patch to update the documentation about idt codecs https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/Documentation/sound/alsa/HD-Audio-Controls.txt As a side-effect, when this mode is set, the individual volume controls will be no longer available for headphones and speakers because mixer widget is alway connect to primary DAC even when there are more than one DAC can be connected to mixer widget
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/94.
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.