audio_init_ops, audio_fini_ops - initialize DDI entry points for an audio device driver
#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);
pointer to the dev_ops(9S) vector for the device instance
name of the audio driver, which must be the same as the kernel module name. For example, “audiohd”.
Solaris DDI specific (Solaris DDI)
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().
These functions may be called from the driver's _init(9E) and _fini(9E) entry points only.
See attributes(7) for descriptions of the following attributes:
|
attributes(7), _fini(9E), _init(9E), attach(9E), detach(9E), quiesce(9E), ddi_driver_name(9F), dev_ops(9S)
Writing Device Drivers in Oracle Solaris 11.4
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.