I have a laptop (Thinkpad L460) with a jack port that can take both input audio and output audio.
TL.DR.: I'm trying to setup a jack port that can take headphones and/or microphone, so I can use an external analog Jack mic to record.
The card is recognized as:
where 20 are speakers, 21 headphones and 26 mic.
I setup output audio this way so I can mute speakers on headphone plug:
and I added this line to sysctl.conf in order to allow polling:
At this point if I read sndstat it looks like this:
And some sysctl logs reveal more info:
I have an external jack microphone that I'd want to use to record voice. I read a bit about snd_hda() and search in formus and ended up adding this hint to the nid26:
I tried using seq=15 but it doesn't work either.
Using as=1 removes speakers from pcm0 in sndstat.
With the hint applied, sndstat looks like this:
So internal mic seems to be missing (I don't really care at all about internal tho).
Checking mixer0, the output is this:
I tried changing Recording source to monitor but no luck.
Increasing Mixer igain adds a lot of white noise and the spectrum seems to be taking sound from my voice but I cannot verify it at all.
Any thoughts on how to setup a Jack port that can take both mic and headphones?
TL.DR.: I'm trying to setup a jack port that can take headphones and/or microphone, so I can use an external analog Jack mic to record.
The card is recognized as:
pcm0: <Realtek ALC293 (Analog 2.0+HP/2.0)> at nid 20,21 and 26 on hdaa0
where 20 are speakers, 21 headphones and 26 mic.
I setup output audio this way so I can mute speakers on headphone plug:
hint.hdaa.0.nid21.config="as=1 seq=15 device=Headphones conn=Jack"
and I added this line to sysctl.conf in order to allow polling:
dev.hdac.0.polling=1
At this point if I read sndstat it looks like this:
Code:
cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC293 (Analog 2.0+HP/2.0)> (play/rec) default
pcm1: <Realtek ALC293 (Internal Analog Mic)> (rec)
pcm2: <Intel Skylake (HDMI/DP 8ch)> (play)
No devices installed from userspace.
And some sysctl logs reveal more info:
Code:
sysctl -a | grep hda | grep Mic
dev.hdaa.0.nid26_original: 0x03a11020 as=2 seq=0 device=Mic conn=Jack ctype=1/8 loc=Left color=Black misc=0
dev.hdaa.0.nid26_config: 0x03a1102e as=2 seq=0 device=Mic conn=Jack ctype=1/8 loc=Left color=Black misc=0
dev.hdaa.0.nid26: pin: Mic (Black Jack)
dev.hdaa.0.nid18_original: 0x90a60130 as=3 seq=0 device=Mic conn=Fixed ctype=Digital loc=Internal color=Unknown misc=1
dev.hdaa.0.nid18_config: 0x90a60130 as=3 seq=0 device=Mic conn=Fixed ctype=Digital loc=Internal color=Unknown misc=1
dev.hdaa.0.nid18: pin: Mic (Fixed)
sysctl -a | grep hda | grep Speaker
dev.hdaa.0.nid20_original: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.0.nid20_config: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.0.nid20: pin: Speaker (Fixed)
sysctl -a | grep hda | grep Headphone
dev.hdaa.0.nid21_original: 0x03211040 as=4 seq=0 device=Headphones conn=Jack ctype=1/8 loc=Left color=Black misc=0
dev.hdaa.0.nid21_config: 0x0321101f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Left color=Black misc=0
dev.hdaa.0.nid21: pin: Headphones (Black Jack)
I have an external jack microphone that I'd want to use to record voice. I read a bit about snd_hda() and search in formus and ended up adding this hint to the nid26:
hint.hdaa.0.nid26.config="as=3 seq=14 device=Mic conn=Jack ctype=1/8 loc=Left color=Black misc=8"
I tried using seq=15 but it doesn't work either.
Using as=1 removes speakers from pcm0 in sndstat.
With the hint applied, sndstat looks like this:
Code:
cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC293 (Analog 2.0+HP/2.0)> (play/rec) default
pcm1: <Intel Skylake (HDMI/DP 8ch)> (play)
No devices installed from userspace.
So internal mic seems to be missing (I don't really care at all about internal tho).
Checking mixer0, the output is this:
Code:
mixer -f /dev/mixer
Mixer vol is currently set to 50:50
Mixer pcm is currently set to 100:100
Mixer speaker is currently set to 59:59
Mixer mic is currently set to 67:67
Mixer mix is currently set to 37:37
Mixer rec is currently set to 37:37
Mixer igain is currently set to 0:0
Mixer ogain is currently set to 100:100
Mixer monitor is currently set to 67:67
Recording source: mic
I tried changing Recording source to monitor but no luck.
Increasing Mixer igain adds a lot of white noise and the spectrum seems to be taking sound from my voice but I cannot verify it at all.
Any thoughts on how to setup a Jack port that can take both mic and headphones?