# Intel hd4000 - sound over HDMI



## mzperx (Oct 11, 2013)

Hello All,

I have seen that "sound over HDMI" has been discussed a few times but still I am not able to resolve my situation. I have FreeBSD 9.2, Intel i7 with hd 4000 card.

```
cat /dev/sndstat

FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <IDT 92HD93BXX (Analog 2.0+HP/2.0)> (play/rec)
pcm1: <IDT 92HD93BXX (Analog)> (play/rec)
pcm2: <Intel Panther Point (HDMI/DP 8ch)> (play) default
pcm3: <Intel Panther Point (HDMI/DP 8ch)> (play)
pcm4: <Intel Panther Point (HDMI/DP 8ch)> (play
```

I did:

```
/boot/loader.conf

snd_pcm2_load="YES"
snd_hda_load="YES"
```

I have sound on my laptop I just can't get it through HDMI (xrandr says HDMI3).

Thanks for your help.

EDIT: so I guess I need to configure snd_hda in but don't know how. The relevant info:


```
dev.hdaa.0.%desc: IDT 92HD93BXX Audio Function Group
dev.hdaa.0.%driver: hdaa
dev.hdaa.0.%location: nid=1
dev.hdaa.0.%pnpinfo: type=0x01 subsystem=0x1028053d
dev.hdaa.0.%parent: hdacc0
dev.hdaa.0.nid10_config: 0x04a11020 as=2 seq=0 device=Mic conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.0.nid10_original: 0x04a11020 as=2 seq=0 device=Mic conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.0.nid11_config: 0x0421101f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.0.nid11_original: 0x0421101f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.0.nid12_config: 0x400000f0 as=15 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.0.nid12_original: 0x400000f0 as=15 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.0.nid13_config: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.0.nid13_original: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.0.nid14_config: 0x23011050 as=5 seq=0 device=Line-out conn=Jack ctype=1/8 loc=Ext-Left color=Black misc=0
dev.hdaa.0.nid14_original: 0x23011050 as=5 seq=0 device=Line-out conn=Jack ctype=1/8 loc=Ext-Left color=Black misc=0
dev.hdaa.0.nid15_config: 0x23a1102e as=2 seq=14 device=Mic conn=Jack ctype=1/8 loc=Ext-Left color=Black misc=0
dev.hdaa.0.nid15_original: 0x23a1102e as=2 seq=14 device=Mic conn=Jack ctype=1/8 loc=Ext-Left color=Black misc=0
dev.hdaa.0.nid16_config: 0x400000f3 as=15 seq=3 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.0.nid16_original: 0x400000f3 as=15 seq=3 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.0.nid17_config: 0xd5a30130 as=3 seq=0 device=Mic conn=Both ctype=ATAPI loc=0x15 color=Unknown misc=1
dev.hdaa.0.nid17_original: 0xd5a30130 as=3 seq=0 device=Mic conn=Both ctype=ATAPI loc=0x15 color=Unknown misc=1
dev.hdaa.0.nid31_config: 0x400000f0 as=15 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.0.nid31_original: 0x400000f0 as=15 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.0.nid32_config: 0x400000f0 as=15 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.0.nid32_original: 0x400000f0 as=15 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.0.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.0.gpi_state: 
dev.hdaa.0.gpio_state: 0=disabled 1=disabled 2=disabled 3=disabled 4=disabled
dev.hdaa.0.gpio_config: 0=keep 1=keep 2=keep 3=keep 4=keep
dev.hdaa.0.gpo_state: 
dev.hdaa.0.gpo_config: 
dev.hdaa.0.reconfig: 0
dev.hdaa.1.%desc: Intel Panther Point Audio Function Group
dev.hdaa.1.%driver: hdaa
dev.hdaa.1.%location: nid=1
dev.hdaa.1.%pnpinfo: type=0x01 subsystem=0x80860101
dev.hdaa.1.%parent: hdacc1
dev.hdaa.1.nid5_config: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid5_original: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid6_config: 0x18560020 as=2 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid6_original: 0x18560020 as=2 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid7_config: 0x18560030 as=3 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid7_original: 0x18560030 as=3 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.1.gpi_state: 
dev.hdaa.1.gpio_state: 
dev.hdaa.1.gpio_config: 
dev.hdaa.1.gpo_state: 
dev.hdaa.1.gpo_config: 
dev.hdaa.1.reconfig: 0
dev.pcm.0.%parent: hdaa0
dev.pcm.1.%parent: hdaa0
dev.pcm.2.%parent: hdaa1
dev.pcm.3.%parent: hdaa1
dev.pcm.4.%parent: hdaa1
```


----------



## sfara (Oct 15, 2013)

Can you post your xorg.conf please. I have an HP Elitebook 8470p that comes with hd4000 and wiered things happend. I managed to start X but it's running very poorly (lag in moving windows around)...it's using vesa driver. Also when i quit X i have to reboot because it's not showing the command line anymore...just blank screen. Also what modules have you loaded for this videocard ? or compiled in the kernel if that's the case.
Thanks.


----------



## mzperx (Oct 15, 2013)

Unfortunately I can't because until this issue is not solved I switch back to Arch Linux (I use my laptop for multimedia too and I have to have HDMI audio connection).

But I can tell you what I did: compiled Xorg with WITH_NEW_XORG and WITH_KMS options then ran `Xorg -configure`. The screen went black but after restart I found xorg.conf.new and added "AccelMethod" "sna" to the Device section (which included the intel driver already). That was all.

However I think your problem lies somewhere else. How do you know it is using vesa driver? Because for me Xorg worked fine without compilation or any configuration.

Have you installed a composite manager?

I too could not exit X but I think I read somewhere that was perfectly normal so I did not worry about that (I can't remember the specifics).


----------



## jrm@ (Nov 2, 2013)

This works out of the box for me when I do `# sysctl hw.snd.default.unit=2`.  To check which unit number you should use, use `# cat /dev/sndstat`.


----------



## mzperx (Nov 3, 2013)

jrm said:
			
		

> This works out of the box for me when I do `# sysctl hw.snd.default.unit=2`.  To check which unit number you should use, use `# cat /dev/sndstat`.



With this command `# sysctk hw.snd.default_unit=4` I can hear something from the HDMI port but this is something unrecognizable raw noise. I changed the setting in loader.conf too (snd_pcm4_load="YES").

The laptop plays the music fine. Any idea what causes the distortion in HDMI? Thanks.


----------



## trh411 (Nov 3, 2013)

sfara said:
			
		

> ... Also when I quit X, I have to reboot  ...



*Ctrl-Alt-F1* should end your X-session and return you to a virtual terminal. Then *CTRL+c* to get to a prompt. No need to reboot just to get out of X.


----------



## zspider (Nov 4, 2013)

trh411 said:
			
		

> *Ctrl-Alt-F1* should end your X-session and return you to a virtual terminal. Then *CTRL+c* to get to a prompt. No need to reboot just to get out of X.



He's using the KMS, currently there is no way to unload the module when X shuts down, so the only way to get back to a virtual terminal is to reboot. 10.0 is supposed to fix this.


----------



## jrm@ (Nov 4, 2013)

zspider said:
			
		

> He's using the KMS, currently there is no way to unload the module when X shuts down, so the only way to get back to a virtual terminal is to reboot. 10.0 is supposed to fix this.



It's unlikely for 10.0.  Check out this thread from the current@ list.


----------

