Page MenuHomeFreeBSD

Add hack to allow users to bypass pin widget initialization.
Needs ReviewPublic

Authored by sbruno on Oct 30 2018, 11:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 4, 11:45 PM
Unknown Object (File)
Fri, Nov 29, 3:37 PM
Unknown Object (File)
Thu, Nov 28, 7:57 AM
Unknown Object (File)
Thu, Nov 28, 7:57 AM
Unknown Object (File)
Thu, Nov 28, 7:56 AM
Unknown Object (File)
Thu, Nov 28, 7:56 AM
Unknown Object (File)
Thu, Nov 28, 7:56 AM
Unknown Object (File)
Nov 11 2024, 1:00 PM

Details

Summary

snd_hda(4) clears all pin widgets at attach, don't do that if the user requests it.

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

Add a man page update like a good dev.

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.

This revision is now accepted and ready to land.Oct 31 2018, 3:13 AM
0mp requested changes to this revision.Oct 31 2018, 11:55 AM
0mp added a subscriber: 0mp.
0mp added inline comments.
share/man/man4/snd_hda.4
157

Style: please start every sentence on a new line.

158

Style: please start every sentence on a new line.

159

s/bios/BIOS/

This revision now requires changes to proceed.Oct 31 2018, 11:55 AM

Address man page style review for new lines and correct case of BIOS use.

Address man page review comments. Word wrap at 80 columns.

Looks good to me.

Remember, that there are two nice commands to check for common mistakes: mandoc -Tlint and igor (textproc/igor).

This revision is now accepted and ready to land.Oct 31 2018, 1:31 PM

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.

In D17772#379922, @mav wrote:

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.

No, but let me test that tonight and report back.

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 revision is now accepted and ready to land.Mar 31 2019, 3:16 PM

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 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

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