Kernel Functions for Drivers audio_dev_register(9F)
NAME
audio_dev_register, audio_dev_unregister - register or unre-
gister an audio device from the systemSYNOPSIS
#include
int audio_dev_register(audio_dev_t *adev);
int audio_dev_unregister(audio_dev_t *adev);
PARAMETERS
adev pointer to an audio device allocated withaudio_dev_alloc(9F)
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI)DESCRIPTION
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 opera-
tion, 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, itis usually the first function called during detach(9E) pro-
cessing.RETURN VALUES
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
SunOS 5.11 Last change: 21 Apr 2010 1
Kernel Functions for Drivers audio_dev_register(9F)
still in use.CONTEXT
These functions may only be called in user or kernel con-
text.ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Interface Stability | Committed ||_____________________________|_____________________________|
SEE ALSO
attributes(5), audio(7D), attach(9E), detach(9E),audio_dev_alloc(9F)
SunOS 5.11 Last change: 21 Apr 2010 2