1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../xanim/devfs.patch
5 # Copyright (C) 2004 - 2005 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
8 # More information can be found in the files COPYING and README.
10 # This patch file is dual-licensed. It is available under the license the
11 # patched project is licensed under, as long as it is an OpenSource license
12 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
13 # of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
16 # --- T2-COPYRIGHT-NOTE-END ---
18 --- ./docs/Rev_History.doc.orig Wed Mar 21 14:33:32 2001
19 +++ ./docs/Rev_History.doc Wed Mar 21 14:33:32 2001
21 This caused potential core dumps.
23 + HPDEV: setting sampling rate occasionally failed because
24 - /dev/audio reported it was busy. Now loop on that.
25 + /dev/sound/audio reported it was busy. Now loop on that.
27 -------------------------------------------------------------------------
29 --- ./xa_audio.c.orig Wed Mar 21 14:33:25 2001
30 +++ ./xa_audio.c Wed Mar 21 14:33:26 2001
34 /********** Sparc_Audio_Init **********************
35 - * Open /dev/audio and /dev/audioctl for Sparc's.
36 + * Open /dev/sound/audio and /dev/sound/audioctl for Sparc's.
39 void Sparc_Audio_Init()
42 DEBUG_LEVEL2 fprintf(stderr,"Sparc_Audio_Init\n");
43 if (xa_audio_present != XA_AUDIO_UNK) return;
44 - devAudio = open("/dev/audio", O_WRONLY | O_NDELAY);
45 + devAudio = open("/dev/sound/audio", O_WRONLY | O_NDELAY);
48 if (errno == EBUSY) fprintf(stderr,"Audio_Init: Audio device is busy. - ");
52 /********** Sparc_Audio_Kill **********************
53 - * Close /dev/audio and /dev/audioctl.
54 + * Close /dev/sound/audio and /dev/sound/audioctl.
57 void Sparc_Audio_Kill()
61 /********** EWS_Audio_Init **********************
62 - * Open /dev/audio/audio on EWS.
63 + * Open /dev/sound/audio/audio on EWS.
68 * It doesn't support FLUSH, or any of the other funky Sparc ioctls
70 if (xa_audio_present != XA_AUDIO_UNK) return;
71 - devAudio = open("/dev/audio/audio", O_WRONLY | O_NDELAY);
72 + devAudio = open("/dev/sound/audio/audio", O_WRONLY | O_NDELAY);
75 if (errno == EBUSY) fprintf(stderr,"Audio_Init: Audio device is busy. - ");
79 /********** EWS_Audio_Kill **********************
80 - * Close /dev/audio/audio
81 + * Close /dev/sound/audio/audio
86 devMixer = open(_FILE_MIXER, O_RDONLY | O_NDELAY, 0);
87 /* Mixer only present on SB Pro's and above */
88 /* if not present then it's set to -1 and ignored later */
89 - /* THOUGHT: what about doing mixer ioctl to the /dev/dsp device??? */
90 + /* THOUGHT: what about doing mixer ioctl to the /dev/sound/dsp device??? */
91 if (devMixer < 0) devMixer = devAudio;
92 /* determine what volume settings exist */
94 @@ -3108,14 +3108,14 @@
97 /********** HPDEV_Audio_Init ***************************************************
98 - * open /dev/audio and init
99 + * open /dev/sound/audio and init
101 void HPDEV_Audio_Init()
103 DEBUG_LEVEL2 fprintf(stderr,"HPDEV_Audio_Init\n");
104 if (xa_audio_present != XA_AUDIO_UNK) return;
106 - if ((devAudio = open ("/dev/audio", O_WRONLY | O_NDELAY, 0)) < 0)
107 + if ((devAudio = open ("/dev/sound/audio", O_WRONLY | O_NDELAY, 0)) < 0)
109 if (errno == EBUSY) fprintf(stderr,"Audio_Init: Audio device is busy. - ");
110 else fprintf(stderr,"Audio_Init: Error opening audio device. - ");
111 @@ -3127,10 +3127,10 @@
112 fcntl(devAudio,F_SETFL,O_NDELAY);
115 - /* Get description of /dev/audio: */
116 + /* Get description of /dev/sound/audio: */
117 if (ioctl (devAudio, AUDIO_DESCRIBE, &audioDesc))
119 - perror ("ioctl AUDIO_DESCRIBE on /dev/audio");
120 + perror ("ioctl AUDIO_DESCRIBE on /dev/sound/audio");
121 xa_audio_present = XA_AUDIO_ERR;
124 @@ -3143,20 +3143,20 @@
126 if (ioctl (devAudio, AUDIO_SET_DATA_FORMAT, AUDIO_FORMAT_LINEAR16BIT))
128 - perror ("ioctl AUDIO_SET_DATA_FORMAT on /dev/audio");
129 + perror ("ioctl AUDIO_SET_DATA_FORMAT on /dev/sound/audio");
130 xa_audio_present = XA_AUDIO_ERR;
133 if (ioctl (devAudio, AUDIO_SET_CHANNELS, 1))
135 - perror ("ioctl AUDIO_SET_CHANNELS on /dev/audio");
136 + perror ("ioctl AUDIO_SET_CHANNELS on /dev/sound/audio");
137 xa_audio_present = XA_AUDIO_ERR;
141 /* set device internal buffer size: */
142 if (ioctl (devAudio, AUDIO_SET_TXBUFSIZE, 16 * 1024))
143 - perror ("ioctl AUDIO_SET_TXBUFSIZE on /dev/audio");
144 + perror ("ioctl AUDIO_SET_TXBUFSIZE on /dev/sound/audio");
147 xa_audio_present = XA_AUDIO_OK;
148 @@ -3188,7 +3188,7 @@
149 xa_audio_status = XA_AUDIO_STOPPED;
151 if (ioctl (devAudio, AUDIO_DRAIN, 0))
152 - perror ("ioctl AUDIO_DRAIN on /dev/audio");
153 + perror ("ioctl AUDIO_DRAIN on /dev/sound/audio");
156 xa_audio_flushed = 0;
157 @@ -3210,7 +3210,7 @@
159 do { ret = ioctl(devAudio, AUDIO_SET_SAMPLE_RATE, xa_snd_cur->hfreq);
160 } while( (ret < 0) && (errno == EBUSY) );
161 - if (ret < 0) perror ("ioctl AUDIO_SET_SAMPLE_RATE on /dev/audio");
162 + if (ret < 0) perror ("ioctl AUDIO_SET_SAMPLE_RATE on /dev/sound/audio");
163 xa_audio_hard_freq = xa_snd_cur->hfreq;
166 @@ -3273,7 +3273,7 @@
168 if (ioctl (devAudio, AUDIO_GET_OUTPUT, &output_channel))
170 - perror ("ioctl AUDIO_GET_OUTPUT on /dev/audio");
171 + perror ("ioctl AUDIO_GET_OUTPUT on /dev/sound/audio");
175 @@ -3286,7 +3286,7 @@
176 output_channel ^= AUDIO_OUT_SPEAKER;
178 if (ioctl (devAudio, AUDIO_SET_OUTPUT, output_channel))
179 - perror ("ioctl AUDIO_SET_OUTPUT on /dev/audio");
180 + perror ("ioctl AUDIO_SET_OUTPUT on /dev/sound/audio");
183 /********** HPDEV_Headphone_Toggle **********************
184 @@ -3302,7 +3302,7 @@
186 if (ioctl (devAudio, AUDIO_GET_OUTPUT, &output_channel))
188 - perror ("ioctl AUDIO_GET_OUTPUT on /dev/audio");
189 + perror ("ioctl AUDIO_GET_OUTPUT on /dev/sound/audio");
193 @@ -3315,7 +3315,7 @@
194 output_channel ^= AUDIO_OUT_HEADPHONE;
196 if (ioctl (devAudio, AUDIO_SET_OUTPUT, output_channel))
197 - perror ("ioctl AUDIO_SET_OUTPUT on /dev/audio");
198 + perror ("ioctl AUDIO_SET_OUTPUT on /dev/sound/audio");
201 /********** HPDEV_LineOut_Toggle **********************
202 @@ -3331,7 +3331,7 @@
204 if (ioctl (devAudio, AUDIO_GET_OUTPUT, &output_channel))
206 - perror ("ioctl AUDIO_GET_OUTPUT on /dev/audio");
207 + perror ("ioctl AUDIO_GET_OUTPUT on /dev/sound/audio");
211 @@ -3344,7 +3344,7 @@
212 output_channel ^= AUDIO_OUT_LINE;
214 if (ioctl (devAudio, AUDIO_SET_OUTPUT, output_channel))
215 - perror ("ioctl AUDIO_SET_OUTPUT on /dev/audio");
216 + perror ("ioctl AUDIO_SET_OUTPUT on /dev/sound/audio");
219 /********** HPDEV_Adjust_Volume **********************
220 @@ -3361,19 +3361,19 @@
222 if (ioctl (devAudio, AUDIO_DESCRIBE, &description))
224 - perror ("ioctl AUDIO_DESCRIBE on /dev/audio");
225 + perror ("ioctl AUDIO_DESCRIBE on /dev/sound/audio");
228 if (ioctl (devAudio, AUDIO_GET_GAINS, &gains))
230 - perror ("ioctl AUDIO_GET_GAINS on /dev/audio");
231 + perror ("ioctl AUDIO_GET_GAINS on /dev/sound/audio");
234 gains.transmit_gain = (int)((float)description.min_transmit_gain +
235 (float)(description.max_transmit_gain
236 - description.min_transmit_gain) * floatvolume);
237 if (ioctl (devAudio, AUDIO_SET_GAINS, &gains))
238 - perror ("ioctl AUDIO_SET_GAINS on /dev/audio");
239 + perror ("ioctl AUDIO_SET_GAINS on /dev/sound/audio");
243 @@ -4637,7 +4637,7 @@
246 /********** NetBSD_Audio_Init **********************
247 - * Open /dev/audio and NetBSD.
248 + * Open /dev/sound/audio and NetBSD.
251 void NetBSD_Audio_Init()
252 @@ -4646,7 +4646,7 @@
254 DEBUG_LEVEL2 fprintf(stderr,"NetBSD_Audio_Init\n");
255 if (xa_audio_present != XA_AUDIO_UNK) return;
256 - devAudio = open("/dev/audio", O_WRONLY | O_NDELAY);
257 + devAudio = open("/dev/sound/audio", O_WRONLY | O_NDELAY);
260 if (errno == EBUSY) fprintf(stderr,"Audio_Init: Audio device is busy. - ");
261 @@ -4728,7 +4728,7 @@
264 /********** NetBSD_Audio_Kill **********************
265 - * Close /dev/audio.
266 + * Close /dev/sound/audio.
269 void NetBSD_Audio_Kill()
270 --- ./xa_audio.h.orig Wed Mar 21 14:33:30 2001
271 +++ ./xa_audio.h Wed Mar 21 14:33:30 2001
273 #define _FILE_DSP "/dev/sb_dsp"
274 #define _FILE_MIXER "/dev/sb_mixer"
276 -#define _FILE_DSP "/dev/dsp"
277 -#define _FILE_MIXER "/dev/mixer"
278 +#define _FILE_DSP "/dev/sound/dsp"
279 +#define _FILE_MIXER "/dev/sound/mixer"
281 #include <machine/soundcard.h>
283 --- ./xa_config.h.orig Wed Mar 21 14:33:30 2001
284 +++ ./xa_config.h Wed Mar 21 14:33:30 2001
287 #define DEFAULT_AUDIO_DEVICE_NAME "/dev/paud0/1"
289 -#define DEFAULT_AUDIO_DEVICE_NAME "/dev/audio"
290 +#define DEFAULT_AUDIO_DEVICE_NAME "/dev/sound/audio"