Bug 169071 - Incorrect HDA pin mapping on HP Spectre x360
Summary: Incorrect HDA pin mapping on HP Spectre x360
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-17 22:11 UTC by Valentin Ochs
Modified: 2016-11-21 16:52 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.7.3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
alsa-info.txt (31.40 KB, text/plain)
2016-09-17 22:11 UTC, Valentin Ochs
Details
Test patch (1.35 KB, patch)
2016-09-26 15:00 UTC, Takashi Iwai
Details | Diff
Test patch that does not disable NID 0x17 (1.21 KB, patch)
2016-09-26 18:00 UTC, Valentin Ochs
Details | Diff
Enable NID 0x1d with different pincfg value (1.21 KB, patch)
2016-09-27 13:48 UTC, Valentin Ochs
Details | Diff

Description Valentin Ochs 2016-09-17 22:11:24 UTC
Created attachment 238471 [details]
alsa-info.txt

With the default mapping, changing the volume or muting on the "Speaker" control does not have an effect. Changing node 0x1D's mapping to connect to output 0x11 fixes this, as per http://askubuntu.com/questions/745619/sound-from-speakers-when-headphones-connected - node 0x17 is already connected to output 0x11, unlike in that link. Attached is my alsa-info.

Cheers,
Valentin
Comment 1 Takashi Iwai 2016-09-26 12:55:21 UTC
Hm, NID 0x1d is listed as unused.  Does this correspond to the actual speaker output pin?  That is, NID 0x17 is bogus?
Comment 2 Valentin Ochs 2016-09-26 14:48:15 UTC
I haven't worked with the HDA analyzer before, so I'm unsure how to check this correctly. However, removing the 'OUT' checkbox under 'Widget Control' doesn't seem to change anything, and neither does toggling the output between 0x11 and 0x10. I'll gladly test anything else, if you'll tell me what it is.
Comment 3 Takashi Iwai 2016-09-26 15:00:00 UTC
OK, then could you try the patch below?  It disables the bogus NID 0x17 and enables NID 0x1d instead.
Comment 4 Takashi Iwai 2016-09-26 15:00:22 UTC
Created attachment 239771 [details]
Test patch
Comment 5 Valentin Ochs 2016-09-26 17:59:51 UTC
Did seem to work at first, but then I noticed that one of the speaker pairs did not work. It seems that one of the NIDs controls the lower pair and the other the upper pair. It's a bit hard to notice when you don't have sound running while changing things or aren't paying attention. I'm attaching the new patch that does not disable NID 0x17.
Comment 6 Valentin Ochs 2016-09-26 18:00:25 UTC
Created attachment 239781 [details]
Test patch that does not disable NID 0x17
Comment 7 Takashi Iwai 2016-09-27 13:12:05 UTC
Better to assign a different pincfg value than 0x91170110 that is already used for NID 0x17.  Maybe 0x91170111.

Also, try to play only left channel or right channel while enabling / disabling NID 0x17 and 0x1d.  Do both pins play from both the left/right stereo channels?
Comment 8 Valentin Ochs 2016-09-27 13:46:51 UTC
Yes, both pins play from both channels. 0x17 is responsible for the speakers on the bottom of the notebook, 0x1d for the one on top.
Comment 9 Valentin Ochs 2016-09-27 13:48:00 UTC
Created attachment 239821 [details]
Enable NID 0x1d with different pincfg value
Comment 10 Takashi Iwai 2016-09-27 14:48:25 UTC
Good to hear.  I'm going to queue the fix patch now to for-linus branch.
It'll be included at least in 4.9-rc1.
Comment 11 Valentin Ochs 2016-09-27 14:53:38 UTC
Thanks!
Comment 12 Takashi Iwai 2016-11-21 16:52:41 UTC
The fix got merged to upstream.

Note You need to log in before you can comment on or make changes to this bug.