diff options
Diffstat (limited to 'misc/man9ossddk')
63 files changed, 3012 insertions, 0 deletions
diff --git a/misc/man9ossddk/TODO b/misc/man9ossddk/TODO new file mode 100644 index 0000000..d08e980 --- /dev/null +++ b/misc/man9ossddk/TODO @@ -0,0 +1,13 @@ +ossddk_create_stringlist.9ossddk # For rec/play src/target names + +ossddk_mixer_create_control.9ossddk +ossddk_mixer_set_strings.9ossddk +ossddk_mixer_touch.9ossddk +ossddk_mixer_truncate.9ossddk + +ossddk_ac97_install.9ossddk +ossddk_ac97_is_varrate.9ossddk +ossddk_ac97_remove.9ossddk +ossddk_ac97_set_ext_init.9ossddk +ossddk_ac97_set_playrate.9ossddk +ossddk_ac97_set_recrate.9ossddk diff --git a/misc/man9ossddk/ossddk_ac97_install.9ossddk b/misc/man9ossddk/ossddk_ac97_install.9ossddk new file mode 100644 index 0000000..0469fe7 --- /dev/null +++ b/misc/man9ossddk/ossddk_ac97_install.9ossddk @@ -0,0 +1,78 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_ac97_install 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_ac97_install \- TODO +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBint\fR ossddk_ac97_install(\fBac97_handle_t *\fI*ac97handle\fP, \fBchar *\fIname\fP, \fBac97_readfunc_t \fIreadfn\fP, \fBac97_writefunc_t \fIwritefn\fP, \fBvoid *\fIhostparms\fP, \fBoss_device_t * \fIosdev\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fI*ac97handle\fR +.in +16n +.rt +TODO *ac97handle +.in -16n +.sp +.ne 2 +.mk +\fB\fIname\fR +.in +16n +.rt +TODO name +.in -16n +.sp +.ne 2 +.mk +\fB\fIreadfn\fR +.in +16n +.rt +TODO readfn +.in -16n +.sp +.ne 2 +.mk +\fB\fIwritefn\fR +.in +16n +.rt +TODO writefn +.in -16n +.sp +.ne 2 +.mk +\fB\fIhostparms\fR +.in +16n +.rt +TODO hostparms +.in -16n +.sp +.ne 2 +.mk +\fB\fIosdev\fR +.in +16n +.rt +OSS device handle. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +TODO +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_ac97_is_varrate.9ossddk b/misc/man9ossddk/ossddk_ac97_is_varrate.9ossddk new file mode 100644 index 0000000..a6221d3 --- /dev/null +++ b/misc/man9ossddk/ossddk_ac97_is_varrate.9ossddk @@ -0,0 +1,38 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_ac97_is_varrate 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_ac97_is_varrate \- TODO +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBint\fR ossddk_ac97_is_varrate(\fBac97_handle_t * \fIac97handle\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIac97handle\fR +.in +16n +.rt +AC97 device handle returned by ossddk_ac97_install(9ossddk). +.in -16n +.PP +.SH "DESCRIPTION" +.PP +TODO +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_ac97_remove.9ossddk b/misc/man9ossddk/ossddk_ac97_remove.9ossddk new file mode 100644 index 0000000..8ca68c2 --- /dev/null +++ b/misc/man9ossddk/ossddk_ac97_remove.9ossddk @@ -0,0 +1,38 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_ac97_remove 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_ac97_remove \- TODO +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_ac97_remove(\fBac97_handle_t * \fIac97handle\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIac97handle\fR +.in +16n +.rt +AC97 device handle returned by ossddk_ac97_install(9ossddk). +.in -16n +.PP +.SH "DESCRIPTION" +.PP +TODO +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_ac97_set_ext_init.9ossddk b/misc/man9ossddk/ossddk_ac97_set_ext_init.9ossddk new file mode 100644 index 0000000..a10a68c --- /dev/null +++ b/misc/man9ossddk/ossddk_ac97_set_ext_init.9ossddk @@ -0,0 +1,54 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_ac97_set_ext_init 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_ac97_set_ext_init \- TODO +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBint\fR ossddk_ac97_set_ext_init(\fBac97_handle_t * \fIac97handle\fP, \fBmixer_create_controls_t \fIfunc\fP, \fBint \fInextra\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIac97handle\fR +.in +16n +.rt +AC97 device handle returned by ossddk_ac97_install(9ossddk). +.in -16n +.sp +.ne 2 +.mk +\fB\fIfunc\fR +.in +16n +.rt +TODO func +.in -16n +.sp +.ne 2 +.mk +\fB\fInextra\fR +.in +16n +.rt +TODO nextra +.in -16n +.PP +.SH "DESCRIPTION" +.PP +TODO +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_ac97_set_playrate.9ossddk b/misc/man9ossddk/ossddk_ac97_set_playrate.9ossddk new file mode 100644 index 0000000..6db1bb5 --- /dev/null +++ b/misc/man9ossddk/ossddk_ac97_set_playrate.9ossddk @@ -0,0 +1,46 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_ac97_set_playrate 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_ac97_set_playrate \- TODO +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBint\fR ossddk_ac97_set_playrate(\fBac97_handle_t * \fIac97handle\fP, \fBint \fIsrate\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIac97handle\fR +.in +16n +.rt +AC97 device handle returned by ossddk_ac97_install(9ossddk). +.in -16n +.sp +.ne 2 +.mk +\fB\fIsrate\fR +.in +16n +.rt +Sampling rate in HZ. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +TODO +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_ac97_set_recrate.9ossddk b/misc/man9ossddk/ossddk_ac97_set_recrate.9ossddk new file mode 100644 index 0000000..af08710 --- /dev/null +++ b/misc/man9ossddk/ossddk_ac97_set_recrate.9ossddk @@ -0,0 +1,46 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_ac97_set_recrate 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_ac97_set_recrate \- TODO +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBint\fR ossddk_ac97_set_recrate(\fBac97_handle_t * \fIac97handle\fP, \fBint \fIsrate\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIac97handle\fR +.in +16n +.rt +AC97 device handle returned by ossddk_ac97_install(9ossddk). +.in -16n +.sp +.ne 2 +.mk +\fB\fIsrate\fR +.in +16n +.rt +Sampling rate in HZ. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +TODO +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_get_devc.9ossddk b/misc/man9ossddk/ossddk_adev_get_devc.9ossddk new file mode 100644 index 0000000..39abbf3 --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_get_devc.9ossddk @@ -0,0 +1,47 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_get_devc 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_get_devc \- Returns the devc pointer for this audio device +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid*\fR ossddk_adev_get_devc(\fBint \fIdev\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS device number. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +This function returns the devc pointer used when creating this audio device using +ossddk_install_audiodev(9ossddk). +.PP +CAUTION! Extreme care must be taken in drivers that drive both mixer and audio +device files. Both types of devices have different functions for getting +the devc pointer. Drivers must use ossddk_adev_get_devc with audio device +numbers and ossddk_mixer_get_devc with mixer device numbers. +.PP +.SH "RETURN VALUES" +The devc pointer. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_get_dmapin.9ossddk b/misc/man9ossddk/ossddk_adev_get_dmapin.9ossddk new file mode 100644 index 0000000..80b5beb --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_get_dmapin.9ossddk @@ -0,0 +1,50 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_get_dmapin 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_get_dmapin \- Returns the input (recording) dmap handle +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBdmap_t*\fR ossddk_adev_get_dmapin(\fBint \fIdev\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS audio device number. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +This funmction returns the dmap handle used for recording with this device. The dmap +object contains recording and/or playback related parameters. Use the ossddk_dmap_get_* +and ossddk_dmap_set_* methods to access the fields of this object. +.PP +Note that the dmap objects are only valid when the device is open. There are separate +dmap objects for recording and playback directions if the device was created with +ADEV_DUPLEX. However with all other audio devices both dmaps may point to the +same actual dmap object. Unused dmap objects may be NULL too. Drivers should make +sure they access the right dmap object. +.PP +.SH "RETURN VALUES" +The dmap object or NULL if no dmap object is allocated. Getting NULL from this +call means that the driver did the call at wrong moment. Another possible reason is +that it tried to access wrong dmap object (input instead of output or vice versa). +.PP +.SH "SEE ALSO" +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_get_dmapout.9ossddk b/misc/man9ossddk/ossddk_adev_get_dmapout.9ossddk new file mode 100644 index 0000000..7ad9d2e --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_get_dmapout.9ossddk @@ -0,0 +1,51 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_get_dmapout 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_get_dmapout \- Returns the output (playback) dmap handle +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBdmap_t*\fR ossddk_adev_get_dmapout(\fBint \fIdev\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS audio device number. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +This funmction returns the dmap handle used for playback with this device. The dmap +object contains recording and/or playback related parameters. Use the ossddk_dmap_get_* +and ossddk_dmap_set_* methods to access the fields of this object. +.PP +Note that the dmap objects are only valid when the device is open. There are separate +dmap objects for recording and playback directions if the device was created with +ADEV_DUPLEX. However with all other audio devices both dmaps may point to the +same actual dmap object. Unused dmap objects may be NULL too. Drivers should make +sure they access the right dmap object. +.PP +.SH "RETURN VALUES" +The dmap object or NULL if no dmap object is allocated. Getting NULL from this +call means that the driver did the call at wrong moment. Another possible reason is +that it tried to access wrong dmap object (input instead of output or vice versa). +.PP +.SH "SEE ALSO" +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_get_label.9ossddk b/misc/man9ossddk/ossddk_adev_get_label.9ossddk new file mode 100644 index 0000000..30c3ce3 --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_get_label.9ossddk @@ -0,0 +1,51 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_get_label 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_get_label \- Get stream label currently assigned to this device +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBchar*\fR ossddk_adev_get_label(\fBint \fIdev\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS ausio device number. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +Stream labels are short (up to 15 character) mnemonic names that the \fIsource\fR of the +stream can set. The ossddk_adev_get_label function can be used by playback devices to +check if the application playing through the device has set it. For example a driver +for an audio tape recorder can use it as the reel name stored on the tape. Also some +digital audio links may have support for reel names or source names. Third possiblility +is that the label information is shown as the treck name on mixing consoles or other +kind of devices. +.PP +.SH "RETURN VALUES" +This function returns a pointer to the character string containing the label. Empty +string means there is no label assigned. The driver must not modify the string returned. +.PP +.SH "SEE ALSO" +.PP +\fIossddk_adev_set_label(9ossddk)\fR +.LP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_get_portc.9ossddk b/misc/man9ossddk/ossddk_adev_get_portc.9ossddk new file mode 100644 index 0000000..e8d3034 --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_get_portc.9ossddk @@ -0,0 +1,66 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_get_portc 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_get_portc, ossddk_adev_get_portc_play, ossddk_adev_get_portc_record, ossddk_adev_set_portc, ossddk_adev_set_portc_play, ossddk_adev_set_portc_record \- Get/set the portc pointers of an audio device +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid*\fR ossddk_adev_get_portc(\fBint \fIdev\fP); +.LP +\fBvoid*\fR ossddk_adev_get_portc_play(\fBint \fIdev\fP); +.LP +\fBvoid*\fR ossddk_adev_get_portc_record(\fBint \fIdev\fP); +.LP +\fBvoid\fR ossddk_adev_set_portc(\fBint \fIdev\fP, \fBvoid *\fIportc\fP); +.LP +\fBvoid\fR ossddk_adev_set_portc_play(\fBint \fIdev\fP, \fBvoid *\fIportc\fP); +.LP +\fBvoid\fR ossddk_adev_set_portc_record(\fBint \fIdev\fP, \fBvoid *\fIportc\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fIportc\fR +.in +16n +.rt +Pointer to the portc structure created by the driver. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +OSS audio drivers can have three per-audiodevice pointers that the low level +driver can use as it likes. Most drivers use only the common portc structure. However +spme drivers may need to use separate portc structures for recording and playback. +.PP +The driver allocates the port structures when initializing the device and registers them +after installing the audio device. Later the driver can obtain the portc pointer(s) from +OSS. +.PP +.SH "RETURN VALUES" +The get functions return the portc pointer or NULL if no portc pointer has been set. +There are no error returns. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_get_portc_play.9ossddk b/misc/man9ossddk/ossddk_adev_get_portc_play.9ossddk new file mode 100644 index 0000000..b7ae55c --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_get_portc_play.9ossddk @@ -0,0 +1 @@ +.so man9ossddk/ossddk_adev_get_portc.9ossddk diff --git a/misc/man9ossddk/ossddk_adev_get_portc_record.9ossddk b/misc/man9ossddk/ossddk_adev_get_portc_record.9ossddk new file mode 100644 index 0000000..b7ae55c --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_get_portc_record.9ossddk @@ -0,0 +1 @@ +.so man9ossddk/ossddk_adev_get_portc.9ossddk diff --git a/misc/man9ossddk/ossddk_adev_get_songname.9ossddk b/misc/man9ossddk/ossddk_adev_get_songname.9ossddk new file mode 100644 index 0000000..191290a --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_get_songname.9ossddk @@ -0,0 +1,49 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_get_songname 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_get_songname \- Get the song name assigned to an audio stream +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBchar*\fR ossddk_adev_get_songname(\fBint \fIdev\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS audio device number. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +Song name is free formatted string describing the content of the audio stream. Source +of the stream (for example the application playing to the device) can assign the name. +The driver can obtain this string and forward it to the device. For example if the +device has a LCD display the driver can show the song name in it. +.PP +.SH "RETURN VALUES" +This function returns a pointer to a string containing 0 to 63 characters. An empty +string means there is no song name assigned to the stream. The driver must not +modify the string. +.PP +.SH "SEE ALSO" +.PP +\fIossddk_adev_set_songname(9ossddk)\fR +.LP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_set_buflimits.9ossddk b/misc/man9ossddk/ossddk_adev_set_buflimits.9ossddk new file mode 100644 index 0000000..408d6cb --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_set_buflimits.9ossddk @@ -0,0 +1,76 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_set_buflimits 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_set_buflimits \- Set fragment size constraints +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_adev_set_buflimits(\fBint \fIdev\fP, \fBint \fImin_fragment\fP, \fBint \fImax_fragment\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS audio device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fImin_fragment\fR +.in +16n +.rt +Minimum fragment size (in bytes) supported by the device. Value of 0 means no limit. +.in -16n +.sp +.ne 2 +.mk +\fB\fImax_fragment\fR +.in +16n +.rt +Maximum fragment size (in bytes) supported by the device. Value of 0 means no limit. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +Fragment size of an audio stream is the number of bytes (not samples) to be played +or recorded between interrupts genererated by the device. In other words the device +will generate an interrupt exactly at the fragment boundaries. The audio core of OSS +will select the fragment size. However if the device has any size restrictions it can +inform the audio core about them. In most cases there are no restrictions and the driver +should not call this function at all. +The minimum fragment size must be smaller or equal to the maximum. +.PP +For example many devices can not support fragment sizes larger than one 4k page. In +this case the driver can call \fIossddk_adev_set_buflimits(device_num, 0, 4096)\fR. +.PP +This function can be called immediately after installing the audio device using +\fIossddk_install_audiodev(9ossddk)\fR. Alternatively it can be called in driver's open, +set_speed, set_channels and/or set_format entry points. If the latter method is used +then the open entry point must restore the default value. +.PP +Changing the fragment size limits when (or after) the prepare_for_output/prepare_for_input +entry point is called doesn't have any effect. If the fragment size depends on the +sampling rate or the other parameters then the set_speed, set_channels and set_format +driver entgry points must update the fragment size limits depending on the situation. +.PP +The limits should preferably be powers of 2 but this is not an absolute requirement. +Both limits can be the same if the device supports fixed fragment size. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_set_caps.9ossddk b/misc/man9ossddk/ossddk_adev_set_caps.9ossddk new file mode 100644 index 0000000..5ac92c2 --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_set_caps.9ossddk @@ -0,0 +1,56 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_set_caps 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_set_caps \- Set device capabilities +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_adev_set_caps(\fBint \fIdev\fP, \fBunsigned int \fIcaps\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS audio device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fIcaps\fR +.in +16n +.rt +A bit mask containing the device capabilities. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +This function sets the initial values for the device capabilities to be returned by +\fISNDCTL_AUDIOINFO(2oss)\fR ioctl call. While most of the capability bits will be +set automatically by the OSS audio core the driver can set some of them itself. +At this moment the driver can only set the preferred channel configuration +(DSP_CH_ANY, DSP_CH_MONO, DSP_CH_STEREO or DSP_CH_MULTI). Other capability +bits should not be set. +.PP +The driver can call this function whenever it wants. +.PP +.SH "SEE ALSO" +.PP +\fISNDCTL_AUDIOINFO(2oss)\fR +.LP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_set_channels.9ossddk b/misc/man9ossddk/ossddk_adev_set_channels.9ossddk new file mode 100644 index 0000000..fb1cf57 --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_set_channels.9ossddk @@ -0,0 +1,63 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_set_channels 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_set_channels \- Set the supported channel configuration +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_adev_set_channels(\fBint \fIdev\fP, \fBint \fImin_channels\fP, \fBint \fImax_channels\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS audio device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fImin_channels\fR +.in +16n +.rt +Minimum number of channels (should be at least 1). +.in -16n +.sp +.ne 2 +.mk +\fB\fImax_channels\fR +.in +16n +.rt +Maximum number of channels supported. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +This function sets meta information that can be read using the \fISNDCTL_AUDIOINFO(2oss)\fR ioctl call. It is recommended that the driver calls this function after installing +the audio device. +.PP +This call sets only the bounds to the number of channels supported by the device. It's +possible that the device doesn't support all possible channel configurations between +these limits. For example it may support 2 and 8 channels but not anything between +them. This is OK and the driver developer should not worry about this. +.PP +.SH "SEE ALSO" +.PP +\fISNDCTL_AUDIOINFO(2oss)\fR +.LP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_set_devc.9ossddk b/misc/man9ossddk/ossddk_adev_set_devc.9ossddk new file mode 100644 index 0000000..5daa7ae --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_set_devc.9ossddk @@ -0,0 +1,50 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_set_devc 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_set_devc \- Set the devc pointer of an audio device +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_adev_set_devc(\fBint \fIdev\fP, \fBvoid *\fIdevc\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS audio device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fIdevc\fR +.in +16n +.rt +Pointer to driver defined device instance data. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +The devc pointer of an audio device points to the data structure where the driver +stores it's per-card information. The driver can store a pointer to this structure +in the audio device and obtain it later in the callback functions. +Usually the driver sets the devc pointer when calling ossddk_install_audiodev. However +it is possible to change this pointer later with this function. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_set_enable_flag.9ossddk b/misc/man9ossddk/ossddk_adev_set_enable_flag.9ossddk new file mode 100644 index 0000000..1c72fe6 --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_set_enable_flag.9ossddk @@ -0,0 +1,52 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_set_enable_flag 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_set_enable_flag \- Set or reset the device enabled flag. +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_adev_set_enable_flag(\fBint \fIdev\fP, \fBint \fIstate\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS audio device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fIstate\fR +.in +16n +.rt +Device enabled flag (1=available and 0=unavailable). +.in -16n +.PP +.SH "DESCRIPTION" +.PP +Drivers for hot pluggable/unpluggable devices (such as USB or Firewire) can set this +flag at the moment when the device gets unplugged and turn it of when it becomes +available again. By defalt the device is available. Drivers for noh-pluggable devices +(PCI, ISA) must not care about this flag. +.PP +This information is used to prevent OSS from opening a device when it's not present. However this doesn't guarantee that no driver calls are made. The driver must check itself +if the device is really present before doing any operations. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_set_formats.9ossddk b/misc/man9ossddk/ossddk_adev_set_formats.9ossddk new file mode 100644 index 0000000..4e4cafa --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_set_formats.9ossddk @@ -0,0 +1,67 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_set_formats 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_set_formats \- report the supported sample formats +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_adev_set_formats(\fBint \fIdev\fP, \fBunsigned int \fIoformats\fP, \fBunsigned int \fIiformats\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS audio device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fIoformats\fR +.in +16n +.rt +Bit mask containing the formats the device supports in playback direction. +.in -16n +.sp +.ne 2 +.mk +\fB\fIiformats\fR +.in +16n +.rt +Bit mask containing the formats the device supports in recording direction. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +Applications using audio can ask what formats the device supports using various +ioctl calls. The driver must provide this information. Usually it sets the format mask +when installing the device using \fIossddk_install_audiodev(9ossddk)\fR. However it +may be necessary to change this information later if a change in device's mode of +operation also changes the formats it currently supports. Another situation when +this function should be called is when the device supports different formats +for recording and playback. +.PP +.SH "SEE ALSO" +.PP +\fISNDCTL_AUDIOINFO(2oss)\fR +.LP +\fISNDCTL_DSP_GETFMTS(2oss)\fR +.LP +\fISNDCTL_DSP_SETFMT(2oss)\fR +.LP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_set_label.9ossddk b/misc/man9ossddk/ossddk_adev_set_label.9ossddk new file mode 100644 index 0000000..a939ac9 --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_set_label.9ossddk @@ -0,0 +1,63 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_set_label 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_set_label \- Assign a label to an audio stream +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_adev_set_label(\fBint \fIdev\fP, \fBchar *\fIlabel\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fIlabel\fR +.in +16n +.rt +A pointer to a character string containing 0 to 15 characters. An empty string +means there is no label. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +Stream labels are short (up to 15 character) mnemonic names that the \fIsource\fR of the +stream can set. ossddk_adev_set_label assigns a label to an audio stream. The driver +can set the label to an recording stream when this information is available from the +device. For example a driver for a tape recorder or a digital audio link may obtain +the reel name from the device and pass it to the application recording from the +device. Setting the label of an output stream doesn't make any sense. +.PP +It's very important that drivers set the label only if that information is really +available from the device. It doesn't make any sense to assign any kind of dummy labels +such as "Unknown" or "default". +.PP +The driver must not expect that \fIossddk_adev_get_label\fR returns the same label +that the driver had previously set with \fIossddk_adev_set_label\fR. This is +certainly not the case. +.PP +.SH "SEE ALSO" +.PP +\fIossddk_adev_get_label(9ossddk)\fR +.LP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_set_magic.9ossddk b/misc/man9ossddk/ossddk_adev_set_magic.9ossddk new file mode 100644 index 0000000..cecd5c5 --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_set_magic.9ossddk @@ -0,0 +1,57 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_set_magic 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_set_magic \- Set the device magic number +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_adev_set_magic(\fBint \fIdev\fP, \fBint \fImagic\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS audio device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fImagic\fR +.in +16n +.rt +The magic number. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +Some devices may require use of dedicated configuration or setup tools. In such cases +the driver must provide some kind of magic number which the utilities can use +to find out the right device (using \fISNDCTL_AUDIOINFO(2oss)\fR). +.PP +If an magic number is needed for some device driver you must contact support@opensound.com to get a free number. Drivers developers must not use self geterated magic numbers +because they may conflict with other devices. +.PP +Using device specific utilities is not recommended but that method can be used if there +is no other choice. +.PP +.SH "SEE ALSO" +.PP +\fISNDCTL_AUDIOINFO(2oss)\fR +.LP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_set_mixer.9ossddk b/misc/man9ossddk/ossddk_adev_set_mixer.9ossddk new file mode 100644 index 0000000..44373e1 --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_set_mixer.9ossddk @@ -0,0 +1,54 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_set_mixer 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_set_mixer \- Set the mixer device related with an audio device +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_adev_set_mixer(\fBint \fIdev\fP, \fBint \fImixer_dev\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS ausio device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fImixer_dev\fR +.in +16n +.rt +Mixer device number of the mixer related with this audio device. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +Some audio applications want to perform certain mixer operations. Audio drivers can +use this functuon to assign the right mixer device to an audio device. +.PP +Older audio applications written for previous OSS versions still use the mixer interface +to do certain operations such as playback/recording volume control or recording +source selection. OSS 4.0 and later has some new aidio ioctl calls such as +SNDCTL_DSP_SETRECVOL and SNDCTL_DSP_GETRECVOL which do the same more reliably. +New audio drivers should implement these functions in their ioctl entry points. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_set_portc.9ossddk b/misc/man9ossddk/ossddk_adev_set_portc.9ossddk new file mode 100644 index 0000000..b7ae55c --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_set_portc.9ossddk @@ -0,0 +1 @@ +.so man9ossddk/ossddk_adev_get_portc.9ossddk diff --git a/misc/man9ossddk/ossddk_adev_set_portc_play.9ossddk b/misc/man9ossddk/ossddk_adev_set_portc_play.9ossddk new file mode 100644 index 0000000..b7ae55c --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_set_portc_play.9ossddk @@ -0,0 +1 @@ +.so man9ossddk/ossddk_adev_get_portc.9ossddk diff --git a/misc/man9ossddk/ossddk_adev_set_portc_record.9ossddk b/misc/man9ossddk/ossddk_adev_set_portc_record.9ossddk new file mode 100644 index 0000000..b7ae55c --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_set_portc_record.9ossddk @@ -0,0 +1 @@ +.so man9ossddk/ossddk_adev_get_portc.9ossddk diff --git a/misc/man9ossddk/ossddk_adev_set_portnum.9ossddk b/misc/man9ossddk/ossddk_adev_set_portnum.9ossddk new file mode 100644 index 0000000..33e5c68 --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_set_portnum.9ossddk @@ -0,0 +1,48 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_set_portnum 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_set_portnum \- Set the audio port number within a device +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_adev_set_portnum(\fBint \fIdev\fP, \fBint \fIportnum\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS audio device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fIportnum\fR +.in +16n +.rt +Audio port number (0 to N). +.in -16n +.PP +.SH "DESCRIPTION" +.PP +Some sound cards may have multiple audio devices. In such cases the driver should +call this function to set the port number. Port number 0 is the first port and so on. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_set_rates.9ossddk b/misc/man9ossddk/ossddk_adev_set_rates.9ossddk new file mode 100644 index 0000000..a24d8a1 --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_set_rates.9ossddk @@ -0,0 +1,87 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_set_rates 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_set_rates \- Set the supported sampling rates +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_adev_set_rates(\fBint \fIdev\fP, \fBint \fImin_rate\fP, \fBint \fImax_rate\fP, \fBint \fInrates\fP, \fBint \fIrates[20]\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS audio device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fImin_rate\fR +.in +16n +.rt +The minimum sampling rate supported by the device. +.in -16n +.sp +.ne 2 +.mk +\fB\fImax_rate\fR +.in +16n +.rt +The maximum sampling rate supported by the device. +.in -16n +.sp +.ne 2 +.mk +\fB\fInrates\fR +.in +16n +.rt +Number of discrete rates (0 to 20). +.in -16n +.sp +.ne 2 +.mk +\fB\fIrates[20]\fR +.in +16n +.rt +Pointer to an array containing up to 20 sampling rates (in ascending order). +.in -16n +.PP +.SH "DESCRIPTION" +.PP +This function sets meta information that applications may obtain using the +\fISNDCTL_AUDIOINFO(2oss)\fR ioctl call. There are three ways how this function can be +called. In both cases the min_rate and max_rate parameters must be set properly. +.PP +1) If the device supports any rates between the minimum and maximum the nrates parameter +must be set to 0. The rates parameter can be null. +.LP +2) If the device supports just few rates (up to 20) you should pass the number of +supported rates in \fInrates\fR and pointer to an array (of int) in the \fIrates\fR +parameter. Rates stoored in the array must be in increasing order. +.LP +3) If there are more than 20 possible rates you should set nrates=0 and rates=NULL. +.PP +The driver can change the supported rate information whenever necessary. For example if +a change in device's operating mode changes the supported rates too. +.PP +.SH "SEE ALSO" +.PP +\fISNDCTL_AUDIOINFO(2oss)\fR +.LP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_set_ratesource.9ossddk b/misc/man9ossddk/ossddk_adev_set_ratesource.9ossddk new file mode 100644 index 0000000..d12bb8b --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_set_ratesource.9ossddk @@ -0,0 +1,71 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_set_ratesource 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_set_ratesource \- Sets the rate source +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_adev_set_ratesource(\fBint \fIdev\fP, \fBint \fIrate_source\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS audio device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fIrate_source\fR +.in +16n +.rt +Audio device number of the rate source. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +In some cases the sampling rate of an audio device is locked with some other device. +This information may be usefull to some applications that support multiple +simultaneous devices. Knowing that the devices are rate locked together makes it +possible to bypass any synchronization mechanisms that are normally required. +.PP +The driver can set this parameter in the followinng cases: +.PP +1) The device is a virtual device that works on top of some other (real) device. +In that case the master device should be reported as the rate source. +.LP +2) If a sound card has multiple audio engines (recording or playback) then the +subsequent ones should report the first one as their rate source. However this should +only be done if all the engines use the same sample rate clock. +.LP +3) There may be multiple devices (cards) of the same type which are connected together +using some kind of sync cable. If the driver knows this it can use the first audio device +of the first card (or the mown master card) as the rate source for the other audio devices. +.PP +Sometimes several cards of different type may be syncronized together using +word clock or some other methods. In such cases the drivers should not try to +set the rate sources based on that. This situation will be handled by the upper +layers of OSS (in some future OSS versions). + +.PP +.SH "SEE ALSO" +.PP +\fISNDCTL_AUDIOINFO(2oss)\fR +.LP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_adev_set_songname.9ossddk b/misc/man9ossddk/ossddk_adev_set_songname.9ossddk new file mode 100644 index 0000000..842f4cb --- /dev/null +++ b/misc/man9ossddk/ossddk_adev_set_songname.9ossddk @@ -0,0 +1,60 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_adev_set_songname 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_adev_set_songname \- Assign song name to an audio stream +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_adev_set_songname(\fBint \fIdev\fP, \fBchar *\fIsong\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS audio device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fIsong\fR +.in +16n +.rt +Pointer to a string containing 0 to 63 characters. An empty string means that +there is no song name information available. The string should only contain printable +(8 bit ISO-8859-x) characters. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +Song name is free formatted string describing the content of the audio stream. Source +of the stream (for example the driver of an input device) can assign the name. The +application recording from the device can obtain the name using +\fISNDCTL_AUDIOINFO(2oss)\fR. For example a driver of an RDS radio receiver can +obtain the song name from the RDS information sent by the radio station. +.PP +The song name string can contain any other information about the stream if the song +name is not available. However the driver must not send this info unless it has some +information that is really important. In general the song name should NOT be something +generated automatically by the driver. +.PP +.SH "SEE ALSO" +.PP +\fIossddk_adev_get_songname(9ossddk)\fR +.LP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_audio_inputintr.9ossddk b/misc/man9ossddk/ossddk_audio_inputintr.9ossddk new file mode 100644 index 0000000..a91adc3 --- /dev/null +++ b/misc/man9ossddk/ossddk_audio_inputintr.9ossddk @@ -0,0 +1,48 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_audio_inputintr 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_audio_inputintr \- Recording interrupt callback +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_audio_inputintr(\fBint \fIdev\fP, \fBint \fIintr_flags\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS audio device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fIintr_flags\fR +.in +16n +.rt +Currently not used. Should always be set to 0. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +This function should be called by the interrupt handler of an audio driver on fragment +boundaries (for a recording device). The OSS audio core will the update it's internal +pointers and wake up the application if necessary. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_audio_outputintr.9ossddk b/misc/man9ossddk/ossddk_audio_outputintr.9ossddk new file mode 100644 index 0000000..ac892e1 --- /dev/null +++ b/misc/man9ossddk/ossddk_audio_outputintr.9ossddk @@ -0,0 +1,48 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_audio_outputintr 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_audio_outputintr \- Audio output interrupt callback +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_audio_outputintr(\fBint \fIdev\fP, \fBint \fIintr_flags\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS audio device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fIintr_flags\fR +.in +16n +.rt +Currently not used. Should always be set to 0. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +This function should be called by the interrupt handler of an audio driver on fragment +boundaries (for a playback device). The OSS audio core will the update it's internal +pointers and wake up the application if necessary. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_disable_device.9ossddk b/misc/man9ossddk/ossddk_disable_device.9ossddk new file mode 100644 index 0000000..ea2bde6 --- /dev/null +++ b/misc/man9ossddk/ossddk_disable_device.9ossddk @@ -0,0 +1,45 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_disable_device 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_disable_device \- Disables the device if possible prior unloading the driver +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBint\fR ossddk_disable_device(\fBoss_device_t *\fIosdev\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIosdev\fR +.in +16n +.rt +OSS device handle. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +Drivers should call \fIossddk_disable_device\fR function in the beginning of their +detach routine. This function checks if the driver can be safely unloaded and prevents +OSS from accessing the driver any more. +.PP +.SH "RETURN VALUES" +This function returns a negative value (-errno) if the device cannot be disabled at +this moment. In this case the driver should refuse to detach. Value of 0 means that +the device was successfully disabled and the driver can proceed the detach operation. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_dmap_get_buffsize.9ossddk b/misc/man9ossddk/ossddk_dmap_get_buffsize.9ossddk new file mode 100644 index 0000000..e943985 --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_get_buffsize.9ossddk @@ -0,0 +1,61 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_dmap_set_buffsize 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_dmap_get_buffsize, ossddk_dmap_set_buffsize \- Get/set the DMA buffer size +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBint\fR ossddk_dmap_get_buffsize(\fBdmap_t *\fIdmap\fP); +\fBvoid\fR ossddk_dmap_set_buffsize(\fBdmap_t *\fIdmap\fP, \fBint \fIsize\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdmap\fR +.in +16n +.rt +Audio buffer handle. +.in -16n +.sp +.ne 2 +.mk +\fB\fIsize\fR +.in +16n +.rt +Buffer size in bytes. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +If the deriver allocates the DMA buffer itself it can set the buffer size +by calling \fIossddk_dmap_set_buffsize\fR. However if the buffer is allocated +by OSS (the driver has no alloc_buffer/free_buffer entry points) the size +will be set automatically by OSS. +.PP +The \fIossddk_dmap_get_buffsize\fR function can be used to get the size of +the allocated DMA buffer. However drivers rarely have any use of this, Instead +they should use \fIossddk_dmap_get_buffused\fR which returns the number of bytes +of the buffer that are actually in use. +.PP +.SH "RETURN VALUES" +The \fIossddk_dmap_get_buffsize\fR function returns the size of the audio +buffer (in bytes). Value of 0 will be returned if no buffer is allocated for +this dmap. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_dmap_get_buffused.9ossddk b/misc/man9ossddk/ossddk_dmap_get_buffused.9ossddk new file mode 100644 index 0000000..d33001c --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_get_buffused.9ossddk @@ -0,0 +1,46 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_dmap_get_buffused 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_dmap_get_buffused \- Returns the size of buffer that is actually in use +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBint\fR ossddk_dmap_get_buffused(\fBdmap_t *\fIdmap\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdmap\fR +.in +16n +.rt +Audio buffer handle. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +OSS audio devices have a DMA buffer with the maximum size returned by +\fIossddk_dmap_get_buffsize\fR. However in most cases just part of the available +buffer is actually in use. The driver can call \fIossddk_dmap_get_buffused\fR +to find out the transfer count to be programmed in the device registers. +.PP +.SH "RETURN VALUES" +Amount of buffer currently in use (in bytes). This value equals to +fragment_size*num_fragments. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_dmap_get_dmabuf.9ossddk b/misc/man9ossddk/ossddk_dmap_get_dmabuf.9ossddk new file mode 100644 index 0000000..bb0ac54 --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_get_dmabuf.9ossddk @@ -0,0 +1,46 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_dmap_get_dmabuf 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_dmap_get_dmabuf \- Get (kernel) address of the DMA buffer +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBunsigned char*\fR ossddk_dmap_get_dmabuf(\fBdmap_t *\fIdmap\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdmap\fR +.in +16n +.rt +Audio buffer handle. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +This function returns the kernel virtual address of the DMA buffer allocated +for this dmap, However in most drivers this value has no use. Instead they +should use \fIossddk_dmap_set_phys(9ossddk)\fR to get the memory/bus address +of the buffer. +.PP +.SH "RETURN VALUES" +Kernel virtual address of the DMA buffer (first byte) or NULL if no buffer +is currently allocated. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_dmap_get_fragsize.9ossddk b/misc/man9ossddk/ossddk_dmap_get_fragsize.9ossddk new file mode 100644 index 0000000..1096b9d --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_get_fragsize.9ossddk @@ -0,0 +1,77 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_dmap_get_fragsize 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_dmap_get_fragsize, ossddk_dmap_set_fragsize, ossddk_dmap_get_numfrags, ossddk_dmap_set_numfrags \- Set/get DMA buffer partitioning parameters +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBint\fR ossddk_dmap_get_fragsize(\fBdmap_t *\fIdmap\fP); +\fBint\fR ossddk_dmap_get_numfrags(\fBdmap_t *\fIdmap\fP); +\fBvoid\fR ossddk_dmap_set_fragsize(\fBdmap_t *\fIdmap\fP, \fBint \fIsize\fP); +\fBvoid\fR ossddk_dmap_set_numfrags(\fBdmap_t *\fIdmap\fP, \fBint \fInfrags\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdmap\fR +.in +16n +.rt +Audio buffer handle. +.in -16n +.sp +.ne 2 +.mk +\fB\fInfrags\fR +.in +16n +.rt +Number of fragments. +.in -16n +.sp +.ne 2 +.mk +\fB\fIsize\fR +.in +16n +.rt +Fragment size in bytes. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +The DMA buffer maintained by OSS audio core is divided to number of fragments +with equal size. The driver should program the device to raice an interrupt +on every fragment boundary. The driver can get the fragment size (in bytes) by +calling \fIossddk_dmap_get_fragsize\fR. If the number of fragments is needed it +can be obtained with \fIossddk_dmap_get_numfrags\fR. +.PP +It is also possible to set these parameters but it should be avoided if +possible. Changing these parameters may cause unpredictable problems and is +bot supported by 4Front Technologies. If the driver changes these parameters it must ensure that fragment_size*num_fragments doesn't (even temporarily) become +larger than the total size of the allocated buffer. Otherwise the result will be +something else than what was intended by the driver. These parameters can only +be changed in the prepare_for_input and prepare_for_output methods of the +driver. As a side effect the value returned by \fIossddk_dmap_get_buffused(9ossddk)\fR will also get changed automatically. An undesired side effect is that +the fragment size possibly reported to the application will no longer be valid +which probably breaks some incorrectly designed applications. +.PP +.SH "RETURN VALUES" +\fIossddk_dmap_get_fragsize\fR returns the current fragment size in bytes. +.LP +\fIossddk_dmap_get_numfrags\fR returns the number of fragments currently in use. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_dmap_get_numfrags.9ossddk b/misc/man9ossddk/ossddk_dmap_get_numfrags.9ossddk new file mode 100644 index 0000000..ba2979a --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_get_numfrags.9ossddk @@ -0,0 +1 @@ +.so man9ossddk/ossddk_dmap_get_fragsize.9ossddk diff --git a/misc/man9ossddk/ossddk_dmap_get_phys.9ossddk b/misc/man9ossddk/ossddk_dmap_get_phys.9ossddk new file mode 100644 index 0000000..3862d28 --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_get_phys.9ossddk @@ -0,0 +1 @@ +.so man9ossddk/ossddk_dmap_set_phys.9ossddk diff --git a/misc/man9ossddk/ossddk_dmap_get_private.9ossddk b/misc/man9ossddk/ossddk_dmap_get_private.9ossddk new file mode 100644 index 0000000..2be70fc --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_get_private.9ossddk @@ -0,0 +1 @@ +.so man9ossddk/ossddk_dmap_set_private.9ossddk diff --git a/misc/man9ossddk/ossddk_dmap_get_qhead.9ossddk b/misc/man9ossddk/ossddk_dmap_get_qhead.9ossddk new file mode 100644 index 0000000..93a8271 --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_get_qhead.9ossddk @@ -0,0 +1,50 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_dmap_get_qhead 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_dmap_get_qhead, ossddk_dmap_get_qtail \- Return the DMA buffer head/tail fragment numbers. +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBint\fR ossddk_dmap_get_qhead(\fBdmap_t *\fIdmap\fP); +\fBint\fR ossddk_dmap_get_qtail(\fBdmap_t *\fIdmap\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdmap\fR +.in +16n +.rt +Audio buffer handle. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +Some drivers need to know which fragment it should copy to/from the device. +The \fIossddk_dmap_get_qhead\fR function can be used to get the current +fragment number during playback. The \fIossddk_dmap_get_qtail\fR function +returns the current fragment the device is expected to fill in next during +recording. The fragment number will be in range 0 to num_fragments-1. +.PP +Pointer to the current fragment can be computed using formula +\fptr =d mabuf_address + Ifragment_number*fragment_size\fR. +.PP +.SH "RETURN VALUES" +These functions return the current fragment number. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_dmap_get_qtail.9ossddk b/misc/man9ossddk/ossddk_dmap_get_qtail.9ossddk new file mode 100644 index 0000000..8934eb3 --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_get_qtail.9ossddk @@ -0,0 +1 @@ +.so man9ossddk/ossddk_dmap_get_qhead.9ossddk diff --git a/misc/man9ossddk/ossddk_dmap_set_buffsize.9ossddk b/misc/man9ossddk/ossddk_dmap_set_buffsize.9ossddk new file mode 100644 index 0000000..8e684dc --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_set_buffsize.9ossddk @@ -0,0 +1 @@ +.so ossddk_dmap_get_buffsize.9ossddk diff --git a/misc/man9ossddk/ossddk_dmap_set_callback.9ossddk b/misc/man9ossddk/ossddk_dmap_set_callback.9ossddk new file mode 100644 index 0000000..729d7f7 --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_set_callback.9ossddk @@ -0,0 +1,56 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_dmap_set_callback 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_dmap_set_callback \- Reserved for future use +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_dmap_set_callback(\fBdmap_t *\fIdmap\fP, \fBoss_audio_callback_t \fIcb\fP, \fBint \fIarg\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdmap\fR +.in +16n +.rt +Audio buffer handle. +.in -16n +.sp +.ne 2 +.mk +\fB\fIcb\fR +.in +16n +.rt +TODO cb +.in -16n +.sp +.ne 2 +.mk +\fB\fIarg\fR +.in +16n +.rt +TODO arg +.in -16n +.PP +.SH "DESCRIPTION" +.PP +This function is reserved for future use. Normal OSS DDK drivers should not use +it. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_dmap_set_dmabuf.9ossddk b/misc/man9ossddk/ossddk_dmap_set_dmabuf.9ossddk new file mode 100644 index 0000000..94c0259 --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_set_dmabuf.9ossddk @@ -0,0 +1,56 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_dmap_set_dmabuf 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_dmap_set_dmabuf \- Set the DMA buffer virtual address +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_dmap_set_dmabuf(\fBdmap_t *\fIdmap\fP, \fBunsigned char *\fIbuf\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdmap\fR +.in +16n +.rt +Audio buffer handle. +.in -16n +.sp +.ne 2 +.mk +\fB\fIbuf\fR +.in +16n +.rt +Kernel virtual address of the DMA buffer. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +If an audio driver manages the DMA buffer itself (it has the alloc_buffer and +free_buffer methods in it's callback table) it can set the DMA buffer address +using \fIossddk_dmap_set_dmabuf\fR. The buffer size can be set using +\fIossddk_dmap_set_buffsize(9ossddk)\fR. +.PP +In addition to the virtual address the driver should usually set the physical +memory/bus address too using \fIossddk_dmap_set_phys(9ossddk)\fR. +.PP +.SH "SEE ALSO" +.PP +\fIossddk_dmap_set_phys(9ossddk)\fR. +\fIossddk_dmap_set_buffsize(9ossddk)\fR. +.LP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_dmap_set_fragsize.9ossddk b/misc/man9ossddk/ossddk_dmap_set_fragsize.9ossddk new file mode 100644 index 0000000..ba2979a --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_set_fragsize.9ossddk @@ -0,0 +1 @@ +.so man9ossddk/ossddk_dmap_get_fragsize.9ossddk diff --git a/misc/man9ossddk/ossddk_dmap_set_numfrags.9ossddk b/misc/man9ossddk/ossddk_dmap_set_numfrags.9ossddk new file mode 100644 index 0000000..ba2979a --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_set_numfrags.9ossddk @@ -0,0 +1 @@ +.so man9ossddk/ossddk_dmap_get_fragsize.9ossddk diff --git a/misc/man9ossddk/ossddk_dmap_set_phys.9ossddk b/misc/man9ossddk/ossddk_dmap_set_phys.9ossddk new file mode 100644 index 0000000..10ed701 --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_set_phys.9ossddk @@ -0,0 +1,61 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_dmap_set_phys 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_dmap_set_phys, ossddk_dmap_get_phys \- Set/get the physical address of the DMA buffer. +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_dmap_set_phys(\fBdmap_t *\fIdmap\fP, \fBunsigned long \fIaddr\fP); +\fBunsigned long\fR ossddk_dmap_get_phys(\fBdmap_t *\fIdmap\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdmap\fR +.in +16n +.rt +Audio buffer handle. +.in -16n +.sp +.ne 2 +.mk +\fB\fIaddr\fR +.in +16n +.rt +The physical memory/bus address of the DMA buffer (byte 0). +.in -16n +.PP +.SH "DESCRIPTION" +.PP +The buffer physical address is the +address to be written to device's DMA pointer register. While the driver can +manage this information locally it's possible that OSS core needs it also +for some purposes (such as mmaping the buffer to user's address space under +some operating systems). +.PP +The driver doesn't need to set this physical address if the buffer is +not mapped to the physical memory/bus address space. +.PP +.SH "RETURN VALUES" +\fIossddk_dmap_get_phys\fR returns the physical address as set by the driver +or 0 if no physical address is set. +.PP +.SH "SEE ALSO" +.PP +\fIossddk_dmap_set_dmabuf(9ossddk)\fR. +.LP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_dmap_set_playerror.9ossddk b/misc/man9ossddk/ossddk_dmap_set_playerror.9ossddk new file mode 100644 index 0000000..e6cd185 --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_set_playerror.9ossddk @@ -0,0 +1,54 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_dmap_set_playerror 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_dmap_set_playerror \- TODO +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_dmap_set_playerror(\fBdmap_t *\fIdmap\fP, \fBint \fIerr\fP, \fBint \fIparm\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdmap\fR +.in +16n +.rt +Audio buffer handle. +.in -16n +.sp +.ne 2 +.mk +\fB\fIerr\fR +.in +16n +.rt +TODO err +.in -16n +.sp +.ne 2 +.mk +\fB\fIparm\fR +.in +16n +.rt +TODO parm +.in -16n +.PP +.SH "DESCRIPTION" +.PP +TODO +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_dmap_set_private.9ossddk b/misc/man9ossddk/ossddk_dmap_set_private.9ossddk new file mode 100644 index 0000000..3e62cb1 --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_set_private.9ossddk @@ -0,0 +1,53 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_dmap_set_private 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_dmap_set_private, ossddk_dmap_get_private, ossddk_dmap_set_playerror, ossddk_dmap_set_recerror, ossddk_dmap_set_callback \- Misc helper functions +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_dmap_set_private(\fBdmap_t *\fIdmap\fP, \fBvoid *\fIptr\fP); +\fBvoid*\fR ossddk_dmap_get_private(\fBdmap_t *\fIdmap\fP); +\fBvoid\fR ossddk_dmap_set_playerror(\fBdmap_t *\fIdmap\fP, \fBint \fIerr\fP, \fBint \fIparm\fP); +\fBvoid\fR ossddk_dmap_set_recerror(\fBdmap_t *\fIdmap\fP, \fBint \fIerr\fP, \fBint \fIparm\fP); +\fBvoid\fR ossddk_dmap_set_callback(\fBdmap_t *\fIdmap\fP, \fBoss_audio_callback_t \fIcb\fP, \fBint \fIarg\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdmap\fR +.in +16n +.rt +Audio buffer handle. +.in -16n +.sp +.ne 2 +.mk +\fB\fIptr\fR +.in +16n +.rt +TODO ptr +.in -16n +.PP +.SH "DESCRIPTION" +.PP +These functions are included in the current OSS DDK version just for +future compatibility. They don't exist in current versions and must not +be used by drivers written for this version of OSS DDK. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +.LP +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_dmap_set_recerror.9ossddk b/misc/man9ossddk/ossddk_dmap_set_recerror.9ossddk new file mode 100644 index 0000000..2be70fc --- /dev/null +++ b/misc/man9ossddk/ossddk_dmap_set_recerror.9ossddk @@ -0,0 +1 @@ +.so man9ossddk/ossddk_dmap_set_private.9ossddk diff --git a/misc/man9ossddk/ossddk_install_audiodev.9ossddk b/misc/man9ossddk/ossddk_install_audiodev.9ossddk new file mode 100644 index 0000000..f5c3c79 --- /dev/null +++ b/misc/man9ossddk/ossddk_install_audiodev.9ossddk @@ -0,0 +1,242 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_install_audiodev 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_install_audiodev \- Install an audio device +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBint\fR ossddk_install_audiodev(\fBint \fIvers\fP, \fBoss_device_t * \fIosdev\fP, \fBoss_device_t * \fImaster_osdev\fP, \fBchar *\fIname\fP, \fBconst audiodrv_t *\fIdriver\fP, \fBint \fIdriver_size\fP, \fBint \fIflags\fP, \fBunsigned int \fIformat_mask\fP, \fBvoid *\fIdevc\fP, \fBint \fIparent\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIvers\fR +.in +16n +.rt +Audio driver interface version. Must be set to OSS_AUDIO_DRIVER_VERSION. +.in -16n +.sp +.ne 2 +.mk +\fB\fIosdev\fR +.in +16n +.rt +OSS device handle. Returned by ossddk_register_device. +.in -16n +.sp +.ne 2 +.mk +\fB\fImaster_osdev\fR +.in +16n +.rt +OSS device handle for the master device. Usually same as \fIosdev\fR but +virtual drivers have to give the osdev handle of the master/physical device here. +OSS uses this parameter for example to get the right iblock_cookie. +.in -16n +.sp +.ne 2 +.mk +\fB\fIname\fR +.in +16n +.rt +Name of the device. This name will be reported in /dev/sndstat as well as to +the applications using SNDCTL_AUDIOINFO(2oss) ioctl (such as ossinfo). +.in -16n +.sp +.ne 2 +.mk +\fB\fIdriver\fR +.in +16n +.rt +Pointer to the audio_driver structure that defines the entry points for +this low level audio driver. +.in -16n +.sp +.ne 2 +.mk +\fB\fIdriver_size\fR +.in +16n +.rt +Size of the driver structure. Pass sizeof(audiodrv_t) in this parameter. +.in -16n +.sp +.ne 2 +.mk +\fB\fIflags\fR +.in +16n +.rt +Audio device flags (see the description below). +.in -16n +.sp +.ne 2 +.mk +\fB\fIformat_mask\fR +.in +16n +.rt +Bit mask describing the sample formats supported by the device. See the \fISupported Audio Formats\fR section of OSS v4.0 API reference for more info. For example +\fBAFMT_S16_LE|AFMT_U8\fR tells that the driver supports the industry standard 8 and 16 +bit audio formats. +.PP +If the device supports different formats for recording and playback the driver should use the \fIossddk_adev_set_formats(9ossddk)\fR routine to set the masks. +.in -16n +.sp +.ne 2 +.mk +\fB\fIdevc\fR +.in +16n +.rt +Pointer to driver defined device instance data. +.in -16n +.sp +.ne 2 +.mk +\fB\fIparent\fR +.in +16n +.rt +Reserved for future use. Set to -1. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +\fIossddk_install_audiodev\fR creates an audio device file (/dev/dsp0 to /dev/dspN) and installs its driver callbacks. By default the device will be input/output capable. + +Behaviour of the driver can be modified using the \fIflags\fR parameter in the following way: +.PP +.sp +.ne 2 +.mk +\fBADEV_DUPLEX\fR +.in +30n +.rt +Give this flag if this device supports full duplex (simultaneous recording and playback). +.in -30n +.sp +.ne 2 +.mk +\fBADEV_NOINPUT\fR +.in +30n +.rt +Set this flag if the device doesn't do recording (ie it's playback only). +.in -30n +.sp +.ne 2 +.mk +\fBADEV_NOOUTPUT\fR +.in +30n +.rt +Set this flag if the device doesn't do playback (ie it's recording only). +.in -30n +.sp +All new OSS drivers should create separate device files for input and output. Earlier OSS versions created just a single input/output device file with \fBADEV_DUPLEX\fR flag. +However this approach doesn't work with all device so it should not be used any more. +.sp +.ne 2 +.mk +\fBADEV_VIRTUAL\fR +.in +30n +.rt +This flag tells that this device is virtual which means that it doesn't drive any +real hardware device. Instead it performs some software-only processing or works on +top of some other device. This flag is used to prevent chaining multiple virtual +drivers. Also some applications using SNDCTL_AUDIOINFO(2oss) may use this flag +for some purposes. +.in -30n +.sp +.ne 2 +.mk +\fBADEV_NOCONVERT\fR +.in +30n +.rt +This flag prevents the audio core from doing any automatic sample rate or format +conversions with this device. This flag should be set only if there is some strong +reason to prevent the conversions. +.in -30n +.sp +.ne 2 +.mk +\fBADEV_HIDDEN\fR +.in +30n +.rt +This flag means that the device serves some very special purpose and it should +be hidden from ordinary audio applications. It will not be visible in +device selection lists shown by applications. Instead the user/administrator +should know the device file to use. +.in -30n +.sp +.ne 2 +.mk +\fBADEV_SHADOW\fR +.in +30n +.rt +Some devices have multiple audio playback engines that are functionally identical +(in theory this kind of input devices are possible too but). An OSS audio driver +is supposed to create one audio device file for each of the available engines. All but +the first one should have this flag set. +.in -30n +.sp +.ne 2 +.mk +\fBADEV_NOSRC\fR +.in +30n +.rt +This flag disables automatic sample rate conversions performed by the audio core of OSS. +It's similar than the \fBADEV_NOCONVERT\fR flag but doesn't disable other kind of +format conversions. Usually used with rofessional audio devices (digital ones in +particular) to prevent lossy sample rate conversions. + +.in -30n +.sp +.ne 2 +.mk +\fBADEV_SPECIAL\fR +.in +30n +.rt +Use this flag with devices that should not be used to play system sounds (warning beeps, +etc). For example multi channel only or digital (AES/EBU or S/PDIF) devices should +specify this flag. +.in -30n +.sp +.ne 2 +.mk +\fBADEV_NOMMAP\fR +.in +30n +.rt +Use this flag if the device doesn't support mmap (direct access to the DMA buffer) for +some reason. +.in -30n +.sp +.ne 2 +.mk +\fBADEV_DISABLE_VIRTUAL\fR +.in +30n +.rt +Use this flag if the device is not suitable to be used as a master device of some +virtual driver. This flag should be set for example when the interrupt routine of +this device uses large amounts of stack (which may cause a stack overflow when +the virtual driver gets invoked). +.in -30n +.sp +.ne 2 +.mk +.PP +.SH "RETURN VALUES" +.PP +Negative value is an error code (-errno). Zero or positive is the audio device +number created. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_install_mixer.9ossddk b/misc/man9ossddk/ossddk_install_mixer.9ossddk new file mode 100644 index 0000000..c6509d0 --- /dev/null +++ b/misc/man9ossddk/ossddk_install_mixer.9ossddk @@ -0,0 +1,95 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_install_mixer 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_install_mixer \- Creates an mixer device. +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBint\fR ossddk_install_mixer(\fBint \fIvers\fP, \fBoss_device_t * \fIosdev\fP, \fBoss_device_t * \fImaster_osdev\fP, \fBconst char *\fIname\fP, \fBmixer_driver_t *\fIdriver\fP, \fBint \fIdriver_size\fP, \fBvoid *\fIdevc\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIvers\fR +.in +16n +.rt +The OSSDDK mixer interface version. Pass OSS_MIXER_DRIVER_VERSION in this parameter. +.in -16n +.sp +.ne 2 +.mk +\fB\fIosdev\fR +.in +16n +.rt +OSS device handle from ossddk_register_device(9ossddk). +.in -16n +.sp +.ne 2 +.mk +\fB\fImaster_osdev\fR +.in +16n +.rt +OSS device handle for the master device. Usually same as \fIosdev\fR but +virtual drivers have to give the osdev handle of the master/physical device here. +OSS uses this parameter for example to get the right iblock_cookie. +.in -16n +.sp +.ne 2 +.mk +\fB\fIname\fR +.in +16n +.rt +Name of the mixer device to be shown in /dev/sndstat. Also returned by the +SNDCTL_MIXERINFO(2oss) ioctl call. +.in -16n +.sp +.ne 2 +.mk +\fB\fIdriver\fR +.in +16n +.rt +Pointer to the mixer driver callback table (mixer_driver_t). +.in -16n +.sp +.ne 2 +.mk +\fB\fIdriver_size\fR +.in +16n +.rt +Set to sizeof(mixer_driver_t). +.in -16n +.sp +.ne 2 +.mk +\fB\fIdevc\fR +.in +16n +.rt +Pointer to driver defined device instance data. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +This call creates a mixer device file (/dev/mixer#) and returns the mixer +device number. +.PP +.SH "RETURN VALUES" +.PP +Negative value is an error code (-errno). Zero or positive is the mixer device +number created. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_mixer_create_control.9ossddk b/misc/man9ossddk/ossddk_mixer_create_control.9ossddk new file mode 100644 index 0000000..f7113b9 --- /dev/null +++ b/misc/man9ossddk/ossddk_mixer_create_control.9ossddk @@ -0,0 +1,94 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_mixer_create_control 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_mixer_create_control \- TODO +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBint\fR ossddk_mixer_create_control(\fBint \fIdev\fP, \fBint \fIparent\fP, \fBint \fIctrl\fP, \fBmixer_ext_fn \fIfunc\fP, \fBint \fItype\fP, \fBconst char *\fIid\fP, \fBint \fImaxvalue\fP, \fBint \fIflags\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fIparent\fR +.in +16n +.rt +TODO parent +.in -16n +.sp +.ne 2 +.mk +\fB\fIctrl\fR +.in +16n +.rt +TODO ctrl +.in -16n +.sp +.ne 2 +.mk +\fB\fIfunc\fR +.in +16n +.rt +TODO func +.in -16n +.sp +.ne 2 +.mk +\fB\fItype\fR +.in +16n +.rt +TODO type +.in -16n +.sp +.ne 2 +.mk +\fB\fIid\fR +.in +16n +.rt +TODO id +.in -16n +.sp +.ne 2 +.mk +\fB\fImaxvalue\fR +.in +16n +.rt +TODO maxvalue +.in -16n +.sp +.ne 2 +.mk +\fB\fIflags\fR +.in +16n +.rt +TODO flags +.in -16n +.PP +.SH "DESCRIPTION" +.PP +TODO +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_mixer_create_group.9ossddk b/misc/man9ossddk/ossddk_mixer_create_group.9ossddk new file mode 100644 index 0000000..69e5a32 --- /dev/null +++ b/misc/man9ossddk/ossddk_mixer_create_group.9ossddk @@ -0,0 +1,56 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_mixer_create_group 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_mixer_create_group \- Create a new mixer group (window frame). +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBint\fR ossddk_mixer_create_group(\fBint \fIdev\fP, \fBint \fIparent\fP, \fBconst char *\fIid\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS mixer device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fIparent\fR +.in +16n +.rt +Control number of the parent group. 0 means the device root group. +.in -16n +.sp +.ne 2 +.mk +\fB\fIid\fR +.in +16n +.rt +Short name for the group (at most 15 characters). +.in -16n +.PP +.SH "DESCRIPTION" +.PP +This function creates a new mixer group under the given parent group. +See the mixer extension programming section of OSS 4.0 API Specification +for more info about mixer groups. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_mixer_get_devc.9ossddk b/misc/man9ossddk/ossddk_mixer_get_devc.9ossddk new file mode 100644 index 0000000..483b186 --- /dev/null +++ b/misc/man9ossddk/ossddk_mixer_get_devc.9ossddk @@ -0,0 +1,48 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_mixer_get_devc 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_mixer_get_devc \- Get the devc pointer assigned to a mixer device. +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid*\fR ossddk_mixer_get_devc(\fBint \fIdev\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS device number. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +Mixer drivers can give a pointer to their private devc structure when installing +the themselves. This function makes it possible to obtain this pointer when +necessary. +.PP +CAUTION! Extreme care must be taken in drivers that drive both mixer and audio +device files. Both types of devices have different functions for getting +the devc pointer. Drivers must use ossddk_adev_get_devc with audio device +numbers and ossddk_mixer_get_devc with mixer device numbers. +.PP +.SH "RETURN VALUES" +This function returns a poiner to the devc structure created by this driver. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_mixer_set_strings.9ossddk b/misc/man9ossddk/ossddk_mixer_set_strings.9ossddk new file mode 100644 index 0000000..39c9a98 --- /dev/null +++ b/misc/man9ossddk/ossddk_mixer_set_strings.9ossddk @@ -0,0 +1,62 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_mixer_set_strings 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_mixer_set_strings \- TODO +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBint\fR ossddk_mixer_set_strings(\fBint \fIdev\fP, \fBint \fIctl\fP, \fBconst char *\fIs\fP, \fBint \fIversion\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fIctl\fR +.in +16n +.rt +TODO ctl +.in -16n +.sp +.ne 2 +.mk +\fB\fIs\fR +.in +16n +.rt +TODO s +.in -16n +.sp +.ne 2 +.mk +\fB\fIversion\fR +.in +16n +.rt +TODO version +.in -16n +.PP +.SH "DESCRIPTION" +.PP +TODO +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_mixer_touch.9ossddk b/misc/man9ossddk/ossddk_mixer_touch.9ossddk new file mode 100644 index 0000000..c3b5529 --- /dev/null +++ b/misc/man9ossddk/ossddk_mixer_touch.9ossddk @@ -0,0 +1,38 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_mixer_touch 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_mixer_touch \- TODO +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_mixer_touch(\fBint \fIdev\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS device number. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +TODO +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_mixer_truncate.9ossddk b/misc/man9ossddk/ossddk_mixer_truncate.9ossddk new file mode 100644 index 0000000..03bbeef --- /dev/null +++ b/misc/man9ossddk/ossddk_mixer_truncate.9ossddk @@ -0,0 +1,46 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_mixer_truncate 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_mixer_truncate \- TODO +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBint\fR ossddk_mixer_truncate(\fBint \fIdev\fP, \fBint \fIindex\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIdev\fR +.in +16n +.rt +OSS device number. +.in -16n +.sp +.ne 2 +.mk +\fB\fIindex\fR +.in +16n +.rt +TODO index +.in -16n +.PP +.SH "DESCRIPTION" +.PP +TODO +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_osdev_get_devc.9ossddk b/misc/man9ossddk/ossddk_osdev_get_devc.9ossddk new file mode 100644 index 0000000..5e8ccb4 --- /dev/null +++ b/misc/man9ossddk/ossddk_osdev_get_devc.9ossddk @@ -0,0 +1,42 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_osdev_get_devc 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_osdev_get_devc \- Get the devc pointer registered for the osdev handle. +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid*\fR ossddk_osdev_get_devc(\fBoss_device_t *\fIosdev\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIosdev\fR +.in +16n +.rt +OSS device handle. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +Driver can use this function to get the devc structure it used when calling +ossddk_register_device(9ossddk). +.PP +.SH "RETURN VALUES" +This function always returns the devc pointer. There are no error codes. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_register_device.9ossddk b/misc/man9ossddk/ossddk_register_device.9ossddk new file mode 100644 index 0000000..5d891f9 --- /dev/null +++ b/misc/man9ossddk/ossddk_register_device.9ossddk @@ -0,0 +1,104 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_register_device 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_register_device \- Registers a driver with OSS +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\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); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIddkvers\fR +.in +16n +.rt +OSS DDK version. Set to OSSDDK_VERSION. Registering the driver will fail if the +version numbers are incompatible. +.in -16n +.sp +.ne 2 +.mk +\fB\fIdip\fR +.in +16n +.rt +This is the \fIdip\fR parameter given by Solaris as the argument of driver's +attach routine. +.in -16n +.sp +.ne 2 +.mk +\fB\fIdrvtype\fR +.in +16n +.rt +Bus type of the device. OSS DDK needs this parameter for some internal purposes. +Possible values are: DRV_PCI, DRV_USB and DRV_VIRTUAL. Some other values may be defined +in ossddk.h but they are not supported by the current version of OSS DDK. +.in -16n +.sp +.ne 2 +.mk +\fB\fIinstance\fR +.in +16n +.rt +This is the instance number of this driver (see ddi_get_instance(9F)). +.in -16n +.sp +.ne 2 +.mk +\fB\fInick\fR +.in +16n +.rt +Nick is a short name of the driver. Usually same as the name of the driver module. +.in -16n +.sp +.ne 2 +.mk +\fB\fIiblock_cookie\fR +.in +16n +.rt +The iblock cookie for the device. Should be set to NULL if the driver is a pseudo +one or if there is no iblock cookie for some other reason. +.in -16n +.sp +.ne 2 +.mk +\fB\fIdevc\fR +.in +16n +.rt +Pointer to driver defined device instance data. The driver can use this memory area +to store whatever information it wants. +.sp +.ne 2 +.mk +\fB\fIlongname\fR +.in +16n +.rt +Full name of the device. For example manufacturer and model. Keep as short as possible +since too long names will be truncated. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +This routine registers the device with OSS and returns the \fIosdev\fR handle. The call +must be made omce in driver's attach routine before any other OSS DDK calls are made. +.PP +.SH "RETURN VALUES" +This routine returns the osdev handle or NULL if the call failed. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR diff --git a/misc/man9ossddk/ossddk_unregister_device.9ossddk b/misc/man9ossddk/ossddk_unregister_device.9ossddk new file mode 100644 index 0000000..aeb54e1 --- /dev/null +++ b/misc/man9ossddk/ossddk_unregister_device.9ossddk @@ -0,0 +1,40 @@ +'\" te +.\" Copyright (c) 2005, 4Front Technologies 2005\&. +.TH ossddk_unregister_device 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" +.SH "NAME" +ossddk_unregister_device \- Disconnects the driver from OSS DDK +.PP +.SH "SYNOPSIS" +.nf +#include <sys/soundcard.h> +.LP +#include <sys/ossddk/ossddk.h> +.fi +.LP +\fBvoid\fR ossddk_unregister_device(\fBoss_device_t *\fIosdev\fP); +.PP +.SH "INTERFACE LEVEL" +.PP +Open Sound System specific (OSS 4.0 DDK)\&. +.PP +.SH "ARGUMENTS" +.PP +.sp +.ne 2 +.mk +\fB\fIosdev\fR +.in +16n +.rt +OSS device handle. +.in -16n +.PP +.SH "DESCRIPTION" +.PP +This routine disconnects the driver from OSS DDK and disables all the services +(device files) created by the driver. This call must be made once in driver's detach +routine. No subsequent OSS DDK calls can be made after this moment. +.PP +.SH "SEE ALSO" +.PP +\fIWriting Sound Device Drivers with OSS DDK\fR +\fIOpen Sound System Programmer's Guide\fR |