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_output_block

Move a block of audio output data to the device

Usage

void (*adrv_output_block) (int dev, oss_native_word buf, int count, int fragsize, int intrflag);

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 audio device method is used by audio devices that need to move each block audio data to an on-board hardware buffer to play it. Such drivers usually don't define the ADEV_AUTOMODE bit in their flags parameter. Other drivers can define this entry point as NULL in their callback lists.

When called this function should move a fragment of audio data to the device buffer.

Parameters

ParameterDescription
buf Physical address of the first byte of the fragment.
count Total DMA buffer size in bytes.
fragsize Size of a buffer fragment in bytes.
intrflag This parameter is 1 if the call was made from interrupt context. Value of 0 means call from process context.

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