Need a simple command/method for boot hints

From the output of sysctl /dev.hdaa
I got
Code:
dev.hdaa.1.nid2
dev.hdaa.1.nid3

Also got:
dev.hdaa.0.nid2
dev.hdaa.0.nid3
dev.hdaa.0.nid4
.
.
till
.
.
dev.hdaa.0.nid36

My autoconfiguration is incorrect and my internal mic does not work. Speaker does.

I am ready to try placing every nid/pin as a hint.

Questions:
1. Do I have to use the as= and seq= as is from the log or should I change that also in a series from 1,2,3.. ?
2. Can some one tell me the the exact steps to use boot hints and if possible how to apply the changes without rebooting (if possible). Thanks.

P.S.

My /dev/sndstat is:
Code:
Installed devices:
pcm0: <Realtek ALC257 (Analog)> (play/rec) default
pcm1: <Realtek ALC257 (Right Analog Headphones)> (play)
pcm2: <Intel Kaby Lake (HDMI/DP 8ch)> (play)
No devices installed from userspace.

I am currently using virtualoss to use an external earphones' mic, but would like to use the internal mic which works on Win and Lin.
Thanks.
 
Last edited by a moderator:
Questions:
1. Do I have to use the as= and seq= as is from the log or should I change that also in a series from 1,2,3.. ?
2. Can some one tell me the the exact steps to use boot hints and if possible how to apply the changes without rebooting (if possible). Thanks.
Basically you can do everything - but whether it then will work, that may depend on the actual internal wiring on your board.
So, maximize your debugging output, try it out, and then see if the association gets accepted or disabled. As you say, win+lin do work, it must be possible to find a working config.

I didn't use a way to do this in the running system. But if the sound is not compiled into the kernel, then it may be possible to kldload/kldunload the sound drivers, and modify the hints with kenv, which then should do that trick.

A different approach might be to disable the sound in the kernel, and instead install audio/oss from ports. That one uses a somehow different approach, and, depending on the specific soundcard, it may or may not work better
 
So any steps how to use boot hints file?
Please tell me more about kenv



to disable the sound in the kernel, and instead install audio/oss

So do I kndunload everything related to sound and then?? Or are you suggesting a complete kernel recompilation? Could you please give me some examples? Thanks for your response.
 
So any steps how to use boot hints file?
Please tell me more about kenv
kenv allows to view the settings from the /boot/device.hints (and /boot/loader.conf) files that are currently loaded into the kernel.
It also allows to change these settings temporarily in the kernel, without changing the files.
Examples are in man 1 kenv.

So do I kndunload everything related to sound and then??
Then you install the port or pkg audio/oss like you install any port. And then follow the documentation that comes with that package. Or, it might "just work" when starting it with service oss start and then running ossxmix in the graphical display.
 
Here's what I have ben doing:
I did not discover any sound driver loaded under kldstat. My speakers work fine.
I went through the log of sysctl /dev/hdaa and selected those nids that have as= and seq=
Next here's what I tried:

Step 1:
Code:
kenv "hint.hdaa.0.nid18_config=as1 seq=0"
Step 2: Record using audacity using all 4 options one by one.
/dev/dsp: Sprk
/dev/dsp: Mic
/dev/dsp0: Sprk
/dev/dsp0: Mic

Check if it played the recorded audio.
If not,
Code:
kenv -q  -u hint.hdaa.0.nid18_config

Then on to the next nid.
Not firing the commands for nids that have
Code:
vendor widget [ DISABLED ]
Widget cap: 0x00f00000

I am NOT rebooting my system since kenv was suggested. Is the above process correct?

Audacity:
 
service oss start and then running ossxmix in the graphical display.
Tried this as well. osstest played fancy music but upon starting the service it said"

"You must recompile your kernel without the built in sound"

ossinfo shows
pcm0:record:dsp0.r0 /dev/dsp0.r0 (device index 3)

Audacity does not show this device.
Tried ossrecord -d /dev/dsp0.r0 -t 2 out.wav and it said
/dev/dsp0.r0: Device busy

There is some other application using this audio device.

I think trying the nid/pins is a better idea. Please read my earlier post.
 
I recompiled my kernel leaving sound aside
Installed oss and startd it via rc.conf - also rebooted. It played no ball. Here's the output of ossmix, ossinfo etc.

Code:
Loading the osscore module failed
Version info: OSS 4.2 (b 2019/202211080434) (0x00040100) BSD
Platform: FreeBSD/amd64 13.1-RELEASE FreeBSD 13.1-RELEASE GENERIC-NOSOUND (-)

Number of audio devices:    0
Number of audio engines:    0
Number of MIDI devices:        0
Number of mixer devices:    0


Device objects

MIDI devices (/dev/midi*)

Mixer devices

Audio devices

Nodes
Sound subsystem and version: OSS 4.2 (b 2019/202211080434) (0x00040100)
Platform: FreeBSD/amd64 13.1-RELEASE FreeBSD 13.1-RELEASE GENERIC-NOSOUND


NOTICE! You don't have any audio devices available.
        It looks like your audio hardware was not recognized
        by OSS.
           
        If you have installed OSS just a moment ago then it may be necessary to.
        to rebot the system before trying to use the device(s).
Yes rebot and not reboot :D
So I reverted back to the original kernel with snd_hda preloaded.

Alternatively I tried the following uncommented nids with as=1 and as=3 one by one with reboots.
Code:
#Setting as=3
#hint.hdaa.0.nid24.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid20.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid18.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid19.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid25.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid26.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid27.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid29.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid30.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid33.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid3.config="as=3 seq=0 device=mic"

#Setting as=1
#hint.hdaa.0.nid24.config="as=1 seq=0 device=mic"
#hint.hdaa.0.nid20.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid18.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid19.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid25.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid26.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid27.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid29.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid30.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid33.config="as=3 seq=0 device=mic"
#hint.hdaa.0.nid3.config="as=3 seq=0 device=mic"
#TRIED ALL OF THE ABOVE - DID NOT WORK!!

I have a request: If you are reading this and you have a working internal mic, could you all please post your output of

sysctl -a | grep hint.hd | grep as= ?


I get that for mic it should be different than the output stream. I am just trying to sense a pattern to try out more combinations.
Also do I need to mention conn=, ctype= and loc= ?
I am trying to understand which are the most common as and seq observed and maybe I can tweak these a little better.

Thanks.
 
 
Back
Top