# Speaker / Mic on different sound devices. Need to modify 'Pins'?



## freebsdinator (Apr 17, 2020)

Hello,

One of the last things I need configured on my notebook is the microphone. I have two sound devices, the one that has the speakers and the other which has the mic. If I'm using Audacity to record the audio, I'm able to manually specify it no problem, but this is an issue with Jitsi through Chrome or Firefox as that flexibility is missing.

I believe I have to adjust the 'pins', but after a year of on and off trying to tinker with the audio settings, I'm seeking some guidance as to what I need to modify.


```
$ cat /dev/sndstat
Installed devices:
pcm0: <IDT 92HD81B1X (Analog 2.0+HP/2.0)> (play/rec) default <- Speakers / Headphone
pcm1: <IDT 92HD81B1X (Analog Mic)> (rec) <- Mic that I want to record my audio
No devices installed from userspace.
```


```
mixer for pcm0
# mixer
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
Mixer speaker  is currently set to 100:100
Mixer mic      is currently set to 100:100
Mixer mix      is currently set to 100:100
Mixer rec      is currently set to 100:100
Mixer ogain    is currently set to 100:100
Recording source: mic
```


```
mixer for pcm1
# mixer
Mixer rec      is currently set to 100:100
Mixer monitor  is currently set to 100:100
Recording source: monitor
```


```
sysctl dev.hdac.0.pindump=1

hdaa0: Dumping AFG pins:
hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa0: 10 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0 DISA
hdaa0:     Caps: IN OUT HP EAPD VREF Sense: 0x00000000 (disconnected)
hdaa0: 11 0221101f 1  15 Headphones    Jack  1/8     Front      Black   0
hdaa0:     Caps:    OUT HP EAPD      Sense: 0x00000000 (disconnected)
hdaa0: 12 02a11020 2  0  Mic           Jack  1/8     Front      Black   0
hdaa0:     Caps: IN OUT    EAPD VREF Sense: 0x00000000 (disconnected)
hdaa0: 13 90170110 1  0  Speaker       Fixed Analog  Internal   Unknown 1
hdaa0:     Caps:    OUT    EAPD     
hdaa0: 14 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0 DISA
hdaa0:     Caps: IN OUT    EAPD      Sense: 0x00000000 (disconnected)
hdaa0: 15 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0 DISA
hdaa0:     Caps: IN OUT    EAPD      Sense: 0x00000000 (disconnected)
hdaa0: 16 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0 DISA
hdaa0:     Caps:    OUT             
hdaa0: 17 d5a30130 3  0  Mic           Both  ATAPI   0x15       Unknown 1
hdaa0:     Caps: IN                  Sense: 0x00000000 (disconnected)
hdaa0: 31 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0 DISA
hdaa0:     Caps:    OUT              Sense: 0x00000000 (disconnected)
hdaa0: 32 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0 DISA
hdaa0:     Caps: IN OUT              Sense: 0x00000000 (disconnected)
hdaa0: NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=1 GPIUnsol=1
hdaa0:  GPIO0: disabled
hdaa0:  GPIO1: disabled
hdaa0:  GPIO2: disabled
hdaa1: Dumping AFG pins:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1:  5 58560000 0  0  Digital-out   None  Digital 0x18       Unknown 0 DISA
hdaa1:     Caps:    OUT              Sense: 0x00000000 (disconnected)
hdaa1:  6 58560000 0  0  Digital-out   None  Digital 0x18       Unknown 0 DISA
hdaa1:     Caps:    OUT              Sense: 0x00000000 (disconnected)
hdaa1:  7 18560000 0  0  Digital-out   Jack  Digital 0x18       Unknown 0 DISA
hdaa1:     Caps:    OUT              Sense: 0x00000000 (disconnected)
hdaa1: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0
```

I know the information above *should* be enough to modify the boot device hints, but I'm still at a loss as to how to parse the above dump and then structure it to be interpreted at boot. 
I'll even happily take reading recommendations. I'm just tired of spinning my wheels on this as I feel like it's far simpler than I'm making it out to be!


----------



## Alain De Vos (Apr 17, 2020)

Not a direct answer. Sound recording in front jack of my PC sits on another PCI bus than the one on the rear jack. And I could only make the front jack working.
man snd_hda,





						snd_hda
					






					www.freebsd.org
				



$sysctl -a | grep pcm | grep rec


----------



## freebsdinator (Apr 17, 2020)

```
# sysctl -a | grep pcm | grep rec
dev.pcm.1.rec.vchanformat: s16le:2.0
dev.pcm.1.rec.vchanrate: 48000
dev.pcm.1.rec.vchanmode: fixed
dev.pcm.1.rec.vchans: 1
dev.pcm.1.rec.autosrc: 2
dev.pcm.1.rec.32bit: 24
dev.pcm.0.rec.vchanformat: s16le:2.0
dev.pcm.0.rec.vchanrate: 48000
dev.pcm.0.rec.vchanmode: fixed
dev.pcm.0.rec.vchans: 1
dev.pcm.0.rec.autosrc: 2
dev.pcm.0.rec.32bit: 24
```


----------



## freebsdinator (Apr 18, 2020)

I was able to get it working by placing the following in my /boot/devices.hints:


```
hint.hdac.0.cad0.nid12.config="as=0 seq=0       device=Mic"
hint.hdac.0.cad0.nid17.config="as=2 seq=15      device=Mic"
```

Unfortunately, I don't have a firm grasp as to *why* it worked. The first entry I believe basically 'throws away' the mic jack (at least that's my assumption). The second entry I set the same 'as' as the first entry with the built in mic, but what significance does the 'seq' have? I set it to 15 because 0 failed.


----------

