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_redirect

Audio driver method for open redirection

Usage

int *adrv_redirect (int dev, int mode, int open_flags);

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 by the audio core just before it makes the call to the adrv_open entry point. Purpose of this call is to let the driver to redirect the call to a different engine. This entry point is reserved for special (virtual) drivers and ordinary OSS drivers must not define it.

Parameters

ParameterDescription
mode Open mode. Bit mask of OPEN_READ and OPEN_WRITE.
open_flags See the description of the open_flags in the documentation for adev_t.

Return value

This function should return the audio engine number of the audio engine that should get opened by the audio core. Valid audio engine number must be returned in all situations. It is not permitted to return any errors.

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