| || || |
Open Sound System
The Hitchhiker's Guide to OSS 4.1 Internals
Audio driver ioctl method (optional)
int (*adrv_ioctl) (int dev, unsigned int cmd, int *arg);
The first paramater (
dev) is anways the audio engine number which is an index to the audio_engines table. The driver can use the audio_engines entry to find out some of the current parameters. In particular the devc, portc, portc_play and portc_record fields can be used to locate the driver defined structures for the audio engine.
Most of the OSS audio ioctl calls are handled by the audio core. However some optional calls are handled directly by the individual device drivers. Drivers that don't have any locally implemented ioctl calls can define this entry point to handle them.
|Ioctl command number. See ioctl for more info.|
|Integer pointer that points to the beginning of the (in-kernel) memory area allocated for the argument (structure). The driver can typecast this pointer to the correct type (depending on the ioctl call).|
Audio driver entry point should return 0 if the call was successful. Negative return value (-errno) means that an error has occurred. However some of the functions have void type and they don't return any value.
Copyright (C) 4Front Technologies, 2007. All rights reserved. Back to index OSS web site