How to prevent driver from attaching

Is there some way in FreeBSD to actually prevent a driver from attaching to some piece of hardware it would otherwise happily attach (other than hacking device_id list in driver source)?

Why am I asking this is that I have snd_hda attaching to some sound module on my graphic card, and although I am not using that for anything I get lots of messages like
Code:
pcm3: feeder_chain(): failed to acquire hw matrix [0x00800400]
pcm3: feeder_chain(): failed to acquire hw matrix [0x00800400]
(one every 10-15 seconds or so), so I would prefer not to have a driver attaching to that card.

I used to disable that by changing the driver source, but I would prefer to know some more user friendly way (if there is any).
 
Generally if the variable is defined at all, it is considered set regardless of the contents.

As far as preventing a driver from attaching, the only way I know would be to not load it. That would require building and installing a custom kernel without the module.
 
I'm not sure if this is going to work but you could try adding this to /boot/loader.conf:
Code:
hint.hdac.0.disabled=1

The *_load variables only have an effect on loadable modules and snd_hda(4) is built into the GENERIC kernel. So if the above doesn't work there's nothing else to do but to build a custom kernel without it.
 
Code:
hint.hdac.0.disabled=1
Worked - thanks a lot for the suggestion.

Regarding the other ideas I forgot to mention in the original post that the audio card on the motherboard (the one I am really using) also uses snd_hda, so I couldn't prevent the driver from loading without completely losing sound.
 
The 0 in hint.hdac.0.disabled refers to the first, try disabling the other one instead with hint.hdac.1.disabled.
 
Back
Top