Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| ryanbeasley:ioctlref [2006/08/13 21:05] – RyanBeasley | ryanbeasley:ioctlref [2008/06/17 21:37] (current) – converted to 1.6 markup 127.0.0.1 | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ====== ioctls listed in current OSS v4.0 documentation ====== | ====== ioctls listed in current OSS v4.0 documentation ====== | ||
| - | * [#todo Still missing] | + | * [[#todo|Still missing]] |
| - | * [#hmpf Still missing, and not fully documented] | + | * [[#hmpf|Still missing, and not fully documented]] |
| - | * [#stub2 Null stub (commented, but just returns EINVAL)] | + | * [[#stub2|Null stub (commented, but just returns EINVAL)]] |
| - | * [#stub Stubbed (preliminary | + | * [[#prelim|Preliminary |
| - | * [#complete Already supported] | + | * [[#complete|Already supported]] |
| - | * [#obsolete Missing, but obsolete] | + | * [[#obsolete|Missing, but obsolete]] |
| - | | | + | | |
| | ioctl | compatibility | summary | notes | argument | | | ioctl | compatibility | summary | notes | argument | | ||
| - | | [[/ | + | | SNDCTL_DSP_COOKEDMODE | ossv4 | {Dis, |
| - | | SNDCTL_MIXERINFO | ossv4 | Returns information about a mixer device | Ioctl call supported by all OSS devices. (See SNDCTL_AUDIOINFO.) | oss_mixerinfo | + | |
| - | | | + | | |
| | ioctl | compatibility | summary | notes | argument | | | ioctl | compatibility | summary | notes | argument | | ||
| | SNDCTL_MIDIINFO | ossv4 | Returns information about a MIDI device | No sample available. | | SNDCTL_MIDIINFO | ossv4 | Returns information about a MIDI device | No sample available. | ||
| Line 21: | Line 20: | ||
| | SNDCTL_MIX_EXTINFO | ossv4 | | Not fully documented. | | SNDCTL_MIX_EXTINFO | ossv4 | | Not fully documented. | ||
| - | | | + | | |
| | ioctl | compatibility | summary | notes | argument | | | ioctl | compatibility | summary | notes | argument | | ||
| | SNDCTL_CARDINFO | ossv4? | Returns information about a sound card or pseudo device | "The usability of this call is very limited. It's provided only for completeness of the API. OSS API doesn' | | SNDCTL_CARDINFO | ossv4? | Returns information about a sound card or pseudo device | "The usability of this call is very limited. It's provided only for completeness of the API. OSS API doesn' | ||
| - | | SNDCTL_GETLABEL | ossv4 | Returns label assigned to this device | **Under construction.**[[/BR|BR]]From Hannu@4Front: | + | | SNDCTL_GETLABEL | ossv4 | Returns label assigned to this device | **Under construction.**\\ From Hannu@4Front: |
| | SNDCTL_SETLABEL | ossv4 | Sets the label for this device | See **SNDCTL_GETLABEL**. | oss_label_t | | | SNDCTL_SETLABEL | ossv4 | Sets the label for this device | See **SNDCTL_GETLABEL**. | oss_label_t | | ||
| - | | SNDCTL_GETSONG | ossv4 | Returns the current song name (if given) related with this device | **Under construction.**[[/BR|BR]]From Hannu@4Front: | + | | SNDCTL_GETSONG | ossv4 | Returns the current song name (if given) related with this device | **Under construction.**\\ From Hannu@4Front: |
| | SNDCTL_SETSONG | ossv4 | Sets the song name related with this device. | See **SNDCTL_GETSONG**. | oss_longname_t | | | SNDCTL_SETSONG | ossv4 | Sets the song name related with this device. | See **SNDCTL_GETSONG**. | oss_longname_t | | ||
| - | | SNDCTL_SETNAME | ossv4 | Sets the name of this device (if changeable) | **Under construction.**[[/BR|BR]]From Hannu@4Front: | + | | SNDCTL_SETNAME | ossv4 | Sets the name of this device (if changeable) | **Under construction.**\\ From Hannu@4Front: |
| | SNDCTL_DSP_GET_CHNORDER | ossv4-draft | Get the channel ordering of a multi channel device | Under construction; | | SNDCTL_DSP_GET_CHNORDER | ossv4-draft | Get the channel ordering of a multi channel device | Under construction; | ||
| | SNDCTL_DSP_READCTL | ossv4 | Reads the S/PDIF interface status. | 4Front advises avoiding this and WRITECTL. | oss_digital_control | | | SNDCTL_DSP_READCTL | ossv4 | Reads the S/PDIF interface status. | 4Front advises avoiding this and WRITECTL. | oss_digital_control | | ||
| | SNDCTL_DSP_WRITECTL | ossv4 | Alters the S/PDIF interface setup. | See READCTL | oss_digital_control ctl | | | SNDCTL_DSP_WRITECTL | ossv4 | Alters the S/PDIF interface setup. | See READCTL | oss_digital_control ctl | | ||
| - | | | + | | Preliminary support added |
| | ioctl | compatibility | summary | notes | argument | | | ioctl | compatibility | summary | notes | argument | | ||
| | SNDCTL_DSP_CURRENT_IPTR | ossv4 | Returns current recording position | Same caveat as SNDCTL_DSP_CURRENT_OPTR. | oss_count_t | | | SNDCTL_DSP_CURRENT_IPTR | ossv4 | Returns current recording position | Same caveat as SNDCTL_DSP_CURRENT_OPTR. | oss_count_t | | ||
| Line 58: | Line 57: | ||
| | SNDCTL_DSP_SYNCGROUP | ossv4 | Creates a synchronization group. | | oss_syncgroup group | | | SNDCTL_DSP_SYNCGROUP | ossv4 | Creates a synchronization group. | | oss_syncgroup group | | ||
| | SNDCTL_DSP_SYNCSTART | ossv4 | Starts all devices added to a synchronization group. | BUG: Playback starts on all channels, but gets interrupted (audio pops once like when resetting a channel), though all channels still stay in sync. Still can't track down the cause of this, but will come back to it later. | int id | | | SNDCTL_DSP_SYNCSTART | ossv4 | Starts all devices added to a synchronization group. | BUG: Playback starts on all channels, but gets interrupted (audio pops once like when resetting a channel), though all channels still stay in sync. Still can't track down the cause of this, but will come back to it later. | int id | | ||
| - | | [wiki:Self:[[/RyanBeasley|RyanBeasley]]/ | + | | [[RyanBeasley/ |
| - | | [wiki:Self:[[/RyanBeasley|RyanBeasley]]/ | + | | SNDCTL_MIXERINFO | ossv4 | Returns information about a mixer device | Ioctl call supported by all OSS devices. |
| + | | [[RyanBeasley/ | ||
| - | | | + | | |
| | ioctl | compatibility | summary | notes | argument | | | ioctl | compatibility | summary | notes | argument | | ||
| - | | [[/ | + | | SNDCTL_DSP_CHANNELS | all versions | Set the number of audio channels | API doesn' |
| - | | SNDCTL_DSP_GETBLKSIZE | all versions | Get the current fragment size | Obsoleted by[[/BR|BR]]SNDCTL_DSP_GETOSPACE[[/BR|BR]]SNDCTL_DSP_GETISPACE[[/ | + | | SNDCTL_DSP_GETBLKSIZE | all versions | Get the current fragment size | Obsoleted by\\ SNDCTL_DSP_GETOSPACE\\ SNDCTL_DSP_GETISPACE\\ |
| - | | SNDCTL_DSP_GETCAPS | ~ossv3.5 | Returns the capabilities of an audio device | See [http:// | + | | SNDCTL_DSP_GETCAPS | ~ossv3.5 | Returns the capabilities of an audio device | See [[http:// |
| | SNDCTL_DSP_GETFMTS | all versions | Returns a list of natively supported sample formats | Supposed to report only native formats, but %%FreeBSD%% also reports emulated formats by default (toggled via sysctl). | | | | SNDCTL_DSP_GETFMTS | all versions | Returns a list of natively supported sample formats | Supposed to report only native formats, but %%FreeBSD%% also reports emulated formats by default (toggled via sysctl). | | | ||
| - | | SNDCTL_DSP_GETIPTR | all versions | Returns the current recording pointer | Useful only w/ mmap. Obsoleted by [[/BR|BR]][# | + | | SNDCTL_DSP_GETIPTR | all versions | Returns the current recording pointer | Useful only w/ mmap. Obsoleted by \\ [[# |
| | SNDCTL_DSP_GETISPACE | all versions | Returns the number of currently recorded bytes | Can be used to determine # of bytes that can be recorded w/o blocking. | | SNDCTL_DSP_GETISPACE | all versions | Returns the number of currently recorded bytes | Can be used to determine # of bytes that can be recorded w/o blocking. | ||
| | SNDCTL_DSP_GETODELAY | all versions | Returns the playback buffering delay | | int delay | | | SNDCTL_DSP_GETODELAY | all versions | Returns the playback buffering delay | | int delay | | ||
| Line 77: | Line 77: | ||
| | SNDCTL_DSP_POST | all versions | Forces audio playback to start | According to OSS, useless. | | SNDCTL_DSP_POST | all versions | Forces audio playback to start | According to OSS, useless. | ||
| | SNDCTL_DSP_SETDUPLEX | all versions | Turns on the duplex mode | | NULL | | | SNDCTL_DSP_SETDUPLEX | all versions | Turns on the duplex mode | | NULL | | ||
| - | | SNDCTL_DSP_SETFMT | all versions | Select the sample format | [http:// | + | | SNDCTL_DSP_SETFMT | all versions | Select the sample format | [[http:// |
| | SNDCTL_DSP_SETSYNCRO | ??? | Slaves the audio device to the / | | SNDCTL_DSP_SETSYNCRO | ??? | Slaves the audio device to the / | ||
| | SNDCTL_DSP_SETTRIGGER | all versions | Starts audio recording and/or playback in sync | OSS: " | | SNDCTL_DSP_SETTRIGGER | all versions | Starts audio recording and/or playback in sync | OSS: " | ||
| Line 84: | Line 84: | ||
| | SNDCTL_DSP_SYNC | all versions | Suspend the application until all samples have been played | | NULL | | | SNDCTL_DSP_SYNC | all versions | Suspend the application until all samples have been played | | NULL | | ||
| - | | | + | | |
| | ioctl | compatibility | summary | notes | argument | | | ioctl | compatibility | summary | notes | argument | | ||
| - | | [[/ | + | | SNDCTL_DSP_BIND_CHANNEL | unofficial, obsolete | Route stereo output to the specified channels | Obsoleted by\\ [[# |
| - | | SNDCTL_DSP_GETCHANNELMASK | unofficial | Returns the bindings supported by the device | Same as [# | + | | SNDCTL_DSP_GETCHANNELMASK | unofficial | Returns the bindings supported by the device | Same as [[# |
| | SNDCTL_DSP_SAMPLESIZE | ??? | Sets the sample size | "This ioctl call is obsolete. You should use SNDCTL_DSP_SETFMT instead." | | SNDCTL_DSP_SAMPLESIZE | ??? | Sets the sample size | "This ioctl call is obsolete. You should use SNDCTL_DSP_SETFMT instead." | ||