|Skip Navigation Links|
|Exit Print View|
|man pages section 9: DDI and DKI Kernel Functions Oracle Solaris 11 Express 11/10|
- allocate or free an audio device
#include <sys/audio/audio_driver.h> audio_dev_t *audio_dev_alloc(dev_info_t *dip, int devno);
void audio_dev_free(audio_dev_t *adev);
the device instance structure for the device
an integer representing the “logical device” number of the device. If 0 is supplied, the instance number returned from ddi_get_instance(9F) is used instead.
pointer to an audio device allocated with audio_dev_alloc()
Solaris DDI specific (Solaris DDI)
The audio_dev_alloc() function allocates a structure representing a logical audio device. Normally, there is one such audio device per dev_info_t. Some devices, however, may support the notion of multiple logical devices, where different audio devices with completely independent configurations can be supported. These devices will usually have completely independent physical ports as well. In such cases, the driver may supply a non-zero value for the devno.
If devno is used, it is the responsibility of the driver to ensure that all values of devno are unique for that particular driver, and a devno must be supplied for all hardware instances in the system to avoid collisions with device instance numbers.
An audio device (audio_dev_t) may have multiple DMA or PIO engines “streams”, but generally all of these engines are subject to the same set of controllable parameters (such as gain, port selection, etc.)
The audio_dev_free() function frees a previously allocated audio device handle and releases any resources associated with it.
The audio_dev_alloc() function returns an opaque handle for the audio device. It always succeeds.
The audio_dev_alloc() and audio_dev_free() functions may be called from user or kernel context only.
See attributes(5) for descriptions of the following attributes: