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

« back to all changes in this revision

Viewing changes to kernel/framework/include/internal.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
/*
 
2
 * Purpose: Definitions for internal use by OSS
 
3
 *
 
4
 * Definitions for private use by the ossctl program. Everything defined
 
5
 * in this file is likely to change without notice between OSS versions.
 
6
 *
 
7
 * Note that thse ioctl calls are not for public use. They cannot be used by 
 
8
 * applications that are not part of the official OSS distribution.
 
9
 *
 
10
 */
 
11
/*
 
12
 *
 
13
 * This file is part of Open Sound System.
 
14
 *
 
15
 * Copyright (C) 4Front Technologies 1996-2008.
 
16
 *
 
17
 * This this source file is released under GPL v2 license (no other versions).
 
18
 * See the COPYING file included in the main directory of this source
 
19
 * distribution for the license terms and conditions.
 
20
 *
 
21
 */
 
22
 
 
23
#ifndef _INTERNAL_H_
 
24
#define _INTERNAL_H_
 
25
 
 
26
/*
 
27
 * This file defines ioctl codes 200 to 255 in the 'X' block. These codes may be
 
28
 * reused for internal purposes by other OSSv4 implementations that don't use
 
29
 * this file. Implementations based on the 'stock' OSS code can add their 
 
30
 * private use ioctl codes in this file. However in such case it's recommended
 
31
 * to notify the OSS development community (4Front Technologies) so that the
 
32
 * code can be marked as reserved in the official sources.
 
33
 *
 
34
 */
 
35
 
 
36
#define OSS_MAXERR 200
 
37
typedef struct
 
38
{
 
39
  int nerrors;
 
40
  int errors[OSS_MAXERR];
 
41
  int error_parms[OSS_MAXERR];
 
42
}
 
43
oss_error_info;
 
44
#define BOOTERR_BAD_PCIIRQ                                1
 
45
#define BOOTERR_AC97CODEC                                 2
 
46
#define BOOTERR_IRQSTORM                                  3
 
47
#define BOOTERR_BIGMEM                                    4
 
48
 
 
49
extern oss_error_info oss_booterrors;
 
50
 
 
51
#if 0
 
52
typedef struct
 
53
{
 
54
  int mode;                     /* OPEN_READ and/or OPEN_WRITE */
 
55
  oss_devlist_t devlist;
 
56
}
 
57
oss_reroute_t;
 
58
#endif
 
59
 
 
60
typedef struct
 
61
{
 
62
/*
 
63
 * Private structure for renumbering legacy dsp, mixer and MIDI devices
 
64
 */
 
65
  int n;
 
66
  short map[HARD_MAX_AUDIO_DEVFILES];
 
67
} oss_renumber_t;
 
68
/*
 
69
 * Some internal use only ioctl calls ('X', 200-255)
 
70
 */
 
71
#if 0
 
72
#define OSSCTL_GET_REROUTE      __SIOWR('X', 200, oss_reroute_t)
 
73
#define OSSCTL_SET_REROUTE      __SIOW ('X', 200, oss_reroute_t)
 
74
#endif
 
75
 
 
76
#ifdef APPLIST_SUPPORT
 
77
/*
 
78
 * Application redirection list for audio.c.
 
79
 */
 
80
typedef struct
 
81
{
 
82
  char name[32 + 1];            /* Command name (such as xmms) */
 
83
  int mode;                     /* OPEN_READ|OPEN_WRITE */
 
84
  int dev;                      /* "Target" audio device number */
 
85
  int open_flags;               /* Open flags to be passed to oss_audio_open_engine */
 
86
} app_routing_t;
 
87
 
 
88
#define APPLIST_SIZE    64
 
89
extern app_routing_t oss_applist[APPLIST_SIZE];
 
90
extern int oss_applist_size;
 
91
 
 
92
#define OSSCTL_RESET_APPLIST    __SIO  ('X', 201)
 
93
#define OSSCTL_ADD_APPLIST      __SIOW ('X', 201, app_routing_t)
 
94
#endif
 
95
 
 
96
/*
 
97
 * Legacy device file numbering calls
 
98
 */
 
99
#define OSSCTL_RENUM_AUDIODEVS  __SIOW ('X', 202, oss_renumber_t)
 
100
#define OSSCTL_RENUM_MIXERDEVS  __SIOW ('X', 203, oss_renumber_t)
 
101
#define OSSCTL_RENUM_MIDIDEVS   __SIOW ('X', 204, oss_renumber_t)
 
102
 
 
103
/*
 
104
 * vmixctl related ioctl calls
 
105
 */
 
106
 
 
107
typedef struct
 
108
{
 
109
        int masterdev;
 
110
        int inputdev;
 
111
 
 
112
        int attach_flags;
 
113
 
 
114
/*
 
115
 *                                              0x000000xx reserved
 
116
 *                                              for #clients to prealloc
 
117
 */
 
118
#define VMIX_INSTALL_NOPREALLOC                 0x00000100
 
119
#define VMIX_INSTALL_NOINPUT                    0x00000200
 
120
#define VMIX_INSTALL_VISIBLE                    0x00000400
 
121
#define VMIX_INSTALL_MANUAL                     0x00000800 /* By vmxctl */
 
122
} vmixctl_attach_t;
 
123
 
 
124
typedef struct
 
125
{
 
126
        int masterdev;
 
127
        int rate;
 
128
} vmixctl_rate_t;
 
129
 
 
130
typedef int oss_chninfo[128];
 
131
typedef struct
 
132
{
 
133
        int masterdev;
 
134
        oss_chninfo map;
 
135
} vmixctl_map_t;
 
136
 
 
137
#define VMIXCTL_ATTACH          __SIOW ('X', 220, vmixctl_attach_t)
 
138
#define VMIXCTL_DETACH          __SIOW ('X', 221, vmixctl_attach_t)
 
139
#define VMIXCTL_RATE            __SIOW ('X', 222, vmixctl_rate_t)
 
140
#define VMIXCTL_REMAP           __SIOW ('X', 223, vmixctl_map_t)
 
141
 
 
142
/*
 
143
 * FreeBSD compatibility ioctl
 
144
 */
 
145
#define FREEBSD_GETBLKSIZE      __SIOR ('P', 4, int)
 
146
 
 
147
#ifdef DO_TIMINGS
 
148
#define DFLAG_ALL               0x00000001
 
149
#define DFLAG_PROFILE           0x00000002
 
150
/*
 
151
 * Time counters 
 
152
 */
 
153
#define DF_IDDLE        0
 
154
#define DF_WRITE        1
 
155
#define DF_READ         2
 
156
#define DF_INTERRUPT    3
 
157
#define DF_SLEEPWRITE   4
 
158
#define DF_SLEEPREAD    5
 
159
#define DF_SRCWRITE     6
 
160
#define DF_SRCREAD      7
 
161
#define DF_NRBINS       8
 
162
#endif
 
163
 
 
164
#endif