Disabling sound output devices (e.g. Internal Speakers) in OS X
kextunload is a formal interface for unloading kexts in the Darwin OS and in Mac OS X.


Unload the system audio driver:

sudo kextunload /System/Library/Extensions/AppleHDA.kext

Load it again:

sudo kextload /System/Library/Extensions/AppleHDA.kext

If not "AppleHDA.kext", another kernel extension in /System/Library/Extensions/ may be what you're looking for.