History

Automute actually works for a select number of cards. The problem is
that instead of querying the card for the info the automute feature
needs (which speakers to mute etc.) the driver looks up the values in
a lookup table. The lookup table only has 10 or so cards in it. I
added values for my card/codec into the lookup table and automute
worked fine. I'm going to try and update the auto mute to get rid of
the lookup table. After that if I'm feeling ambitous, I'll try to
update the driver to have some of the bells and whistles of the
freebsd driver.

The attached patch shuts down all speakers when something is plugged into a headphone jack. This is done by enumerating the codec's widgets instead of using a static lookup table. This patch also removes polling for headphone jack insertion because polling was configured via the lookup table. If needed, polling can be re-added with a new sysctl which would correspond with how FBSD configures polling.

Sound plays out of the computer speaker, and plays out of headphones when they are plugged in, but the speaker is unaffected by plugging/unplugging the headphones. The 'nid' showing up at module load is different; perhaps I have a slightly different chip?

'card' is very different here. According to man: "The third column gives the contents of the subvendorid register, introduced in revision 2.1 of the PCI standard. Note that it will be 0 for older cards. The field consists of the card ID in the upper half and the card vendor ID in the lower half of the value."

I don't have time to look at this but it would be useful if you could compile snd_hda with -DSND_HDA_DEBUG (I think). Then load sound module and set hw.snd.verbose=3 (again I think). Then load the snd_hda module and paste the output of /var/log/messages. There should be alot. I wish I could look into this but I don't even have a DFBSD install right now.