man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: July 2014
 
 

audio_engine_free(9F)

Name

audio_engine_alloc, audio_engine_free - allocate or free an audio engine

Synopsis

#include <sys/audio/audio_driver.h>

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 with audio_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 allocated 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 deregistered with 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.

Context

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

Attributes

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

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)