| | Open Sound System The Hitchhiker's Guide to OSS 4.1 Internals |
adrv_setup_fragments
Audio driver method for setting device specific fragment size
Usage
void (*adrv_setup_fragments) (int dev, dmap_t * dmap, int direction);
Description
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 optional driver method will be called at the moment when audio core has selected the fragment size and the other parameters. This function can be used to override these parameters before they are committed.
Parameters
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. |
Return value
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.
Referenced by
Copyright (C) 4Front Technologies, 2007. All rights reserved. Back to index OSS web site