Open Sound System
|Do you have problems with sound/audio application development? Don't panic! Click here for help!|
int (*adrv_sync_control) (int dev, int event, int mode);
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.
This audio driver method is used for the synchronisation group feature of the OSS API (SNDCTL_DSP_SYNCGROUP and SNDCTL_DSP_SYNCSTART). It will get called three times when the device is to be started. This functionality is similar to the adrv_trigger entry point routine.
|Step number of the operation (|
|This parameter is a direction mask for the operation. The |
This method will be called three times with different
event values. The first call (
SYNC_ATTACH) will be made when the device is joined to a sync group. This may happen hours before the the sync group gets actually started. No audio data has been written by the application yet (in case of output). Second invocation (
SYNC_PREPARE is used to tell the driver to do any time consuming preparations. The third invovcation (!code SYNC_TRIGGER
The idea is that all time consuming preparations are performed during the first invocation. The second invocation should just start all the devices that have been prepared during the first step. This should be performed as quickly as possible. The second call will be made for all sub-devices managed by this driver but the first call should activate all of them (if possible). The subsequent calls with event==SYNC_TRIGGER should be ignored by the driver.
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|
|oss_envy24ht/oss_envy24ht.c||VIA ENVY24HT chipset driver.|
|oss_madi/oss_madi.c||Driver for RME MADI and AES32 audio interfaces|
|oss_envy24/oss_envy24.c||Driver for IC Ensemble ENVY24 based audio cards.|