Open Sound System |
Do you have problems with sound/audio application development? Don't panic! Click here for help! |
int (*adrv_check_input) (int dev);
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.
By default the audio core will return EIO error to the application when new fragment of recorded audio data doesn't arrive within a timeout period. This is used to prevent the application from hanging infinitely when the device is malfunctioning.
In special cases the driver can define a method that checks why recording has timed out and prints more detailed error message. In addition the driver may ask the audio core to continue without reporting an error by returning value of 0. If the error cannot be recovered then this method should return -EIO (or some other error code).
When this method is called it's likely that a recording overrun has already occurred and some audio data has been lost. For this reason this method cannot be used to recover audio data.
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.
audio/oss_audio_core.c | Audio core functionality of OSS |
include/ossddk.h | Source file oss-current/kernel/framework/include/ossddk/ossddk.h |