Go to main content

man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: July 2017
 
 

audio_fini_ops(9F)

Name

audio_init_ops, audio_fini_ops - initialize DDI entry points for an audio device driver

Synopsis

#include <sys/audio/audio_driver.h>

void audio_init_ops(struct dev_ops *devops, const char *name);
void audio_fini_ops(struct dev_ops *devops);

Parameters

devops

pointer to the dev_ops(9S) vector for the device instance

name

name of the audio driver, which must be the same as the kernel module name. For example, “audiohd”.

Interface Level

Solaris DDI specific (Solaris DDI)

Description

The audio_init_ops() function initializes the device operations vector for an audio driver, setting a number of entry points to common implementation from the audio framework. It must be executed during the _init(9E) function for the driver.

The actual values supplied by audio_init_ops() are the fields for devo_cb_ops and devo_getinfo.

Device drivers need to supply any other entry points, especially the attach(9E), detach(9E), and quiesce(9E) entry points.

The ddi_driver_name(9F) function cannot be used to determine the device driver's name, as there is not necessarily a dev_info_t to use during the _init(9E) entry point. A constant string must be supplied by the driver.

The audio_fini_ops() function undoes the work of audio_init_ops() and releases resources allocated by audio_init_ops().

Context

These functions may be called from the driver's _init(9E) and _fini(9E) entry points only.

Attributes

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

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed

See Also

attributes(5), attach(9E), detach(9E), _fini(9E), _init(9E), quiesce(9E), ddi_driver_name(9F), dev_ops(9S)

Writing Device Drivers for Oracle Solaris 11.3

Notes

Audio device driver names are limited to at most 12 characters.

The audio DDI is provided by the drv/audio module. Developers should supply “-dy -Ndrv/audio” on the final link command line to ensure that symbol dependencies can be satisfied when the driver is loaded.