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!

oss_install_audiodev

Register a new audio engine

Usage

int oss_install_audiodev (
int audiocore_version,
oss_device_t * osdev,
oss_device_t * master_osdev,
char *name,
const audiodrv_t * driver,
int driver_size,
int flags,
unsigned int format_mask,
void *devc,
int parent
);

int oss_install_audiodev_with_devname (
int audiocore_version,
oss_device_t * osdev,
oss_device_t * master_osdev,
char *name,
const audiodrv_t * driver,
int driver_size,
int flags,
unsigned int format_mask,
void *devc,
int parent,
char *devfile_name
);

Description

Low level audio drivers use the oss_install_audiodev function to install audio engines. This routine creates a new entry in the audio_engines table and returns the index to it.

The oss_install_audiodev_with_devname() function can be used to install an audio device with nonstandard device file name. The extra devfile_name paramater can be used for this purpose.

Parameters

.
ParameterDescription
audiocore_version Verion number of the OSS audio core version this driver was compiled for. Pass OSS_AUDIO_DRIVER_VERSION in this parameter.
osdev OSS device handle for the device. Drivers typically get this as a parameter of their attach entry point.
master_osdev In general drivers should pass the same value as in the osdev parameter. Some virtual/pseudo drivers need to pass the osdev parameter of the "master" device.
name Descriptive name of the audio engine. This name will be shown to the users by applications in their setup dialogs.
driver Pointer to the callback function list that defines the actual driver. See the description of audiodrv_t for more info.
driver_size Size of the callback function list. You should pass sizeof(audiodrv_t) in this parameter.
flags Audio device flags for the device. See Audio device flags for more info.
format_mask Bitmask for the audio formats supported by the device. See the Supported audio formats section for more info. If the device supports different formats for recording and playback the driver should set the iformat_mask and oformat_mask fields of the audio_engines entry after the oss_install_audiodev call.
devc Pointer to the driver defined sound card information structure.
parent Currently not used. Pass value of -1 in this parameter.
devfile_name This parameter of oss_install_audiodev_with_devname() can be used to assign a nonstandard device file name to the device. For example names like "spdin" or "loopback" can be used.

Return Value

This function returns a negative value (-errno) if the call failed to create an engine. This should only happen if the system runs out of memory or other resources. After getting an error the driver should give up and return error from the attach() entry point.

Other setup operations

Drivers need to initialize some fields of the audio_engines entry after creating the engine. See the Device Initialization subsection for the adev_t structure.

Availability

This function can only be called during attach of a device.

Referenced by

vmix_core/vmix_core.cSet the master sampling rate of given vmix instance.
audio/oss_audio_core.cAudio core functionality of OSS
include/audio_core.hInternal definitions for the OS audio core
remux/oss_remux.cMulti channel playback support for devices with multiple stereo engines.
oss_hdaudio/oss_hdaudio.cThe High Definition Audio (HDA/Azalia) driver.
oss_cmpci/oss_cmpci.cDriver for CMEDIA CM8738 PCI audio controller.
oss_userdev/oss_userdev.cThis entry point is used to create new userdev instances and to redirect clients to them.
oss_userdev/oss_userdev_devicepair.cClient/server audio device pair for oss_userdev
oss_envy24ht/oss_envy24ht.cVIA ENVY24HT chipset driver.
oss_trident/oss_trident.cDriver for Trident 4DWAVE, ALI 5451 and SiS 7918 audio chips
oss_cs4281/oss_cs4281.cDriver for Crystal PCI audio controller.
oss_solo/oss_solo.cDriver for ESS Solo PCI audio controller.
oss_sbpci/oss_sbpci.cCreative/Ensoniq AudioPCI97 driver (ES1371/ES1373)
oss_madi/oss_madi.cDriver for RME MADI and AES32 audio interfaces
oss_ymf7xx/oss_ymf7xx.cDriver for Yamaha YMF7xx PCI audio controller.
oss_imux/oss_imux.cPseudo driver for sharing one input device between multiple apps.
oss_via823x/oss_via823x.cDriver for the VIA8233/8235 AC97 audio controller
oss_digi96/oss_digi96.cDriver for RME Digi96 family
oss_fmedia/oss_fmedia.cDriver for FM801 FM801 PCI audio controller.
oss_ich/oss_ich.cDriver for the Intel ICH AC97 audio controller
oss_sblive/oss_sblive.cDriver for Creative SB Live/Audigy/2/4. Audio, MIDI and mixer services.
oss_audiopci/oss_audiopci.cCreative/Ensoniq AudioPCI driver (ES1370 "CONCERT" ASIC and AKM4531 codec/mixer)
oss_audioloop/oss_audioloop.cOSS audio loopback (virtual) driver
oss_emu10k1x/oss_emu10k1x.cDriver for Creative emu10k1x audio controller
oss_cmi878x/oss_cmi878x.cDriver for C-Media CMI8788 PCI audio controller.
oss_audigyls/oss_audigyls.cDriver for Creative Audigy LS audio controller
oss_cs461x/oss_cs461x.cDriver for Crystal cs461x and cs461x PCI audio controllers
oss_geode/oss_geode.cDriver for the NS/Cyrix/AMD Geode AC97 audio controller
oss_via97/oss_via97.cDriver for the VIA VT82C686A AC97 audio controller
oss_ali5455/oss_ali5455.cDriver for the ALI 5455 (AC97) audio controller
oss_usb/ossusb_audio.cUSB audio streaming interface support
oss_atiaudio/oss_atiaudio.cDriver for the ATI IXP (AC97) audio controller
oss_sbxfi/oss_sbxfi.cDriver for Sound Blaster X-Fi (emu20k)
oss_audiocs/oss_audiocs.cDriver for the UltraSparc workstations using CS4231 codec for audio
oss_envy24/oss_envy24.cDriver for IC Ensemble ENVY24 based audio cards.
oss_envy24/envy24_direct.cDirect 24 bit multich driver for Envy24.
Linux/osscore.cLinux kernel version specific wrapper routines.


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