/tmp/l4check/full_tree/trunk/l4/pkg/dde_linux/lib/sound/soundcore.c File Reference

Linux DDE Soundcore. More...

#include <l4/env/errno.h>
#include <l4/lock/lock.h>
#include <l4/dde_linux/dde.h>
#include <linux/vmalloc.h>
#include <linux/fs.h>
#include "__config.h"
#include "internal.h"
#include "soundcore.h"

Go to the source code of this file.

Classes

struct  sound_unit
 internal sound device/unit structure More...

Functions

static int __sound_insert_unit (struct sound_unit *s, struct sound_unit **list, struct file_operations *fops)
 Low level list operator.
static void __sound_remove_unit (struct sound_unit **list, int unit)
 Remove a node from the chain.
static struct sound_unit__look_for_unit (struct sound_unit *s, int unit)
 look
static int sound_insert_unit (struct sound_unit **list, struct file_operations *fops, const char *name, int type)
 Insert a unit.
static void sound_remove_unit (struct sound_unit **list, int unit)
 Remove a unit.
int register_sound_dsp (struct file_operations *fops, int dev)
 Register a DSP Device.
int register_sound_mixer (struct file_operations *fops, int dev)
 Register a Mixer Device.
int register_sound_midi (struct file_operations *fops, int dev)
 Register a MIDI Device.
int register_sound_special (struct file_operations *fops, int unit)
 Register a Special Sound Node.
int register_sound_synth (struct file_operations *fops, int dev)
 Register a synth Device.
void unregister_sound_dsp (int unit)
 Unregister a DSP Device.
void unregister_sound_mixer (int unit)
 Unregister a Mixer Device.
void unregister_sound_midi (int unit)
 Unregister a MIDI Device.
void unregister_sound_special (int unit)
 Unregister a Special Node.
void unregister_sound_synth (int unit)
 Unregister a synth Device.
struct file_operations * soundcore_req_fops (int type, int num)
 Query for device operations structure.
void soundcore_rel_fops (int type, int num)
 Release DSP/PCM device XXX nothing to do ?

Variables

static struct sound_unitdsp = NULL
 internal lists of sound units
static struct sound_unitmixer = NULL
static l4lock_t sound_loader_lock = L4LOCK_UNLOCKED
 initilization lock


Detailed Description

Linux DDE Soundcore.

Date:
08/28/2003
Author:
Christian Helmuth <ch12@os.inf.tu-dresden.de>

Definition in file soundcore.c.


Function Documentation

static int __sound_insert_unit ( struct sound_unit s,
struct sound_unit **  list,
struct file_operations *  fops 
) [static]

Low level list operator.

Scan the ordered list, find a hole and join into it. Called with the lock asserted.

Test:
krishna: It differs from Linux as we use n as device number (not as minor number).

Definition at line 60 of file soundcore.c.

static void __sound_remove_unit ( struct sound_unit **  list,
int  unit 
) [static]

Remove a node from the chain.

Called with the lock asserted

Definition at line 95 of file soundcore.c.

static int sound_insert_unit ( struct sound_unit **  list,
struct file_operations *  fops,
const char *  name,
int  type 
) [static]

Insert a unit.

Allocate the controlling structure and add it to the sound driver list. Acquires locks as needed

Definition at line 127 of file soundcore.c.

static void sound_remove_unit ( struct sound_unit **  list,
int  unit 
) [static]

Remove a unit.

Acquires locks as needed. The drivers MUST have completed the removal before their file operations become invalid.

Definition at line 152 of file soundcore.c.


Linux DDE, written by Christian Helmuth  © 2003 Technische Universitaet Dresden