# Trouble with snd_hda



## jogi (Nov 22, 2010)

Hi all, 
I spent the whole day trying to fix my problem with sound. Please, could you tell me, how to correctly write device.hints file? I don't know. When I had freebsd 7.2 version, it worked well after adding two lines in device.hints. But if I put the same lines in FBSD 8.1 Release, it won't work. This worked in FBSD 7.2:

```
hint.hdac.1.cad0.nid17.config="as=1 seq=15 device=Headphones"
hint.hdac.1.cad0.nid22.config="as=1 seq=13 device=Speaker"
```


```
#pciconf -lv
hdac1@pci0:0:27:0:      class=0x040300 card=0x30e7103c chip=0x293e8086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801IB/IR/IH (ICH9 Family) HD Audio Controller'
    class      = multimedia
    subclass   = HDA
```


```
#dmesg
hdac1: Processing audio FG cad=0 nid=1...
hdac1: GPIO: 0x40000003 NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdac1:  nid 17 0x04212040 as  4 seq  0    Headphones  Jack jack  1 loc  4 color    Grey misc 0
hdac1:  nid 18 0x01014010 as  1 seq  0      Line-out  Jack jack  1 loc  1 color   Green misc 0
hdac1:  nid 19 0x413711f0 as 15 seq  0            CD  None jack  7 loc  1 color   Black misc 1
hdac1:  nid 20 0x04a12060 as  6 seq  0           Mic  Jack jack  1 loc  4 color    Grey misc 0
hdac1:  nid 21 0x91a7112e as  2 seq 14           Mic Fixed jack  7 loc 17 color   Black misc 1
hdac1:  nid 22 0x9217411f as  1 seq 15       Speaker Fixed jack  7 loc 18 color   Green misc 1
hdac1:  nid 23 0x41a6e130 as  3 seq  0           Mic  None jack  6 loc  1 color   White misc 1
hdac1: Patching widget caps nid=26 0x00400000 -> 0x00700000
hdac1:  nid 27 0x50461150 as  5 seq  0     SPDIF-out  None jack  6 loc 16 color   Black misc 1
hdac1:  nid 28 0x01813021 as  2 seq  1       Line-in  Jack jack  1 loc  1 color    Blue misc 0
hdac1: GHOST: nid=42 j=0 entnum=4 index=0 res=0x00002701
hdac1: Patched pins configuration:
hdac1:  nid 17 0x04212040 as  4 seq  0    Headphones  Jack jack  1 loc  4 color    Grey misc 0
hdac1:  nid 18 0x01014010 as  1 seq  0      Line-out  Jack jack  1 loc  1 color   Green misc 0
hdac1:  nid 19 0x413711f0 as 15 seq  0            CD  None jack  7 loc  1 color   Black misc 1 [DISABLED]
hdac1:  nid 20 0x04a12060 as  6 seq  0           Mic  Jack jack  1 loc  4 color    Grey misc 0
hdac1:  nid 21 0x91a7112e as  2 seq 14           Mic Fixed jack  7 loc 17 color   Black misc 1
hdac1:  nid 22 0x9217411f as  1 seq 15       Speaker Fixed jack  7 loc 18 color   Green misc 1
hdac1:  nid 23 0x41a6e130 as  3 seq  0           Mic  None jack  6 loc  1 color   White misc 1 [DISABLED]
hdac1:  nid 27 0x50461150 as  5 seq  0     SPDIF-out  None jack  6 loc 16 color   Black misc 1 [DISABLED]
hdac1:  nid 28 0x01813021 as  2 seq  1       Line-in  Jack jack  1 loc  1 color    Blue misc 0
hdac1: 4 associations found:
hdac1: Association 0 (1) out:
hdac1:  Pin nid=18 seq=0
hdac1:  Pin nid=22 seq=15
hdac1: Association 1 (2) in:
hdac1:  Pin nid=28 seq=1
hdac1:  Pin nid=21 seq=14
hdac1: Association 2 (4) out:
hdac1:  Pin nid=17 seq=0
hdac1: Association 3 (6) in:
hdac1:  Pin nid=20 seq=0
hdac1: Tracing association 0 (1)
hdac1:  Pin 18 traced to DAC 3
hdac1:  Pin 22 traced to DAC 4
hdac1: Association 0 (1) trace succeeded
hdac1: Tracing association 1 (2)
hdac1:  Pin 28 traced to ADC 8
hdac1:  Pin 21 traced to ADC 8
hdac1: Association 1 (2) trace succeeded
hdac1: Tracing association 2 (4)
hdac1:  Unable to trace pin 17 seq 0 with min nid 0
hdac1: Association 2 (4) trace failed
hdac1: Tracing association 3 (6)
hdac1:  Pin 20 traced to ADC 9
hdac1: Association 3 (6) trace succeeded
hdac1: Tracing input monitor
hdac1: Tracing other input monitors
hdac1:  Tracing nid 20 to out
hdac1:  nid 20 is input monitor
hdac1:  Tracing nid 21 to out
hdac1:  nid 21 is input monitor
hdac1:  Tracing nid 28 to out
hdac1: Tracing beeper
hdac1:  nid 26 traced to out
hdac1: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
```


```
#mixer
Mixer vol      is currently set to  75:75
Mixer pcm      is currently set to  75:75
Mixer speaker  is currently set to  75:75
Mixer line     is currently set to  75:75
Mixer rec      is currently set to  75:75
Mixer igain    is currently set to   0:0
Mixer ogain    is currently set to  50:50
Mixer monitor  is currently set to  75:75
Recording source: monitor
```


```
#less sysctl.conf
hw.snd.default_unit=1
```


```
#less /dev/sndstat
FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
Installed devices:
pcm0: <HDA ATI R6xx HDMI PCM #0 HDMI> (play)
pcm1: <HDA Analog Devices AD1984A PCM #0 Analog> (play/rec) default
pcm2: <HDA Analog Devices AD1984A PCM #1 Analog> (rec)
```

Please, HELP ME!


----------



## mav@ (Nov 22, 2010)

Could you define what exactly not working? Also I don't see here what CODEC do you have?


----------



## jogi (Nov 26, 2010)

I've thought I couldn't hear anything. But now it works well. I had to write this lines into /boot/device.hints


```
hint.hdac.1.cad0.nid18.config="as=4 seq=0"
hint.hdac.1.cad0.nid17.config="as=1 seq=15 device=Headphones"
hint.hdac.1.cad0.nid22.config="as=1 seq=0 device=Speaker"
```

Sorry for delay, but I wasn't last days on the internet.


----------

