# hdaa driver documentation



## decuser (Aug 26, 2020)

I figured out how to get sound working on my MacPro5,1 (mid 2010). Here's that thread. Basically:

```
sudo vi /etc/sysctl.conf
dev.hdaa.0.gpio_config="0=set 1=set"
hw.snd.default_unit=3
```
Part of this makes sense (which unit is the default), and part of it is magic(0=set 1=set). I gather this is turning on the first two gpio pins, but why this works is still pretty mysterious. I read in another thread here, about using hints such as:

```
hint.hdaa.0.config="ovref"
hint.hdaa.0.gpio_config="0=set"
```
and like any script-kiddie, I'm willing to give it a go, but I don't really have a clue as to what this does or how. I will gladly try it and if it works, use it, but I'd like to get a clue. Hence my latest question - where's the documentation, or put another way, how can I figure out what hints and what sysctls are applicable to my hardware?


----------



## shepper (Aug 26, 2020)

It is split into sections.  General sound is here:
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/sound-setup.html
Sound is somewhat dated from around the time when SoundBlaster (snd_sbc) cards were common.  Now days most on-board sound chips are 
in the man page:  snd_hda(4)


----------



## a6h (Aug 26, 2020)

They are all over the places: tuning(7), man pages of related drivers, e.g. snd_hda(4), `sysctl -d` and finally reading /usr/src. For example (not necessary related to your specific question)





						[base] Log of /head/sys/dev/sound/pci/hda/hdaa_patches.c
					






					svnweb.freebsd.org
				







__





						[base] Log of /head/sys/dev/sound/pci/hda/hdaa.h
					






					svnweb.freebsd.org


----------



## a6h (Aug 26, 2020)

A personal example/experience: as you already know, mixer(1) has lots of different options and you couldn't find any useful explanation about them in the man page. Options like _vol, bass, treble, synth, pcm, speaker, line, mic, cd, mix, pcm2_. For example I couldn't understand what is the difference between pcm and vol. Finally I've started to read its related source on /usr/src to get a clue what is going on, and I found some helpful hints. I can't remember exaclty where I was looking for, but you get the idea. I was looking into different places and reading different files such as: /usr/src/sys/sys/soundcard.h and /usr/src/usr.sbin/mixer/mixer.c so forth and so on.
[EDIT] using a combination of different tools for searching grep(1), sed(1), find(1), etc.


----------

