Open Sound System |
Do you have problems with sound/audio application development? Don't panic! Click here for help! |
int (*adrv_free_buffer) (int dev, dmap_t * dmap, int direction);
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.
If a driver has defined the adrv_alloc_buffer method then this method should be defined too. It's purpose is to free the DMA buffer allocated for the device. This method must in no case be defined if the adrv_alloc_buffer one is not defined.
This method should set the dmabuf
field of the dmap structure to NULL and the dmabuf_phys
field to 0 after freeing the buffer.
Parameter | Description |
dmap | This is a pointer to the dmap_t structure for this direction (recording or playback). |
direction | This is the direction (record or playback) the buffer is to be allocated for. OPEN_READ means recording and OPEN_WRITE means playback. |
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 |