snd_hda(4) clears all pin widgets at attach, don't do that if the user requests it.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 20534 Build 19959: arc lint + arc unit
Event Timeline
This is probably completely wrong on multiple levels, but this certainly does allow me to use my headphones again on my Skylake Intel HDA box.
sysctl.conf:dev.hdaa.0.init_clear=0
Works for me as-is in 13.0-CURRENT @r339912M & 12.0-BETA2 @r339910M. 11.2-STABLE @r339881M needed the original .Dd line in the man page patch tweaked a bit to match expectations, but the text of that change and the code changes work as-is.
This is on a Dell Precision M4800, and addresses this bug report.
Looks good to me.
Remember, that there are two nice commands to check for common mistakes: mandoc -Tlint and igor (textproc/igor).
Have you tried to investigate whether keeping only VREF_ENABLE_MASK would be enough? It could have some more sense in general, since the driver has no way to know what VREF is needed in specific case. Same time other bits there are pretty logical.
Yeah, just changing VREF_ENABLE_MASK was insufficient. I think I'll just commit this so people can use it for their newer desktops/laptops.
This fixes audio playback with headphones on my HDA ALC255 card (Acer Aspire E5-773G-78RN) :)
share/man/man4/snd_hda.4 | ||
---|---|---|
158 | ' widget' with an 'e' after the 'g' :) |
This is quite belated, but are you sure that the above makes any difference?
Isn't sysctl.conf too late with respect to driver initialization?
head/share/man/man4/snd_hda.4 | ||
---|---|---|
156 ↗ | (On Diff #59833) | Shouldn't this be hint.hdaa rather than dev.hdaa like other nearby tunables? |
I've updated a laptop Acer C720 to r368166 (which contains the fix reviewed here). It seems there is no way to get devinfo->init_clear to set to 1. I added a few debug statements in hdaa.c and here is what gets logged to messages:
Dec 16 08:21:33 c720-r368166 kernel: hdaa0: DEBUG hdaa.c: hdaa_audio_prepare_pin_ctrl() has devinfo->init_clear as: 0 Dec 16 08:21:33 c720-r368166 kernel: hdaa0: DEBUG hdaa.c: hdaa_attach() calls SYSCTL_ADD_INT() macro for init_clear Dec 16 08:21:33 c720-r368166 kernel: hdaa1: DEBUG hdaa.c: hdaa_audio_prepare_pin_ctrl() has devinfo->init_clear as: 0 Dec 16 08:21:33 c720-r368166 kernel: hdaa1: DEBUG hdaa.c: hdaa_attach() calls SYSCTL_ADD_INT() macro for init_clear
See also PR 251727