aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc')
-rw-r--r--include/asm-sparc/audioio.h234
-rw-r--r--include/asm-sparc/kbio.h56
-rw-r--r--include/asm-sparc/ptrace.h3
-rw-r--r--include/asm-sparc/termios.h9
-rw-r--r--include/asm-sparc/vuid_event.h41
5 files changed, 3 insertions, 340 deletions
diff --git a/include/asm-sparc/audioio.h b/include/asm-sparc/audioio.h
deleted file mode 100644
index cf16173f521b..000000000000
--- a/include/asm-sparc/audioio.h
+++ /dev/null
@@ -1,234 +0,0 @@
1/*
2 * include/asm-sparc/audioio.h
3 *
4 * Sparc Audio Midlayer
5 * Copyright (C) 1996 Thomas K. Dyas (tdyas@noc.rutgers.edu)
6 */
7
8#ifndef _AUDIOIO_H_
9#define _AUDIOIO_H_
10
11/*
12 * SunOS/Solaris /dev/audio interface
13 */
14
15#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
16#include <linux/types.h>
17#include <linux/time.h>
18#include <linux/ioctl.h>
19#endif
20
21/*
22 * This structure contains state information for audio device IO streams.
23 */
24typedef struct audio_prinfo {
25 /*
26 * The following values describe the audio data encoding.
27 */
28 unsigned int sample_rate; /* samples per second */
29 unsigned int channels; /* number of interleaved channels */
30 unsigned int precision; /* bit-width of each sample */
31 unsigned int encoding; /* data encoding method */
32
33 /*
34 * The following values control audio device configuration
35 */
36 unsigned int gain; /* gain level: 0 - 255 */
37 unsigned int port; /* selected I/O port (see below) */
38 unsigned int avail_ports; /* available I/O ports (see below) */
39 unsigned int _xxx[2]; /* Reserved for future use */
40
41 unsigned int buffer_size; /* I/O buffer size */
42
43 /*
44 * The following values describe driver state
45 */
46 unsigned int samples; /* number of samples converted */
47 unsigned int eof; /* End Of File counter (play only) */
48
49 unsigned char pause; /* non-zero for pause, zero to resume */
50 unsigned char error; /* non-zero if overflow/underflow */
51 unsigned char waiting; /* non-zero if a process wants access */
52 unsigned char balance; /* stereo channel balance */
53
54 unsigned short minordev;
55
56 /*
57 * The following values are read-only state flags
58 */
59 unsigned char open; /* non-zero if open access permitted */
60 unsigned char active; /* non-zero if I/O is active */
61} audio_prinfo_t;
62
63
64/*
65 * This structure describes the current state of the audio device.
66 */
67typedef struct audio_info {
68 /*
69 * Per-stream information
70 */
71 audio_prinfo_t play; /* output status information */
72 audio_prinfo_t record; /* input status information */
73
74 /*
75 * Per-unit/channel information
76 */
77 unsigned int monitor_gain; /* input to output mix: 0 - 255 */
78 unsigned char output_muted; /* non-zero if output is muted */
79 unsigned char _xxx[3]; /* Reserved for future use */
80 unsigned int _yyy[3]; /* Reserved for future use */
81} audio_info_t;
82
83
84/*
85 * Audio encoding types
86 */
87#define AUDIO_ENCODING_NONE (0) /* no encoding assigned */
88#define AUDIO_ENCODING_ULAW (1) /* u-law encoding */
89#define AUDIO_ENCODING_ALAW (2) /* A-law encoding */
90#define AUDIO_ENCODING_LINEAR (3) /* Linear PCM encoding */
91#define AUDIO_ENCODING_FLOAT (4) /* IEEE float (-1. <-> +1.) */
92#define AUDIO_ENCODING_DVI (104) /* DVI ADPCM */
93#define AUDIO_ENCODING_LINEAR8 (105) /* 8 bit UNSIGNED */
94#define AUDIO_ENCODING_LINEARLE (106) /* Linear PCM LE encoding */
95
96/*
97 * These ranges apply to record, play, and monitor gain values
98 */
99#define AUDIO_MIN_GAIN (0) /* minimum gain value */
100#define AUDIO_MAX_GAIN (255) /* maximum gain value */
101
102/*
103 * These values apply to the balance field to adjust channel gain values
104 */
105#define AUDIO_LEFT_BALANCE (0) /* left channel only */
106#define AUDIO_MID_BALANCE (32) /* equal left/right channel */
107#define AUDIO_RIGHT_BALANCE (64) /* right channel only */
108#define AUDIO_BALANCE_SHIFT (3)
109
110/*
111 * Generic minimum/maximum limits for number of channels, both modes
112 */
113#define AUDIO_MIN_PLAY_CHANNELS (1)
114#define AUDIO_MAX_PLAY_CHANNELS (4)
115#define AUDIO_MIN_REC_CHANNELS (1)
116#define AUDIO_MAX_REC_CHANNELS (4)
117
118/*
119 * Generic minimum/maximum limits for sample precision
120 */
121#define AUDIO_MIN_PLAY_PRECISION (8)
122#define AUDIO_MAX_PLAY_PRECISION (32)
123#define AUDIO_MIN_REC_PRECISION (8)
124#define AUDIO_MAX_REC_PRECISION (32)
125
126/*
127 * Define some convenient names for typical audio ports
128 */
129/*
130 * output ports (several may be enabled simultaneously)
131 */
132#define AUDIO_SPEAKER 0x01 /* output to built-in speaker */
133#define AUDIO_HEADPHONE 0x02 /* output to headphone jack */
134#define AUDIO_LINE_OUT 0x04 /* output to line out */
135
136/*
137 * input ports (usually only one at a time)
138 */
139#define AUDIO_MICROPHONE 0x01 /* input from microphone */
140#define AUDIO_LINE_IN 0x02 /* input from line in */
141#define AUDIO_CD 0x04 /* input from on-board CD inputs */
142#define AUDIO_INTERNAL_CD_IN AUDIO_CD /* input from internal CDROM */
143#define AUDIO_ANALOG_LOOPBACK 0x40 /* input from output */
144
145
146/*
147 * This macro initializes an audio_info structure to 'harmless' values.
148 * Note that (~0) might not be a harmless value for a flag that was
149 * a signed int.
150 */
151#define AUDIO_INITINFO(i) { \
152 unsigned int *__x__; \
153 for (__x__ = (unsigned int *)(i); \
154 (char *) __x__ < (((char *)(i)) + sizeof (audio_info_t)); \
155 *__x__++ = ~0); \
156}
157
158/*
159 * These allow testing for what the user wants to set
160 */
161#define AUD_INITVALUE (~0)
162#define Modify(X) ((unsigned int)(X) != AUD_INITVALUE)
163#define Modifys(X) ((X) != (unsigned short)AUD_INITVALUE)
164#define Modifyc(X) ((X) != (unsigned char)AUD_INITVALUE)
165
166/*
167 * Parameter for the AUDIO_GETDEV ioctl to determine current
168 * audio devices.
169 */
170#define MAX_AUDIO_DEV_LEN (16)
171typedef struct audio_device {
172 char name[MAX_AUDIO_DEV_LEN];
173 char version[MAX_AUDIO_DEV_LEN];
174 char config[MAX_AUDIO_DEV_LEN];
175} audio_device_t;
176
177
178/*
179 * Ioctl calls for the audio device.
180 */
181
182/*
183 * AUDIO_GETINFO retrieves the current state of the audio device.
184 *
185 * AUDIO_SETINFO copies all fields of the audio_info structure whose
186 * values are not set to the initialized value (-1) to the device state.
187 * It performs an implicit AUDIO_GETINFO to return the new state of the
188 * device. Note that the record.samples and play.samples fields are set
189 * to the last value before the AUDIO_SETINFO took effect. This allows
190 * an application to reset the counters while atomically retrieving the
191 * last value.
192 *
193 * AUDIO_DRAIN suspends the calling process until the write buffers are
194 * empty.
195 *
196 * AUDIO_GETDEV returns a structure of type audio_device_t which contains
197 * three strings. The string "name" is a short identifying string (for
198 * example, the SBus Fcode name string), the string "version" identifies
199 * the current version of the device, and the "config" string identifies
200 * the specific configuration of the audio stream. All fields are
201 * device-dependent -- see the device specific manual pages for details.
202 *
203 * AUDIO_GETDEV_SUNOS returns a number which is an audio device defined
204 * herein (making it not too portable)
205 *
206 * AUDIO_FLUSH stops all playback and recording, clears all queued buffers,
207 * resets error counters, and restarts recording and playback as appropriate
208 * for the current sampling mode.
209 */
210#define AUDIO_GETINFO _IOR('A', 1, audio_info_t)
211#define AUDIO_SETINFO _IOWR('A', 2, audio_info_t)
212#define AUDIO_DRAIN _IO('A', 3)
213#define AUDIO_GETDEV _IOR('A', 4, audio_device_t)
214#define AUDIO_GETDEV_SUNOS _IOR('A', 4, int)
215#define AUDIO_FLUSH _IO('A', 5)
216
217/* Define possible audio hardware configurations for
218 * old SunOS-style AUDIO_GETDEV ioctl */
219#define AUDIO_DEV_UNKNOWN (0) /* not defined */
220#define AUDIO_DEV_AMD (1) /* audioamd device */
221#define AUDIO_DEV_SPEAKERBOX (2) /* dbri device with speakerbox */
222#define AUDIO_DEV_CODEC (3) /* dbri device (internal speaker) */
223#define AUDIO_DEV_CS4231 (5) /* cs4231 device */
224
225/*
226 * The following ioctl sets the audio device into an internal loopback mode,
227 * if the hardware supports this. The argument is TRUE to set loopback,
228 * FALSE to reset to normal operation. If the hardware does not support
229 * internal loopback, the ioctl should fail with EINVAL.
230 * Causes ADC data to be digitally mixed in and sent to the DAC.
231 */
232#define AUDIO_DIAG_LOOPBACK _IOW('A', 101, int)
233
234#endif /* _AUDIOIO_H_ */
diff --git a/include/asm-sparc/kbio.h b/include/asm-sparc/kbio.h
deleted file mode 100644
index 3cf496bdf399..000000000000
--- a/include/asm-sparc/kbio.h
+++ /dev/null
@@ -1,56 +0,0 @@
1#ifndef __LINUX_KBIO_H
2#define __LINUX_KBIO_H
3
4/* Return keyboard type */
5#define KIOCTYPE _IOR('k', 9, int)
6/* Return Keyboard layout */
7#define KIOCLAYOUT _IOR('k', 20, int)
8
9enum {
10 TR_NONE,
11 TR_ASCII, /* keyboard is in regular state */
12 TR_EVENT, /* keystrokes sent as firm events */
13 TR_UNTRANS_EVENT /* EVENT+up and down+no translation */
14};
15
16/* Return the current keyboard translation */
17#define KIOCGTRANS _IOR('k', 5, int)
18/* Set the keyboard translation */
19#define KIOCTRANS _IOW('k', 0, int)
20
21/* Send a keyboard command */
22#define KIOCCMD _IOW('k', 8, int)
23
24/* Return if keystrokes are being sent to /dev/kbd */
25
26/* Set routing of keystrokes to /dev/kbd */
27#define KIOCSDIRECT _IOW('k', 10, int)
28
29/* Set keyboard leds */
30#define KIOCSLED _IOW('k', 14, unsigned char)
31
32/* Get keyboard leds */
33#define KIOCGLED _IOR('k', 15, unsigned char)
34
35/* Used by KIOC[GS]RATE */
36struct kbd_rate {
37 unsigned char delay; /* Delay in Hz before first repeat. */
38 unsigned char rate; /* In characters per second (0..50). */
39};
40
41/* Set keyboard rate */
42#define KIOCSRATE _IOW('k', 40, struct kbd_rate)
43
44/* Get keyboard rate */
45#define KIOCGRATE _IOW('k', 41, struct kbd_rate)
46
47/* Top bit records if the key is up or down */
48#define KBD_UP 0x80
49
50/* Usable information */
51#define KBD_KEYMASK 0x7f
52
53/* All keys up */
54#define KBD_IDLE 0x75
55
56#endif /* __LINUX_KBIO_H */
diff --git a/include/asm-sparc/ptrace.h b/include/asm-sparc/ptrace.h
index a8ecb2d6977a..714497099a42 100644
--- a/include/asm-sparc/ptrace.h
+++ b/include/asm-sparc/ptrace.h
@@ -60,6 +60,9 @@ struct sparc_stackf {
60#define STACKFRAME_SZ sizeof(struct sparc_stackf) 60#define STACKFRAME_SZ sizeof(struct sparc_stackf)
61 61
62#ifdef __KERNEL__ 62#ifdef __KERNEL__
63
64#define __ARCH_SYS_PTRACE 1
65
63#define user_mode(regs) (!((regs)->psr & PSR_PS)) 66#define user_mode(regs) (!((regs)->psr & PSR_PS))
64#define instruction_pointer(regs) ((regs)->pc) 67#define instruction_pointer(regs) ((regs)->pc)
65unsigned long profile_pc(struct pt_regs *); 68unsigned long profile_pc(struct pt_regs *);
diff --git a/include/asm-sparc/termios.h b/include/asm-sparc/termios.h
index 0a8ad4cac125..d05f83c80989 100644
--- a/include/asm-sparc/termios.h
+++ b/include/asm-sparc/termios.h
@@ -38,15 +38,6 @@ struct sunos_ttysize {
38 int st_columns; /* Columns on the terminal */ 38 int st_columns; /* Columns on the terminal */
39}; 39};
40 40
41/* Used for packet mode */
42#define TIOCPKT_DATA 0
43#define TIOCPKT_FLUSHREAD 1
44#define TIOCPKT_FLUSHWRITE 2
45#define TIOCPKT_STOP 4
46#define TIOCPKT_START 8
47#define TIOCPKT_NOSTOP 16
48#define TIOCPKT_DOSTOP 32
49
50struct winsize { 41struct winsize {
51 unsigned short ws_row; 42 unsigned short ws_row;
52 unsigned short ws_col; 43 unsigned short ws_col;
diff --git a/include/asm-sparc/vuid_event.h b/include/asm-sparc/vuid_event.h
deleted file mode 100644
index 7781e9f2fdd3..000000000000
--- a/include/asm-sparc/vuid_event.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/* SunOS Virtual User Input Device (VUID) compatibility */
2
3
4typedef struct firm_event {
5 unsigned short id; /* tag for this event */
6 unsigned char pair_type; /* unused by X11 */
7 unsigned char pair; /* unused by X11 */
8 int value; /* VKEY_UP, VKEY_DOWN or delta */
9 struct timeval time;
10} Firm_event;
11
12enum {
13 FE_PAIR_NONE,
14 FE_PAIR_SET,
15 FE_PAIR_DELTA,
16 FE_PAIR_ABSOLUTE
17};
18
19/* VUID stream formats */
20#define VUID_NATIVE 0 /* Native byte stream format */
21#define VUID_FIRM_EVENT 1 /* send firm_event structures */
22
23/* ioctls */
24 /* Set input device byte stream format (any of VUID_{NATIVE,FIRM_EVENT}) */
25#define VUIDSFORMAT _IOW('v', 1, int)
26 /* Retrieve input device byte stream format */
27#define VUIDGFORMAT _IOR('v', 2, int)
28
29/* Possible tag values */
30/* mouse buttons: */
31#define MS_LEFT 0x7f20
32#define MS_MIDDLE 0x7f21
33#define MS_RIGHT 0x7f22
34/* motion: */
35#define LOC_X_DELTA 0x7f80
36#define LOC_Y_DELTA 0x7f81
37#define LOC_X_ABSOLUTE 0x7f82 /* X compat, unsupported */
38#define LOC_Y_ABSOLUTE 0x7f83 /* X compat, unsupported */
39
40#define VKEY_UP 0
41#define VKEY_DOWN 1