== System Information * Lenovo Thinkpad X220 without Dock * Linux 3.16.3 * PulseAudio 5.0.r273.g1ff4f1b * Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04) == Description When the headphones are plugged in the "Output Devices" tab in pavucontrol will list "Headphones (unplugged)", "Analog Output" and "Speakers (unavailable)" with "Analog Output" being selected. If I unplug the headphones I would expect it to fallback to the Speakers, however it doesn't (no sound) and returns the following error: Availability of port 'analog-output-headphones' is inconsistent! If I manually set the sink-port to the Speakers it will work however pavucontrol will continue to mark the as "unavailable". When plugging the headphones back in pavucontrol switches to "Analog Output" and I can hear sound through the headphones again. == Resolution Attempts Looking at the git logs I came across this commit: alsa-mixer: recognize Dock headphone jack http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=594da41d07edce Reverting this fixes the issue on my machine and restores normal functionality.
post output of pactl list alsa-info.sh when you plug and unplug headphone
Created attachment 106913 [details] Output from pactl list when unplugged
Created attachment 106914 [details] Output from pactl list when plugged
Created attachment 106915 [details] Output from alsa-info.sh when unplugged
Created attachment 106916 [details] Output from alsa-info.sh when plugged
Note that the above output is while having fixed PulseAudio. Sorry for the attachment spam but I was unable to find a function which would let me upload these files all at once. They were too long to paste directly.
you have to post output of pactl list without your fix do you mean the availabltity of headphone is not OR values of headphone jack / dock headphone jack controls since headphone and dock headphone share the same volume control ? control.16 { iface CARD name 'Dock Headphone Jack' value false comment { access read type BOOLEAN count 1 } } control.17 { iface CARD name 'Headphone Jack' value true comment { access read type BOOLEAN count 1 } }
Created attachment 106958 [details] Output from pactl list when broken and unplugged
Created attachment 106959 [details] Output from pactl list when broken and plugged
> do you mean the availabltity of headphone is not OR values of headphone > jack / dock headphone jack controls since headphone and dock headphone share > the same volume control ? I'm sorry, but I don't understand this question. I said I don't have a dock. What pavucontrol lists as "unavailable" does not reflect whatever reality is on my machine, that's the confusion. (It seems to get "stuck" on "Analog Output".) As described above my issue is that when using that commit which adds a "Phantom" Jack, PA no longer switches to external speakers when unplugging my headphones, however, PA does switch back to the headphones when I plug them back in. If I want audio to play on external speakers is I have to manually and explicitly switch the sink port to the analog-output-speakers in order to get sound on external speakers every time. Removing the changes in commit "fixes" this. I.e. I get sound via external speakers when unplugging my headphones. Sorry if I'm being unclear as I'm probably repeating myself.
For what it's worth, I experimented removing only the changes to `analog-output-headphones.conf`: ```diff --- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf +++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf @@ -25,6 +25,14 @@ description-key = analog-output-headphones [Properties] device.icon_name = audio-headphones +# [Jack Dock Headphone] +# required-any = any +# +# [Jack Dock Headphone Phantom] +# required-any = any +# state.plugged = unknown +# state.unplugged = unknown [Jack Front Headphone] required-any = any ``` PA seems to be working correctly at least with my setup. I can't test with docks obviously, but it seems that the changes made to `analog-output-speakers.conf` is fine.
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=a555bb8c6bf6932c5706745bfdbad22df26324d9 Sysfs Files !!----------- /sys/class/sound/hwC0D0/init_pin_configs: 0x19 0x04211040 0x1a 0x61a19050 0x1b 0x04a11060 0x1c 0x6121401f 0x1d 0x40f001f0 0x1e 0x40f001f0 0x1f 0x90170110 0x20 0x40f001f0 0x22 0x40f001f0 0x23 0x90a60170 /sys/class/sound/hwC0D0/driver_pin_configs: 0x19 0x042110ff 0x1a 0x21a190f0 0x1c 0x212140ff it is unlikely for the driver to support four channels when notebook without dock station since driver won't set different channel tag to speaker and headphone the driver also cannot support four channels when headphone and dock headphone share same dac output:analog-surround-40: Analog Surround 4.0 Output (sinks: 1, sources: 0, priority: 700, available: yes) output:analog-surround-40+input:analog-stereo: Analog Surround 4.0 Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 760, available: yes) seem bug of pulseaudio since active port cannot be not available module-switch-on-available-port ensure active port is available or unknown but cannot be not available Ports: analog-output: Analog Output (priority: 9900) analog-output-speaker: Speakers (priority: 10000) analog-output-headphones: Headphones (priority: 9000, not available) Active Port: analog-output-headphones
Your report has also some influence from bug 74609, which makes it difficult to analyze. Recently there were two patches posted by Tanu Kaskinen against that bug, could you please perform all the tests again with these patches applied, so that we see what remains? http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=facfd3a6644711d32ecfd755d30a351b8ee61620 http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/20915/focus=20916
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/hda_generic.c?id=a07a949be6eb1c9aab06adaadce72dbd27b7d9cb Ports: analog-output: Analog Output (priority: 9900) analog-output-speaker: Speakers (priority: 10000) analog-output-headphones: Headphones (priority: 9000, not available) if analog-output: Analog Output (priority: 9900) is related to surround40 you need to fix the driver by - if (cfg->line_out_type != AUTO_PIN_HP_OUT) + if (cfg->line_out_type == AUTO_PIN_HP_OUT) spec->const_channel_count = max(spec->const_channel_count, cfg->hp_outs * 2);
> could you please perform all the tests again with these patches applied, so > that we see what remains? > > http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/20915/focus=20916 I've applied both of those patches to HEAD and it didn't resolve the situation. However pavucontrol doesn't mark my "Speakers" as (unavailable) anymore, it still doesn't switch when unplugging though.
Created attachment 106994 [details] Output from pactl list when patched and unplugged
Created attachment 106995 [details] Output from pactl list when patched and plugged
Ports: analog-output: Analog Output (priority: 9900) analog-output-speaker: Speakers (priority: 10000) analog-output-headphones: Headphones (priority: 9000, not available) Active Port: analog-output at least the unavailable headphone is no longer active port but speaker is still not active port
https://bugzilla.redhat.com/show_bug.cgi?id=1101278#c22 for desktop which front panel hp does not support jack detection Ports: analog-output: Analog Output (priority: 9900) analog-output-lineout: Line Out (priority: 9900, available) analog-output-headphones: Headphones (priority: 9000) Active Port: analog-output pulseaudio does use jack state of line out to switch active port to lineout
for desktop with internal speaker, line out and headphone https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1376342 control.13 { iface MIXER name 'Auto-Mute Mode' value 'Line Out+Speaker' comment { access 'read write' type ENUMERATED count 1 item.0 Disabled item.1 'Speaker Only' item.2 'Line Out+Speaker' } } https://launchpadlibrarian.net/186316042/PulseList.txt ports: analog-output: Salida analógica (priority 9900, latency offset 0 usec, available: unknown) properties: analog-output-speaker: Altavoces (priority 10000, latency offset 0 usec, available: unknown) properties: device.icon_name = "audio-speakers" analog-output-headphones: Auriculares analógicos (priority 9000, latency offset 0 usec, available: no) properties: device.icon_name = "audio-headphones" active port: <analog-output-speaker>
-- 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/44.
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.