/[linux-patches]/genpatches-2.6/trunk/2.6.14/4900_speakup-20051028.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/4900_speakup-20051028.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 198 - (hide annotations) (download) (as text)
Fri Oct 28 11:46:12 2005 UTC (15 years, 1 month ago) by dsd
File MIME type: text/x-diff
File size: 380362 byte(s)
Speakup 20051028
1 dsd 198 diff -urNpXdontdiff linux-2.6.14/arch/arm/Kconfig linux-dsd/arch/arm/Kconfig
2     --- linux-2.6.14/arch/arm/Kconfig 2005-10-28 12:35:25.000000000 +0100
3     +++ linux-dsd/arch/arm/Kconfig 2005-10-28 12:24:46.000000000 +0100
4     @@ -724,6 +724,7 @@ source "drivers/mfd/Kconfig"
5     source "drivers/media/Kconfig"
6    
7     source "drivers/video/Kconfig"
8     +source "drivers/char/speakup/Kconfig"
9    
10     source "sound/Kconfig"
11    
12     diff -urNpXdontdiff linux-2.6.14/arch/mips/Kconfig linux-dsd/arch/mips/Kconfig
13     --- linux-2.6.14/arch/mips/Kconfig 2005-10-28 12:35:46.000000000 +0100
14     +++ linux-dsd/arch/mips/Kconfig 2005-10-28 12:24:46.000000000 +0100
15     @@ -931,6 +931,8 @@ config SIBYTE_STANDALONE
16     depends on SIBYTE_SB1xxx_SOC && !SIBYTE_CFE
17     default y
18    
19     +source "drivers/char/speakup/Kconfig"
20     +
21     config SIBYTE_STANDALONE_RAM_SIZE
22     int "Memory size (in megabytes)"
23     depends on SIBYTE_STANDALONE
24     diff -urNpXdontdiff linux-2.6.14/Documentation/speakup/DefaultKeyAssignments linux-dsd/Documentation/speakup/DefaultKeyAssignments
25     --- linux-2.6.14/Documentation/speakup/DefaultKeyAssignments 1970-01-01 01:00:00.000000000 +0100
26     +++ linux-dsd/Documentation/speakup/DefaultKeyAssignments 2005-10-28 12:24:46.000000000 +0100
27 eradicator 150 @@ -0,0 +1,46 @@
28     +This file is intended to give you an overview of the default keys used
29     +by speakup for it's review functions. You may change them to be
30     +anything you want but that will take some familiarity with key
31     +mapping.
32     +
33     +We have remapped the insert or zero key on the keypad to act as a
34     +shift key. Well, actually as an altgr key. So in the following list
35     +InsKeyPad-period means hold down the insert key like a shift key and
36     +hit the keypad period.
37     +
38     +KeyPad-8 Say current Line
39     +InsKeyPad-8 say from top of screen to reading cursor.
40     +KeyPad-7 Say Previous Line (UP one line)
41     +KeyPad-9 Say Next Line (down one line)
42     +KeyPad-5 Say Current Word
43     +InsKeyPad-5 Spell Current Word
44     +KeyPad-4 Say Previous Word (left one word)
45     +InsKeyPad-4 say from left edge of line to reading cursor.
46     +KeyPad-6 Say Next Word (right one word)
47     +InsKeyPad-6 Say from reading cursor to right edge of line.
48     +KeyPad-2 Say Current Letter
49     +InsKeyPad-2 say current letter phonetically
50     +KeyPad-1 Say Previous Character (left one letter)
51     +KeyPad-3 Say Next Character (right one letter)
52     +KeyPad-plus Say Entire Screen
53     +InsKeyPad-plus Say from reading cursor line to bottom of screen.
54     +KeyPad-Minus Park reading cursor (toggle)
55     +InsKeyPad-minus Say character hex and decimal value.
56     +KeyPad-period Say Position (current line, position and console)
57     +InsKeyPad-period say colour attributes of current position.
58     +InsKeyPad-9 Move reading cursor to top of screen (insert pgup)
59     +InsKeyPad-3 Move reading cursor to bottom of screen (insert pgdn)
60     +InsKeyPad-7 Move reading cursor to left edge of screen (insert home)
61     +InsKeyPad-1 Move reading cursor to right edge of screen (insert end)
62     +ControlKeyPad-1 Move reading cursor to last character on current line.
63     +KeyPad-Enter Shut Up (until another key is hit) and sync reading cursor
64     +InsKeyPad-Enter Shut Up (until toggled back on).
65     +InsKeyPad-star n<x|y> go to line (y) or column (x). Where 'n' is any
66     + allowed value for the row or column for your current screen.
67     +KeyPad-/ Mark and Cut screen region.
68     +InsKeyPad-/ Paste screen region into any console.
69     +
70     +Hitting any key while speakup is outputting speech will quiet the
71     +synth until it has caught up with what is being printed on the
72     +console.
73     +
74 dsd 198 diff -urNpXdontdiff linux-2.6.14/Documentation/speakup/INSTALLATION linux-dsd/Documentation/speakup/INSTALLATION
75     --- linux-2.6.14/Documentation/speakup/INSTALLATION 1970-01-01 01:00:00.000000000 +0100
76     +++ linux-dsd/Documentation/speakup/INSTALLATION 2005-10-28 12:24:46.000000000 +0100
77 eradicator 150 @@ -0,0 +1,108 @@
78     +This document assumes you have had some experience with kernel
79     +compilation and installation. If you have not, I recommend you get
80     +the kernel source and read the README and various documents in the
81     +linux/Documentation directory. In particular the Changes file to make
82     +sure you have the appropriate utilities needed for installing a 2.2.xx
83     +or 2.4xx kernel. It isn't as difficult as you might think. The
84     +kernel README is intimidating the first time but once you get the
85     +steps down, it's really pretty easy. Getting through the "make
86     +config" is the tedious bit.
87     +
88     +The first thing to do is to place a copy of the tarball in the /usr/src
89     +directory which is the directory the linux tree is located in as well.
90     +Next untar speakup by typing:
91     +
92     +tar zxf speakup-1.00.tar.gz
93     +cd speakup-1.00
94     +./install
95     +
96     +Note the dot-slash before the install. This will copy the speakup
97     +directory to the kernel tree and apply the various patches and
98     +components to the appropriate kernel files. Depending on how
99     +experienced you are with kernel compiling and hacking will determine
100     +whether you should bother looking at any failed patches. If this
101     +happens, you should probably write to the speakup mailing list for
102     +help or myself.
103     +
104     +If all of the patch hunks apply successfully then just continue with
105     +the standard steps to compile the kernel with:
106     +
107     +make mrproper
108     +make config
109     +
110     +When you get to the section console speech output, answer 'y' to the
111     +CONFIG_SPEAKUP prompt. You will be given a submenu with the list of
112     +synthesizers which are currently supported. You can include as many
113     +synths in the kernel as you wish but remember each one takes up kernel
114     +space. You can only choose one of the synths as the default or none,
115     +so just type dtlk or whatever is the correct string for the
116     +synthesizer you have. You will also be asked if you wish to build-in
117     +a speakup key map. If you do not say 'y' to this option you will need
118     +to load a speakup map at boot time with whichever mechanism your
119     +distribution uses for loading key maps.
120     +
121     +We have placed the speakup configuration options in make config just
122     +after the vga console choice. For the DoubleTalk PC driver included
123     +by Jim Van Zandt. I recommend you say no to that option. I have not
124     +tried configuring them both in, but I wouldn't be at all surprised if
125     +it didn't work.
126     +
127     +If all goes well up to this point you can continue with the compiling
128     +process by doing:
129     +
130     +make dep >dep.file 2>&1 &
131     +make bzImage >cc.file 2>&1 &
132     +make modules >mod.file 2>&1 &
133     +
134     +I always redirect output to the files dep.file and cc.file so I can
135     +look over the compilation record to make sure there are no errors and
136     +warnings.
137     +
138     +Okay, you are ready to install the newly compiled kernel. Make sure
139     +you make an linux.old entry in your lilo.conf file so you can recover
140     +if it blows up. next as root run "make modules_install" to install
141     +whatever modules you compiled and move the bzImage from
142     +/usr/src/linux/arch/i386/boot to wherever your kernel lives. Also
143     +move the System.map from /usr/src/linux to where your System.map
144     +lives. On our systems we use debian so we create an vmlinuz-speakup
145     +and System.map-speakup in our /boot directory and set the symbolic
146     +links vmlinuz and System.map in the root (/) directory to point to the
147     +images. Now type lilo to tell lilo to build the new booter file and
148     +install it.
149     +
150     +As of version 0.07, the keymap for speakup is automatically built in
151     +at compile time. If you have other keymaps installed at boot time,
152     +you might want to consider removing them before you reboot the system.
153     +
154     +If everything has gone OK up until now, cross your fingers and type:
155     +
156     +shutdown -r now
157     +
158     +Your system should start talking to you as soon as it starts booting.
159     +It will talk and talk and ... well, you might want to hit the
160     +keypad-enter key to tell it to shut up. You should also read the
161     +DefaultKeyAssignments file to learn the various review functions
162     +available.
163     +
164     +As of v-0.10 the speakup configuration options are in the
165     +/proc/speakup subtree. The individual options should be fairly
166     +obvious by their names such as rate, volume, punc_level and so forth.
167     +You can manipulate them by cat'ing or echoing new values to them such
168     +as:
169     +
170     +echo 9 >/proc/speakup/rate
171     +
172     +You can see what the current values are by cat'ing those files to the console:
173     +
174     +cat /proc/speakup/rate
175     +
176     +I have probably managed to overlook a whole whack of things because
177     +this is the, enter version number here, draft. Don't worry we'll get
178     +it right eventually. If you like the package you really should get on
179     +the mailing list and start participating in it's development.
180     +
181     + Kirk
182     +
183     +email: kirk@braille.uwo.ca
184     +phone: (519) 679-6845 (home)
185     +
186 dsd 198 diff -urNpXdontdiff linux-2.6.14/Documentation/speakup/keymap-tutorial linux-dsd/Documentation/speakup/keymap-tutorial
187     --- linux-2.6.14/Documentation/speakup/keymap-tutorial 1970-01-01 01:00:00.000000000 +0100
188     +++ linux-dsd/Documentation/speakup/keymap-tutorial 2005-10-28 12:24:46.000000000 +0100
189 eradicator 150 @@ -0,0 +1,140 @@
190     + Speakup Keymap Tutorial
191     +
192     +This is meant to be a basic tutorial on how to change the Linux keymap
193     +file to assign speakup review functions to desired keys. It is not
194     +intended to be a replacement for the loadkeys(8) or keymap(5) man
195     +pages.
196     +
197     +The basic lay-out of the keymap file is a series of lines with the
198     +following fields. The keyword keycode indicates this is the start of
199     +a new key assignment. It is then followed by a number which
200     +represents the actual key on the keyboard. That number is followed by
201     +the equals '=' operator and finally a list of keywords representing
202     +key names such as keypad5. Each line can have quite a few key
203     +functions on it. They are interpreted by loadkeys in order and
204     +assigned to key shift states depending on the order they are
205     +encountered. So for example, the first value after the equals is the
206     +keys unshifted state, while the second is the keys shifted state. If
207     +you wish to learn the order they are interpreted in read the
208     +loadkeys(8) and keymap(5) man pages.
209     +
210     +You can have subsequent lines which are indented and start with
211     +another keyword for the various shifted states. This way you can
212     +assign some of the states without having to specify them all in order
213     +up until you get to the one you want to assign.
214     +
215     +In speakup, we have assigned the insert key on the number pad to the
216     +altgr keyword. This is not required; you could choose any other
217     +shifted state keyword. We used altgr because it typically represents
218     +the right hand alt key. In Linux each shift key is separate and
219     +independent, so the left shift and the right shift keys are not
220     +necessarily the same. The altgr key is not really used for anything
221     +important, so we steel it.
222     +
223     +Here are the default key assignments for the number eight on the
224     +keypad:
225     +
226     +keycode 72 = KP_8
227     + alt keycode 72 = Ascii_8
228     +
229     +As you can see, the first line starts with keycode followed by 72
230     +which is the actual number assigned to the key when the keyboard port
231     +is read. The KP_8 after the equal sign, is the symbolic representation
232     +of the function called when that key is hit.
233     +
234     +The second line is the same format except it starts with the keyword
235     +alt which is indented. That means that the function at the end of
236     +that line Ascii_8 is applied to the alt-shifted eight key.
237     +
238     +Now here are the speakup assignments for that key:
239     +
240     +keycode 72 = 0x0d0a
241     + altgr keycode 72 = 0x0d20
242     +#keycode 72 = KP_8
243     + alt keycode 72 = Ascii_8
244     +
245     +Notice that the only thing which has changed on the first line is the
246     +function called when the key is struck. It is a hexadecimal number
247     +identifying the function called in a look up table. It is not a
248     +symbolic representation yet because that means we need to change the
249     +loadkeys program to understand our symbolic names. We will do this in
250     +the future but for now it is more expedient to just use the table
251     +indices. You will find a table at the bottom of this document
252     +listing the review functions and their corresponding hex lookups.
253     +
254     +The 0x0d0a in the first line above is speakup's say line function.
255     +The second line ends with 0x0d20 which is speakup's read from top of
256     +screen to reading cursor line.
257     +
258     +The third line is the original key assignment commented out with a
259     +number-sign '#' at the beginning. I do that so I can easily find the
260     +keys I want to affect by symbolic name. Otherwise I would need to
261     +keep a look up table for all the keycodes. I recommend you do this as
262     +well or you'll be very sorry at some point in the future.
263     +
264     +The forth line is just the standard key assignment for the left hand
265     +alt key.
266     +
267     +Now let's say we want to design a different keyboard layout. I'll use
268     +an example for the JAWS style keypad because I've specifically been
269     +asked to help with that. JAWS uses the eight on the keypad to move up
270     +a line or the speakup function to read previous line. JAWS also uses
271     +the keypad_8 key in a shifted mode to read the current line. I
272     +apologize if these are not quite right. It has been a long time since
273     +I used JAWS. So we would have the following two lines:
274     +
275     +keycode 72 = 0x0d0b
276     + altgr keycode 72 = 0x0d0a
277     +
278     +The hex value 0x0d0b in the first line is speakup's SAY_PREVIOUS_LINE
279     +function. The 0x0d0a in the second line is the same say_line function
280     +as we had earlier. So when the number eight is hit on the keypad
281     +speakup will read the previous line and when the number eight is
282     +shifted with the insert key on the keypad it will read the current
283     +line.
284     +
285     +As you can tell, it is not really very difficult to reassign the keys
286     +to different review functions.
287     +
288     +Once you have carefully edited the keymap file, called default.map in
289     +the speakup distribution, you copy it into the /etc/kbd directory.
290     +Make sure you back up the original default.map from that directory
291     +first, if there is one. Then you run loadkeys to load the new map
292     +into the kernel:
293     +
294     +loadkeys /etc/kbd/default.map
295     +
296     +If you wish to build your new keyboard lay-out into the kernel, after
297     +testing it, copy the default.map file into the drivers/char directory,
298     +with the name defkeymap.map, of your Linux source tree. Then rm the
299     +defkeymap.c file and recompile the kernel. Because there is no
300     +defkeymap.c `make' will rebuild it on the next compile.
301     +
302     +Here is a list of the available speakup review functions at this point
303     +in time.
304     +
305     +SAY_CHAR 0x0d04 /* say this character */
306     +SAY_PREV_CHAR 0x0d05 /* say character left of this char */
307     +SAY_NEXT_CHAR 0x0d06 /* say char right of this char */
308     +SAY_WORD 0x0d07 /* say this word under reading cursor */
309     +SAY_PREV_WORD 0x0d08
310     +SAY_NEXT_WORD 0x0d09
311     +SAY_LINE 0x0d0a /* say this line */
312     +SAY_PREV_LINE 0x0d0b /* say line above this line */
313     +SAY_NEXT_LINE 0x0d0c
314     +TOP_EDGE 0x0d0d /* move to top edge of screen */
315     +BOTTOM_EDGE 0x0d0e
316     +LEFT_EDGE 0x0d0f
317     +RIGHT_EDGE 0x0d10
318     +SAY_PHONETIC_CHAR 0x0d11 /* say this character phonetically */
319     +SPELL_WORD 0x0d12 /* spell this word letter by letter */
320     +SAY_SCREEN 0x0d14
321     +SAY_POSITION 0x0d1b
322     +SPEECH_OFF 0x0d1c
323     +SAY_ATTRIBUTES 0x0d1d
324     +SPEAKUP_PARKED 0x0d1e
325     +SAY_FROM_TOP 0x0d20
326     +SAY_TO_BOTTOM 0x0d21
327     +SAY_FROM_LEFT 0x0d22
328     +SAY_TO_RIGHT 0x0d23
329     +
330 dsd 198 diff -urNpXdontdiff linux-2.6.14/Documentation/speakup/README linux-dsd/Documentation/speakup/README
331     --- linux-2.6.14/Documentation/speakup/README 1970-01-01 01:00:00.000000000 +0100
332     +++ linux-dsd/Documentation/speakup/README 2005-10-28 12:24:46.000000000 +0100
333     @@ -0,0 +1,98 @@
334     +Welcome to the speakup project for the Speakup speech package for Linux.
335     +
336     +Speakup is written by Kirk Reiser and Andy Berdan. It is licensed
337     +under the GPL. If you don't already know, the GPL stands for the GNU
338     +General Public License. Which basically states that this code is free to
339     +copy, modify and distribute to anyone interested in playing with it.
340     +The one thing you may not do is turn any part of it into proprietary
341     +or commercial code without the permission of the author. That's me.
342     +
343     +If you are interested in being involved with the development of speech
344     +output for Linux you can subscribe to the Speakup mailing list by
345     +sending a message to speakup-request@braille.uwo.ca with the line: subscribe. You can also subscribe by going to the speakup web page and following the links at http://www.linux-speakup.org.
346     +
347     +We are at a very early stage in the development of this package.
348     +Hopefully changes will happen often and many. The current files in
349     +this directory are:
350     +
351     +DefaultKeyAssignments # speakup's default review keys
352     +INSTALLATION # for installing speakup from the tar ball.
353     +README # this file
354     +keymap-tutorial # a tutorial on how to layout the keyboard
355     +
356     +Read the INSTALLATION file to learn how to apply the patches and the
357     +default.map for the keyboard. You should also read the Changes file.
358     +It really has any new things I've added since last time.
359     +
360     +There is no documentation in any of these files to instruct you what
361     +to do if something goes wrong with the patching or compilation. If
362     +you would like that information you will need to subscribe to the
363     +mailing list and ask for help, or write me kirk@braille.uwo.ca for
364     +help. I suggest the mailing list because I will probably tire quickly
365     +of answering the same questions over and over. You could always
366     +decide to dig-in and take on the task, and write documentation to help
367     +others.
368     +
369     +There also is a speakup reflector for the Speak Freely package, which
370     +many of us hang out on and discuss all sorts of topics from speakup
371     +problems to ALSA driver installation and just about anything else
372     +you'd like to talk about. The reflector is at lwl.braille.uwo.ca:4074
373     +with it's lwl page at lwl.braille.uwo.ca/speakup.html. Come and join
374     +us, it's fun!
375     +
376     +Acknowledgements:
377     +
378     +I am really very new at kernel hacking and screen review package
379     +writing, so I have depended heavily on other folks kindness to help me
380     +a long. No doubt I will continue to abuse them freely and others
381     +before this is a really good speech solution for Linux. (Oh Well!,
382     +somebody's got to do it.)
383     +
384     +Theodore Ts'o. He gave me a good discussion of unicode and UTF and
385     +the like. He doesn't even remember writing me about it.
386     +
387     +Alan Cox. He has answered many questions about scheduling and wait
388     +queues and timers along with code fragments and so on. I just wish I
389     +understood it all totally. He has also helped immensely in moving
390     +this package toward inclusion in the standard kernel tree. (Maybe next
391     +release!)
392     +
393     +Martin Mares. He pointed me in the right direction to figuring out
394     +the colour attributes and other useful tidbits.
395     +
396     +Paul McDermott. He really is the catalyst for me to actually get
397     +this all working. Besides I like seeing him bounce around and get all
398     +excited every time I have something new working.
399     +
400     +John Covici, He was the first person to actually attempt writing
401     +another synthesizer driver for speakup. It was the Speakout driver so
402     +it was also the first serial driver.
403     +
404     +Brian Borowski, he was the first person to actually write a speakup
405     +function other than Andy and I.
406     +
407     +Jim Danley, he has more or less become my main man in helping test
408     +code, add new features, bounce ideas off and generally become a good
409     +friend.
410     +
411     +Matt Campbell, he basically rewrote the drivers to be able to include
412     +all synths in the kernel at the same time. The distribution
413     +maintainers appreciate him a lot as well.
414     +
415     +Gene Collins, he was very helpful debugging the current release prior
416     +to its public showing. He has also worked hard educating others on
417     +the list and writing the ALSA mini howto.
418     +
419     +I would also like to really thank the folks that handle the
420     +distribution packages. I and many other people would not find access
421     +to speakup nearly so convenient without their efforts. They include
422     +Bill Acker, Tom Moore, Matt Campbell, Joe Norton and Joshua Lambert.
423     +
424     +There are probably many more I am forgetting right now. I guess I'll
425     +just have to add you all later.
426     +
427     +
428     +Happy Hacking!
429     +
430     + Kirk
431     +
432     diff -urNpXdontdiff linux-2.6.14/Documentation/speakup/spkguide.txt linux-dsd/Documentation/speakup/spkguide.txt
433     --- linux-2.6.14/Documentation/speakup/spkguide.txt 1970-01-01 01:00:00.000000000 +0100
434     +++ linux-dsd/Documentation/speakup/spkguide.txt 2005-10-28 12:24:46.000000000 +0100
435 eradicator 150 @@ -0,0 +1,1279 @@
436     +
437     +The Speakup User's Guide
438     +For Speakup 2.0 and Later
439     +By Gene Collins
440     +Last modified on Tue Mar 29 10:54:19 2005
441     +Document version 1.0
442     +
443     +Copyright (c) 2005 Gene Collins
444     +
445     +Permission is granted to copy, distribute and/or modify this document
446     +under the terms of the GNU Free Documentation License, Version 1.2 or
447     +any later version published by the Free Software Foundation; with no
448     +Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
449     +copy of the license is included in the section entitled "GNU Free
450     +Documentation License".
451     +
452     +Preface
453     +
454     +The purpose of this document is to familiarize users with the user
455     +interface to Speakup, a Linux Screen Reader. If you need instructions
456     +for installing or obtaining Speakup, visit the web site at
457     +http://linux-speakup.org/. Speakup is a set of patches to the standard
458     +Linux kernel source tree. It can be built as a series of modules, or as
459     +a part of a monolithic kernel. These details are beyond the scope of
460     +this manual, but the user may need to be aware of the module
461     +capabilities, depending on how your system administrator has installed
462     +Speakup. If Speakup is built as a part of a monolithic kernel, and the
463     +user is using a hardware synthesizer, then Speakup will be able to
464     +provide speech access from the time the kernel is loaded, until the time
465     +the system is shutdown. This means that if you have obtained Linux
466     +installation media for a distribution which includes Speakup as a part
467     +of its kernel, you will be able, as a blind person, to install Linux
468     +with speech access unaided by a sighted person. Again, these details
469     +are beyond the scope of this manual, but the user should be aware of
470     +them. See the web site mentioned above for further details.
471     +
472     +1. Starting Speakup
473     +
474     +If your system administrator has installed Speakup to work with your
475     +specific synthesizer by default, then all you need to do to use Speakup
476     +is to boot your system, and Speakup should come up talking. This
477     +assumes of course that your synthesizer is a supported hardware
478     +synthesizer, and that it is either installed in or connected to your
479     +system, and is if necessary powered on.
480     +
481     +It is possible, however, that Speakup may have been compiled into the
482     +kernel with no default synthesizer. It is even possible that your
483     +kernel has been compiled with support for some of the supported
484     +synthesizers and not others. If you find that this is the case, and
485     +your synthesizer is supported but not available, complain to the person
486     +who compiled and installed your kernel. Or better yet, go to the web
487     +site, and learn how to patch Speakup into your own kernel source, and
488     +build and install your own kernel.
489     +
490     +If your kernel has been compiled with Speakup, and has no default
491     +synthesizer set, or you would like to use a different synthesizer than
492     +the default one, then you may issue the following command at the boot
493     +prompt of your boot loader.
494     +
495     +linux speakup_synth=ltlk
496     +
497     +This command would tell Speakup to look for and use a LiteTalk or
498     +DoubleTalk LT at boot up. You may replace the ltlk synthesizer keyword
499     +with the keyword for whatever synthesizer you wish to use. The
500     +speakup_synth parameter will accept the following keywords, provided
501     +that support for the related synthesizers has been built into the
502     +kernel.
503     +
504     +acntsa -- Accent SA
505     +acntpc -- Accent PC
506     +apolo -- Apolo
507     +audptr -- Audapter
508     +bns -- Braille 'n Speak
509     +dectlk -- DecTalk Express (old and new, db9 serial only)
510     +decext -- DecTalk (old) External
511     +dtlk -- DoubleTalk PC
512     +keypc -- Keynote Gold PC
513     +ltlk -- DoubleTalk LT, LiteTalk, or external Tripletalk (db9 serial only)
514     +spkout -- Speak Out
515     +txprt -- Transport
516     +
517     +Note: Speakup does * NOT * support usb connections! Speakup also does *
518     +NOT * support the internal Tripletalk!
519     +
520     +Speakup does support two other synthesizers, but because they work in
521     +conjunction with other software, they must be loaded as modules after
522     +their related software is loaded, and so are not available at boot up.
523     +These are as follows:
524     +
525     +decpc -- DecTalk PC (not available at boot up)
526     +sftsyn -- One of several software synthesizers (not available at boot up)
527     +
528     +See the sections on loading modules and software synthesizers later in
529     +this manual for further details. It should be noted here that the
530     +speakup_synth boot parameter will have no effect if Speakup has been
531     +compiled as modules. In order for Speakup modules to be loaded during
532     +the boot process, such action must be configured by your system
533     +administrator. This will mean that you will hear some, but not all, of
534     +the bootup messages.
535     +
536     +2. Basic operation
537     +
538     +Once you have booted the system, and if necessary, have supplied the
539     +proper bootup parameter for your synthesizer, Speakup will begin
540     +talking as soon as the kernel is loaded. In fact, it will talk a lot!
541     +It will speak all the boot up messages that the kernel prints on the
542     +screen during the boot process. This is because Speakup is not a
543     +separate screen reader, but is actually built into the operating
544     +system. Since almost all console applications must print text on the
545     +screen using the kernel, and must get their keyboard input through the
546     +kernel, they are automatically handled properly by Speakup. There are a
547     +few exceptions, but we'll come to those later.
548     +
549     +Note: In this guide I will refer to the numeric keypad as the keypad.
550     +This is done because the speakupmap.map file referred to later in this
551     +manual uses the term keypad instead of numeric keypad. Also I'm lazy
552     +and would rather only type one word. So keypad it is. Got it? Good.
553     +
554     +Most of the Speakup review keys are located on the keypad at the far
555     +right of the keyboard. The numlock key should be off, in order for these
556     +to work. If you toggle the numlock on, the keypad will produce numbers,
557     +which is exactly what you want for spreadsheets and such. For the
558     +purposes of this guide, you should have the numlock turned off, which is
559     +its default state at bootup.
560     +
561     +You probably won't want to listen to all the bootup messages every time
562     +you start your system, though it's a good idea to listen to them at
563     +least once, just so you'll know what kind of information is available to
564     +you during the boot process. You can always review these messages after
565     +bootup with the command:
566     +
567     +dmesg | more
568     +
569     +In order to speed the boot process, and to silence the speaking of the
570     +bootup messages, just press the keypad enter key. This key is located
571     +in the bottom right corner of the keypad. Speakup will shut up and stay
572     +that way, until you press another key.
573     +
574     +You can check to see if the boot process has completed by pressing the 8
575     +key on the keypad, which reads the current line. This also has the
576     +effect of starting Speakup talking again, so you can press keypad enter
577     +to silence it again if the boot process has not completed.
578     +
579     +When the boot process is complete, you will arrive at a "login" prompt.
580     +At this point, you'll need to type in your user id and password, as
581     +provided by your system administrator. You will hear Speakup speak the
582     +letters of your user id as you type it, but not the password. This is
583     +because the password is not displayed on the screen for security
584     +reasons. This has nothing to do with Speakup, it's a Linux security
585     +feature.
586     +
587     +Once you've logged in, you can run any Linux command or program which is
588     +allowed by your user id. Normal users will not be able to run programs
589     +which require root privileges.
590     +
591     +When you are running a program or command, Speakup will automatically
592     +speak new text as it arrives on the screen. You can at any time silence
593     +the speech with keypad enter, or use any of the Speakup review keys.
594     +
595     +Here are some basic Speakup review keys, and a short description of what
596     +they do.
597     +
598     +keypad 1 -- read previous character
599     +keypad 2 -- read current character (pressing keypad 2 twice rapidly will speak
600     + the current character phonetically)
601     +keypad 3 -- read next character
602     +keypad 4 -- read previous word
603     +keypad 5 -- read current word (press twice rapidly to spell the current word)
604     +keypad 6 -- read next word
605     +keypad 7 -- read previous line
606     +keypad 8 -- read current line (press twice rapidly to hear how much the
607     + text on the current line is indented)
608     +keypad 9 -- read next line
609     +keypad period -- speak current cursor position and announce current
610     + virtual console
611     +
612     +It's also worth noting that the insert key on the keypad is mapped
613     +as the speakup key. Instead of pressing and releasing this key, as you
614     +do under DOS or Windows, you hold it like a shift key, and press other
615     +keys in combination with it. For example, repeatedly holding keypad
616     +insert, from now on called speakup, and keypad enter will toggle the
617     +speaking of new text on the screen on and off. This is not the same as
618     +just pressing keypad enter by itself, which just silences the speech
619     +until you hit another key. When you hit speakup plus keypad enter,
620     +Speakup will say, "You turned me off.", or "Hey, that's better." When
621     +Speakup is turned off, no new text on the screen will be spoken. You
622     +can still use the reading controls to review the screen however.
623     +
624     +3. Using the Speakup Help System
625     +
626     +Speakup has a help system, which is compiled as a module. It is loaded
627     +automatically whenever the Speakup help system is invoked for the first
628     +time, and remains loaded after that, until speakup is unloaded. Note
629     +that if speakup was compiled into a monolithic kernel on your system,
630     +you will not be able to unload Speakup from your kernel. If you try to
631     +use the help system, and find that it is unavailable, then your system
632     +administrator has not installed the Speakup help module, which is called
633     +speakup_help. Complain to your system administrator about this.
634     +
635     +In order to enter the Speakup help system, press and hold the speakup
636     +key (remember that this is the keypad insert key), and press the f1 key.
637     +You will hear the message:
638     +
639     +"Press space to leave help, cursor up or down to scroll, or a letter to
640     +go to commands in list."
641     +
642     +When you press the spacebar to leave the help system, you will hear:
643     +
644     +"Leaving help."
645     +
646     +While you are in the Speakup help system, you can scroll up or down
647     +through the list of available commands using the cursor keys. The list
648     +of commands is arranged in alphabetical order. If you wish to jump to
649     +commands in a specific part of the alphabet, you may press the letter of
650     +the alphabet you wish to jump to.
651     +
652     +You can also just explore by typing keyboard keys. Pressing keys will
653     +cause Speakup to speak the command associated with that key. For
654     +example, if you press the keypad 8 key, you will hear:
655     +
656     +"Keypad 8 is line, say current."
657     +
658     +You'll notice that some commands do not have keys assigned to them.
659     +This is because they are very infrequently used commands, and are also
660     +accessible through the proc system. We'll discuss the proc system later
661     +in this manual.
662     +
663     +You'll also notice that some commands have two keys assigned to them.
664     +This is because Speakup has a built in set of alternative key bindings
665     +for laptop users. The alternate speakup key is the caps lock key. You
666     +can press and hold the caps lock key, while pressing an alternate
667     +speakup command key to activate the command. On most laptops, the
668     +numeric keypad is defined as the keys in the j k l area of the keyboard.
669     +
670     +There is usually a function key which turns this keypad function on and
671     +off, and some other key which controls the numlock state. Toggling the
672     +keypad functionality on and off can become a royal pain. So, Speakup
673     +gives you a simple way to get at an alternative set of key mappings for
674     +your laptop. These are also available by default on desktop systems,
675     +because Speakup does not know whether it is running on a desktop or
676     +laptop. So you may choose which set of Speakup keys to use. Some
677     +system administrators may have chosen to compile Speakup for a desktop
678     +system without this set of alternate key bindings, but these details are
679     +beyond the scope of this manual. To use the caps lock for its normal
680     +purpose, hold the shift key while toggling the caps lock on and off. We
681     +should note here, that holding the caps lock key and pressing the z key
682     +will toggle the alternate j k l keypad on and off.
683     +
684     +4. Keys and Their Assigned Commands
685     +
686     +In this section, we'll go through a list of all the speakup keys and
687     +commands. You can also get a list of commands and assigned keys from
688     +the help system.
689     +
690     +The following list was taken from the speakupmap.map file. Key
691     +assignments are on the left of the equal sign, and the associated
692     +Speakup commands are on the right. The designation "spk" means to press
693     +and hold the speakup key, a.k.a. keypad insert, a.k.a. caps lock, while
694     +pressing the other specified key.
695     +
696     +spk key_f9 = punc_level_dec
697     +spk key_f10 = punc_level_inc
698     +spk key_f11 = reading_punc_dec
699     +spk key_f12 = reading_punc_inc
700     +spk key_1 = vol_dec
701     +spk key_2 = vol_inc
702     +spk key_3 = pitch_dec
703     +spk key_4 = pitch_inc
704     +spk key_5 = rate_dec
705     +spk key_6 = rate_inc
706     +key_kpasterisk = toggle_cursoring
707     +spk key_kpasterisk = speakup_goto
708     +spk key_f1 = speakup_help
709     +spk key_f2 = set_win
710     +spk key_f3 = clear_win
711     +spk key_f4 = enable_win
712     +spk key_f5 = edit_some
713     +spk key_f6 = edit_most
714     +spk key_f7 = edit_delim
715     +spk key_f8 = edit_repeat
716     +shift spk key_f9 = edit_exnum
717     + key_kp7 = say_prev_line
718     +spk key_kp7 = left_edge
719     + key_kp8 = say_line
720     +double key_kp8 = say_line_indent
721     +spk key_kp8 = say_from_top
722     + key_kp9 = say_next_line
723     +spk key_kp9 = top_edge
724     + key_kpminus = speakup_parked
725     +spk key_kpminus = say_char_num
726     + key_kp4 = say_prev_word
727     +spk key_kp4 = say_from_left
728     + key_kp5 = say_word
729     +double key_kp5 = spell_word
730     +spk key_kp5 = spell_phonetic
731     + key_kp6 = say_next_word
732     +spk key_kp6 = say_to_right
733     + key_kpplus = say_screen
734     +spk key_kpplus = say_win
735     + key_kp1 = say_prev_char
736     +spk key_kp1 = right_edge
737     + key_kp2 = say_char
738     +spk key_kp2 = say_to_bottom
739     +double key_kp2 = say_phonetic_char
740     + key_kp3 = say_next_char
741     +spk key_kp3 = bottom_edge
742     + key_kp0 = spk_key
743     + key_kpdot = say_position
744     +spk key_kpdot = say_attributes
745     +key_kpenter = speakup_quiet
746     +spk key_kpenter = speakup_off
747     +key_sysrq = speech_kill
748     + key_kpslash = speakup_cut
749     +spk key_kpslash = speakup_paste
750     +spk key_pageup = say_first_char
751     +spk key_pagedown = say_last_char
752     +key_capslock = spk_key
753     + spk key_z = spk_lock
754     +key_leftmeta = spk_key
755     +ctrl spk key_0 = speakup_goto
756     +spk key_u = say_prev_line
757     +spk key_i = say_line
758     +double spk key_i = say_line_indent
759     +spk key_o = say_next_line
760     +spk key_minus = speakup_parked
761     +shift spk key_minus = say_char_num
762     +spk key_j = say_prev_word
763     +spk key_k = say_word
764     +double spk key_k = spell_word
765     +spk key_l = say_next_word
766     +spk key_m = say_prev_char
767     +spk key_comma = say_char
768     +double spk key_comma = say_phonetic_char
769     +spk key_dot = say_next_char
770     +spk key_n = say_position
771     + ctrl spk key_m = left_edge
772     + ctrl spk key_y = top_edge
773     + ctrl spk key_dot = right_edge
774     +ctrl spk key_p = bottom_edge
775     +spk key_apostrophe = say_screen
776     +spk key_h = say_from_left
777     +spk key_y = say_from_top
778     +spk key_semicolon = say_to_right
779     +spk key_p = say_to_bottom
780     +spk key_slash = say_attributes
781     + spk key_enter = speakup_quiet
782     + ctrl spk key_enter = speakup_off
783     + spk key_9 = speakup_cut
784     +spk key_8 = speakup_paste
785     +shift spk key_m = say_first_char
786     + ctrl spk key_semicolon = say_last_char
787     +
788     +5. The Speakup Proc System
789     +
790     +The Speakup screen reader also creates a speakup subdirectory as a part
791     +of the proc system. You can see these entries by typing the command:
792     +
793     +ls -1 /proc/speakup/*
794     +
795     +If you issue the above ls command, you will get back something like
796     +this:
797     +
798     +/proc/speakup/attrib_bleep
799     +/proc/speakup/bell_pos
800     +/proc/speakup/bleep_time
801     +/proc/speakup/bleeps
802     +/proc/speakup/caps_start
803     +/proc/speakup/caps_stop
804     +/proc/speakup/characters
805     +/proc/speakup/cursor_time
806     +/proc/speakup/delay_time
807     +/proc/speakup/delimiters
808     +/proc/speakup/ex_num
809     +/proc/speakup/freq
810     +/proc/speakup/full_time
811     +/proc/speakup/jiffy_delta
812     +/proc/speakup/key_echo
813     +/proc/speakup/keymap
814     +/proc/speakup/no_interrupt
815     +/proc/speakup/pitch
816     +/proc/speakup/punc_all
817     +/proc/speakup/punc_level
818     +/proc/speakup/punc_most
819     +/proc/speakup/punc_some
820     +/proc/speakup/punct
821     +/proc/speakup/rate
822     +/proc/speakup/reading_punc
823     +/proc/speakup/repeats
824     +/proc/speakup/say_control
825     +/proc/speakup/say_word_ctl
826     +/proc/speakup/silent
827     +/proc/speakup/spell_delay
828     +/proc/speakup/synth_direct
829     +/proc/speakup/synth_name
830     +/proc/speakup/tone
831     +/proc/speakup/trigger_time
832     +/proc/speakup/version
833     +/proc/speakup/voice
834     +/proc/speakup/vol
835     +
836     +In addition to using the Speakup hot keys to change such things as
837     +volume, pitch, and rate, you can also echo values to the appropriate
838     +entry in the /proc/speakup directory. This is very useful, since it
839     +lets you control Speakup parameters from within a script. How you
840     +would write such scripts is somewhat beyond the scope of this manual,
841     +but I will include a couple of simple examples here to give you a
842     +general idea of what such scripts can do.
843     +
844     +Suppose for example, that you wanted to control both the punctuation
845     +level and the reading punctuation level at the same time. For
846     +simplicity, we'll call them punc0, punc1, punc2, and punc3. The scripts
847     +might look something like this:
848     +
849     +#!/bin/bash
850     +# punc0
851     +# set punc and reading punc levels to 0
852     +echo 0 >/proc/speakup/punc_level
853     +echo 0 >/proc/speakup/reading_punc
854     +echo Punctuation level set to 0.
855     +
856     +#!/bin/bash
857     +# punc1
858     +# set punc and reading punc levels to 1
859     +echo 1 >/proc/speakup/punc_level
860     +echo 1 >/proc/speakup/reading_punc
861     +echo Punctuation level set to 1.
862     +
863     +#!/bin/bash
864     +# punc2
865     +# set punc and reading punc levels to 2
866     +echo 2 >/proc/speakup/punc_level
867     +echo 2 >/proc/speakup/reading_punc
868     +echo Punctuation level set to 2.
869     +
870     +#!/bin/bash
871     +# punc3
872     +# set punc and reading punc levels to 3
873     +echo 3 >/proc/speakup/punc_level
874     +echo 3 >/proc/speakup/reading_punc
875     +echo Punctuation level set to 3.
876     +
877     +If you were to store these four small scripts in a directory in your
878     +path, perhaps /usr/local/bin, and set the permissions to 755 with the
879     +chmod command, then you could change the default reading punc and
880     +punctuation levels at the same time by issuing just one command. For
881     +example, if you were to execute the punc3 command at your shell prompt,
882     +then the reading punc and punc level would both get set to 3.
883     +
884     +I should note that the above scripts were written to work with bash, but
885     +regardless of which shell you use, you should be able to do something
886     +similar.
887     +
888     +The Speakup proc system also has another interesting use. You can echo
889     +Speakup parameters into the proc system in a script during system
890     +startup, and speakup will return to your preferred parameters every time
891     +the system is rebooted.
892     +
893     +Most of the Speakup proc parameters can be manipulated by a regular user
894     +on the system. However, there are a few parameters that are dangerous
895     +enough that they should only be manipulated by the root user on your
896     +system. There are even some parameters that are read only, and cannot
897     +be written to at all. For example, the version entry in the Speakup
898     +proc system is read only. This is because there is no reason for a user
899     +to tamper with the version number which is reported by Speakup. Doing
900     +an ls -l on /proc/speakup/version will return this:
901     +
902     +-r--r--r-- 1 root root 0 Mar 21 13:46 /proc/speakup/version
903     +
904     +As you can see, the version entry in the Speakup proc system is read
905     +only, is owned by root, and belongs to the root group. Doing a cat of
906     +/proc/speakup/version will display the Speakup version number, like
907     +this:
908     +
909     +cat /proc/speakup/version
910     +Speakup v-2.00 CVS: Thu Oct 21 10:38:21 EDT 2004
911     +synth dtlk version 1.1
912     +
913     +The display shows the Speakup version number, along with the version
914     +number of the driver for the current synthesizer.
915     +
916     +Looking at entries in the Speakup proc system can be useful in many
917     +ways. For example, you might wish to know what level your volume is set
918     +at. You could type:
919     +
920     +cat /proc/speakup/vol
921     +5
922     +
923     +The number five which comes back is the level at which the synthesizer
924     +volume is set at.
925     +
926     +All the entries in the Speakup proc system are readable, some are
927     +writable by root only, and some are writable by everyone. Unless you
928     +know what you are doing, you should probably leave the ones that are
929     +writable by root only alone. Most of the names are self explanatory.
930     +Vol for controlling volume, pitch for pitch, rate for controlling speaking
931     +rate, etc. If you find one you aren't sure about, you can post a query
932     +on the Speakup list.
933     +
934     +6. Changing Synthesizers
935     +
936     +It is possible to change to a different synthesizer while speakup is
937     +running. In other words, it is not necessary to reboot the system
938     +in order to use a different synthesizer. You can simply echo the
939     +synthesizer keyword to the /proc/speakup/synth_name proc entry.
940     +Depending on your situation, you may wish to echo none to the synth_name
941     +proc entry, to disable speech while one synthesizer is disconnected and
942     +a second one is connected in its place. Then echo the keyword for the
943     +new synthesizer into the synth_name proc entry in order to start speech
944     +with the newly connected synthesizer. See the list of synthesizer
945     +keywords in section 1 to find the keyword which matches your synth.
946     +
947     +7. Loading modules
948     +
949     +As mentioned earlier, Speakup can either be completely compiled into the
950     +kernel, with the exception of the help module, or it can be compiled as
951     +a series of modules. When compiled as modules, Speakup will only be
952     +able to speak some of the bootup messages if your system administrator
953     +has configured the system to load the modules at boo time. The modules
954     +can be loaded after the file systems have been checked and mounted, or
955     +from an initrd. There is a third possibility. Speakup can be compiled
956     +with some components built into the kernel, and others as modules. As
957     +we'll see in the next section, this is particularly useful when you are
958     +working with software synthesizers.
959     +
960     +If Speakup is completely compiled as modules, then you must use the
961     +modprobe command to load Speakup. You do this by loading the module for
962     +the synthesizer driver you wish to use. The driver modules are all
963     +named speakup_<keyword>, where <keyword> is the keyword for the
964     +synthesizer you want. So, in order to load the driver for the DecTalk
965     +Express, you would type the following command:
966     +
967     +modprobe speakup_dectlk
968     +
969     +Issuing this command would load the DecTalk Express driver and all other
970     +related Speakup modules necessary to get Speakup up and running.
971     +
972     +To completely unload Speakup, again presuming that it is entirely built
973     +as modules, you would give the command:
974     +
975     +modprobe -r speakup_dectlk
976     +
977     +The above command assumes you were running a DecTalk Express. If you
978     +were using a different synth, then you would substitute its keyword in
979     +place of dectlk.
980     +
981     +But now, suppose we have a situation where the main Speakup component
982     +is built into the kernel, and some or all of the drivers are built as
983     +modules. Since the main part of Speakup is compiled into the kernel, a
984     +partial Speakup proc system has been created which we can take advantage
985     +of by simply echoing the synthesizer keyword into the
986     +/proc/speakup/synth_name proc entry. This will cause the kernel to
987     +automatically load the appropriate driver module, and start Speakup
988     +talking. To switch to another synth, just echo a new keyword to the
989     +synth_name proc entry. For example, to load the DoubleTalk LT driver,
990     +you would type:
991     +
992     +echo ltlk >/proc/speakup/synth_name
993     +
994     +You can use the modprobe -r command to unload driver modules, regardless
995     +of whether the main part of Speakup has been built into the kernel or
996     +not.
997     +
998     +8. Using Software Synthesizers
999     +
1000     +Using a software synthesizer requires that some other software be
1001     +installed and running on your system. For this reason, software
1002     +synthesizers are not available for use at bootup, or during a system
1003     +installation process.
1004     +
1005     +In order to use a software synthesizer, you must have a package called
1006     +Speech Dispatcher running on your system, and it must be configured to
1007     +work with one of its supported software synthesizers.
1008     +
1009     +Two open source synthesizers you might use are Flite and Festival. You
1010     +might also choose to purchase the Software DecTalk from Fonix Sales Inc.
1011     +If you run a google search for Fonix, you'll find their web site.
1012     +
1013     +You can obtain a copy of Speech Dispatcher from free(b)soft at
1014     +http://www.freebsoft.org/. Follow the installation instructions that
1015     +come with Speech Dispatcher in order to install and configure Speech
1016     +Dispatcher. You can check out the web site for your Linux distribution
1017     +in order to get a copy of either Flite or Festival. Your Linux
1018     +distribution may also have a precompiled Speech Dispatcher package.
1019     +
1020     +Once you've installed, configured, and tested Speech Dispatcher with your
1021     +chosen software synthesizer, you still need one more piece of software
1022     +in order to make things work. You need a package called speechd-up.
1023     +You get it from the free(b)soft web site mentioned above. After you've
1024     +compiled and installed speechd-up, you are almost ready to begin using
1025     +your software synthesizer.
1026     +
1027     +Before you can use a software synthesizer, you must have created the
1028     +/dev/softsynth device. If you have not already done so, issue the
1029     +following commands as root:
1030     +
1031     +cd /dev
1032     +mknod softsynth c 10 26
1033     +
1034     +While we are at it, we might just as well create the /dev/synth device,
1035     +which can be used to let user space programs send information to your
1036     +synthesizer. To create /dev/synth, change to the /dev directory, and
1037     +issue the following command as root:
1038     +
1039     +mknod synth c 10 25
1040     +
1041     +Now you can begin using your software synthesizer. In order to do so,
1042     +echo the sftsyn keyword to the synth_name proc entry like this:
1043     +
1044     +echo sftsyn >/proc/speakup/synth_name
1045     +
1046     +Next run the speechd_up command like this:
1047     +
1048     +speechd_up &
1049     +
1050     +Your synth should now start talking, and you should be able to adjust
1051     +the pitch, rate, etc.
1052     +
1053     +In this section, we have assumed that your copy of Speakup was compiled
1054     +with the speakup_sftsyn component either built into the kernel, or
1055     +compiled as a module.
1056     +
1057     +9. Using The DecTalk PC Card
1058     +
1059     +The DecTalk PC card is an ISA card that is inserted into one of the ISA
1060     +slots in your computer. It requires that the DecTalk PC software be
1061     +installed on your computer, and that the software be loaded onto the
1062     +Dectalk PC card before it can be used.
1063     +
1064     +You can get the dec_pc.tgz file from the linux-speakup.org site. The
1065     +dec_pc.tgz file is in the ~ftp/pub/linux/speakup directory.
1066     +
1067     +After you have downloaded the dec_pc.tgz file, untar it in your home
1068     +directory, and read the Readme file in the newly created dec_pc
1069     +directory.
1070     +
1071     +The easiest way to get the software working is to copy the entire dec_pc
1072     +directory into /user/local/lib. To do this, su to root in your home
1073     +directory, and issue the command:
1074     +
1075     +cp dec_pc /usr/local/lib
1076     +
1077     +You will need to copy the dtload command from the dec_pc directory to a
1078     +directory in your path. Either /usr/bin or /usr/local/bin is a good
1079     +choice.
1080     +
1081     +You can now run the dtload command in order to load the DecTalk PC
1082     +software onto the card. After you have done this, echo the decpc
1083     +keyword to the synth_name entry in the proc system like this:
1084     +
1085     +echo decpc >/proc/speakup/synth_name
1086     +
1087     +Your DecTalk PC should start talking, and then you can adjust the pitch,
1088     +rate, volume, voice, etc. The voice entry in the Speakup proc system
1089     +will accept a number from 0 through 7 for the DecTalk PC synthesizer,
1090     +which will give you access to some of the DecTalk voices.
1091     +
1092     +10. Using Cursor Tracking
1093     +
1094     +In Speakup version 2.0 and later, cursor tracking is turned on by
1095     +default. This means that when you are using an editor, Speakup will
1096     +automatically speak characters as you move left and right with the
1097     +cursor keys, and lines as you move up and down with the cursor keys.
1098     +
1099     +This is extremely useful, and makes editing files a snap. But there are
1100     +times when cursor tracking can get in your way. So Speakup provides a
1101     +toggle to turn cursor tracking on and off. You do this with the keypad
1102     +asterisk key. Pressing this key repeatedly will toggle the cursor
1103     +tracking on and off, and you will hear Speakup say, "cursoring off", and
1104     +"cursoring on".
1105     +
1106     +Some folks like to turn cursor tracking off while they are using the
1107     +lynx web browser. You definitely want to turn cursor tracking off when
1108     +you are using the alsamixer application. Otherwise, you won't be able
1109     +to hear your mixer settings while you are using the arrow keys.
1110     +
1111     +11. Cut and Paste
1112     +
1113     +One of Speakup's more useful features is the ability to cut and paste
1114     +text on the screen. This means that you can capture information from a
1115     +program, and paste that captured text into a different place in the
1116     +program, or into an entirely different program, which may even be
1117     +running on a different console.
1118     +
1119     +For example, in this manual, we have made references to several web
1120     +sites. It would be nice if you could cut and paste these urls into your
1121     +web browser. Speakup does this quite nicely. Suppose you wanted to
1122     +past the following url into your browser:
1123     +
1124     +http://linux-speakup.org/
1125     +
1126     +Use the speakup review keys to position the reading cursor on the first
1127     +character of the above url. When the reading cursor is in position,
1128     +press the keypad slash key once. Speakup will say, "mark". Next,
1129     +position the reading cursor on the rightmost character of the above
1130     +url. Press the keypad slash key once again to actually cut the text
1131     +from the screen. Speakup will say, "cut". Although we call this
1132     +cutting, Speakup does not actually delete the cut text from the screen.
1133     +It makes a copy of the text in a special buffer for later pasting.
1134     +
1135     +Now that you have the url cut from the screen, you can paste it into
1136     +your browser, or even paste the url on a command line as an argument to
1137     +your browser.
1138     +
1139     +Suppose you want to start lynx and go to the Speakup site.
1140     +
1141     +You can switch to a different console with the alt left and right
1142     +arrows, or you can switch to a specific console by typing alt and a
1143     +function key. These are not Speakup commands, just standard Linux
1144     +console capabilities.
1145     +
1146     +Once you've changed to an appropriate console, and are at a shell prompt,
1147     +type the word lynx, followed by a space. Now press and hold the speakup
1148     +key, while you type the keypad slash character. The url will be pasted
1149     +onto the command line, just as though you had typed it in. Press the
1150     +enter key to execute the command.
1151     +
1152     +The paste buffer will continue to hold the cut information, until a new
1153     +mark and cut operation is carried out. This means you can paste the cut
1154     +information as many times as you like before doing another cut
1155     +operation.
1156     +
1157     +You are not limited to cutting and pasting only one line on the screen.
1158     +You can also cut and paste rectangular regions of the screen. Just
1159     +position the reading cursor at the top left corner of the text to be
1160     +cut, mark it with the keypad slash key, then position the reading cursor
1161     +at the bottom right corner of the region to be cut, and cut it with the
1162     +keypad slash key.
1163     +
1164     +12. Changing the Pronunciation of Characters
1165     +
1166     +Through the /proc/speakup/chars proc entry, Speakup gives you the
1167     +ability to change how Speakup pronounces a given character. You could,
1168     +for example, change how some punctuation characters are spoken. You can
1169     +even change how Speakup will pronounce certain letters.
1170     +
1171     +You may, for example, wish to change how Speakup pronounces the z
1172     +character. The author of Speakup, Kirk Reiser, is Canadian, and thus
1173     +believes that the z should be pronounced zed. If you are an American,
1174     +you might wish to use the zee pronunciation instead of zed. You can
1175     +change the pronunciation of both the upper and lower case z with the
1176     +following two commands:
1177     +
1178     +echo 90 zee >/proc/speakup/characters
1179     +echo 122 zee >/proc/speakup/characters
1180     +
1181     +Let's examine the parts of the two previous commands. They are issued
1182     +at the shell prompt, and could be placed in a startup script.
1183     +
1184     +The word echo tells the shell that you want to have it display the
1185     +string of characters that follow the word echo. If you were to just
1186     +type:
1187     +
1188     +echo hello.
1189     +
1190     +You would get the word hello printed on your screen as soon as you
1191     +pressed the enter key. In this case, we are echoing strings that we
1192     +want to be redirected into the proc system.
1193     +
1194     +The numbers 90 and 122 in the above echo commands are the ascii numeric
1195     +values for the upper and lower case z, the characters we wish to change.
1196     +
1197     +The string zee is the pronunciation that we want Speakup to use for the
1198     +upper and lower case z.
1199     +
1200     +The > symbol redirects the output of the echo command to a file, just
1201     +like in DOS, or at the Windows command prompt.
1202     +
1203     +And finally, /proc/speakup/chars is the file entry in the proc system
1204     +where we want the output to be directed. Speakup looks at the numeric
1205     +value of the character we want to change, and inserts the pronunciation
1206     +string into an internal table.
1207     +
1208     +You can look at the whole table with the following command:
1209     +
1210     +cat /proc/speakup/chars
1211     +
1212     +Speakup will then print out the entire character pronunciation table. I
1213     +won't display it here, but leave you to look at it at your convenience.
1214     +
1215     +13. Mapping Keys
1216     +
1217     +Speakup has the capability of allowing you to assign or "map" keys to
1218     +internal Speakup commands. This section necessarily assumes you have a
1219     +Linux kernel source tree installed, and that it has been patched and
1220     +configured with Speakup. How you do this is beyond the scope of this
1221     +manual. For this information, visit the Speakup web site at
1222     +http://linux-speakup.org/. The reason you'll need the kernel source
1223     +tree patched with Speakup is that the genmap utility you'll need for
1224     +processing keymaps is in the
1225     +/usr/src/linux-<version_number>/drivers/char/speakup directory. The
1226     +<version_number> in the above directory path is the version number of
1227     +the Linux source tree you are working with.
1228     +
1229     +So ok, you've gone off and gotten your kernel source tree, and patched
1230     +and configured it. Now you can start manipulating keymaps.
1231     +
1232     +You can either use the
1233     +/usr/src/linux-<version_number>/drivers/char/speakup/speakupmap.map file
1234     +included with the Speakup source, or you can cut and paste the copy in
1235     +section 4 into a separate file. If you use the one in the Speakup
1236     +source tree, make sure you make a backup of it before you start making
1237     +changes. You have been warned!
1238     +
1239     +Suppose that you want to swap the key assignments for the Speakup
1240     +say_last_char and the Speakup say_first_char commands. The
1241     +speakupmap.map lists the key mappings for these two commands as follows:
1242     +
1243     +spk key_pageup = say_first_char
1244     +spk key_pagedown = say_last_char
1245     +
1246     +You can edit your copy of the speakupmap.map file and swap the command
1247     +names on the right side of the = (equals) sign. You did make a backup,
1248     +right? The new keymap lines would look like this:
1249     +
1250     +spk key_pageup = say_last_char
1251     +spk key_pagedown = say_first_char
1252     +
1253     +After you edit your copy of the speakupmap.map file, save it under a new
1254     +file name, perhaps newmap.map. Then exit your editor and return to the
1255     +shell prompt.
1256     +
1257     +You are now ready to load your keymap with your swapped key assignments.
1258     + Assuming that you saved your new keymap as the file newmap.map, you
1259     +would load your keymap into the proc system like this:
1260     +
1261     +/usr/src/linux-<version_number>/drivers/char/speakup/genmap newmap.map
1262     +>/proc/speakup/keymap
1263     +
1264     +Remember to substitute your kernel version number for the
1265     +<version_number> in the above command. Also note that although the
1266     +above command wrapped onto two lines in this document, you should type
1267     +it all on one line.
1268     +
1269     +Your say first and say last characters should now be swapped. Pressing
1270     +speakup pagedown should read you the first non-whitespace character on
1271     +the line your reading cursor is in, and pressing speakup pageup should
1272     +read you the last character on the line your reading cursor is in.
1273     +
1274     +You should note that these new mappings will only stay in effect until
1275     +you reboot, or until you load another keymap.
1276     +
1277     +One final warning. If you try to load a partial map, you will quickly
1278     +find that all the mappings you didn't include in your file got deleted
1279     +from the working map. Be extremely careful, and always make a backup!
1280     +You have been warned!
1281     +
1282     +14. Using Speakup's Windowing Capability
1283     +
1284     +Speakup has the capability of defining and manipulating windows on the
1285     +screen. Speakup uses the term "Window", to mean a user defined area of
1286     +the screen. The key strokes for defining and manipulating Speakup
1287     +windows are as follows:
1288     +
1289     +speakup + f2 -- Set the bounds of the window.
1290     +Speakup + f3 -- clear the current window definition.
1291     +speakup + f4 -- Toggle window silence on and off.
1292     +speakup + keypad plus -- Say the currently defined window.
1293     +
1294     +These capabilities are useful for tracking a certain part of the screen
1295     +without rereading the whole screen, or for silencing a part of the
1296     +screen that is constantly changing, such as a clock or status line.
1297     +
1298     +There is no way to save these window settings, and you can only have one
1299     +window defined for each virtual console. There is also no way to have
1300     +windows automaticly defined for specific applications.
1301     +
1302     +In order to define a window, use the review keys to move your reading
1303     +cursor to the beginning of the area you want to define. Then press
1304     +speakup + f2. Speakup will tell you that the window starts at the
1305     +indicated row and column position. Then move the reading cursor to the
1306     +end of the area to be defined as a window, and press speakup + f2 again.
1307     + If there is more than one line in the window, Speakup will tell you
1308     +that the window ends at the indicated row and column position. If there
1309     +is only one line in the window, then Speakup will tell you that the
1310     +window is the specified line on the screen. If you are only defining a
1311     +one line window, you can just press speakup + f2 twice after placing the
1312     +reading cursor on the line you want to define as a window. It is not
1313     +necessary to position the reading cursor at the end of the line in order
1314     +to define the whole line as a window.
1315     +
1316     + GNU Free Documentation License
1317     + Version 1.2, November 2002
1318     +
1319     +
1320     + Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
1321     + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1322     + Everyone is permitted to copy and distribute verbatim copies
1323     + of this license document, but changing it is not allowed.
1324     +
1325     +
1326     +0. PREAMBLE
1327     +
1328     +The purpose of this License is to make a manual, textbook, or other
1329     +functional and useful document "free" in the sense of freedom: to
1330     +assure everyone the effective freedom to copy and redistribute it,
1331     +with or without modifying it, either commercially or noncommercially.
1332     +Secondarily, this License preserves for the author and publisher a way
1333     +to get credit for their work, while not being considered responsible
1334     +for modifications made by others.
1335     +
1336     +This License is a kind of "copyleft", which means that derivative
1337     +works of the document must themselves be free in the same sense. It
1338     +complements the GNU General Public License, which is a copyleft
1339     +license designed for free software.
1340     +
1341     +We have designed this License in order to use it for manuals for free
1342     +software, because free software needs free documentation: a free
1343     +program should come with manuals providing the same freedoms that the
1344     +software does. But this License is not limited to software manuals;
1345     +it can be used for any textual work, regardless of subject matter or
1346     +whether it is published as a printed book. We recommend this License
1347     +principally for works whose purpose is instruction or reference.
1348     +
1349     +
1350     +1. APPLICABILITY AND DEFINITIONS
1351     +
1352     +This License applies to any manual or other work, in any medium, that
1353     +contains a notice placed by the copyright holder saying it can be
1354     +distributed under the terms of this License. Such a notice grants a
1355     +world-wide, royalty-free license, unlimited in duration, to use that
1356     +work under the conditions stated herein. The "Document", below,
1357     +refers to any such manual or work. Any member of the public is a
1358     +licensee, and is addressed as "you". You accept the license if you
1359     +copy, modify or distribute the work in a way requiring permission
1360     +under copyright law.
1361     +
1362     +A "Modified Version" of the Document means any work containing the
1363     +Document or a portion of it, either copied verbatim, or with
1364     +modifications and/or translated into another language.
1365     +
1366     +A "Secondary Section" is a named appendix or a front-matter section of
1367     +the Document that deals exclusively with the relationship of the
1368     +publishers or authors of the Document to the Document's overall subject
1369     +(or to related matters) and contains nothing that could fall directly
1370     +within that overall subject. (Thus, if the Document is in part a
1371     +textbook of mathematics, a Secondary Section may not explain any
1372     +mathematics.) The relationship could be a matter of historical
1373     +connection with the subject or with related matters, or of legal,
1374     +commercial, philosophical, ethical or political position regarding
1375     +them.
1376     +
1377     +The "Invariant Sections" are certain Secondary Sections whose titles
1378     +are designated, as being those of Invariant Sections, in the notice
1379     +that says that the Document is released under this License. If a
1380     +section does not fit the above definition of Secondary then it is not
1381     +allowed to be designated as Invariant. The Document may contain zero
1382     +Invariant Sections. If the Document does not identify any Invariant
1383     +Sections then there are none.
1384     +
1385     +The "Cover Texts" are certain short passages of text that are listed,
1386     +as Front-Cover Texts or Back-Cover Texts, in the notice that says that
1387     +the Document is released under this License. A Front-Cover Text may
1388     +be at most 5 words, and a Back-Cover Text may be at most 25 words.
1389     +
1390     +A "Transparent" copy of the Document means a machine-readable copy,
1391     +represented in a format whose specification is available to the
1392     +general public, that is suitable for revising the document
1393     +straightforwardly with generic text editors or (for images composed of
1394     +pixels) generic paint programs or (for drawings) some widely available
1395     +drawing editor, and that is suitable for input to text formatters or
1396     +for automatic translation to a variety of formats suitable for input
1397     +to text formatters. A copy made in an otherwise Transparent file
1398     +format whose markup, or absence of markup, has been arranged to thwart
1399     +or discourage subsequent modification by readers is not Transparent.
1400     +An image format is not Transparent if used for any substantial amount
1401     +of text. A copy that is not "Transparent" is called "Opaque".
1402     +
1403     +Examples of suitable formats for Transparent copies include plain
1404     +ASCII without markup, Texinfo input format, LaTeX input format, SGML
1405     +or XML using a publicly available DTD, and standard-conforming simple
1406     +HTML, PostScript or PDF designed for human modification. Examples of
1407     +transparent image formats include PNG, XCF and JPG. Opaque formats
1408     +include proprietary formats that can be read and edited only by
1409     +proprietary word processors, SGML or XML for which the DTD and/or
1410     +processing tools are not generally available, and the
1411     +machine-generated HTML, PostScript or PDF produced by some word
1412     +processors for output purposes only.
1413     +
1414     +The "Title Page" means, for a printed book, the title page itself,
1415     +plus such following pages as are needed to hold, legibly, the material
1416     +this License requires to appear in the title page. For works in
1417     +formats which do not have any title page as such, "Title Page" means
1418     +the text near the most prominent appearance of the work's title,
1419     +preceding the beginning of the body of the text.
1420     +
1421     +A section "Entitled XYZ" means a named subunit of the Document whose
1422     +title either is precisely XYZ or contains XYZ in parentheses following
1423     +text that translates XYZ in another language. (Here XYZ stands for a
1424     +specific section name mentioned below, such as "Acknowledgements",
1425     +"Dedications", "Endorsements", or "History".) To "Preserve the Title"
1426     +of such a section when you modify the Document means that it remains a
1427     +section "Entitled XYZ" according to this definition.
1428     +
1429     +The Document may include Warranty Disclaimers next to the notice which
1430     +states that this License applies to the Document. These Warranty
1431     +Disclaimers are considered to be included by reference in this
1432     +License, but only as regards disclaiming warranties: any other
1433     +implication that these Warranty Disclaimers may have is void and has
1434     +no effect on the meaning of this License.
1435     +
1436     +
1437     +2. VERBATIM COPYING
1438     +
1439     +You may copy and distribute the Document in any medium, either
1440     +commercially or noncommercially, provided that this License, the
1441     +copyright notices, and the license notice saying this License applies
1442     +to the Document are reproduced in all copies, and that you add no other
1443     +conditions whatsoever to those of this License. You may not use
1444     +technical measures to obstruct or control the reading or further
1445     +copying of the copies you make or distribute. However, you may accept
1446     +compensation in exchange for copies. If you distribute a large enough
1447     +number of copies you must also follow the conditions in section 3.
1448     +
1449     +You may also lend copies, under the same conditions stated above, and
1450     +you may publicly display copies.
1451     +
1452     +
1453     +3. COPYING IN QUANTITY
1454     +
1455     +If you publish printed copies (or copies in media that commonly have
1456     +printed covers) of the Document, numbering more than 100, and the
1457     +Document's license notice requires Cover Texts, you must enclose the
1458     +copies in covers that carry, clearly and legibly, all these Cover
1459     +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
1460     +the back cover. Both covers must also clearly and legibly identify
1461     +you as the publisher of these copies. The front cover must present
1462     +the full title with all words of the title equally prominent and
1463     +visible. You may add other material on the covers in addition.
1464     +Copying with changes limited to the covers, as long as they preserve
1465     +the title of the Document and satisfy these conditions, can be treated
1466     +as verbatim copying in other respects.
1467     +
1468     +If the required texts for either cover are too voluminous to fit
1469     +legibly, you should put the first ones listed (as many as fit
1470     +reasonably) on the actual cover, and continue the rest onto adjacent
1471     +pages.
1472     +
1473     +If you publish or distribute Opaque copies of the Document numbering
1474     +more than 100, you must either include a machine-readable Transparent
1475     +copy along with each Opaque copy, or state in or with each Opaque copy
1476     +a computer-network location from which the general network-using
1477     +public has access to download using public-standard network protocols
1478     +a complete Transparent copy of the Document, free of added material.
1479     +If you use the latter option, you must take reasonably prudent steps,
1480     +when you begin distribution of Opaque copies in quantity, to ensure
1481     +that this Transparent copy will remain thus accessible at the stated
1482     +location until at least one year after the last time you distribute an
1483     +Opaque copy (directly or through your agents or retailers) of that
1484     +edition to the public.
1485     +
1486     +It is requested, but not required, that you contact the authors of the
1487     +Document well before redistributing any large number of copies, to give
1488     +them a chance to provide you with an updated version of the Document.
1489     +
1490     +
1491     +4. MODIFICATIONS
1492     +
1493     +You may copy and distribute a Modified Version of the Document under
1494     +the conditions of sections 2 and 3 above, provided that you release
1495     +the Modified Version under precisely this License, with the Modified
1496     +Version filling the role of the Document, thus licensing distribution
1497     +and modification of the Modified Version to whoever possesses a copy
1498     +of it. In addition, you must do these things in the Modified Version:
1499     +
1500     +A. Use in the Title Page (and on the covers, if any) a title distinct
1501     + from that of the Document, and from those of previous versions
1502     + (which should, if there were any, be listed in the History section
1503     + of the Document). You may use the same title as a previous version
1504     + if the original publisher of that version gives permission.
1505     +B. List on the Title Page, as authors, one or more persons or entities
1506     + responsible for authorship of the modifications in the Modified
1507     + Version, together with at least five of the principal authors of the
1508     + Document (all of its principal authors, if it has fewer than five),
1509     + unless they release you from this requirement.
1510     +C. State on the Title page the name of the publisher of the
1511     + Modified Version, as the publisher.
1512     +D. Preserve all the copyright notices of the Document.
1513     +E. Add an appropriate copyright notice for your modifications
1514     + adjacent to the other copyright notices.
1515     +F. Include, immediately after the copyright notices, a license notice
1516     + giving the public permission to use the Modified Version under the
1517     + terms of this License, in the form shown in the Addendum below.
1518     +G. Preserve in that license notice the full lists of Invariant Sections
1519     + and required Cover Texts given in the Document's license notice.
1520     +H. Include an unaltered copy of this License.
1521     +I. Preserve the section Entitled "History", Preserve its Title, and add
1522     + to it an item stating at least the title, year, new authors, and
1523     + publisher of the Modified Version as given on the Title Page. If
1524     + there is no section Entitled "History" in the Document, create one
1525     + stating the title, year, authors, and publisher of the Document as
1526     + given on its Title Page, then add an item describing the Modified
1527     + Version as stated in the previous sentence.
1528     +J. Preserve the network location, if any, given in the Document for
1529     + public access to a Transparent copy of the Document, and likewise
1530     + the network locations given in the Document for previous versions
1531     + it was based on. These may be placed in the "History" section.
1532     + You may omit a network location for a work that was published at
1533     + least four years before the Document itself, or if the original
1534     + publisher of the version it refers to gives permission.
1535     +K. For any section Entitled "Acknowledgements" or "Dedications",
1536     + Preserve the Title of the section, and preserve in the section all
1537     + the substance and tone of each of the contributor acknowledgements
1538     + and/or dedications given therein.
1539     +L. Preserve all the Invariant Sections of the Document,
1540     + unaltered in their text and in their titles. Section numbers
1541     + or the equivalent are not considered part of the section titles.
1542     +M. Delete any section Entitled "Endorsements". Such a section
1543     + may not be included in the Modified Version.
1544     +N. Do not retitle any existing section to be Entitled "Endorsements"
1545     + or to conflict in title with any Invariant Section.
1546     +O. Preserve any Warranty Disclaimers.
1547     +
1548     +If the Modified Version includes new front-matter sections or
1549     +appendices that qualify as Secondary Sections and contain no material
1550     +copied from the Document, you may at your option designate some or all
1551     +of these sections as invariant. To do this, add their titles to the
1552     +list of Invariant Sections in the Modified Version's license notice.
1553     +These titles must be distinct from any other section titles.
1554     +
1555     +You may add a section Entitled "Endorsements", provided it contains
1556     +nothing but endorsements of your Modified Version by various
1557     +parties--for example, statements of peer review or that the text has
1558     +been approved by an organization as the authoritative definition of a
1559     +standard.
1560     +
1561     +You may add a passage of up to five words as a Front-Cover Text, and a
1562     +passage of up to 25 words as a Back-Cover Text, to the end of the list
1563     +of Cover Texts in the Modified Version. Only one passage of
1564     +Front-Cover Text and one of Back-Cover Text may be added by (or
1565     +through arrangements made by) any one entity. If the Document already
1566     +includes a cover text for the same cover, previously added by you or
1567     +by arrangement made by the same entity you are acting on behalf of,
1568     +you may not add another; but you may replace the old one, on explicit
1569     +permission from the previous publisher that added the old one.
1570     +
1571     +The author(s) and publisher(s) of the Document do not by this License
1572     +give permission to use their names for publicity for or to assert or
1573     +imply endorsement of any Modified Version.
1574     +
1575     +
1576     +5. COMBINING DOCUMENTS
1577     +
1578     +You may combine the Document with other documents released under this
1579     +License, under the terms defined in section 4 above for modified
1580     +versions, provided that you include in the combination all of the
1581     +Invariant Sections of all of the original documents, unmodified, and
1582     +list them all as Invariant Sections of your combined work in its
1583     +license notice, and that you preserve all their Warranty Disclaimers.
1584     +
1585     +The combined work need only contain one copy of this License, and
1586     +multiple identical Invariant Sections may be replaced with a single
1587     +copy. If there are multiple Invariant Sections with the same name but
1588     +different contents, make the title of each such section unique by
1589     +adding at the end of it, in parentheses, the name of the original
1590     +author or publisher of that section if known, or else a unique number.
1591     +Make the same adjustment to the section titles in the list of
1592     +Invariant Sections in the license notice of the combined work.
1593     +
1594     +In the combination, you must combine any sections Entitled "History"
1595     +in the various original documents, forming one section Entitled
1596     +"History"; likewise combine any sections Entitled "Acknowledgements",
1597     +and any sections Entitled "Dedications". You must delete all sections
1598     +Entitled "Endorsements".
1599     +
1600     +
1601     +6. COLLECTIONS OF DOCUMENTS
1602     +
1603     +You may make a collection consisting of the Document and other documents
1604     +released under this License, and replace the individual copies of this
1605     +License in the various documents with a single copy that is included in
1606     +the collection, provided that you follow the rules of this License for
1607     +verbatim copying of each of the documents in all other respects.
1608     +
1609     +You may extract a single document from such a collection, and distribute
1610     +it individually under this License, provided you insert a copy of this
1611     +License into the extracted document, and follow this License in all
1612     +other respects regarding verbatim copying of that document.
1613     +
1614     +
1615     +7. AGGREGATION WITH INDEPENDENT WORKS
1616     +
1617     +A compilation of the Document or its derivatives with other separate
1618     +and independent documents or works, in or on a volume of a storage or
1619     +distribution medium, is called an "aggregate" if the copyright
1620     +resulting from the compilation is not used to limit the legal rights
1621     +of the compilation's users beyond what the individual works permit.
1622     +When the Document is included in an aggregate, this License does not
1623     +apply to the other works in the aggregate which are not themselves
1624     +derivative works of the Document.
1625     +
1626     +If the Cover Text requirement of section 3 is applicable to these
1627     +copies of the Document, then if the Document is less than one half of
1628     +the entire aggregate, the Document's Cover Texts may be placed on
1629     +covers that bracket the Document within the aggregate, or the
1630     +electronic equivalent of covers if the Document is in electronic form.
1631     +Otherwise they must appear on printed covers that bracket the whole
1632     +aggregate.
1633     +
1634     +
1635     +8. TRANSLATION
1636     +
1637     +Translation is considered a kind of modification, so you may
1638     +distribute translations of the Document under the terms of section 4.
1639     +Replacing Invariant Sections with translations requires special
1640     +permission from their copyright holders, but you may include
1641     +translations of some or all Invariant Sections in addition to the
1642     +original versions of these Invariant Sections. You may include a
1643     +translation of this License, and all the license notices in the
1644     +Document, and any Warranty Disclaimers, provided that you also include
1645     +the original English version of this License and the original versions
1646     +of those notices and disclaimers. In case of a disagreement between
1647     +the translation and the original version of this License or a notice
1648     +or disclaimer, the original version will prevail.
1649     +
1650     +If a section in the Document is Entitled "Acknowledgements",
1651     +"Dedications", or "History", the requirement (section 4) to Preserve
1652     +its Title (section 1) will typically require changing the actual
1653     +title.
1654     +
1655     +
1656     +9. TERMINATION
1657     +
1658     +You may not copy, modify, sublicense, or distribute the Document except
1659     +as expressly provided for under this License. Any other attempt to
1660     +copy, modify, sublicense or distribute the Document is void, and will
1661     +automatically terminate your rights under this License. However,
1662     +parties who have received copies, or rights, from you under this
1663     +License will not have their licenses terminated so long as such
1664     +parties remain in full compliance.
1665     +
1666     +
1667     +10. FUTURE REVISIONS OF THIS LICENSE
1668     +
1669     +The Free Software Foundation may publish new, revised versions
1670     +of the GNU Free Documentation License from time to time. Such new
1671     +versions will be similar in spirit to the present version, but may
1672     +differ in detail to address new problems or concerns. See
1673     +http://www.gnu.org/copyleft/.
1674     +
1675     +Each version of the License is given a distinguishing version number.
1676     +If the Document specifies that a particular numbered version of this
1677     +License "or any later version" applies to it, you have the option of
1678     +following the terms and conditions either of that specified version or
1679     +of any later version that has been published (not as a draft) by the
1680     +Free Software Foundation. If the Document does not specify a version
1681     +number of this License, you may choose any version ever published (not
1682     +as a draft) by the Free Software Foundation.
1683     +
1684     +
1685     +ADDENDUM: How to use this License for your documents
1686     +
1687     +To use this License in a document you have written, include a copy of
1688     +the License in the document and put the following copyright and
1689     +license notices just after the title page:
1690     +
1691     + Copyright (c) YEAR YOUR NAME.
1692     + Permission is granted to copy, distribute and/or modify this document
1693     + under the terms of the GNU Free Documentation License, Version 1.2
1694     + or any later version published by the Free Software Foundation;
1695     + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
1696     + A copy of the license is included in the section entitled "GNU
1697     + Free Documentation License".
1698     +
1699     +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
1700     +replace the "with...Texts." line with this:
1701     +
1702     + with the Invariant Sections being LIST THEIR TITLES, with the
1703     + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
1704     +
1705     +If you have Invariant Sections without Cover Texts, or some other
1706     +combination of the three, merge those two alternatives to suit the
1707     +situation.
1708     +
1709     +If your document contains nontrivial examples of program code, we
1710     +recommend releasing these examples in parallel under your choice of
1711     +free software license, such as the GNU General Public License,
1712     +to permit their use in free software.
1713     +
1714     +The End.
1715 dsd 198 diff -urNpXdontdiff linux-2.6.14/drivers/char/consolemap.c linux-dsd/drivers/char/consolemap.c
1716     --- linux-2.6.14/drivers/char/consolemap.c 2005-08-29 00:41:01.000000000 +0100
1717     +++ linux-dsd/drivers/char/consolemap.c 2005-10-28 12:24:46.000000000 +0100
1718 eradicator 150 @@ -670,3 +670,4 @@ console_map_init(void)
1719     }
1720    
1721     EXPORT_SYMBOL(con_copy_unimap);
1722     +EXPORT_SYMBOL(inverse_translate);
1723 dsd 198 diff -urNpXdontdiff linux-2.6.14/drivers/char/keyboard.c linux-dsd/drivers/char/keyboard.c
1724     --- linux-2.6.14/drivers/char/keyboard.c 2005-10-28 12:36:00.000000000 +0100
1725     +++ linux-dsd/drivers/char/keyboard.c 2005-10-28 12:24:46.000000000 +0100
1726 eradicator 150 @@ -40,6 +40,13 @@
1727     #include <linux/sysrq.h>
1728     #include <linux/input.h>
1729    
1730     +
1731     +#include <linux/speakup.h>
1732     +
1733     +#ifdef CONFIG_SPEAKUP_MODULE
1734     +spk_key_func addr_spk_key = NULL;
1735     +#endif
1736     +
1737     static void kbd_disconnect(struct input_handle *handle);
1738     extern void ctrl_alt_del(void);
1739    
1740     @@ -64,6 +71,10 @@ extern void ctrl_alt_del(void);
1741    
1742     #define KBD_DEFLOCK 0
1743    
1744     +/* Key types processed even in raw modes */
1745     +
1746     +#define TYPES_ALLOWED_IN_RAW_MODE ((1 << KT_SPEC) | (1 << KT_SHIFT) | (1 << KT_SPKUP))
1747     +
1748     void compute_shiftstate(void);
1749    
1750     /*
1751     @@ -79,7 +90,7 @@ void compute_shiftstate(void);
1752 eradicator 187 typedef void (k_handler_fn)(struct vc_data *vc, unsigned char value,
1753 eradicator 150 char up_flag, struct pt_regs *regs);
1754     static k_handler_fn K_HANDLERS;
1755     -static k_handler_fn *k_handler[16] = { K_HANDLERS };
1756     +k_handler_fn *k_handler[16] = { K_HANDLERS };
1757    
1758     #define FN_HANDLERS\
1759 eradicator 187 fn_null, fn_enter, fn_show_ptregs, fn_show_mem,\
1760 eradicator 150 @@ -100,15 +111,18 @@ static fn_handler_fn *fn_handler[] = { F
1761     const int max_vals[] = {
1762     255, ARRAY_SIZE(func_table) - 1, ARRAY_SIZE(fn_handler) - 1, NR_PAD - 1,
1763     NR_DEAD - 1, 255, 3, NR_SHIFT - 1, 255, NR_ASCII - 1, NR_LOCK - 1,
1764     - 255, NR_LOCK - 1, 255
1765     + 255, NR_LOCK - 1, 255, 255
1766     };
1767    
1768     const int NR_TYPES = ARRAY_SIZE(max_vals);
1769    
1770     struct kbd_struct kbd_table[MAX_NR_CONSOLES];
1771     -static struct kbd_struct *kbd = kbd_table;
1772     +struct kbd_struct *kbd = kbd_table;
1773     static struct kbd_struct kbd0;
1774    
1775     +EXPORT_SYMBOL(kbd);
1776     +EXPORT_SYMBOL(k_handler);
1777     +
1778     int spawnpid, spawnsig;
1779    
1780     /*
1781 eradicator 187 @@ -255,12 +269,14 @@ void kd_mksound(unsigned int hz, unsigne
1782 eradicator 150 }
1783     }
1784     }
1785     - if (ticks)
1786     - mod_timer(&kd_mksound_timer, jiffies + ticks);
1787     + if (ticks)
1788     + mod_timer(&kd_mksound_timer, jiffies + ticks);
1789     } else
1790     kd_nosound(0);
1791     }
1792    
1793     +EXPORT_SYMBOL(kd_mksound);
1794     +
1795     /*
1796     * Setting the keyboard rate.
1797     */
1798 eradicator 187 @@ -602,6 +618,7 @@ static void k_spec(struct vc_data *vc, u
1799 eradicator 150 if (up_flag)
1800     return;
1801     if (value >= ARRAY_SIZE(fn_handler))
1802     + if (up_flag || (value >= ARRAY_SIZE(fn_handler)))
1803     return;
1804 eradicator 187 if ((kbd->kbdmode == VC_RAW ||
1805     kbd->kbdmode == VC_MEDIUMRAW) &&
1806 eradicator 150 @@ -1119,6 +1136,13 @@ static void kbd_keycode(unsigned int key
1807     key_map = key_maps[shift_final];
1808    
1809     if (!key_map) {
1810     +#ifdef CONFIG_SPEAKUP
1811     + if (speakup_key(vc, shift_final, keycode, K(KT_SHIFT,0), !down, regs ))
1812     + return;
1813     +#elif defined(CONFIG_SPEAKUP_MODULE)
1814     + if ( addr_spk_key && (*addr_spk_key)(vc, shift_final,
1815     + keycode, K(KT_SHIFT,0), !down, regs) ) return;
1816     +#endif
1817     compute_shiftstate();
1818     kbd->slockstate = 0;
1819     return;
1820 eradicator 187 @@ -1137,10 +1161,17 @@ static void kbd_keycode(unsigned int key
1821 eradicator 150 }
1822    
1823     type -= 0xf0;
1824     -
1825     - if (raw_mode && type != KT_SPEC && type != KT_SHIFT)
1826     +#ifdef CONFIG_SPEAKUP
1827     + if (speakup_key(vc, shift_final, keycode, keysym, !down, regs ))
1828     return;
1829     +#elif defined(CONFIG_SPEAKUP_MODULE)
1830     + if ( addr_spk_key && (*addr_spk_key)(vc, shift_final,
1831     + keycode, keysym, !down, regs) ) return;
1832     +#endif
1833    
1834     + if (raw_mode && type != KT_SPEC && type != KT_SHIFT )
1835     + return;
1836     +
1837     if (type == KT_LETTER) {
1838     type = KT_LATIN;
1839     if (vc_kbd_led(kbd, VC_CAPSLOCK)) {
1840 dsd 198 @@ -1149,13 +1180,28 @@ static void kbd_keycode(unsigned int key
1841 eradicator 150 keysym = key_map[keycode];
1842     }
1843     }
1844     -
1845     (*k_handler[type])(vc, keysym & 0xff, !down, regs);
1846    
1847     if (type != KT_SLOCK)
1848 dsd 198 kbd->slockstate = 0;
1849     }
1850    
1851     +struct input_dev *fakekeydev=NULL;
1852     +
1853     +void kbd_fakekey(unsigned int keycode)
1854     +{
1855     + if (fakekeydev==NULL)
1856     + return;
1857     + kbd_keycode(keycode, 0, HW_RAW(fakekeydev), fakekeydev->regs);
1858     + kbd_keycode(keycode, 1, HW_RAW(fakekeydev), fakekeydev->regs);
1859     +
1860     + tasklet_schedule(&keyboard_tasklet);
1861     + do_poke_blanked_console = 1;
1862     + schedule_console_callback();
1863     +}
1864     +
1865     +EXPORT_SYMBOL(kbd_fakekey);
1866     +
1867     static void kbd_event(struct input_handle *handle, unsigned int event_type,
1868     unsigned int event_code, int value)
1869     {
1870     @@ -1193,6 +1239,7 @@ static struct input_handle *kbd_connect(
1871     memset(handle, 0, sizeof(struct input_handle));
1872    
1873     handle->dev = dev;
1874     + fakekeydev=dev;
1875     handle->handler = handler;
1876     handle->name = "kbd";
1877    
1878     diff -urNpXdontdiff linux-2.6.14/drivers/char/Makefile linux-dsd/drivers/char/Makefile
1879     --- linux-2.6.14/drivers/char/Makefile 2005-08-29 00:41:01.000000000 +0100
1880     +++ linux-dsd/drivers/char/Makefile 2005-10-28 12:24:46.000000000 +0100
1881     @@ -83,6 +83,7 @@ obj-$(CONFIG_SCx200_GPIO) += scx200_gpio
1882     obj-$(CONFIG_GPIO_VR41XX) += vr41xx_giu.o
1883     obj-$(CONFIG_TANBAC_TB0219) += tb0219.o
1884    
1885     +obj-$(CONFIG_SPEAKUP) += speakup/
1886     obj-$(CONFIG_WATCHDOG) += watchdog/
1887     obj-$(CONFIG_MWAVE) += mwave/
1888     obj-$(CONFIG_AGP) += agp/
1889     diff -urNpXdontdiff linux-2.6.14/drivers/char/speakup/BUGS linux-dsd/drivers/char/speakup/BUGS
1890     --- linux-2.6.14/drivers/char/speakup/BUGS 1970-01-01 01:00:00.000000000 +0100
1891     +++ linux-dsd/drivers/char/speakup/BUGS 2005-10-28 12:24:46.000000000 +0100
1892 eradicator 150 @@ -0,0 +1,10 @@
1893     +Well, there are probably just thousands to squash, but these are the
1894     +ones I think of as bugs.
1895     +
1896     +There is a problem with speakup interrogating LiteTalks with rom
1897     +versions of at least 3.22 and earlier. (kirk)
1898     +
1899     +I define bugs as things which aren't working correctly although
1900     +they've been implemented. NOT features which haven't been added yet.
1901     +
1902     + Kirk
1903 dsd 198 diff -urNpXdontdiff linux-2.6.14/drivers/char/speakup/Config.in linux-dsd/drivers/char/speakup/Config.in
1904     --- linux-2.6.14/drivers/char/speakup/Config.in 1970-01-01 01:00:00.000000000 +0100
1905     +++ linux-dsd/drivers/char/speakup/Config.in 2005-10-28 12:24:46.000000000 +0100
1906 eradicator 150 @@ -0,0 +1,26 @@
1907     +tristate 'Speakup console speech' CONFIG_SPEAKUP
1908     +if [ "$CONFIG_SPEAKUP" != "n" ]; then
1909     + comment 'Type "y" for each synthesizer you want built into the kernel.'
1910     + dep_tristate "Accent SA, acntsa" CONFIG_SPEAKUP_ACNTSA $CONFIG_SPEAKUP
1911     + dep_tristate "Accent PC, acntpc" CONFIG_SPEAKUP_ACNTPC $CONFIG_SPEAKUP
1912     + dep_tristate "Apollo, apollo" CONFIG_SPEAKUP_APOLLO $CONFIG_SPEAKUP
1913     + dep_tristate "Audapter, audptr" CONFIG_SPEAKUP_AUDPTR $CONFIG_SPEAKUP
1914     + dep_tristate "Braille 'n' Speak, bns" CONFIG_SPEAKUP_BNS $CONFIG_SPEAKUP
1915     + dep_tristate "DECtalk Express, dectlk" CONFIG_SPEAKUP_DECTLK $CONFIG_SPEAKUP
1916     + dep_tristate "DECtalk External (old), decext" CONFIG_SPEAKUP_DECEXT $CONFIG_SPEAKUP
1917     + dep_tristate "DECtalk PC (big ISA card), decpc" CONFIG_SPEAKUP_DECPC $CONFIG_SPEAKUP
1918     + if [ "$CONFIG_SPEAKUP_DECPC" = "y" ] ;then
1919     + comment 'warning: decpc can only be built as a module'
1920     + fi
1921     + comment 'In order to use this you will need'
1922     + comment 'the dtload program and DECPC software files '
1923     + comment 'Read the accompanying DECPC documentation for more details'
1924     + dep_tristate "DoubleTalk PC, dtlk" CONFIG_SPEAKUP_DTLK $CONFIG_SPEAKUP
1925     + dep_tristate "Keynote Gold PC, keypc" CONFIG_SPEAKUP_KEYPC $CONFIG_SPEAKUP
1926     + dep_tristate "DoubleTalk LT or LiteTalk, ltlk" CONFIG_SPEAKUP_LTLK $CONFIG_SPEAKUP
1927     + dep_tristate "Software synthesizers /dev/sftsyn, sftsyn" CONFIG_SPEAKUP_SFTSYN $CONFIG_SPEAKUP
1928     + dep_tristate "Speak Out, spkout" CONFIG_SPEAKUP_SPKOUT $CONFIG_SPEAKUP
1929     + dep_tristate "Transport, txprt" CONFIG_SPEAKUP_TXPRT $CONFIG_SPEAKUP
1930     + comment 'Enter the three to six character synth string from above or none.'
1931     + string "Default synthesizer for Speakup" CONFIG_SPEAKUP_DEFAULT "none"
1932     +fi
1933 dsd 198 diff -urNpXdontdiff linux-2.6.14/drivers/char/speakup/COPYING linux-dsd/drivers/char/speakup/COPYING
1934     --- linux-2.6.14/drivers/char/speakup/COPYING 1970-01-01 01:00:00.000000000 +0100
1935     +++ linux-dsd/drivers/char/speakup/COPYING 2005-10-28 12:24:46.000000000 +0100
1936     @@ -0,0 +1,358 @@
1937 eradicator 150 +
1938 dsd 198 + NOTE! This copyright does *not* cover user programs that use kernel
1939     + services by normal system calls - this is merely considered normal use
1940     + of the kernel, and does *not* fall under the heading of "derived work".
1941     + Also note that the GPL below is copyrighted by the Free Software
1942     + Foundation, but the instance of code that it refers to (the Linux
1943     + kernel) is copyrighted by me and others who actually wrote it.
1944 eradicator 150 +
1945 dsd 198 + Linus Torvalds
1946 eradicator 150 +
1947 dsd 198 +----------------------------------------
1948 eradicator 150 +
1949 dsd 198 +This is included for completeness of GPL for the speakup project.
1950     +Speakup is a screen review and speech synthesizer set of drivers and
1951     +patches for the Linux kernel. (Kirk Reiser)
1952 eradicator 150 +
1953 dsd 198 +------------------------------------------------------------------------
1954 eradicator 150 +
1955 dsd 198 + GNU GENERAL PUBLIC LICENSE
1956     + Version 2, June 1991
1957 eradicator 150 +
1958 dsd 198 + Copyright (C) 1989, 1991 Free Software Foundation, Inc.
1959     + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1960     + Everyone is permitted to copy and distribute verbatim copies
1961     + of this license document, but changing it is not allowed.
1962 eradicator 150 +
1963 dsd 198 + Preamble
1964 eradicator 150 +
1965 dsd 198 + The licenses for most software are designed to take away your
1966     +freedom to share and change it. By contrast, the GNU General Public
1967     +License is intended to guarantee your freedom to share and change free
1968     +software--to make sure the software is free for all its users. This
1969     +General Public License applies to most of the Free Software
1970     +Foundation's software and to any other program whose authors commit to
1971     +using it. (Some other Free Software Foundation software is covered by
1972     +the GNU Library General Public License instead.) You can apply it to
1973     +your programs, too.
1974 eradicator 150 +
1975 dsd 198 + When we speak of free software, we are referring to freedom, not
1976     +price. Our General Public Licenses are designed to make sure that you
1977     +have the freedom to distribute copies of free software (and charge for
1978     +this service if you wish), that you receive source code or can get it
1979     +if you want it, that you can change the software or use pieces of it
1980     +in new free programs; and that you know you can do these things.
1981 eradicator 150 +
1982 dsd 198 + To protect your rights, we need to make restrictions that forbid
1983     +anyone to deny you these rights or to ask you to surrender the rights.
1984     +These restrictions translate to certain responsibilities for you if you
1985     +distribute copies of the software, or if you modify it.
1986 eradicator 150 +
1987 dsd 198 + For example, if you distribute copies of such a program, whether
1988     +gratis or for a fee, you must give the recipients all the rights that
1989     +you have. You must make sure that they, too, receive or can get the
1990     +source code. And you must show them these terms so they know their
1991     +rights.
1992 eradicator 150 +
1993 dsd 198 + We protect your rights with two steps: (1) copyright the software, and
1994     +(2) offer you this license which gives you legal permission to copy,
1995     +distribute and/or modify the software.
1996 eradicator 150 +
1997 dsd 198 + Also, for each author's protection and ours, we want to make certain
1998     +that everyone understands that there is no warranty for this free
1999     +software. If the software is modified by someone else and passed on, we
2000     +want its recipients to know that what they have is not the original, so
2001     +that any problems introduced by others will not reflect on the original
2002     +authors' reputations.
2003 eradicator 150 +
2004 dsd 198 + Finally, any free program is threatened constantly by software
2005     +patents. We wish to avoid the danger that redistributors of a free
2006     +program will individually obtain patent licenses, in effect making the
2007     +program proprietary. To prevent this, we have made it clear that any
2008     +patent must be licensed for everyone's free use or not licensed at all.
2009 eradicator 150 +
2010 dsd 198 + The precise terms and conditions for copying, distribution and
2011     +modification follow.
2012     +
2013     + GNU GENERAL PUBLIC LICENSE
2014     + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
2015 eradicator 150 +
2016 dsd 198 + 0. This License applies to any program or other work which contains
2017     +a notice placed by the copyright holder saying it may be distributed
2018     +under the terms of this General Public License. The "Program", below,
2019     +refers to any such program or work, and a "work based on the Program"
2020     +means either the Program or any derivative work under copyright law:
2021     +that is to say, a work containing the Program or a portion of it,
2022     +either verbatim or with modifications and/or translated into another
2023     +language. (Hereinafter, translation is included without limitation in
2024     +the term "modification".) Each licensee is addressed as "you".
2025 eradicator 150 +
2026 dsd 198 +Activities other than copying, distribution and modification are not
2027     +covered by this License; they are outside its scope. The act of
2028     +running the Program is not restricted, and the output from the Program
2029     +is covered only if its contents constitute a work based on the
2030     +Program (independent of having been made by running the Program).
2031     +Whether that is true depends on what the Program does.
2032 eradicator 150 +
2033 dsd 198 + 1. You may copy and distribute verbatim copies of the Program's
2034     +source code as you receive it, in any medium, provided that you
2035     +conspicuously and appropriately publish on each copy an appropriate
2036     +copyright notice and disclaimer of warranty; keep intact all the
2037     +notices that refer to this License and to the absence of any warranty;
2038     +and give any other recipients of the Program a copy of this License
2039     +along with the Program.
2040 eradicator 150 +
2041 dsd 198 +You may charge a fee for the physical act of transferring a copy, and
2042     +you may at your option offer warranty protection in exchange for a fee.
2043 eradicator 150 +
2044 dsd 198 + 2. You may modify your copy or copies of the Program or any portion
2045     +of it, thus forming a work based on the Program, and copy and
2046     +distribute such modifications or work under the terms of Section 1
2047     +above, provided that you also meet all of these conditions:
2048 eradicator 150 +
2049 dsd 198 + a) You must cause the modified files to carry prominent notices
2050     + stating that you changed the files and the date of any change.
2051 eradicator 150 +
2052 dsd 198 + b) You must cause any work that you distribute or publish, that in
2053     + whole or in part contains or is derived from the Program or any
2054     + part thereof, to be licensed as a whole at no charge to all third
2055     + parties under the terms of this License.
2056 eradicator 150 +
2057 dsd 198 + c) If the modified program normally reads commands interactively
2058     + when run, you must cause it, when started running for such
2059     + interactive use in the most ordinary way, to print or display an
2060     + announcement including an appropriate copyright notice and a
2061     + notice that there is no warranty (or else, saying that you provide
2062     + a warranty) and that users may redistribute the program under
2063     + these conditions, and telling the user how to view a copy of this
2064     + License. (Exception: if the Program itself is interactive but
2065     + does not normally print such an announcement, your work based on
2066     + the Program is not required to print an announcement.)
2067     +
2068     +These requirements apply to the modified work as a whole. If
2069     +identifiable sections of that work are not derived from the Program,
2070     +and can be reasonably considered independent and separate works in
2071     +themselves, then this License, and its terms, do not apply to those
2072     +sections when you distribute them as separate works. But when you
2073     +distribute the same sections as part of a whole which is a work based
2074     +on the Program, the distribution of the whole must be on the terms of
2075     +this License, whose permissions for other licensees extend to the
2076     +entire whole, and thus to each and every part regardless of who wrote it.
2077 eradicator 150 +
2078 dsd 198 +Thus, it is not the intent of this section to claim rights or contest
2079     +your rights to work written entirely by you; rather, the intent is to
2080     +exercise the right to control the distribution of derivative or
2081     +collective works based on the Program.
2082 eradicator 150 +
2083 dsd 198 +In addition, mere aggregation of another work not based on the Program
2084     +with the Program (or with a work based on the Program) on a volume of
2085     +a storage or distribution medium does not bring the other work under
2086     +the scope of this License.
2087 eradicator 150 +
2088 dsd 198 + 3. You may copy and distribute the Program (or a work based on it,
2089     +under Section 2) in object code or executable form under the terms of
2090     +Sections 1 and 2 above provided that you also do one of the following:
2091 eradicator 150 +
2092 dsd 198 + a) Accompany it with the complete corresponding machine-readable
2093     + source code, which must be distributed under the terms of Sections
2094     + 1 and 2 above on a medium customarily used for software interchange; or,
2095 eradicator 150 +
2096 dsd 198 + b) Accompany it with a written offer, valid for at least three
2097     + years, to give any third party, for a charge no more than your
2098     + cost of physically performing source distribution, a complete
2099     + machine-readable copy of the corresponding source code, to be
2100     + distributed under the terms of Sections 1 and 2 above on a medium
2101     + customarily used for software interchange; or,
2102 eradicator 150 +
2103 dsd 198 + c) Accompany it with the information you received as to the offer
2104     + to distribute corresponding source code. (This alternative is
2105     + allowed only for noncommercial distribution and only if you
2106     + received the program in object code or executable form with such
2107     + an offer, in accord with Subsection b above.)
2108 eradicator 150 +
2109 dsd 198 +The source code for a work means the preferred form of the work for
2110     +making modifications to it. For an executable work, complete source
2111     +code means all the source code for all modules it contains, plus any
2112     +associated interface definition files, plus the scripts used to
2113     +control compilation and installation of the executable. However, as a
2114     +special exception, the source code distributed need not include
2115     +anything that is normally distributed (in either source or binary
2116     +form) with the major components (compiler, kernel, and so on) of the
2117     +operating system on which the executable runs, unless that component
2118     +itself accompanies the executable.
2119 eradicator 150 +
2120 dsd 198 +If distribution of executable or object code is made by offering
2121     +access to copy from a designated place, then offering equivalent
2122     +access to copy the source code from the same place counts as
2123     +distribution of the source code, even though third parties are not
2124     +compelled to copy the source along with the object code.
2125     +
2126     + 4. You may not copy, modify, sublicense, or distribute the Program
2127     +except as expressly provided under this License. Any attempt
2128     +otherwise to copy, modify, sublicense or distribute the Program is
2129     +void, and will automatically terminate your rights under this License.
2130     +However, parties who have received copies, or rights, from you under
2131     +this License will not have their licenses terminated so long as such
2132     +parties remain in full compliance.
2133 eradicator 150 +
2134 dsd 198 + 5. You are not required to accept this License, since you have not
2135     +signed it. However, nothing else grants you permission to modify or
2136     +distribute the Program or its derivative works. These actions are
2137     +prohibited by law if you do not accept this License. Therefore, by
2138     +modifying or distributing the Program (or any work based on the
2139     +Program), you indicate your acceptance of this License to do so, and
2140     +all its terms and conditions for copying, distributing or modifying
2141     +the Program or works based on it.
2142 eradicator 150 +
2143 dsd 198 + 6. Each time you redistribute the Program (or any work based on the
2144     +Program), the recipient automatically receives a license from the
2145     +original licensor to copy, distribute or modify the Program subject to
2146     +these terms and conditions. You may not impose any further
2147     +restrictions on the recipients' exercise of the rights granted herein.
2148     +You are not responsible for enforcing compliance by third parties to
2149     +this License.
2150 eradicator 150 +
2151 dsd 198 + 7. If, as a consequence of a court judgment or allegation of patent
2152     +infringement or for any other reason (not limited to patent issues),
2153     +conditions are imposed on you (whether by court order, agreement or
2154     +otherwise) that contradict the conditions of this License, they do not
2155     +excuse you from the conditions of this License. If you cannot
2156     +distribute so as to satisfy simultaneously your obligations under this
2157     +License and any other pertinent obligations, then as a consequence you
2158     +may not distribute the Program at all. For example, if a patent
2159     +license would not permit royalty-free redistribution of the Program by
2160     +all those who receive copies directly or indirectly through you, then
2161     +the only way you could satisfy both it and this License would be to
2162     +refrain entirely from distribution of the Program.
2163 eradicator 150 +
2164 dsd 198 +If any portion of this section is held invalid or unenforceable under
2165     +any particular circumstance, the balance of the section is intended to
2166     +apply and the section as a whole is intended to apply in other
2167     +circumstances.
2168 eradicator 150 +
2169 dsd 198 +It is not the purpose of this section to induce you to infringe any
2170     +patents or other property right claims or to contest validity of any
2171     +such claims; this section has the sole purpose of protecting the
2172     +integrity of the free software distribution system, which is
2173     +implemented by public license practices. Many people have made
2174     +generous contributions to the wide range of software distributed
2175     +through that system in reliance on consistent application of that
2176     +system; it is up to the author/donor to decide if he or she is willing
2177     +to distribute software through any other system and a licensee cannot
2178     +impose that choice.
2179 eradicator 150 +
2180 dsd 198 +This section is intended to make thoroughly clear what is believed to
2181     +be a consequence of the rest of this License.
2182     +
2183     + 8. If the distribution and/or use of the Program is restricted in
2184     +certain countries either by patents or by copyrighted interfaces, the
2185     +original copyright holder who places the Program under this License
2186     +may add an explicit geographical distribution limitation excluding
2187     +those countries, so that distribution is permitted only in or among
2188     +countries not thus excluded. In such case, this License incorporates
2189     +the limitation as if written in the body of this License.
2190 eradicator 150 +
2191 dsd 198 + 9. The Free Software Foundation may publish revised and/or new versions
2192     +of the General Public License from time to time. Such new versions will
2193     +be similar in spirit to the present version, but may differ in detail to
2194     +address new problems or concerns.
2195 eradicator 150 +
2196 dsd 198 +Each version is given a distinguishing version number. If the Program
2197     +specifies a version number of this License which applies to it and "any
2198     +later version", you have the option of following the terms and conditions
2199     +either of that version or of any later version published by the Free
2200     +Software Foundation. If the Program does not specify a version number of
2201     +this License, you may choose any version ever published by the Free Software
2202     +Foundation.
2203 eradicator 150 +
2204 dsd 198 + 10. If you wish to incorporate parts of the Program into other free
2205     +programs whose distribution conditions are different, write to the author
2206     +to ask for permission. For software which is copyrighted by the Free
2207     +Software Foundation, write to the Free Software Foundation; we sometimes
2208     +make exceptions for this. Our decision will be guided by the two goals
2209     +of preserving the free status of all derivatives of our free software and
2210     +of promoting the sharing and reuse of software generally.
2211 eradicator 150 +
2212 dsd 198 + NO WARRANTY
2213 eradicator 150 +
2214 dsd 198 + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
2215     +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
2216     +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
2217     +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
2218     +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2219     +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
2220     +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
2221     +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
2222     +REPAIR OR CORRECTION.
2223 eradicator 150 +
2224 dsd 198 + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
2225     +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
2226     +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
2227     +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
2228     +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
2229     +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
2230     +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
2231     +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
2232     +POSSIBILITY OF SUCH DAMAGES.
2233 eradicator 150 +
2234 dsd 198 + END OF TERMS AND CONDITIONS
2235     +
2236     + How to Apply These Terms to Your New Programs
2237 eradicator 150 +
2238 dsd 198 + If you develop a new program, and you want it to be of the greatest
2239     +possible use to the public, the best way to achieve this is to make it
2240     +free software which everyone can redistribute and change under these terms.
2241 eradicator 150 +
2242 dsd 198 + To do so, attach the following notices to the program. It is safest
2243     +to attach them to the start of each source file to most effectively
2244     +convey the exclusion of warranty; and each file should have at least
2245     +the "copyright" line and a pointer to where the full notice is found.
2246 eradicator 150 +
2247 dsd 198 + <one line to give the program's name and a brief idea of what it does.>
2248     + Copyright (C) 19yy <name of author>
2249 eradicator 150 +
2250 dsd 198 + This program is free software; you can redistribute it and/or modify
2251     + it under the terms of the GNU General Public License as published by
2252     + the Free Software Foundation; either version 2 of the License, or
2253     + (at your option) any later version.
2254 eradicator 150 +
2255 dsd 198 + This program is distributed in the hope that it will be useful,
2256     + but WITHOUT ANY WARRANTY; without even the implied warranty of
2257     + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2258     + GNU General Public License for more details.
2259 eradicator 150 +
2260 dsd 198 + You should have received a copy of the GNU General Public License
2261     + along with this program; if not, write to the Free Software
2262     + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2263 eradicator 150 +
2264     +
2265 dsd 198 +Also add information on how to contact you by electronic and paper mail.
2266 eradicator 150 +
2267 dsd 198 +If the program is interactive, make it output a short notice like this
2268     +when it starts in an interactive mode:
2269 eradicator 150 +
2270 dsd 198 + Gnomovision version 69, Copyright (C) 19yy name of author
2271     + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
2272     + This is free software, and you are welcome to redistribute it
2273     + under certain conditions; type `show c' for details.
2274 eradicator 150 +
2275 dsd 198 +The hypothetical commands `show w' and `show c' should show the appropriate
2276     +parts of the General Public License. Of course, the commands you use may
2277     +be called something other than `show w' and `show c'; they could even be
2278     +mouse-clicks or menu items--whatever suits your program.
2279 eradicator 150 +
2280 dsd 198 +You should also get your employer (if you work as a programmer) or your
2281     +school, if any, to sign a "copyright disclaimer" for the program, if
2282     +necessary. Here is a sample; alter the names:
2283 eradicator 150 +
2284 dsd 198 + Yoyodyne, Inc., hereby disclaims all copyright interest in the program
2285     + `Gnomovision' (which makes passes at compilers) written by James Hacker.
2286 eradicator 150 +
2287 dsd 198 + <signature of Ty Coon>, 1 April 1989
2288     + Ty Coon, President of Vice
2289 eradicator 150 +
2290 dsd 198 +This General Public License does not permit incorporating your program into
2291     +proprietary programs. If your program is a subroutine library, you may
2292     +consider it more useful to permit linking proprietary applications with the
2293     +library. If this is what you want to do, use the GNU Library General
2294     +Public License instead of this License.
2295     diff -urNpXdontdiff linux-2.6.14/drivers/char/speakup/cvsversion.h linux-dsd/drivers/char/speakup/cvsversion.h
2296     --- linux-2.6.14/drivers/char/speakup/cvsversion.h 1970-01-01 01:00:00.000000000 +0100
2297     +++ linux-dsd/drivers/char/speakup/cvsversion.h 2005-10-28 12:24:46.000000000 +0100
2298 eradicator 150 @@ -0,0 +1 @@
2299 dsd 198 +#define CVSVERSION " CVS: Wed Oct 26 15:13:02 EDT 2005 "
2300     diff -urNpXdontdiff linux-2.6.14/drivers/char/speakup/dtload.c linux-dsd/drivers/char/speakup/dtload.c
2301     --- linux-2.6.14/drivers/char/speakup/dtload.c 1970-01-01 01:00:00.000000000 +0100
2302     +++ linux-dsd/drivers/char/speakup/dtload.c 2005-10-28 12:24:46.000000000 +0100
2303 eradicator 150 @@ -0,0 +1,554 @@
2304     +/*
2305     + * This is the DECtalk PC firmware loader for the Linux kernel, version 1.0
2306     + *
2307     + * Original 386BSD source:
2308     + * Copyright ( c ) 1996 Brian Buhrow <buhrow@lothlorien.nfbcal.org>
2309     + *
2310     + * Adapted for Linux:
2311     + * Copyright ( c ) 1997 Nicolas Pitre <nico@cam.org>
2312     + *
2313     + * Adapted for speakup:
2314     + * Copyright ( c ) 2003 David Borowski <david575@golden.net>
2315     + *
2316     + * All rights reserved.
2317     + *
2318     + * This program is free software; you can redistribute it and/or modify
2319     + * it under the terms of the GNU General Public License as published by
2320     + * the Free Software Foundation; either version 2 of the License, or
2321     + * ( at your option ) any later version.
2322     + *
2323     + * This program is distributed in the hope that it will be useful,
2324     + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2325     + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2326     + * GNU General Public License for more details.
2327     + *
2328     + * You should have received a copy of the GNU General Public License
2329     + * along with this program; if not, write to the Free Software
2330     + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2331     + *
2332     + */
2333     +
2334     +#include <stdio.h>
2335     +#include <stdlib.h>
2336     +#include <unistd.h>
2337     +#include <string.h>
2338     +#include <sys/types.h>
2339     +#include <sys/stat.h>
2340     +#include <fcntl.h>
2341     +#include <malloc.h>
2342     +#include <sys/errno.h>
2343     +#include <asm/io.h>
2344     +#include "dtload.h"
2345     +#include "dtpc_reg.h"
2346     +
2347     +#define dt_delay(x) usleep(x)
2348     +int verbose = 0, intest = 0,infd = -1;
2349     +int image_len, total_paras;
2350     +int dt_stat, dma_state = 0, has_kernel = 0;
2351     +struct dos_reloc fixups[512];
2352     +char *read_buff = NULL;
2353     +struct dos_exe_header header;
2354     +u_short iobase = 0x350;
2355     +
2356     +static inline int dt_getstatus( )
2357     +{
2358     + dt_stat = inb_p( iobase )|(inb_p( iobase+1 )<<8);
2359     + return dt_stat;
2360     +}
2361     +
2362     +static void dt_sendcmd( u_int cmd )
2363     +{
2364     + outb_p( cmd & 0xFF, iobase );
2365     + outb_p( (cmd>>8) & 0xFF, iobase+1 );
2366     +}
2367     +
2368     +static int dt_waitbit( int bit )
2369     +{
2370     + int timeout = 100;
2371     + while ( --timeout > 0 ) {
2372     + if( (dt_getstatus( ) & bit ) == bit ) return 1;
2373     + usleep( 1000 );
2374     + }
2375     + return 0;
2376     +}
2377     +
2378     +static int dt_sendcmd_wait( u_int cmd, int bit )
2379     +{
2380     + int timeout = 1000;
2381     + outb_p( cmd & 0xFF, iobase );
2382     + outb_p( (cmd>>8) & 0xFF, iobase+1 );
2383     + while ( --timeout > 0 ) {
2384     + if( (dt_getstatus( ) & bit ) == bit ) return 1;
2385     + usleep( 1000 );
2386     + }
2387     + return 0;
2388     +}
2389     +
2390     +static int dt_waitmode( int pattern )
2391     +{
2392     + int timeout = 1000;
2393     + while ( --timeout > 0 ) {
2394     + if( dt_getstatus( ) == pattern ) return 1;
2395     + usleep( 1000 );
2396     + }
2397     + fprintf( stderr, "waitmode p=%x s = %x\n", pattern, dt_stat );
2398     + return 0;
2399     +}
2400     +
2401     +static int dt_wait_dma( )
2402     +{
2403     + int timeout = 1000, state = dma_state;
2404     + if( !has_kernel ){
2405     + dt_delay( 500 );
2406     + return( dt_waitbit( STAT_dma_ready ) );
2407     + }
2408     + if( ! dt_waitbit( STAT_dma_ready ) ) return 0;
2409     + while ( --timeout > 0 ) {
2410     + if( (dt_getstatus()&STAT_dma_state) == state ) return 1;
2411     + usleep( 1000 );
2412     + }
2413     + dma_state = dt_getstatus( ) & STAT_dma_state;
2414     + return 1;
2415     +}
2416     +
2417     +dt_ctrl( u_int cmd )
2418     +{
2419     + while ( ! dt_waitbit( STAT_cmd_ready ) ) dt_delay( 100 );
2420     + outb_p( 0, iobase+2 );
2421     + outb_p( 0, iobase+3 );
2422     + dt_getstatus( );
2423     + dt_sendcmd( CMD_control|cmd );
2424     + outb_p( 0, iobase+6 );
2425     + dt_delay( 100 );
2426     + dt_sendcmd( CMD_null );
2427     + while ( ! dt_waitbit( STAT_cmd_ready ) ) dt_delay( 100 );
2428     +}
2429     +
2430     +int dt_flush( void )
2431     +{
2432     + dt_ctrl( CTRL_flush );
2433     + dt_waitbit( STAT_dma_ready );
2434     + outb_p( DMA_sync, iobase+4 );
2435     + outb_p( 0, iobase+4 );
2436     + dma_state ^= STAT_dma_state;
2437     + while( dt_getstatus( ) & STAT_flushing ) dt_delay( 100 );
2438     + return 0;
2439     +}
2440     +
2441     +static int dt_sendbuff( char *src, int len )
2442     +{
2443     + while( len-- ){
2444     + if( ! dt_wait_dma( ) ) return -1;
2445     + if( ! (dt_getstatus( ) & STAT_rr_char) ) break;
2446     + outb_p( DMA_single_in, iobase+4 );
2447     + outb_p( *src++, iobase+4 );
2448     + dma_state ^= STAT_dma_state;
2449     + }
2450     + return 0;
2451     +}
2452     +
2453     +unsigned long dt_allocmem( unsigned long paras )
2454     +{
2455     + unsigned long addr;
2456     + if( ! dt_wait_dma( ) ) return 0;
2457     + outb_p( DMA_control, iobase+4 );
2458     + outb_p( DT_MEM_ALLOC, iobase+4 );
2459     + dma_state ^= STAT_dma_state;
2460     + if( ! dt_wait_dma( ) ) return 0;
2461     + outb_p( paras & 0xFF, iobase+4 );
2462     + outb_p( (paras>>8) & 0xFF, iobase+4 );
2463     + dma_state ^= STAT_dma_state;
2464     + if( ! dt_wait_dma( ) ) return 0;
2465     + addr = inb_p( iobase+4 );
2466     + addr |= (inb_p( iobase+4 )<<8);
2467     + addr += (inb_p( iobase+4 )<<4);
2468     + addr += (inb_p( iobase+4 )<<12);
2469     + dma_state ^= STAT_dma_state;
2470     + return addr;
2471     +}
2472     +
2473     +static int testkernel( void )
2474     +{
2475     + dt_sendcmd( CMD_sync );
2476     + if( ! dt_waitbit( STAT_cmd_ready ) ) return -10;
2477     + has_kernel = ( dt_stat&0x8000 ) ? 1 : 0;
2478     + if ( verbose ) printf( "testkernel got %x\n", dt_stat );
2479     + if ( has_kernel ) return 0;
2480     + dt_delay( 100 );
2481     + return 1;
2482     +}
2483     +
2484     +static int dt_loadmem( int addr, int len, char *src )
2485     +{
2486     + char c;
2487     + int l;
2488     + if ( verbose ) printf( "dt_loadmem: addr = %08X size = %d\n", addr, len );
2489     + do {
2490     + l = len;
2491     + if ( l >= 0xc000 ) l = 0xc000;
2492     + len -= l;
2493     + if( ! dt_wait_dma( ) ) return -1;
2494     + outb_p( DMA_control, iobase+4 );
2495     + outb_p( DT_LOAD_MEM, iobase+4 );
2496     + dma_state ^= STAT_dma_state;
2497     + if( ! dt_wait_dma( ) ) return -2;
2498     + outb_p( addr & 0xFF, iobase+4 );
2499     + outb_p( (addr>>8) & 0xFF, iobase+4 );
2500     + outb_p( (addr>>16) & 0xFF, iobase+4 );
2501     + outb_p( (addr>>24) & 0xFF, iobase+4 );
2502     + outb_p( l & 0xFF, iobase+4 );
2503     + outb_p( (l>>8) & 0xFF, iobase+4 );
2504     + dma_state ^= STAT_dma_state;
2505     + if( ! dt_wait_dma( ) ) return -3;
2506     + addr += l;
2507     + while( l-- ){
2508     + c = *src++;
2509     + outb_p( c, iobase+4 );
2510     + }
2511     + dma_state ^= STAT_dma_state;
2512     + } while ( len > 0 );
2513     + return 0;
2514     +}
2515     +
2516     +unsigned int loadfile ( char *filename )
2517     +{
2518     + int i, header_size;
2519     + unsigned int total_paras;
2520     + long fix;
2521     + infd = open ( filename, O_RDONLY );
2522     + if ( infd == -1 ) {
2523     + perror ( "Opening file: " );
2524     + return 0;
2525     + }
2526     + read ( infd, &header, sizeof ( struct dos_exe_header ) );
2527     + if ( header.id != 0x5a4d ) {
2528     + fprintf ( stderr, "Invalid header file format\n" );
2529     + fprintf ( stderr, "Want 0x5a4d, got 0x%x\n", header.id );
2530     + return 0;
2531     + }
2532     + if ( header.relen > MAX_FIXUPS ) {
2533     + fprintf ( stderr, "Too many fixups\n" );
2534     + return 0;
2535     + }
2536     + lseek ( infd, ( long ) header.reloc, SEEK_SET );
2537     + read ( infd, fixups, sizeof ( struct dos_reloc ) * header.relen );
2538     + header_size = header.hsize * 16;
2539     + lseek ( infd, ( long )header_size, SEEK_SET );
2540     + image_len = ( ( header.pages-1 )*512 ) + ( header.rem- header_size );
2541     + total_paras = ( image_len >> 4 ) + header.hmin + 16;
2542     + read ( infd, read_buff, image_len );
2543     + close( infd );
2544     + return total_paras;
2545     +}
2546     +
2547     +static int loadkernel( char *filename )
2548     +{
2549     + int segfix = 0x40, fix, i;
2550     + int ipval, csval;
2551     + if ( has_kernel ) return 0;
2552     + if ( !loadfile( filename ) ) return -1;
2553     + header.csval += segfix;
2554     + header.ssval += segfix;
2555     + if ( verbose ) {
2556     + printf ( "Loading kernel of %ld bytes ( %d relocs )\n",
2557     + image_len, header.relen );
2558     + printf ( " cs:ip == %04x:%04x ss:sp == %04x:%04x\n",
2559     + header.csval, header.ipval, header.ssval, header.spval );
2560     + }
2561     + for ( i = 0; i < header.relen; i++ ) {
2562     + fix = ( fixups[i].segment << 4 ) + fixups[i].offset;
2563     + ( *( unsigned int * ) &read_buff[fix] ) += segfix;
2564     + }
2565     + csval = header.csval;
2566     + ipval = header.ipval;
2567     + dt_sendcmd_wait( MODULE_reset, MODULE_init );
2568     + dt_sendcmd( CMD_reset );
2569     + if( dt_getstatus( ) == MODULE_self_test ){
2570     + if( ! dt_waitmode( MODULE_init ) ) return -1;
2571     + }
2572     + if ( !dt_sendcmd_wait( CMD_reset, MODE_status ) ) return -2;
2573     + if ( !dt_sendcmd_wait( CMD_sync, MODE_error ) ) return -3;
2574     + if ( !dt_sendcmd_wait( CMD_reset, MODE_status ) ) return -4;
2575     + if ( verbose ) printf( "card is ready\n" );
2576     + dt_sendcmd( CMD_dma );
2577     + if( ! dt_waitbit( STAT_dma_ready ) ) return -5;
2578     + if( ( i = dt_loadmem( 0x00000400, image_len, read_buff ) ) ) {
2579     + fprintf( stderr, "kernel load failed, status %d\n", i );
2580     + return -6;
2581     + }
2582     + dt_delay( 100 );
2583     + /* the kernel is loaded, start it */
2584     + if ( !dt_sendcmd_wait( CMD_reset, MODE_status ) ) return -7;
2585     + dt_sendcmd( CMD_dma+1 ); /**xxx**/
2586     + dt_delay( 100 );
2587     + if( ! dt_waitbit( STAT_dma_ready ) ) return-8;
2588     + outb_p( DMA_control, iobase+4 );
2589     + outb_p( DT_START_TASK, iobase+4 );
2590     + dt_delay( 100 );
2591     + outb_p( ipval & 0xFF, iobase+4 );
2592     + outb_p( (ipval>>8) & 0xFF, iobase+4 );
2593     + outb_p( csval & 0xFF, iobase+4 );
2594     + outb_p( (csval>>8) & 0xFF, iobase+4 );
2595     + if( ! dt_waitmode( 0xc001 ) ) return -9;
2596     + if ( verbose ) {
2597     + printf( "done loading kernel\n" );
2598     + }
2599     + return testkernel( );
2600     +}
2601     +
2602     +int loaddict ( char *filename, char *name, int type )
2603     +{
2604     + int i, read_index, read_size, act_size;
2605     + unsigned short *index_fix, seg_fix;
2606     + unsigned long entries, index, dic_bytes, dic_addr;
2607     + unsigned int total_paras;
2608     + unsigned long param, l;
2609     + infd = open ( filename, O_RDONLY );
2610     + if ( infd == -1 ) {
2611     + perror ( filename );
2612     + return -1;
2613     + }
2614     +/* read in the entry count and the actual entry size excluding the
2615     + * index table ( which is entries * 4 ) ... */
2616     + read ( infd, &entries, 4 );
2617     + read ( infd, &dic_bytes, 4 );
2618     + if ( verbose )
2619     + printf ( "Loading %s dictionary of %lu entries, %lu bytes.\n",
2620     + name, entries, dic_bytes );
2621     + total_paras = ( ( ( entries * 4 ) + dic_bytes ) >> 4 ) + 2;
2622     + if ( verbose )
2623     + printf ( "Allocating %d paragraphs of free ram ...\n", total_paras );
2624     + l = dt_allocmem( total_paras );
2625     + if ( l == 0 ) {
2626     + perror ( "Error requesting memory from speech device" );
2627     + return -1;
2628     + }
2629     + seg_fix = ( l >> 4 ) & 0xffff;
2630     + dic_addr = l;
2631     + index = entries;
2632     + index_fix = ( unsigned short * ) &read_buff[0];
2633     + if ( verbose )
2634     + printf ( "Index table starts at %lx\n", l );
2635     + read_index = index*4;
2636     + act_size = read ( infd, read_buff, read_index );
2637     + if ( act_size != read_index ) {
2638     + fprintf ( stderr, "\nError reading indexes\n" );
2639     + fprintf ( stderr, " exp : %d act : %d\n", read_index * 4, act_size );
2640     + return -1;
2641     + }
2642     + for ( i = 1; i < index * 2; i += 2 )
2643     + index_fix[i] += seg_fix;
2644     + if( ( i = dt_loadmem( l, read_index, read_buff ) ) ) {
2645     + fprintf ( stderr, "\nError loading indexes at 0x%lX: i %d\n",
2646     + l, i );
2647     + return -1;
2648     + }
2649     + l += read_index;
2650     +/* now, load up the dictionary bytes ... */
2651     + if ( verbose )
2652     + printf ( "Dictionary text starts at %lx\n", l );
2653     + read_size = dic_bytes;
2654     + if ( ( act_size = read ( infd, read_buff, read_size ) ) != read_size ) {
2655     + fprintf ( stderr, "\nError reading dictionary text!\n" );
2656     + fprintf ( stderr, "asked : %d actual : %d\n", act_size, read_size );
2657     + return -1;
2658     + }
2659     + if( ( i = dt_loadmem( l, read_size, read_buff ) ) ) {
2660     + fprintf ( stderr, "\nError loading dictionary at 0x%lX: status %d\n",
2661     + l, i );
2662     + return -1;
2663     + }
2664     + if( ! dt_wait_dma( ) ) return -1;
2665     + outb_p( DMA_control, iobase+4 );
2666     + outb_p( DT_SET_DIC, iobase+4 );
2667     + dma_state ^= STAT_dma_state;
2668     + if( ! dt_wait_dma( ) ) return -1;
2669     + l = dic_addr;
2670     + l = ((l << 12) & 0xFFFF0000) + (l & 0x0000000F);
2671     + outb_p( l & 0xFF, iobase+4 );
2672     + outb_p( (l>>8) & 0xFF, iobase+4 );
2673     + outb_p( (l>>16) & 0xFF, iobase+4 );
2674     + outb_p( (l>>24) & 0xFF, iobase+4 );
2675     + l = entries;
2676     + outb_p( l & 0xFF, iobase+4 );
2677     + outb_p( (l>>8) & 0xFF, iobase+4 );
2678     + outb_p( (l>>16) & 0xFF, iobase+4 );
2679     + outb_p( (l>>24) & 0xFF, iobase+4 );
2680     + l = type;
2681     + outb_p( l & 0xFF, iobase+4 );
2682     + outb_p( (l>>8) & 0xFF, iobase+4 );
2683     + dma_state ^= STAT_dma_state;
2684     + close ( infd );
2685     + if ( verbose ) printf( "dictionary load complete\n" );
2686     + return 0;
2687     +}
2688     +
2689     +int loadexe ( char *filename )
2690     +{
2691     + unsigned int load_addr = 0, seg_fix;
2692     + int i, read_size;
2693     + int ipval, csval;
2694     + long fix;
2695     + unsigned long total_paras;
2696     + total_paras = loadfile ( filename );
2697     + if ( total_paras == 0 ) return -1;
2698     + load_addr = dt_allocmem( total_paras );
2699     + if ( load_addr == 0 ) {
2700     + fprintf ( stderr, "Error allocating memory on card: " );
2701     + return -1;
2702     + }
2703     + seg_fix = ( load_addr >> 4 ) & 0xffff;
2704     + if ( verbose ) {
2705     + printf ( "Loading %s %ld bytes ( %d relocs )\n",
2706     + filename, image_len, header.relen );
2707     + printf ( "Allocating %ld bytes of free ram at %05x\n",
2708     + ( long ) header.hmin * 16, load_addr );
2709     + printf ( "Total memory taken is %ld bytes\n", ( long ) total_paras * 16 );
2710     + printf ( " cs:ip == %04x:%04x ss:sp == %04x:%04x\n",
2711     + header.csval + seg_fix, header.ipval, header.ssval + seg_fix, header.spval );
2712     + }
2713     + for ( i = 0; i < header.relen; i++ ) {
2714     + fix = ( ( long ) fixups[i].segment << 4 ) + ( long ) fixups[i].offset;
2715     + ( *( unsigned int * ) &read_buff[fix] ) += seg_fix;
2716     + }
2717     + if( ( i = dt_loadmem( load_addr, image_len, read_buff ) ) ) {
2718     + fprintf ( stderr, "Error loading speech device at 0x%lX: status %d\n",
2719     + load_addr, i );
2720     + return -1;
2721     + }
2722     + csval = header.csval + seg_fix;
2723     + ipval = header.ipval;
2724     + if( ! dt_wait_dma( ) ) return -1;
2725     + outb_p( DMA_control, iobase+4 );
2726     + outb_p( DT_START_TASK, iobase+4 );
2727     + dma_state ^= STAT_dma_state;
2728     + if( ! dt_wait_dma( ) ) return -1;
2729     + outb_p( ipval & 0xFF, iobase+4 );
2730     + outb_p( (ipval>>8) & 0xFF, iobase+4 );
2731     + outb_p( csval & 0xFF, iobase+4 );
2732     + outb_p( (csval>>8) & 0xFF, iobase+4 );
2733     + dma_state ^= STAT_dma_state;
2734     + return 0;
2735     +}
2736     +
2737     +void release_io( void )
2738     +{
2739     + ioperm( (long)iobase, 8, 0 );
2740     + ioperm( (long)0x0080, 1, 0 );
2741     + if ( read_buff ) free( read_buff );
2742     +}
2743     +
2744     +parseparm( char *parm, char *value )
2745     +{
2746     + char *cp = parm+strlen( parm );
2747     + while ( --cp > parm ) if ( *cp > ' ' ) break;
2748     + cp[1] = '\0';
2749     + if ( !strcmp( parm, "io" ) ) {
2750     + long io = strtol( value, 0, 0 );
2751     + if ( io >= 0x100 && io <= 0x350 ) {
2752     + iobase = (u_short)io;
2753     + return;
2754     + }
2755     + fprintf( stderr, "invalid io value %s\n", value );
2756     + exit( 1 );
2757     + } else if ( !strcmp( parm,"verbose" ) ) {
2758     + verbose = atoi( value );
2759     + }
2760     +}
2761     +
2762     +do_test( void )
2763     +{
2764     + char buffer[512];
2765     + int len;
2766     + dma_state = dt_getstatus( ) & STAT_dma_state;
2767     + while ( fgets( buffer, 510, stdin ) ) {
2768     + len = strlen( buffer );
2769     + if ( len == 1 ) dt_flush( );
2770     + else {
2771     + if ( buffer[len-1] == '\n' ) buffer[len-1] = '\013';
2772     + dt_sendbuff( buffer, len );
2773     + }
2774     + }
2775     + *buffer = '\013';
2776     + dt_sendbuff( buffer, 1 );
2777     +}
2778     +
2779     +int main ( int argc, char **argv )
2780     +{
2781     + char name[80], *cp;
2782     + char *dirname = 0, *confname = "dec_pc.conf";
2783     + char *init_msg = "[:ra 360] dec pc initialized\011";
2784     + FILE *confile;
2785     + struct stat statbuf;
2786     + int maxsize = 0, status = 0;
2787     + while ( --argc > 0 ) {
2788     + argv++;
2789     + if ( !strcmp( *argv, "-v" ) ) verbose = 1;
2790     + else if ( !strcmp( *argv, "-t" ) ) intest = 1;
2791     + else dirname = *argv;
2792     + }
2793     + if ( !dirname ) dirname = "/usr/local/lib/dec_pc";
2794     + if ( chdir( dirname ) != 0 ) {
2795     + fprintf( stderr, "cannot chdir to %s\n", dirname );
2796     + exit( 1 );
2797     + }
2798     + if ( !( confile = fopen( confname, "r" ) ) ) {
2799     + fprintf( stderr, "could not open %s", confname );
2800     + exit( 1 );
2801     + }
2802     + while ( fgets( name, 80, confile ) ) {
2803     + cp = strchr( name, '\n' );
2804     + if ( cp ) *cp = '\0';
2805     + if ( ( cp = strchr( name, '=' ) ) ) {
2806     + *cp++ = '\0';
2807     + parseparm( name, cp );
2808     + continue;
2809     + }
2810     + if ( stat( name, &statbuf ) != 0 ) {
2811     + fprintf( stderr, "cannot stat %s\n", name );
2812     + exit( 1 );
2813     + }
2814     + if ( statbuf.st_size > maxsize ) maxsize = statbuf.st_size;
2815     + }
2816     + rewind( confile );
2817     + if ( ioperm( (long)0x0080, 1, 1 ) || ioperm( (long)iobase, 8, 1 ) ) {
2818     + fprintf( stderr, "could not get ioperm\n" );
2819     + exit( 1 );
2820     + }
2821     + atexit( release_io );
2822     + if ( testkernel( ) == 0 ) {
2823     + if ( intest ) do_test( );
2824     + else fprintf( stderr, "kernel already loaded\n" );
2825     + exit( 0 );
2826     + }
2827     + read_buff = malloc( maxsize );
2828     + if ( !read_buff ) {
2829     + fprintf( stderr, "cannot malloc %d bytes\n", maxsize );
2830     + exit( 1 );
2831     + }
2832     + while ( fgets( name, 80, confile ) && !status ) {
2833     + cp = strchr( name, '\n' );
2834     + if ( cp ) *cp = '\0';
2835     + if ( strchr( name, '=' ) ) continue; /* a parameter */
2836     + if ( !( cp = strchr( name, '.' ) ) ) continue;
2837     + cp++;
2838     + if ( !strcmp ( cp, "dic" ) ) {
2839     + status = loaddict ( name, "primary", PRIMARY_DIC );
2840     + } else if ( !strcmp ( cp, "dtu" ) ) {
2841     + status = loaddict ( name, "user", USER_DIC );
2842     + } else if ( !strcmp ( cp, "dta" ) ) {
2843     + status = loaddict ( name, "abbreviation file", ABBREV_DIC );
2844     + } else if ( !strcmp ( cp, "exe" ) ) {
2845     + status = loadexe ( name );
2846     + } else if ( !strcmp ( cp, "sys" ) ) {
2847     + status = loadkernel ( name );
2848     + }
2849     + }
2850     + if ( status ) fprintf( stderr, "status %d\n", status );
2851     + fclose( confile );
2852     + if ( status ) exit( status );
2853     + dt_sendbuff( init_msg, strlen( init_msg ) );
2854     + sleep( 1 );
2855     + if ( intest ) do_test( );
2856     + exit( 0 );
2857     +}
2858 dsd 198 diff -urNpXdontdiff linux-2.6.14/drivers/char/speakup/dtload.h linux-dsd/drivers/char/speakup/dtload.h
2859     --- linux-2.6.14/drivers/char/speakup/dtload.h 1970-01-01 01:00:00.000000000 +0100
2860     +++ linux-dsd/drivers/char/speakup/dtload.h 2005-10-28 12:24:46.000000000 +0100
2861 eradicator 150 @@ -0,0 +1,57 @@
2862     +/*
2863     + * This is the DECtalk PC firmware loader for the Linux kernel, version 1.0
2864     + *
2865     + * Original 386BSD source:
2866     + * Copyright (c) 1996 Brian Buhrow <buhrow@lothlorien.nfbcal.org>
2867     + *
2868     + * Adapted for Linux:
2869     + * Copyright (c) 1997 Nicolas Pitre <nico@cam.org>
2870     + *
2871     + * Adapted for speakup:
2872     + * Copyright (c) 2003 David Borowski <david575@golden.net>
2873     + *
2874     + * All rights reserved.
2875     + *
2876     + * This program is free software; you can redistribute it and/or modify
2877     + * it under the terms of the GNU General Public License as published by
2878     + * the Free Software Foundation; either version 2 of the License, or
2879     + * (at your option) any later version.
2880     + *
2881     + * This program is distributed in the hope that it will be useful,
2882     + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2883     + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2884     + * GNU General Public License for more details.
2885     + *
2886     + * You should have received a copy of the GNU General Public License
2887     + * along with this program; if not, write to the Free Software
2888     + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2889     + *
2890     + */
2891     +
2892     +#define MAX_FIXUPS 512 /* maximum fixups per exe */
2893     +/*
2894     + * msdos .exe files will look like ...
2895     + */
2896     +
2897     +struct dos_exe_header {
2898     + unsigned short id; /* Linker's signature, must be 0x5a4d */
2899     + unsigned short rem; /* length of image mod 512 */
2900     + unsigned short pages; /* length of image in pages of 512 bytes */
2901     + unsigned short relen; /* number of relocation items */
2902     + unsigned short hsize; /* header size in paragraphs of 16 bytes */
2903     + unsigned short hmin; /* min # of paragraphs above prog end */
2904     + unsigned short hmax;
2905     + unsigned short ssval;
2906     + unsigned short spval; /* to be loaded in sp */
2907     + unsigned short checksum;
2908     + unsigned short ipval; /* to be loaded in ip */
2909     + unsigned short csval; /* segment offset to code */
2910     + unsigned short reloc; /* location of relocation items */
2911     + unsigned short ovrlay; /* overlay number */
2912     +};
2913     +
2914     +/* a dos relocation element looks like */
2915     +
2916     +struct dos_reloc {
2917     + short int offset, segment;
2918     +};
2919 dsd 198 diff -urNpXdontdiff linux-2.6.14/drivers/char/speakup/dtpc_reg.h linux-dsd/drivers/char/speakup/dtpc_reg.h
2920     --- linux-2.6.14/drivers/char/speakup/dtpc_reg.h 1970-01-01 01:00:00.000000000 +0100
2921     +++ linux-dsd/drivers/char/speakup/dtpc_reg.h 2005-10-28 12:24:46.000000000 +0100
2922 eradicator 150 @@ -0,0 +1,132 @@
2923     +/*
2924     + * This is the DECtalk PC register constants (from DEC's DOS driver)
2925     + *
2926     + * Original code:
2927     + * Copyright (c) by Digital Equipment Corp.
2928     + *
2929     + * 386BSD DECtalk PC driver:
2930     + * Copyright (c) 1996 Brian Buhrow <buhrow@lothlorien.nfbcal.org>
2931     + *
2932     + * Linux DECtalk PC driver:
2933     + * Copyright (c) 1997 Nicolas Pitre <nico@cam.org>
2934     + *
2935     + * speakup DECtalk PC driver:
2936     + * Copyright (c) 2003 David Borowski <david575@golden.net>
2937     + *
2938     + * All rights reserved.
2939     + *
2940     + * This program is free software; you can redistribute it and/or modify
2941     + * it under the terms of the GNU General Public License as published by
2942     + * the Free Software Foundation; either version 2 of the License, or
2943     + * (at your option) any later version.
2944     + *
2945     + * This program is distributed in the hope that it will be useful,
2946     + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2947     + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2948     + * GNU General Public License for more details.
2949     + *
2950     + * You should have received a copy of the GNU General Public License
2951     + * along with this program; if not, write to the Free Software
2952     + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2953     + *
2954     + */
2955     +
2956     +/*
2957     + * port interface defs ... used by dtpc.c
2958     + */
2959     +
2960     +#define MODULE_init 0x0dec /* module in boot code */
2961     +#define MODULE_self_test 0x8800 /* module in self-test */
2962     +#define MODULE_reset 0xffff /* reinit the whole module */
2963     +
2964     +#define MODE_mask 0xf000 /* mode bits in high nibble */
2965     +#define MODE_null 0x0000
2966     +#define MODE_test 0x2000 /* in testing mode */
2967     +#define MODE_status 0x8000
2968     +#define STAT_int 0x0001 /* running in interrupt mode */
2969     +#define STAT_tr_char 0x0002 /* character data to transmit */
2970     +#define STAT_rr_char 0x0004 /* ready to receive char data */
2971     +#define STAT_cmd_ready 0x0008 /* ready to accept commands */
2972     +#define STAT_dma_ready 0x0010 /* dma command ready */
2973     +#define STAT_digitized 0x0020 /* spc in digitized mode */
2974     +#define STAT_new_index 0x0040 /* new last index ready */
2975     +#define STAT_new_status 0x0080 /* new status posted */
2976     +#define STAT_dma_state 0x0100 /* dma state toggle */
2977     +#define STAT_index_valid 0x0200 /* indexs are valid */
2978     +#define STAT_flushing 0x0400 /* flush in progress */
2979     +#define STAT_self_test 0x0800 /* module in self test */
2980     +#define MODE_ready 0xc000 /* module ready for next phase */
2981     +#define READY_boot 0x0000
2982     +#define READY_kernel 0x0001
2983     +#define MODE_error 0xf000
2984     +
2985     +#define CMD_mask 0xf000 /* mask for command nibble */
2986     +#define CMD_null 0x0000 /* post status */
2987     +#define CMD_control 0x1000 /* hard control command */
2988     +#define CTRL_mask 0x0F00 /* mask off control nibble */
2989     +#define CTRL_data 0x00FF /* madk to get data byte */
2990     +#define CTRL_null 0x0000 /* null control */
2991     +#define CTRL_vol_up 0x0100 /* increase volume */
2992     +#define CTRL_vol_down 0x0200 /* decrease volume */
2993     +#define CTRL_vol_set 0x0300 /* set volume */
2994     +#define CTRL_pause 0x0400 /* pause spc */
2995     +#define CTRL_resume 0x0500 /* resume spc clock */
2996     +#define CTRL_resume_spc 0x0001 /* resume spc soft pause */
2997     +#define CTRL_flush 0x0600 /* flush all buffers */
2998     +#define CTRL_int_enable 0x0700 /* enable status change ints */
2999     +#define CTRL_buff_free 0x0800 /* buffer remain count */
3000     +#define CTRL_buff_used 0x0900 /* buffer in use */
3001     +#define CTRL_speech 0x0a00 /* immediate speech change */
3002     +#define CTRL_SP_voice 0x0001 /* voice change */
3003     +#define CTRL_SP_rate 0x0002 /* rate change */
3004     +#define CTRL_SP_comma 0x0003 /* comma pause change */
3005     +#define CTRL_SP_period 0x0004 /* period pause change */
3006     +#define CTRL_SP_rate_delta 0x0005 /* delta rate change */
3007     +#define CTRL_SP_get_param 0x0006 /* return the desired parameter */
3008     +#define CTRL_last_index 0x0b00 /* get last index spoken */
3009     +#define CTRL_io_priority 0x0c00 /* change i/o priority */
3010     +#define CTRL_free_mem 0x0d00 /* get free paragraphs on module */
3011     +#define CTRL_get_lang 0x0e00 /* return bit mask of loaded languages */
3012     +#define CMD_test 0x2000 /* self-test request */
3013     +#define TEST_mask 0x0F00 /* isolate test field */
3014     +#define TEST_null 0x0000 /* no test requested */
3015     +#define TEST_isa_int 0x0100 /* assert isa irq */
3016     +#define TEST_echo 0x0200 /* make data in == data out */
3017     +#define TEST_seg 0x0300 /* set peek/poke segment */
3018     +#define TEST_off 0x0400 /* set peek/poke offset */
3019     +#define TEST_peek 0x0500 /* data out == *peek */
3020     +#define TEST_poke 0x0600 /* *peek == data in */
3021     +#define TEST_sub_code 0x00FF /* user defined test sub codes */
3022     +#define CMD_id 0x3000 /* return software id */
3023     +#define ID_null 0x0000 /* null id */
3024     +#define ID_kernel 0x0100 /* kernel code executing */
3025     +#define ID_boot 0x0200 /* boot code executing */
3026     +#define CMD_dma 0x4000 /* force a dma start */
3027     +#define CMD_reset 0x5000 /* reset module status */
3028     +#define CMD_sync 0x6000 /* kernel sync command */
3029     +#define CMD_char_in 0x7000 /* single character send */
3030     +#define CMD_char_out 0x8000 /* single character get */
3031     +#define CHAR_count_1 0x0100 /* one char in cmd_low */
3032     +#define CHAR_count_2 0x0200 /* the second in data_low */
3033     +#define CHAR_count_3 0x0300 /* the third in data_high */
3034     +#define CMD_spc_mode 0x9000 /* change spc mode */
3035     +#define CMD_spc_to_text 0x0100 /* set to text mode */
3036     +#define CMD_spc_to_digit 0x0200 /* set to digital mode */
3037     +#define CMD_spc_rate 0x0400 /* change spc data rate */
3038     +#define CMD_error 0xf000 /* severe error */
3039     +
3040     +enum { PRIMARY_DIC = 0, USER_DIC, COMMAND_DIC, ABBREV_DIC };
3041     +
3042     +#define DMA_single_in 0x01
3043     +#define DMA_single_out 0x02
3044     +#define DMA_buff_in 0x03
3045     +#define DMA_buff_out 0x04
3046     +#define DMA_control 0x05
3047     +#define DT_MEM_ALLOC 0x03
3048     +#define DT_SET_DIC 0x04
3049     +#define DT_START_TASK 0x05
3050     +#define DT_LOAD_MEM 0x06
3051     +#define DT_READ_MEM 0x07
3052     +#define DT_DIGITAL_IN 0x08
3053     +#define DMA_sync 0x06
3054     +#define DMA_sync_char 0x07
3055 dsd 198 diff -urNpXdontdiff linux-2.6.14/drivers/char/speakup/genmap.c linux-dsd/drivers/char/speakup/genmap.c
3056     --- linux-2.6.14/drivers/char/speakup/genmap.c 1970-01-01 01:00:00.000000000 +0100
3057     +++ linux-dsd/drivers/char/speakup/genmap.c 2005-10-28 12:24:46.000000000 +0100
3058 eradicator 150 @@ -0,0 +1,204 @@
3059     +#include <stdlib.h>
3060     +#include <stdio.h>
3061     +#include <libgen.h>
3062     +#include <string.h>
3063     +#include <linux/version.h>
3064     +#include <ctype.h>
3065     +
3066     +int get_define(void);
3067     +
3068     +#define MAXKEYS 512
3069     +#define MAXKEYVAL 160
3070     +#define HASHSIZE 101
3071     +#define is_shift -3
3072     +#define is_spk -2
3073     +#define is_input -1
3074     +typedef struct st_key_init t_key_init;
3075     +struct st_key_init {
3076     + char *name;
3077     + int value, shift;
3078     +};
3079     +typedef struct st_key t_key;
3080     +struct st_key {
3081     + char *name;
3082     + t_key *next;
3083     + int value, shift;
3084     +};
3085     +unsigned char key_data[MAXKEYVAL][16], *kp;
3086     +
3087     +#include "mapdata.h"
3088     +t_key key_table[MAXKEYS];
3089     +t_key *extra_keys = key_table+HASHSIZE;
3090     +char buffer[256], filename[256];
3091     +FILE *infile;
3092     +char delims[] = "\t\n ";
3093     +char *def_name, *def_val, *cp;
3094     +int map_ver = 119; /* an arbitrary number so speakup can check */
3095     +int lc, shift_table[17];
3096     +int max_states = 1, flags = 0;
3097     +/* flags reserved for later, maybe for individual console maps */
3098     +
3099     +void open_input( char *name )
3100     +{
3101     + strcpy( filename, name );
3102     + if ( ( infile = fopen( filename, "r" ) ) == 0 ) {
3103     + fprintf( stderr, "can't open %s, version %d\n", filename, LINUX_VERSION_CODE );
3104     + exit( 1 );
3105     + }
3106     + lc = 0;
3107     +}
3108     +
3109     +int
3110     +oops( char *msg, char *info )
3111     +{
3112     + if ( info == NULL ) info = " ";
3113     + fprintf( stderr, "error: file %s line %d\n", filename, lc );
3114     + fprintf( stderr, "%s %s\n", msg, info );
3115     + exit( 1 );
3116     +}
3117     +
3118     +t_key *hash_name( char *name )
3119     +{
3120     + u_char *pn = (u_char *)name;
3121     + int hash = 0;
3122     + while ( *pn ) {
3123     + hash = ( hash * 17 ) & 0xfffffff;
3124     + if ( isupper( *pn ) ) *pn = tolower( *pn );
3125     + hash += ( int )*pn;
3126     + pn++;
3127     + }
3128     + hash %= HASHSIZE;
3129     + return &key_table[hash];
3130     +}
3131     +
3132     +t_key *find_key( char *name )
3133     +{
3134     + t_key *this = hash_name( name );
3135     + while ( this ) {
3136     + if ( !strcmp( name, this->name ) ) return this;
3137     + this = this->next;
3138     + }
3139     + return this;
3140     +}
3141     +
3142     +t_key *add_key( char *name, int value, int shift )
3143     +{
3144     + t_key *this = hash_name( name );
3145     + if ( extra_keys-key_table >= MAXKEYS )
3146     + oops( "out of key table space, enlarge MAXKEYS", NULL );
3147     + if ( this->name != NULL ) {
3148     + while ( this->next ) {
3149     + if ( !strcmp( name, this->name ) )
3150     + oops( "attempt to add duplicate key", name );
3151     + this = this->next;
3152     + }
3153     + this->next = extra_keys++;
3154     + this = this->next;
3155     + }
3156     + this->name = strdup( name );
3157     + this->value = value;
3158     + this->shift = shift;
3159     + return this;
3160     +}
3161     +
3162     +int get_shift_value( int state )
3163     +{
3164     + int i;
3165     + for ( i = 0; shift_table[i] != state; i++ ) {
3166     + if ( shift_table[i] == -1 ) {
3167     + if ( i >= 16 )
3168     + oops( "too many shift states", NULL );
3169     + shift_table[i] = state;
3170     + max_states = i+1;
3171     + break;
3172     + }
3173     + }
3174     + return i;
3175     +}
3176     +
3177     +int
3178     +main( int argc, char *argv[] )
3179     +{
3180     + int value, shift_state, i, spk_val = 0, lock_val = 0;
3181     + int max_key_used = 0, num_keys_used = 0;
3182     + t_key *this;
3183     + t_key_init *p_init;
3184     +char *argpath, *argname, *argcopy;
3185     +
3186     + bzero( key_table, sizeof( key_table ) );
3187     + bzero( key_data, sizeof( key_data ) );
3188     + shift_table[0] = 0;
3189     + for ( i = 1; i <= 16; i++ ) shift_table[i] = -1;
3190     + if ( argc < 2 ) {
3191     + fputs( "usage: genmap filename\n", stderr );
3192     + exit( 1 );
3193     + }
3194     + for ( p_init = init_key_data; p_init->name[0] != '.'; p_init++ )
3195     + add_key( p_init->name, p_init->value, p_init->shift );
3196     + open_input( argv[1] );
3197     + while ( fgets( buffer, 250, infile ) ) {
3198     + lc++;
3199     + value = shift_state = 0;
3200     + cp = strtok( buffer, delims );
3201     + if ( *cp == '#' ) continue;
3202     + while ( cp ) {
3203     + if ( *cp == '=' ) break;
3204     + this = find_key( cp );
3205     + if ( this == NULL )
3206     + oops( "unknown key/modifier", cp );
3207     + if ( this->shift == is_shift ) {
3208     + if ( value )
3209     + oops( "modifiers must come first", cp );
3210     + shift_state += this->value;
3211     + } else if ( this->shift == is_input )
3212     + value = this->value;
3213     + else oops( "bad modifier or key", cp );
3214     + cp = strtok( 0, delims );
3215     + }
3216     + if ( !cp ) oops( "no = found", NULL );
3217     + cp = strtok( 0, delims );
3218     + if ( !cp ) oops( "no speakup function after =", NULL );
3219     + this = find_key( cp );
3220     + if ( this == NULL || this->shift != is_spk )
3221     + oops( "invalid speakup function", cp );
3222     + i = get_shift_value( shift_state );
3223     + if ( key_data[value][i] ) {
3224     + while ( --cp > buffer )
3225     + if ( !*cp ) *cp = ' ';
3226     + oops( "two functions on same key combination", cp );
3227     + }
3228     + key_data[value][i] = (char)this->value;
3229     + if ( value > max_key_used ) max_key_used = value;
3230     + }
3231     + fclose( infile );
3232     + this = find_key( "spk_key" );
3233     + if ( this ) spk_val = this->value;
3234     + this = find_key( "spk_lock" );
3235     + if ( this ) lock_val = this->value;
3236     + for ( lc = 1; lc <= max_key_used; lc++ ) {
3237     + kp = key_data[lc];
3238     + if ( !memcmp( key_data[0], kp, 16 ) ) continue;
3239     + num_keys_used++;
3240     + for ( i = 0; i < max_states; i++ ) {
3241     + if ( kp[i] != spk_val&& kp[i] != lock_val ) continue;
3242     + shift_state = shift_table[i];
3243     + if ( ( shift_state&16 ) ) continue;
3244     + shift_state = get_shift_value( shift_state+16 );
3245     + kp[shift_state] = kp[i];
3246     +/* fill in so we can process the key up, as spk bit will be set */
3247     + }
3248     + }
3249     + printf( "\t%d, %d, %d,\n\t", map_ver, num_keys_used, max_states );
3250     + for ( i = 0; i < max_states; i++ )
3251     + printf( "%d, ", shift_table[i] );
3252     + printf( "%d,", flags );
3253     + for ( lc = 1; lc <= max_key_used; lc++ ) {
3254     + kp = key_data[lc];
3255     + if ( !memcmp( key_data[0], kp, 16 ) ) continue;
3256     + printf( "\n\t%d,", lc );
3257     + for ( i = 0; i < max_states; i++ )
3258     + printf( " %d,", (unsigned int)kp[i] );
3259     + }
3260     + printf( "\n\t0, %d\n", map_ver );
3261     + exit( 0 );
3262     +}
3263 dsd 198 diff -urNpXdontdiff linux-2.6.14/drivers/char/speakup/install linux-dsd/drivers/char/speakup/install
3264     --- linux-2.6.14/drivers/char/speakup/install 1970-01-01 01:00:00.000000000 +0100
3265     +++ linux-dsd/drivers/char/speakup/install 2005-10-28 12:24:46.000000000 +0100
3266 eradicator 150 @@ -0,0 +1,57 @@
3267     +#!/bin/bash
3268     +
3269     +VERSION=v`head -2 /usr/src/linux/Makefile | \
3270     + awk '{ printf "%s",$3 }'`
3271     +
3272     +DIR=/usr/src/linux/drivers/char/speakup
3273     +
3274     +echo "Patching version $VERSION"
3275     +
3276     +if [ "$1" != "--debug" ]; then
3277     + SILENT=--silent
3278     +fi
3279     +
3280     +cp -R speakup /usr/src/linux/drivers/char/
3281     +cd /usr/src/linux
3282     +
3283     +# make .orig files
3284     +echo -n 'Creating .orig files ['
3285     +for i in `cat ${DIR}/patchlist-${VERSION}`; do
3286     + patch=`echo $i | cut -f 1 -d ,`
3287     + filebase=`echo $i | cut -f 2 -d ,`
3288     +
3289     + mkdir -p `dirname $filebase`
3290     + if [ "$patch" == "1" ]; then
3291     + if [ ! -e $filebase.orig ]; then
3292     + echo -n .
3293     + cp $filebase $filebase.orig
3294     + fi
3295     + fi
3296     +done
3297     +echo '] done.'
3298     +
3299     +# apply patches
3300     +echo -n 'Patching files ['
3301     +for i in ${DIR}/diff-${VERSION}/*.patch; do
3302     + # skip dirs
3303     + [ -d $i ] && continue
3304     + echo -n p
3305     + writeloc=${i##$DIR\/diff-${VERSION}\/}
3306     + writeloc=${writeloc%.patch}
3307     + writeloc=${writeloc//^/\/}
3308     + patch $SILENT -f -p0 -o $writeloc $writeloc.orig $i
3309     +done
3310     +echo '] done.'
3311     +
3312     +# copy files
3313     +echo -n 'Copying files ['
3314     +for i in ${DIR}/diff-${VERSION}/*.copy; do
3315     + # skip dirs
3316     + [ -d $i ] && continue
3317     + echo -n c
3318     + writeloc=${i##$DIR\/diff-${VERSION}\/}
3319     + writeloc=${writeloc%.copy}
3320     + writeloc=${writeloc//^/\/}
3321     + cp $i $writeloc
3322     +done
3323     +echo '] done.'
3324 dsd 198 diff -urNpXdontdiff linux-2.6.14/drivers/char/speakup/Kconfig linux-dsd/drivers/char/speakup/Kconfig
3325     --- linux-2.6.14/drivers/char/speakup/Kconfig 1970-01-01 01:00:00.000000000 +0100
3326     +++ linux-dsd/drivers/char/speakup/Kconfig 2005-10-28 12:24:46.000000000 +0100
3327     @@ -0,0 +1,210 @@
3328     +menu "Speakup console speech"
3329     +config SPEAKUP
3330     + tristate "Build speakup console speech"
3331     + ---help---
3332     +
3333     + This is the Speakup screen reader. Think of it as a
3334     + video console for blind people. If built in to the
3335     + kernel, it can speak evrything on the text console from
3336     + boot up to shutdown. For more information on Speakup,
3337     + point your browser at http://www.linux-speakup.org/.
3338     + There is also a mailing list at the above url that you
3339     + can subscribe to.
3340     +
3341     + Supported synthesizers are accent sa, accent pc, appollo
3342     + II., Auddapter, Braille 'n Speak, Dectalk external
3343     + (old), Dectalk PC (full length isa board), Dectalk
3344     + express, Doubletalk, Doubletalk LT or Litetalk,
3345     + Keynote
3346     + Gold internal PC, software synthesizers, Speakout, and transport.
3347     +
3348     + Speakup can either be built in or compiled as a module
3349     + by answering y or m. If you answer y here, then you
3350     + must answer either y or m to at least one of the
3351     + synthesizer drivers below. If you answer m here, then
3352     + the synthesizer drivers below can only be built as
3353     + modules.
3354     +
3355     + These drivers are not standalone drivers, but must be
3356     + used in conjunction with Speakup. Think of them as
3357     + video cards for blind people.
3358     +
3359     +
3360     + The Dectalk pc driver can only be built as a module, and
3361     + requires software to be pre-loaded on to the card before
3362     + the module can be loaded. See the decpc choice below
3363     + for more details.
3364     +
3365     + If you are not a blind person, or don't have access to
3366     + one of the listed synthesizers, you should say n.
3367     +
3368     +config SPEAKUP_ACNTSA
3369     + depends on SPEAKUP
3370     + tristate "Accent SA, acntsa"
3371     + ---help---
3372     +
3373     + This is the Speakup driver for the accent sa
3374     + synthesizer. You can say y to build it into the kernel,
3375     + or m to build it as a module. See the configuration
3376     + help on the Speakup choice above for more info.
3377     +
3378     +config SPEAKUP_ACNTPC
3379     + depends on SPEAKUP
3380     + tristate "Accent PC, acntpc"
3381     + ---help---
3382     +
3383     + This is the Speakup driver for the accent pc
3384     + synthesizer. You can say y to build it into the kernel,
3385     + or m to build it as a module. See the configuration
3386     + help on the Speakup choice above for more info.
3387     +
3388     +config SPEAKUP_APOLLO
3389     + depends on SPEAKUP
3390     + tristate "Apollo, apollo"
3391     + ---help---
3392     +
3393     + This is the Speakup driver for the Apollo II
3394     + synthesizer. You can say y to build it into the kernel,
3395     + or m to build it as a module. See the configuration
3396     + help on the Speakup choice above for more info.
3397     +
3398     +config SPEAKUP_AUDPTR
3399     + depends on SPEAKUP
3400     + tristate "Audapter, audptr"
3401     + ---help---
3402     +
3403     + This is the Speakup driver for the Audapter synthesizer.
3404     + You can say y to build it into the kernel, or m to
3405     + build it as a module. See the configuration help on the
3406     + Speakup choice above for more info.
3407     +
3408     +config SPEAKUP_BNS
3409     + depends on SPEAKUP
3410     + tristate "Braille 'n' Speak, bns"
3411     + ---help---
3412     +
3413     + This is the Speakup driver for the Braille 'n' Speak
3414     + synthesizer. You can say y to build it into the kernel,
3415     + or m to build it as a module. See the configuration
3416     + help on the Speakup choice above for more info.
3417     +
3418     +config SPEAKUP_DECTLK
3419     + depends on SPEAKUP
3420     + tristate "DECtalk Express, dectlk"
3421     + ---help---
3422     +
3423     + This is the Speakup driver for the DecTalk Express
3424     + synthesizer. You can say y to build it into the kernel,
3425     + or m to build it as a module. See the configuration
3426     + help on the Speakup choice above for more info.
3427     +
3428     +config SPEAKUP_DECEXT
3429     + depends on SPEAKUP
3430     + tristate "DECtalk External (old), decext"
3431     + ---help---
3432     +
3433     + This is the Speakup driver for the DecTalk External
3434     + (old) synthesizer. You can say y to build it into the
3435     + kernel, or m to build it as a module. See the
3436     + configuration help on the Speakup choice above for more
3437     + info.
3438     +
3439     +config SPEAKUP_DECPC
3440     + depends on SPEAKUP
3441     + tristate "DECtalk PC (big ISA card), decpc"
3442     + ---help---
3443     +
3444     + This is the Speakup driver for the DecTalk PC (full
3445     + length ISA) synthesizer. You can say m to build it as
3446     + a module. See the configuration help on the Speakup
3447     + choice above for more info.
3448     +
3449     + In order to use the DecTalk PC driver, you must download
3450     + the dec_pc.tgz file from linux-speakup.org. It is in
3451     + the pub/linux/goodies directory. The dec_pc.tgz file
3452     + contains the software which must be pre-loaded on to the
3453     + DecTalk PC board in order to use it with this driver.
3454     + This driver must be built as a module, and can not be
3455     + loaded until the file system is mounted and the DecTalk
3456     + PC software has been pre-loaded on to the board.
3457     +
3458     + See the README file in the dec_pc.tgz file for more
3459     + details.
3460     +
3461     +config SPEAKUP_DTLK
3462     + depends on SPEAKUP
3463     + tristate "DoubleTalk PC, dtlk"
3464     + ---help---
3465     +
3466     + This is the Speakup driver for the internal DoubleTalk
3467     + PC synthesizer. You can say y to build it into the
3468     + kernel, or m to build it as a module. See the
3469     + configuration help on the Speakup choice above for more
3470     + info.
3471     +
3472     +config SPEAKUP_KEYPC
3473     + depends on SPEAKUP
3474     + tristate "Keynote Gold PC, keypc"
3475     + ---help---
3476     +
3477     + This is the Speakup driver for the Keynote Gold
3478     + PC synthesizer. You can say y to build it into the
3479     + kernel, or m to build it as a module. See the
3480     + configuration help on the Speakup choice above for more
3481     + info.
3482     +
3483     +config SPEAKUP_LTLK
3484     + depends on SPEAKUP
3485     + tristate "DoubleTalk LT or LiteTalk, ltlk"
3486     +---help---
3487     +
3488     + This is the Speakup driver for the LiteTalk/DoubleTalk
3489     + LT synthesizer. You can say y to build it into the
3490     + kernel, or m to build it as a module. See the
3491     + configuration help on the Speakup choice above for more
3492     + info.
3493     +
3494     +config SPEAKUP_SFTSYN
3495     + depends on SPEAKUP
3496     + tristate "Software synthesizers, sftsyn"
3497     +---help---
3498     +
3499     + This is the software synthesizer device node. It will
3500     + register a device /dev/sftsyn which midware programs
3501     + and speech
3502     + daemons may open and read to provide kernel output to
3503     + software synths
3504     + such as festival, flite, tuxtalk and so forth. You
3505     + can select 'y' or
3506     + 'm' to have it built-in to the kernel or loaded as a module.
3507     +
3508     +config SPEAKUP_SPKOUT
3509     + depends on SPEAKUP
3510     + tristate "Speak Out, spkout"
3511     + ---help---
3512     +
3513     + This is the Speakup driver for the Speakout synthesizer.
3514     + You can say y to build it into the kernel, or m to
3515     + build it as a module. See the configuration help on the
3516     + Speakup choice above for more info.
3517     +
3518     +config SPEAKUP_TXPRT
3519     + depends on SPEAKUP
3520     + tristate "Transport, txprt"
3521     + ---help---
3522     +
3523     + This is the Speakup driver for the Transport
3524     + synthesizer. You can say y to build it into the kernel,
3525     + or m to build it as a module. See the configuration
3526     + help on the Speakup choice above for more info.
3527     +
3528     +if SPEAKUP != n
3529     + comment 'Enter the 3 to 6 character keyword from the list above, or none for no default synthesizer on boot up.'
3530     + depends on SPEAKUP
3531     +endif
3532     +
3533     +config SPEAKUP_DEFAULT
3534     + string "Choose Default synthesizer for Speakup"
3535     + default "none"
3536     +
3537     +endmenu
3538     diff -urNpXdontdiff linux-2.6.14/drivers/char/speakup/keyinfo.h linux-dsd/drivers/char/speakup/keyinfo.h
3539     --- linux-2.6.14/drivers/char/speakup/keyinfo.h 1970-01-01 01:00:00.000000000 +0100
3540     +++ linux-dsd/drivers/char/speakup/keyinfo.h 2005-10-28 12:24:46.000000000 +0100
3541     @@ -0,0 +1,120 @@
3542 eradicator 150 +/* spk_priv.h
3543     + review functions for the speakup screen review package.
3544     + originally written by: Kirk Reiser and Andy Berdan.
3545     +
3546     + extensively modified by David Borowski.
3547     +
3548     + Copyright (C ) 1998 Kirk Reiser.
3549     + Copyright (C ) 2003 David Borowski.
3550     +
3551     + This program is free software; you can redistribute it and/or modify
3552     + it under the terms of the GNU General Public License as published by
3553     + the Free Software Foundation; either version 2 of the License, or
3554     + (at your option ) any later version.
3555     +
3556     + This program is distributed in the hope that it will be useful,
3557     + but WITHOUT ANY WARRANTY; without even the implied warranty of
3558     + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3559     + GNU General Public License for more details.
3560     +
3561     + You should have received a copy of the GNU General Public License
3562     + along with this program; if not, write to the Free Software
3563     + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
3564     +*/
3565     +
3566     +enum { /* var_ids */
3567     + VERSION = 0, SYNTH, SILENT, SYNTH_DIRECT,
3568     + KEYMAP, CHARS,
3569     + PUNC_SOME, PUNC_MOST, PUNC_ALL,
3570     + DELIM, REPEATS, EXNUMBER,
3571     + DELAY, TRIGGER, JIFFY, FULL, /* all timers must be together */
3572     + BLEEP_TIME, CURSOR_TIME, BELL_POS,
3573     +SAY_CONTROL, SAY_WORD_CTL, NO_INTERRUPT, KEY_ECHO,
3574     + SPELL_DELAY, PUNC_LEVEL, READING_PUNC,
3575     + ATTRIB_BLEEP, BLEEPS,
3576     + RATE, PITCH, VOL, TONE, PUNCT, VOICE, FREQ, LANG,
3577     + CAPS_START, CAPS_STOP,
3578     + MAXVARS
3579     +};
3580     +
3581     +#define FIRST_SYNTH_VAR RATE
3582     +/* 0 is reserved for no remap */
3583     +#define SPEAKUP_GOTO 0x01
3584     +#define SPEECH_KILL 0x02
3585     +#define SPEAKUP_QUIET 0x03
3586     +#define SPEAKUP_CUT 0x04
3587     +#define SPEAKUP_PASTE 0x05
3588     +#define SAY_FIRST_CHAR 0x06
3589     +#define SAY_LAST_CHAR 0x07
3590     +#define SAY_CHAR 0x08
3591     +#define SAY_PREV_CHAR 0x09
3592     +#define SAY_NEXT_CHAR 0x0a
3593     +#define SAY_WORD 0x0b
3594     +#define SAY_PREV_WORD 0x0c
3595     +#define SAY_NEXT_WORD 0x0d
3596     +#define SAY_LINE 0x0e
3597     +#define SAY_PREV_LINE 0x0f
3598     +#define SAY_NEXT_LINE 0x10
3599     +#define TOP_EDGE 0x11
3600     +#define BOTTOM_EDGE 0x12
3601     +#define LEFT_EDGE 0x13
3602     +#define RIGHT_EDGE 0x14
3603     +#define SPELL_PHONETIC 0x15
3604     +#define SPELL_WORD 0x16
3605     +#define SAY_SCREEN 0x17
3606     +#define SAY_POSITION 0x18
3607