audio_dev_register, audio_dev_unregister - register or unregister an audio device from the system
#include <sys/audio/audio_driver.h> int audio_dev_register(audio_dev_t *adev);
int audio_dev_unregister(audio_dev_t *adev);
pointer to an audio device allocated with audio_dev_alloc(9F)
Solaris DDI specific (Solaris DDI)
The audio_dev_register() function is called by the driver to complete configuration of the audio device and register the device (along with all of its engines and controls) with the audio framework.
Use of this function also results in making the device accessible to applications through the creation of minor nodes and other such entities.
The audio_dev_register() function is often the last function called by a driver during attach(9E) processing.
The audio_dev_unregister() function is the inverse operation, and deregisters the device (and engines and controls) from the framework. However, it also checks to make sure that the device is not in use before doing so. As such, it is usually the first function called during detach(9E) processing.
The audio_dev_register() function returns DDI_SUCCESS on success or DDI_FAILURE on failure.
The audio_dev_unregister() function returns DDI_SUCCESS if it unregistered successfully, or DDI_FAILURE if it did not. Generally, DDI_FAILURE indicates that the audio device is still in use.
These functions may only be called in user or kernel context.
See attributes(5) for descriptions of the following attributes: