2
.\" Copyright (c) 2005, 4Front Technologies 2005\&.
3
.TH ossddk_register_device 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services"
5
ossddk_register_device \- Registers a driver with OSS
9
#include <sys/soundcard.h>
11
#include <sys/ossddk/ossddk.h>
14
\fBoss_device_t*\fR ossddk_register_device(\fBint \fIddkvers\fP, \fBdev_info_t *\fIdip\fP, \fBint \fIdrvtype\fP, \fBint \fIinstance\fP, \fBconst char *\fInick\fP, \fBddi_iblock_cookie_t \fIiblock_cookie\fP, \fBvoid *\fIdevc\fP, \fBconst char *\fIlongname\fP);
18
Open Sound System specific (OSS 4.0 DDK)\&.
28
OSS DDK version. Set to OSSDDK_VERSION. Registering the driver will fail if the
29
version numbers are incompatible.
37
This is the \fIdip\fR parameter given by Solaris as the argument of driver's
46
Bus type of the device. OSS DDK needs this parameter for some internal purposes.
47
Possible values are: DRV_PCI, DRV_USB and DRV_VIRTUAL. Some other values may be defined
48
in ossddk.h but they are not supported by the current version of OSS DDK.
56
This is the instance number of this driver (see ddi_get_instance(9F)).
64
Nick is a short name of the driver. Usually same as the name of the driver module.
69
\fB\fIiblock_cookie\fR
72
The iblock cookie for the device. Should be set to NULL if the driver is a pseudo
73
one or if there is no iblock cookie for some other reason.
81
Pointer to driver defined device instance data. The driver can use this memory area
82
to store whatever information it wants.
89
Full name of the device. For example manufacturer and model. Keep as short as possible
90
since too long names will be truncated.
95
This routine registers the device with OSS and returns the \fIosdev\fR handle. The call
96
must be made omce in driver's attach routine before any other OSS DDK calls are made.
99
This routine returns the osdev handle or NULL if the call failed.
103
\fIWriting Sound Device Drivers with OSS DDK\fR
104
\fIOpen Sound System Programmer's Guide\fR