# Microphone does not work with Thinkpad T530



## DrKnuth (Oct 28, 2021)

Hi! This is my first post on the FreeBSD forums.

I am relatively new to FreeBSD. I installed it a couple of days ago on my work notebook to see if it could solve a problem with the trackpoint that I am having with GNU/Linux systems and indeed I can use the trackpoint without problems here, but I still have this problem with the microphone 

Some data from my environment:

`$ freebsd-version -ku
13.0-RELEASE-p4`

`$ cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC269 (Analog 2.0+HP/2.0)> (play/rec) default
pcm1: <Realtek ALC269 (Internal Analog Mic)> (rec)
pcm2: <Intel Panther Point (HDMI/DP 8ch)> (play)
pcm3: <Intel Panther Point (HDMI/DP 8ch)> (play)
pcm4: <Intel Panther Point (HDMI/DP 8ch)> (play)
No devices installed from userspace.`

Basically the behavior I am seeing is that I can play sound in applications but I cannot capture audio from the microphone.

If I run:

`sysctl hw.snd.default_unit=1`

applications are capable of capturing from the microphone but are nevertheless unable to reproduce sounds. In other words, I am not being able to hear sound and use the microphone at the same time.

I have read similar cases in the forum where this can be solved by adding a few lines in the /boot/device.hints file but it is not clear to me what parameters I should use. Can you help me with this?

Thanks in advance.

Kind regards,


----------



## DrKnuth (Oct 29, 2021)

Hi again!

Some more information:

 dmesg output if system is booted in verbose mode


```
hdacc0: <Realtek ALC269 HDA CODEC>acpi_acad0: acline initialization start at cad 0 on hdac0
hdaa0: <Realtek ALC269 Audio Function Group>ahcich0: AHCI reset...
at nid 1 on hdacc0
hdaa0: Subsystem ID: 0x17aa21f6
hdaa0: Original pins configuration:
hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa0: 18 90a60140 4  0  Mic           Fixed Digital Internal   Unknown 1
hdaa0: 20 90170110 1  0  Speaker       Fixed Analog  Internal   Unknown 1
hdaa0: 21 03211020 2  0  Headphones    Jack  1/8     Left       Black   0
hdaa0: 23 411111f0 15 0  Speaker       None  1/8     Rear       Black   1
hdaa0: 24 03a11830 3  0  Mic           Jack  1/8     Left       Black   8
hdaa0: 25 411111f0 15 0  Speaker       None  1/8     Rear       Black   1
hdaa0: 26 411111f0 15 0  Speaker       None  1/8     Rear       Black   1
hdaa0: 27 411111f0 15 0  Speaker       None  1/8     Rear       Black   1
hdaa0: 29 40138205 0  5  Speaker       None  ATAPI   0x00       Purple  2
hdaa0: 30 411111f0 15 0  Speaker       None  1/8     Rear       Black   1
hdaa0: Patching pin config nid=21 0x03211020 -> 0x0321101f
hdaa0: Patching widget caps nid=29 0x00400400 -> 0x00700400
hdaa0: Patched pins configuration:
hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa0: 18 90a60140 4  0  Mic           Fixed Digital Internal   Unknown 1
hdaa0: 20 90170110 1  0  Speaker       Fixed Analog  Internal   Unknown 1
hdaa0: 21 0321101f 1  15 Headphones    Jack  1/8     Left       Black   0
hdaa0: 23 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0: 24 03a11830 3  0  Mic           Jack  1/8     Left       Black   8
hdaa0: 25 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0: 26 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0: 27 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0: 30 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdacc1: <Intel Panther Point HDA CODEC> at cad 3 on hdac0
hdaa1: <Intel Panther Point Audio Function Group> at nid 1 on hdacc1
hdaa1: Subsystem ID: 0x80860101
hdaa1: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0
hdaa1: Original pins configuration:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1:  5 18560010 1  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1:  6 18560020 2  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1:  7 18560030 3  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1: Patched pins configuration:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1:  5 18560010 1  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1:  6 18560020 2  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1:  7 18560030 3  0  Digital-out   Jack  Digital 0x18       Unknown 0
```

I have used this configuration in /boot/device.hints:


```
hint.hdac.0.cad0.nid18.config="as=4 seq=0 device=mic"
hint.hdac.0.cad0.nid24.config="as=3 seq=0 device=monitor"
```

and now I can record and listen to sound simultaneously although I don't know if it will be the most efficient configuration.

Any comment is welcomed.

Kind regards,


----------



## bsduck (Nov 5, 2021)

According to snd_hda(4), `monitor` does not exist as a valid `device` option, there's only `Mic` and `Line-in`.

Which one will appear as "mic" and which one as "monitor" in `mixer` is determined by the following rule:
`mic     = first external or second internal microphone input
monitor = first internal or second external microphone input`

By the way, nid18 is the one located on your monitor, why are you telling lies to your OS?


----------

