~ubuntu-branches/ubuntu/oneiric/oss4/oneiric-proposed

« back to all changes in this revision

Viewing changes to kernel/framework/include/ossddk/oss_exports.h

  • Committer: Bazaar Package Importer
  • Author(s): Stefano Rivera
  • Date: 2011-06-16 20:37:48 UTC
  • mfrom: (5.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110616203748-jbrxik6ql33z54co
Tags: 4.2-build2004-1ubuntu1
* Merge from Debian unstable.
  - Supports our current kernel (LP: #746048)
  Remaining changes:
  - debian/oss4-dkms.dkms.in: s/source/build/ in Kernel headers paths.
* ld-as-needed.patch: Re-order CC arguments to enable building with ld
  --as-needed (LP: #770972)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _OSS_EXPORTS_H
 
2
#define _OSS_EXPORTS_H
 
3
/*
 
4
 *
 
5
 * This file is part of Open Sound System.
 
6
 *
 
7
 * Copyright (C) 4Front Technologies 1996-2008.
 
8
 *
 
9
 * This this source file is released under GPL v2 license (no other versions).
 
10
 * See the COPYING file included in the main directory of this source
 
11
 * distribution for the license terms and conditions.
 
12
 *
 
13
 */
 
14
 
 
15
/*
 
16
 * Driver (bus) types
 
17
 *
 
18
 * Note that OSSDDK drivers can only use DRV_PCI or DRV_VIRTUAL. The other
 
19
 * bus types will not work properly because support for them is missing
 
20
 * from the DDK layer.
 
21
 */
 
22
 
 
23
#define DRV_UNKNOWN     0
 
24
#define DRV_PCI         1
 
25
#define DRV_USB         2
 
26
#define DRV_VIRTUAL     3
 
27
#define DRV_VMIX        4       /* Like DRV_VIRTUAL. Used by the vmix module. */
 
28
#define DRV_STREAMS     5
 
29
#define DRV_ISA         6
 
30
#define DRV_FIREWIRE    7
 
31
#define DRV_CLONE       8       /* Clone of some other device */
 
32
 
 
33
/*
 
34
 * Device class numbers. Unlike with earlier OSS versions (up to v4.0)
 
35
 * the minor number doesn't have any special meaning. Minor numbers
 
36
 * will be allocated in the order the device files are initialized. Even
 
37
 * the major number doesn't necessaily be the same for all OSS devices.
 
38
 * Minor numbers will be just indexes to a table (in os.c) that contains
 
39
 * the device class code, instance number, driver call table and things like that.
 
40
 * Ideally OSS will use devfs to expose the available devices.
 
41
 */
 
42
 
 
43
extern int oss_max_audio_devfiles;
 
44
extern int oss_max_audio_engines;
 
45
 
 
46
#define MAX_SYNTH_DEV   6       // TODO: Remove
 
47
#define MAX_AUDIO_DEVFILES      oss_max_audio_devfiles
 
48
#define MAX_AUDIO_ENGINES       oss_max_audio_engines
 
49
#define SYNC_DEVICE_MASK        0xffff
 
50
 
 
51
#include "oss_limits.h"
 
52
/*
 
53
 * Device file class codes. Note that these numbers don't have any kind of relationship with minor numbers.
 
54
 */
 
55
 
 
56
#define OSS_DEV_STATUS          0       /* /dev/sndstat */
 
57
#define OSS_DEV_VDSP            1       /* /dev/dsp (multiplexer device) */
 
58
#define OSS_DEV_VAUDIO          2       /* /dev/audio (multiplexer device) */
 
59
#define OSS_DEV_AWFM            3       /* Reserved for historic purposes */
 
60
#define OSS_DEV_OSSD            4       /* /dev/ossd - ossd process support */
 
61
#define OSS_DEV_AUDIOCTL        5       /* Audioctl device */
 
62
#define OSS_DEV_MIXER           6       /* /dev/mixer0 */
 
63
#define OSS_DEV_SEQ             7       /* /dev/sequencer */
 
64
#define OSS_DEV_MUSIC           8       /* /dev/music AKA /dev/sequencer2 */
 
65
#define OSS_DEV_VMIDI           9       /* /dev/midi (multiplexer device) */
 
66
#define OSS_DEV_MIDI            10      /* /dev/midi## */
 
67
#define OSS_DEV_DEVAUDIO        11      /* /dev/audio# */
 
68
#define OSS_DEV_DSP             12      /* /dev/dsp# */
 
69
#define OSS_DEV_MISC            13      /* Special purpose device files */
 
70
#define OSS_DEV_DSP_ENGINE      14      /* Hidden DSP engines */
 
71
 
 
72
extern int oss_max_cdevs;
 
73
#define OSS_MAX_CDEVS   oss_max_cdevs
 
74
 
 
75
/*
 
76
 * Misc definitions 
 
77
 */
 
78
 
 
79
typedef struct _oss_device_t oss_device_t;
 
80
 
 
81
#if defined(linux) && defined(OSS_MAINLINE_BUILD)
 
82
#include <stdint.h>
 
83
#endif
 
84
 
 
85
/*
 
86
 * AC97
 
87
 */
 
88
typedef int (*ac97_readfunc_t) (void *, int);
 
89
typedef int (*ac97_writefunc_t) (void *, int, int);
 
90
typedef struct _ac97_handle_t ac97_handle_t;
 
91
 
 
92
/*
 
93
 * Mixer
 
94
 */
 
95
typedef struct _mixer_driver_t mixer_driver_t;
 
96
typedef struct _mixer_operations_t mixer_operations_t;
 
97
typedef int (*mixer_create_controls_t) (int dev);
 
98
typedef int (*mixer_ext_fn) (int dev, int ctrl, unsigned int cmd, int value);
 
99
 
 
100
extern void oss_audio_delayed_attach (void);
 
101
#endif