Google
 

Open Sound System
The Hitchhiker's Guide to OSS 4.1 Internals

Do you have problems with sound/audio application development? Don't panic! Click here for help!

adrv_local_qlen

Return number of bytes in any on-device buffers

Usage

int (*adrv_local_qlen) (int dev);

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.

Some devices may have on-board sample buffer of FIFO where the number of samples are stored after they have been copied from the DMA buffer managed by the audio core. This additional buffering causes some latencies and it's necessary to know how large they are (in particular if the buffer is large). This method should return the number of sample bytes that have been copied from the DMA buffer of OSS to the device but that have not yet been played.

Value of 0 means that the on-board buffer/FIFO is currently empty.

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

audio/oss_audio_core.cAudio core functionality of OSS
include/ossddk.hSource file oss-current/kernel/framework/include/ossddk/ossddk.h


Copyright (C) 4Front Technologies, 2007. All rights reserved.
Back to index OSS web site