# A few hdac questions...



## bofors (Oct 30, 2009)

I am new to FreeBSD, but spent a reasonable amount of time searching for the answer to my questions before posting, so please excuse my ignorance if I am missing something obvious.

I am studying the hdac (high definition audio codec) driver code and have some really basic questions:

(1) What exactly does "nid" refer to?  Is it "node ID"?

(2) What does "cad" refer to? 

Otherwise, I am able to follow the hdac code fairly well.

Thanks for your assistance,
~bofors


----------



## mav@ (Oct 30, 2009)

(1) nid is indeed "node ID". CODEC consists of multiple nodes.
(2) cad is "CODEC address". There can be several CODECs on HDA bus.


----------



## bofors (Nov 2, 2009)

mav@ said:
			
		

> (1) nid is indeed "node ID". CODEC consists of multiple nodes.
> (2) cad is "CODEC address". There can be several CODECs on HDA bus.



Thank you very much for you prompt response.

For the benefit of others, I want to point out that I was indeed missing something obvious.  This was Intel's HD Audio Programmers' Reference Manual (PRM): http://www.intel.com/Assets/PDF/manual/302349.pdf

Chapters 4 and 5 answer my questions about "nid" and "cad", and many others. They appear to be prerequisites for understanding hdac.


Now, I have two more general questions:

(1) How do FreeBSD and hdac handle analog surround-sound streams (5.1, 7.1, etc.)?  The Microsoft website referenced in the source code suggests that the operating system has a "mixer" that is a key component here and that it communicates with the driver to determine what stream formats are acceptable.   Is that how FreeBSD and hdac work?  If so, which hdac functions are involved in this format "negotiation"?  Any clues about would helpful.  

(2) Is it generally possible to use (re-configure) the Black and Yellow (Orange) jacks associated with 5.1 analog output as auxiliary stereo outputs instead?  Would such a use have to be planned for by the codec widget architecture?  Roughly, how would one go about doing this with hdac?  

Thanks again for your assistance.

~bofors


----------



## mav@ (Nov 2, 2009)

(1) As written in snd_hda(4) man page, multichannel playback is not supported at this moment, but it may be implemented soon.
(2) Yes, it is possible. Most of HDA controllers support up to 4 separate audio streams. Read snd_hda(4) man page for details.


----------



## bofors (Nov 2, 2009)

mav@ said:
			
		

> (1) As written in snd_hda(4) man page, multichannel playback is not supported at this moment, but it may be implemented soon.
> (2) Yes, it is possible. Most of HDA controllers support up to 4 separate audio streams. Read snd_hda(4) man page for details.



Thanks again for your assistance.

Section 7, "Multichannel 'Matrix' Processing" of this page:
http://people.freebsd.org/~ariff/SOUND_4.TXT.html

... suggested to me that multichannel playback support was implemented in the latest versions of hdac (but that the man pages were not updated yet).  Perhaps I was overlooking this sentence: 

"Notes: Implementation on specific hardware drivers not yet completed, but trivial."


----------



## bofors (Nov 2, 2009)

I now see that I can not edit my posts here.

I wanted to include a link to the snd_hda (4) man page for reference:

http://www.freebsd.org/cgi/man.cgi?...ion=0&manpath=FreeBSD+7.2-RELEASE&format=html


----------



## SirDice (Nov 2, 2009)

bofors said:
			
		

> I now see that I can not edit my posts here.


You can once you get past 10 days and 10 posts..



> I wanted to include a link to the snd_hda (4) man page for reference:
> 
> http://www.freebsd.org/cgi/man.cgi?...ion=0&manpath=FreeBSD+7.2-RELEASE&format=html



snd_hda(4)

http://forums.freebsd.org/misc.php?do=bbcode#man


----------

