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!

Typical OSS driver defined structures

By convention each OSS device driver should define the following private structures:

devc The devc structure is a per-device structure that holds information about the device in general. Usually it contains information about the registers of the device and everything that is necessary to control the device.
portc For each independent audio (playback and/or recording) engine the driver should define a portc structure.
midic Drivers for devices with MIDI functionality should create midic structures for them.

All these structures have driver defined type that is not exported to any of the code outside the driver. However these structures should be registered when the driver calls OSS core functions such as oss_install_audiodev. The driver method callbacks can then use the subsystem specific tables such as audio_engines to get pointers to these structures. For example

myossdrv_devc_t *devc=audio_engines[dev]->devc;

See the documentation for the fields of the adev_t structure for more info.

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