Summary: | Active port is not set when plugging in headphones in a lenovo Ultradock jack | ||
---|---|---|---|
Product: | PulseAudio | Reporter: | Francois Marier <francois> |
Component: | alsa | Assignee: | pulseaudio-bugs |
Status: | RESOLVED INVALID | QA Contact: | pulseaudio-bugs |
Severity: | normal | ||
Priority: | medium | CC: | lennart |
Version: | unspecified | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Output of "pulseaudio -k && pulseaudio -vvv"
"cat /proc/asound/card1/codec#0" without headphones "cat /proc/asound/card1/codec#0" with headphones in laptop jack "cat /proc/asound/card1/codec#0" with headphones in dock jack "pactl list sinks" without headphones "pactl list sinks" with headphones in laptop jack "pactl list sinks" with headphones in dock jack |
Description
Francois Marier
2014-06-16 04:22:55 UTC
Created attachment 101133 [details]
"cat /proc/asound/card1/codec#0" without headphones
Created attachment 101134 [details]
"cat /proc/asound/card1/codec#0" with headphones in laptop jack
Created attachment 101135 [details]
"cat /proc/asound/card1/codec#0" with headphones in dock jack
Created attachment 101136 [details]
"pactl list sinks" without headphones
Created attachment 101137 [details]
"pactl list sinks" with headphones in laptop jack
Created attachment 101138 [details]
"pactl list sinks" with headphones in dock jack
try hda-jack-sense-test -a to find out the node of dock headphone when you plug dock headphone Raymond, I'm assuming you mean the tool that's available at https://launchpad.net/~diwic/+archive/hda/+packages in the snd-hda-tools package. I grabbed version 0.20130207+saucy1 and unfortunately it returned this error on my Debian jessie box: Traceback (most recent call last): File "/usr/bin/hda-jack-sense-test", line 47, in <module> codec = HDACodec(cardindex, codecindex) File "/usr/share/snd-hda-tools/hda_codec.py", line 1036, in __init__ self.parse_proc() File "/usr/share/snd-hda-tools/hda_codec.py", line 1135, in parse_proc self.proc_codec = HDACodecProc(self.card, self.device, file) File "/usr/share/snd-hda-tools/hda_proc.py", line 479, in __init__ self.parse(proc_file) File "/usr/share/snd-hda-tools/hda_proc.py", line 677, in parse node.add_digital(line[11:]) File "/usr/share/snd-hda-tools/hda_proc.py", line 296, in add_digital self.wrongfile('unknown dig1 bit %s' % repr(b)) File "/usr/share/snd-hda-tools/hda_proc.py", line 143, in wrongfile raise ValueError, "wrong proc file format (%s)" % msg ValueError: wrong proc file format (unknown dig1 bit 'KAE') Perhaps my kernel (3.14-1-amd64) or alsa-base (1.0.25+3) is more recent than the one in Ubuntu saucy? Is there a more recent version of that script somewhere? http://git.alsa-project.org/?p=alsa-tools.git;a=blob;f=hda-verb/README;hb=HEAD you can use hda-verb GET_PIN_SENSE for all connected and unconnected pin complex the return value 0x80000000 indicate the Jack is detected Thanks Raymond. I installed alsa-tools 1.0.27-3 and ran the following: sudo hda-verb /dev/snd/hwC1D0 0x0 GET_PIN_SENSE 0 but I'm not sure that's what you wanted because I just took a wild guess for the "nid". It's described in the README you pointed to as "widget NID" but I have no idea what that means or how to look it up. If I run any of the following: sudo hda-verb /dev/snd/hwC1D0 0x0 GET_PIN_SENSE sudo hda-verb /dev/snd/hwC1D0 GET_PIN_SENSE sudo hda-verb GET_PIN_SENSE I get the "usage" output: usage: hda-verb [option] hwdep-device nid verb param -l List known verbs and parameters -L List known verbs and parameters (one per line) suggesting that hda-verb needs all four parameters to be supplied on the command line. Nevermind my last comment, I figured out that the "widget NID" are the node IDs displayed in the output "cat /proc/asound/card1/codec#0". So looking at these three pin complexes: Node 0x14 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out Control: name="Speaker Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Speaker Phantom Jack", index=0, device=0 Pin Default 0x90170110: [Fixed] Speaker at Int N/A Conn = Analog, Color = Unknown DefAssociation = 0x1, Sequence = 0x0 Misc = NO_PRESENCE Node 0x15 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out Control: name="Headphone Playback Switch", index=1, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Headphone Jack", index=0, device=0 Pin Default 0x0321101f: [Jack] HP Out at Ext Left Conn = 1/8, Color = Black DefAssociation = 0x1, Sequence = 0xf Node 0x16 [Pin Complex] wcaps 0x40058d: Stereo 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 0x411111f0: [N/A] Speaker at Ext Rear Conn = 1/8, Color = Black DefAssociation = 0xf, Sequence = 0x0 Misc = NO_PRESENCE I see that hda-verb returns these values for GET_PIN_SENSE when nothing is connected: nid = 0x14, verb = 0xf09, param = 0x0 value = 0x0 nid = 0x15, verb = 0xf09, param = 0x0 value = 0x0 nid = 0x16, verb = 0xf09, param = 0x0 value = 0x0 these values when headphones are connected to the laptop jack: nid = 0x14, verb = 0xf09, param = 0x0 value = 0x0 nid = 0x15, verb = 0xf09, param = 0x0 value = 0x80000000 nid = 0x16, verb = 0xf09, param = 0x0 value = 0x0 and these values when headphones are connected to the dock jack: nid = 0x14, verb = 0xf09, param = 0x0 value = 0x0 nid = 0x15, verb = 0xf09, param = 0x0 value = 0x0 nid = 0x16, verb = 0xf09, param = 0x0 value = 0x80000000 So it does look like the two jacks correctly detect the presence of headphones. you most like need to check those unconnected pin complex [N/A] for the missing dock headphone which pincap support OUT use hda-Jack-retask to retask it as dock headphone when the unconnected pin complex response to get pin sense This is starting to feel like it's not a pulseaudio bug after all and that maybe I should be filing this elsewhere? I've looked at all of the pin complexes and the only one that responds to the dock headphone jack is 0x16. One thing I should have probably mentioned when we started talking about pins is that I had to apply the patch for the T440 described here: https://github.com/leoluk/thinkpad-stuff/wiki/Haswell-ThinkPad-problems#linux-docking-station-audio-compatibility Looking at that though, it seems slightly different from the one which has been committed to the kernel sound subsystem: https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/hda/patch_realtek.c#n4711 Actually, it looks like the pins were not configured correctly and that this wiki was wrong. Using the pincfg from the kernel, everything works fine. Thanks for all of your help, I would have never figured this out all by myself! hese values when headphones are connected to the laptop jack: nid = 0x14, verb = 0xf09, param = 0x0 value = 0x0 nid = 0x15, verb = 0xf09, param = 0x0 value = 0x80000000 nid = 0x16, verb = 0xf09, param = 0x0 value = 0x0 and these values when headphones are connected to the dock jack: nid = 0x14, verb = 0xf09, param = 0x0 value = 0x0 nid = 0x15, verb = 0xf09, param = 0x0 value = 0x0 nid = 0x16, verb = 0xf09, param = 0x0 value = 0x80000000 if detection of two headphone jacks are correct, you have to check the availablility of speaker since pulseaudio need to check status of both jacks to determine the status of speaker the speaker is muted when either jack is plugged but unmuted when both jacks are unplugged http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths |
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.