ThinkPad X270 audio device hints for headphones



Reaction score: 2
Messages: 35

I’ve replaced my ThinkPad X230 with a newer X270 model, running FreeBSD 12.1. Everything is working so far, but audio is not switched automatically between speakers and headphones. I guess, I have to set the correct device hints to /etc/device.hints. Does somebody happen to know the hints for the Realtek ALC298?

$ cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC298 (Analog)> (play/rec) default
pcm1: <Realtek ALC298 (Analog)> (play/rec)
pcm2: <Intel Kaby Lake (HDMI/DP 8ch)> (play)


New Member

Messages: 1

I have an Alienware 15r3 with ALC298 and this are mine

hint.hdac.0.cad0.nid23.config="as=1 seq=0"
hint.hdac.0.cad0.nid33.config="as=1 seq=15 device=Headphones"
hint.hdac.0.cad0.nid18.config="as=2 seq=0"
hint.hdac.0.cad0.nid26.config="as=2 seq=15 device=Line-in"

I added boot_verbose="YES" to /boot/loader.conf then used dmesg | grep pcm
then you should see for pcm0 and pcm1 which pins are used in my case was nid23 as fixed speaker on pcm0 and nid33 as headphones on pcm1
so I had to put it in one pcm device (as=1 will put it in a association together and the driver takes it for one pcm device) and Headphones to seq=15.

Next as=2 is for the microphones same logic as for headphones. I am not sure yet if the mic's are in the right order maybe the need to be switched.