man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: July 2014
 
 

audio_dev_register(9F)

Name

audio_dev_register, audio_dev_unregister - register or unregister an audio device from the system

Synopsis

#include <sys/audio/audio_driver.h>

int audio_dev_register(audio_dev_t *adev);
int audio_dev_unregister(audio_dev_t *adev);

Parameters

adev

pointer to an audio device allocated with audio_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 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.

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 still in use.

Context

These functions may only be called in user or kernel context.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed

See Also

attributes(5), audio(7D) , attach(9E), detach(9E) , audio_dev_alloc(9F)