# HDMI sound output



## mix_room (Dec 27, 2009)

I am trying to hook up my TV to my FreeBSD box. Have gotten sound working via the normal analog pins using [CMD="kldload snd_hda"][/CMD]and [CMD="cat FILE > /dev/dsp0.0"][/CMD]

Now for the big however. I would like sound to be output via HDMI, reduce the number of cables. The HDMI output is detected as [cmd="pcm3"][/cmd] on [cmd="hdac1"][/cmd], but I cannot get it to output sound. 

I have read that it might require that I move the pins around. However this seems rather complicated, and is not something that I particularly feel like doing if it isn't necessary. 

Does anyone have tips on why it might not be working? To recap: sound works via headphones on pcm0, but not via hdmi on pcm3


----------



## SirDice (Dec 28, 2009)

HDMI is comming off your graphicscard. Your graphicscard doesn't output audio.


----------



## mix_room (Dec 28, 2009)

SirDice said:
			
		

> HDMI is comming off your graphicscard. Your graphicscard doesn't output audio.



HDMI is coming of the onboard graphicscard, yes that is true. But it should also output sound.

I found an old Win XP cd, going to install that today to make sure that the hardware is ok.


----------



## adamk (Dec 28, 2009)

Your video drivers need to know about the sound chip...  What video card do you have?


----------



## mix_room (Dec 28, 2009)

What ever videocard is built-in to the AMD 790GX. Have a DFI LANPARTY JR 790GX-M2RS motherboard, every thing is onboard.



			
				&quot said:
			
		

> # Integrated ATI Radeon HD 3300 graphics core
> # Onboard graphics interface
> - HDMI port for both digital audio and video HD display


----------



## adamk (Dec 28, 2009)

On linux, the radeonhd driver is able to handle the audio part on that particular GPU.  As I understand it, it works with the alsa high definition audio driver.  You *might* be able to get it to work properly with the radeonhd driver, but I would not be surprised if the necessary hooks are not in place in OSS or if the audio part of the radeonhd driver is linux-only.

Adam


----------



## mix_room (Dec 28, 2009)

So you are saying that I need to install X with the corresponding radeonhd card, and then it should *hopefully* work. I'll give that a try. I got it to work under WinXP after a while, stupid reboots to install a drivers, [cmd="kldload"][/cmd] is much nicer.


----------



## adamk (Dec 28, 2009)

I'm saying that it won't work without the radeonhd driver and, even then, it might not work.

Adam


----------



## mix_room (Dec 29, 2009)

adamk, thanks for the tips. Got it to work. 

It required me to set two options in xorg.conf, under the driver


```
Driver "radeonhd"
Option "Audio" "on"
Option "HDMI"  "all"
```

Now I have sound, the picture looks good as well.


----------



## aragon (Dec 29, 2009)

Have always wondered how this works, or if it even works.  Thanks for confirmation.


----------



## SirDice (Dec 29, 2009)

Actually I'm pleasantly surprised it works :e

So the audio shows up as a 'regular' hda soundcard? 
Does this only work for boards that have onboard sound and video?


----------



## adamk (Dec 29, 2009)

SirDice said:
			
		

> Actually I'm pleasantly surprised it works :e
> 
> So the audio shows up as a 'regular' hda soundcard?
> Does this only work for boards that have onboard sound and video?



Yes, and yes.  I think probably all radeon HD* GPUs have the onboard sound, though not all cards have the port for it   As I understand it, the code in radeonhd was reverse engineered though, since then, code was written from the documentation for the radeon KMS driver in linux.


----------



## aragon (Dec 29, 2009)

adamk said:
			
		

> I think probably all radeon HD* GPUs have the onboard sound, though not all cards have the port for it


My 3450 is like this.  I've pondered how difficult it'd be to add the port.  My onboard sound has no spdif and it would be nice to get it.


----------



## mix_room (Jan 2, 2010)

SirDice said:
			
		

> So the audio shows up as a 'regular' hda soundcard?


Audio shows up as two soundcards, both hda. One for HDMI and one for the remaining outputs. This is probably due to there being two sound chips on the mainboard though. 

I have bad news though, while it worked absolutely wonderful on one TV, I now switched locations of the computer, and now the sound is gone again and the image has a really annoying red tinge to it. I still haven't found out why that it is. Might be that the resolution being set incorrectly.


----------

