Kernel Functions for Drivers audio_engine_alloc(9F)
NAME
audio_engine_alloc, audio_engine_free - allocate or free an
audio engineSYNOPSIS
#include
audio_engine_t *audio_engine_alloc(audio_engine_ops_t *ops,
unsigned flags);void audio_engine_free(audio_engine_t *engine);
PARAMETERS
ops pointer to an operations vector describing the engine flags integer mask of flags indicating further details about the engine and its capabilities.ENGINE_INPUT_CAP indicates the engine supports
recording ENGINE_OUTPUT_CAP indicates the engine
supports playback. All other possible bits are reserved and should be unset. engine pointer to an audio engine allocated withaudio_engine_alloc()
DESCRIPTION
The audio_engine_alloc() function allocates a structure
representing an audio DMA or PIO engine (sometimes called a "stream"). The allocated structure is opaque to device drivers, but is used when the driver needs to supply a reference to the engine to other functions in the Solaris Audio DDI.The audio_engine_free() function frees a previously allo-
cated structure and releases any resources associated with it. It is important that device drivers not call this while the engine remains registered with the audio device. This should not be called until after the engine is deregisteredwith audio_dev_remove_engine(9F) or before it is registered
with audio_dev_add_engine(9F).
RETURN VALUES
The audio_engine_alloc function returns an opaque handle for
the audio engine. It always succeeds.SunOS 5.11 Last change: 21 Apr 2010 1
Kernel Functions for Drivers audio_engine_alloc(9F)
CONTEXT
These functions may be called from user or kernel context only.ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Interface Stability | Committed ||_____________________________|_____________________________|
SEE ALSO
attributes(5), audio(7D), audio_dev_add_engine(9F),
audio_dev_remove_engine(9F), audio_engine_set_private(9F),
audio_engine_ops(9S)
SunOS 5.11 Last change: 21 Apr 2010 2