home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
You can browse this item here: 3455
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news or mail, ASCII text
| default
| |
100%
| TrID
| E-Mail message (Var. 2)
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/rfc822
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 3a 20 62 72 | 69 61 6e 73 40 65 65 63 |From: br|ians@eec|
|00000010| 73 2e 63 73 2e 70 64 78 | 2e 65 64 75 20 28 42 72 |s.cs.pdx|.edu (Br|
|00000020| 69 61 6e 20 53 6d 69 74 | 68 29 0a 4e 65 77 73 67 |ian Smit|h).Newsg|
|00000030| 72 6f 75 70 73 3a 20 61 | 6c 74 2e 73 6f 75 72 63 |roups: a|lt.sourc|
|00000040| 65 73 0a 53 75 62 6a 65 | 63 74 3a 20 53 6f 75 6e |es.Subje|ct: Soun|
|00000050| 64 20 42 6c 61 73 74 65 | 72 20 55 6e 69 78 20 64 |d Blaste|r Unix d|
|00000060| 72 69 76 65 72 20 31 2f | 32 0a 4d 65 73 73 61 67 |river 1/|2.Messag|
|00000070| 65 2d 49 44 3a 20 3c 32 | 38 31 39 40 70 64 78 67 |e-ID: <2|819@pdxg|
|00000080| 61 74 65 2e 55 55 43 50 | 3e 0a 44 61 74 65 3a 20 |ate.UUCP|>.Date: |
|00000090| 36 20 4a 75 6e 20 39 31 | 20 31 35 3a 34 36 3a 32 |6 Jun 91| 15:46:2|
|000000a0| 38 20 47 4d 54 0a 0a 53 | 6f 75 6e 64 20 42 6c 61 |8 GMT..S|ound Bla|
|000000b0| 73 74 65 72 20 64 72 69 | 76 65 72 20 66 6f 72 20 |ster dri|ver for |
|000000c0| 53 79 73 74 65 6d 20 56 | 20 33 2e 32 2c 20 66 6f |System V| 3.2, fo|
|000000d0| 72 20 74 68 65 20 33 38 | 36 2e 20 20 54 68 65 20 |r the 38|6. The |
|000000e0| 53 6f 75 6e 64 20 42 6c | 61 73 74 65 72 0a 69 73 |Sound Bl|aster.is|
|000000f0| 20 61 6e 20 61 75 64 69 | 6f 20 61 6e 64 20 6d 75 | an audi|o and mu|
|00000100| 73 69 63 20 63 61 72 64 | 20 66 6f 72 20 74 68 65 |sic card| for the|
|00000110| 20 50 43 2e 0a 0a 42 72 | 69 61 6e 0a 0a 2f 2d 2d | PC...Br|ian../--|
|00000120| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000130| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000140| 2d 2d 2d 2d 2d 7c 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |-----|--|--------|
|00000150| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000160| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 5c 0a 7c 20 23 69 |--------|--\.| #i|
|00000170| 6e 63 6c 75 64 65 20 3c | 73 74 64 5f 64 69 73 63 |nclude <|std_disc|
|00000180| 6c 61 69 6d 2e 68 3e 20 | 20 20 20 20 20 20 20 20 |laim.h> | |
|00000190| 20 20 20 20 7c 20 49 6e | 65 74 3a 20 62 72 69 61 | | In|et: bria|
|000001a0| 6e 73 40 63 73 2e 70 64 | 78 2e 65 64 75 20 20 20 |ns@cs.pd|x.edu |
|000001b0| 20 20 20 20 20 20 20 20 | 20 7c 0a 7c 20 23 69 6e | | |.| #in|
|000001c0| 63 6c 75 64 65 20 3c 68 | 75 6d 61 6e 5f 65 72 72 |clude <h|uman_err|
|000001d0| 6f 72 73 2e 68 3e 20 20 | 20 20 20 20 20 20 20 20 |ors.h> | |
|000001e0| 20 20 20 7c 20 55 55 43 | 50 3a 20 74 65 6b 74 72 | | UUC|P: tektr|
|000001f0| 6f 6e 69 78 21 70 64 78 | 67 61 74 65 21 62 72 69 |onix!pdx|gate!bri|
|00000200| 61 6e 73 20 20 20 20 20 | 7c 0a 7c 2d 2d 2d 2d 2d |ans ||.|-----|
|00000210| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000220| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000230| 2d 2d 7c 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--|-----|--------|
|00000240| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000250| 2d 2d 2d 2d 2d 2d 2d 7c | 0a 7c 20 42 65 68 6f 6c |-------||.| Behol|
|00000260| 64 20 74 68 65 20 77 61 | 72 72 61 6e 74 79 2e 2e |d the wa|rranty..|
|00000270| 20 74 68 65 20 62 6f 6c | 64 20 70 72 69 6e 74 20 | the bol|d print |
|00000280| 67 69 76 65 74 68 20 61 | 6e 64 20 74 68 65 20 66 |giveth a|nd the f|
|00000290| 69 6e 65 20 70 72 69 6e | 74 20 74 61 6b 65 74 68 |ine prin|t taketh|
|000002a0| 20 61 77 61 79 2e 7c 0a | 5c 2d 2d 2d 2d 2d 2d 2d | away.|.|\-------|
|000002b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002f0| 2d 2d 2d 2d 2d 2f 0a 0a | 23 21 20 2f 62 69 6e 2f |-----/..|#! /bin/|
|00000300| 73 68 0a 23 20 54 68 69 | 73 20 69 73 20 61 20 73 |sh.# Thi|s is a s|
|00000310| 68 65 6c 6c 20 61 72 63 | 68 69 76 65 2c 20 6d 65 |hell arc|hive, me|
|00000320| 61 6e 69 6e 67 3a 0a 23 | 20 31 2e 20 52 65 6d 6f |aning:.#| 1. Remo|
|00000330| 76 65 20 65 76 65 72 79 | 74 68 69 6e 67 20 61 62 |ve every|thing ab|
|00000340| 6f 76 65 20 74 68 65 20 | 23 21 20 2f 62 69 6e 2f |ove the |#! /bin/|
|00000350| 73 68 20 6c 69 6e 65 2e | 0a 23 20 32 2e 20 53 61 |sh line.|.# 2. Sa|
|00000360| 76 65 20 74 68 65 20 72 | 65 73 75 6c 74 69 6e 67 |ve the r|esulting|
|00000370| 20 74 65 78 74 20 69 6e | 20 61 20 66 69 6c 65 2e | text in| a file.|
|00000380| 0a 23 20 33 2e 20 45 78 | 65 63 75 74 65 20 74 68 |.# 3. Ex|ecute th|
|00000390| 65 20 66 69 6c 65 20 77 | 69 74 68 20 2f 62 69 6e |e file w|ith /bin|
|000003a0| 2f 73 68 20 28 6e 6f 74 | 20 63 73 68 29 20 74 6f |/sh (not| csh) to|
|000003b0| 20 63 72 65 61 74 65 3a | 0a 23 09 49 4e 53 54 41 | create:|.#.INSTA|
|000003c0| 4c 4c 0a 23 09 4c 49 43 | 45 4e 53 45 0a 23 09 4d |LL.#.LIC|ENSE.#.M|
|000003d0| 61 6b 65 66 69 6c 65 0a | 23 09 4d 61 73 74 65 72 |akefile.|#.Master|
|000003e0| 0a 23 09 4e 61 6d 65 0a | 23 09 4e 6f 64 65 0a 23 |.#.Name.|#.Node.#|
|000003f0| 09 52 45 41 44 4d 45 0a | 23 09 53 70 61 63 65 2e |.README.|#.Space.|
|00000400| 63 0a 23 09 53 79 73 74 | 65 6d 0a 23 09 73 62 2e |c.#.Syst|em.#.sb.|
|00000410| 63 0a 23 09 73 62 2e 68 | 0a 23 20 54 68 69 73 20 |c.#.sb.h|.# This |
|00000420| 61 72 63 68 69 76 65 20 | 63 72 65 61 74 65 64 3a |archive |created:|
|00000430| 20 54 68 75 20 4a 75 6e | 20 20 36 20 30 38 3a 33 | Thu Jun| 6 08:3|
|00000440| 33 3a 32 31 20 31 39 39 | 31 0a 65 78 70 6f 72 74 |3:21 199|1.export|
|00000450| 20 50 41 54 48 3b 20 50 | 41 54 48 3d 2f 62 69 6e | PATH; P|ATH=/bin|
|00000460| 3a 2f 75 73 72 2f 62 69 | 6e 3a 24 50 41 54 48 0a |:/usr/bi|n:$PATH.|
|00000470| 69 66 20 74 65 73 74 20 | 2d 66 20 27 49 4e 53 54 |if test |-f 'INST|
|00000480| 41 4c 4c 27 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |ALL'.the|n..echo |
|00000490| 73 68 61 72 3a 20 22 77 | 69 6c 6c 20 6e 6f 74 20 |shar: "w|ill not |
|000004a0| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|000004b0| 69 6e 67 20 66 69 6c 65 | 20 27 49 4e 53 54 41 4c |ing file| 'INSTAL|
|000004c0| 4c 27 22 0a 65 6c 73 65 | 0a 63 61 74 20 3c 3c 20 |L'".else|.cat << |
|000004d0| 5c 53 48 41 52 5f 45 4f | 46 20 3e 20 27 49 4e 53 |\SHAR_EO|F > 'INS|
|000004e0| 54 41 4c 4c 27 0a 0a 20 | 20 20 20 20 20 20 20 20 |TALL'.. | |
|000004f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000500| 53 6f 75 6e 64 20 42 6c | 61 73 74 65 72 28 74 6d |Sound Bl|aster(tm|
|00000510| 29 20 44 72 69 76 65 72 | 0a 20 20 20 20 20 20 20 |) Driver|. |
|00000520| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000530| 28 43 6f 70 79 72 69 67 | 68 74 20 31 39 39 31 2c |(Copyrig|ht 1991,|
|00000540| 20 42 72 69 61 6e 20 53 | 6d 69 74 68 29 0a 0a 0a | Brian S|mith)...|
|00000550| 49 4e 53 54 41 4c 4c 49 | 4e 47 20 54 48 45 20 44 |INSTALLI|NG THE D|
|00000560| 52 49 56 45 52 0a 0a 31 | 2e 20 52 75 6e 20 6d 61 |RIVER..1|. Run ma|
|00000570| 6b 65 20 69 6e 20 74 68 | 65 20 64 69 72 65 63 74 |ke in th|e direct|
|00000580| 6f 72 79 20 77 69 74 68 | 20 74 68 65 20 64 72 69 |ory with| the dri|
|00000590| 76 65 72 20 63 6f 64 65 | 20 28 73 62 2e 63 2c 20 |ver code| (sb.c, |
|000005a0| 73 62 2e 68 2c 20 65 74 | 63 2e 2e 2e 29 2e 0a 32 |sb.h, et|c...)..2|
|000005b0| 2e 20 73 75 20 74 6f 20 | 72 6f 6f 74 2c 20 69 66 |. su to |root, if|
|000005c0| 20 6e 6f 74 20 61 6c 72 | 65 61 64 79 20 73 6f 2c | not alr|eady so,|
|000005d0| 20 61 6e 64 20 72 75 6e | 20 2f 65 74 63 2f 69 6e | and run| /etc/in|
|000005e0| 73 64 72 69 76 65 72 2e | 0a 20 20 20 20 61 2e 20 |sdriver.|. a. |
|000005f0| 41 6e 73 77 65 72 20 2e | 20 66 6f 72 20 71 75 65 |Answer .| for que|
|00000600| 72 79 20 61 73 6b 69 6e | 67 20 66 6f 72 20 74 68 |ry askin|g for th|
|00000610| 65 20 64 69 72 65 63 74 | 6f 72 79 20 6f 66 20 74 |e direct|ory of t|
|00000620| 68 65 20 64 72 69 76 65 | 72 0a 20 20 20 20 20 20 |he drive|r. |
|00000630| 20 20 66 69 6c 65 73 2e | 0a 20 20 20 20 62 2e 20 | files.|. b. |
|00000640| 41 6e 73 77 65 72 20 73 | 62 20 66 6f 72 20 74 68 |Answer s|b for th|
|00000650| 65 20 71 75 65 72 79 20 | 61 73 6b 69 6e 67 20 66 |e query |asking f|
|00000660| 6f 72 20 74 68 65 20 64 | 72 69 76 65 72 20 6e 61 |or the d|river na|
|00000670| 6d 65 2e 0a 20 20 20 20 | 63 2e 20 41 63 63 65 70 |me.. |c. Accep|
|00000680| 74 20 74 68 65 20 64 65 | 66 61 75 6c 74 20 6f 66 |t the de|fault of|
|00000690| 20 2f 65 74 63 2f 63 6f | 6e 66 20 66 6f 72 20 74 | /etc/co|nf for t|
|000006a0| 68 65 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e |he confi|guration|
|000006b0| 20 64 69 72 65 63 74 6f | 72 79 0a 20 20 20 20 20 | directo|ry. |
|000006c0| 20 20 20 62 79 20 68 69 | 74 74 69 6e 67 20 72 65 | by hi|tting re|
|000006d0| 74 75 72 6e 2e 0a 20 20 | 20 20 64 2e 20 45 6e 74 |turn.. | d. Ent|
|000006e0| 65 72 20 61 6e 79 20 64 | 65 73 63 72 69 70 74 69 |er any d|escripti|
|000006f0| 6f 6e 20 79 6f 75 20 6c | 69 6b 65 2e 20 20 4d 61 |on you l|ike. Ma|
|00000700| 79 62 65 3a 20 22 53 6f | 75 6e 64 20 42 6c 61 73 |ybe: "So|und Blas|
|00000710| 74 65 72 20 44 72 69 76 | 65 72 22 2e 0a 20 20 20 |ter Driv|er".. |
|00000720| 20 65 2e 20 41 6e 73 77 | 65 72 20 6e 20 74 6f 20 | e. Answ|er n to |
|00000730| 74 68 65 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f |the conf|iguratio|
|00000740| 6e 20 71 75 65 73 74 69 | 6f 6e 2e 0a 33 2e 20 41 |n questi|on..3. A|
|00000750| 73 20 72 6f 6f 74 20 73 | 74 69 6c 6c 2c 20 72 75 |s root s|till, ru|
|00000760| 6e 20 2f 65 74 63 2f 6b | 63 6f 6e 66 69 67 2e 0a |n /etc/k|config..|
|00000770| 34 2e 20 4d 61 6b 65 20 | 73 75 72 65 20 74 68 65 |4. Make |sure the|
|00000780| 20 64 72 69 76 65 72 20 | 69 73 20 63 6f 6e 66 69 | driver |is confi|
|00000790| 67 75 72 65 64 20 69 6e | 74 6f 20 74 68 65 20 6b |gured in|to the k|
|000007a0| 65 72 6e 65 6c 20 69 6e | 20 74 68 65 0a 20 20 20 |ernel in| the. |
|000007b0| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 6d | configu|ration m|
|000007c0| 65 6e 75 2e 0a 35 2e 20 | 42 75 69 6c 64 20 61 20 |enu..5. |Build a |
|000007d0| 6e 65 77 20 6b 65 72 6e | 65 6c 2e 0a 36 2e 20 49 |new kern|el..6. I|
|000007e0| 6e 73 74 61 6c 6c 20 74 | 68 65 20 6e 65 77 20 6b |nstall t|he new k|
|000007f0| 65 72 6e 65 6c 2e 20 20 | 54 68 69 73 20 72 65 62 |ernel. |This reb|
|00000800| 6f 6f 74 73 20 74 68 65 | 20 6d 61 63 68 69 6e 65 |oots the| machine|
|00000810| 2e 0a 0a 0a 49 4e 53 54 | 41 4c 4c 49 4e 47 20 54 |....INST|ALLING T|
|00000820| 48 45 20 55 53 45 52 20 | 50 52 4f 47 52 41 4d 53 |HE USER |PROGRAMS|
|00000830| 0a 0a 31 2e 20 45 64 69 | 74 20 74 68 65 20 4d 61 |..1. Edi|t the Ma|
|00000840| 6b 65 66 69 6c 65 20 69 | 6e 20 74 68 65 20 61 70 |kefile i|n the ap|
|00000850| 70 73 20 64 69 72 65 63 | 74 6f 72 79 2e 0a 32 2e |ps direc|tory..2.|
|00000860| 20 52 75 6e 20 6d 61 6b | 65 2e 0a 33 2e 20 52 75 | Run mak|e..3. Ru|
|00000870| 6e 20 6d 61 6b 65 20 69 | 6e 73 74 61 6c 6c 2e 0a |n make i|nstall..|
|00000880| 34 2e 20 4d 61 6e 75 61 | 6c 6c 79 20 69 6e 73 74 |4. Manua|lly inst|
|00000890| 61 6c 6c 20 74 68 65 20 | 6d 61 6e 20 66 69 6c 65 |all the |man file|
|000008a0| 73 20 68 6f 77 65 76 65 | 72 20 79 6f 75 20 6c 69 |s howeve|r you li|
|000008b0| 6b 65 2e 20 20 54 68 65 | 20 2a 2e 31 20 66 69 6c |ke. The| *.1 fil|
|000008c0| 65 73 20 61 72 65 0a 6e | 72 6f 66 66 20 73 6f 75 |es are.n|roff sou|
|000008d0| 72 63 65 2c 20 77 68 69 | 6c 65 20 74 68 65 20 2a |rce, whi|le the *|
|000008e0| 2e 64 6f 63 20 66 69 6c | 65 73 20 61 72 65 20 6e |.doc fil|es are n|
|000008f0| 72 6f 66 66 27 65 64 20 | 66 6f 72 20 74 68 6f 73 |roff'ed |for thos|
|00000900| 65 20 6f 66 20 75 73 65 | 0a 77 69 74 68 6f 75 74 |e of use|.without|
|00000910| 2e 0a 53 48 41 52 5f 45 | 4f 46 0a 66 69 0a 69 66 |..SHAR_E|OF.fi.if|
|00000920| 20 74 65 73 74 20 2d 66 | 20 27 4c 49 43 45 4e 53 | test -f| 'LICENS|
|00000930| 45 27 0a 74 68 65 6e 0a | 09 65 63 68 6f 20 73 68 |E'.then.|.echo sh|
|00000940| 61 72 3a 20 22 77 69 6c | 6c 20 6e 6f 74 20 6f 76 |ar: "wil|l not ov|
|00000950| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|00000960| 67 20 66 69 6c 65 20 27 | 4c 49 43 45 4e 53 45 27 |g file '|LICENSE'|
|00000970| 22 0a 65 6c 73 65 0a 63 | 61 74 20 3c 3c 20 5c 53 |".else.c|at << \S|
|00000980| 48 41 52 5f 45 4f 46 20 | 3e 20 27 4c 49 43 45 4e |HAR_EOF |> 'LICEN|
|00000990| 53 45 27 0a 0a 20 20 20 | 20 20 20 20 20 20 20 20 |SE'.. | |
|000009a0| 20 20 20 20 20 20 53 6f | 75 6e 64 42 6c 61 73 74 | So|undBlast|
|000009b0| 65 72 28 74 6d 29 20 44 | 72 69 76 65 72 20 47 65 |er(tm) D|river Ge|
|000009c0| 6e 65 72 61 6c 20 50 75 | 62 6c 69 63 20 4c 69 63 |neral Pu|blic Lic|
|000009d0| 65 6e 73 65 0a 20 20 20 | 20 20 20 20 20 20 20 20 |ense. | |
|000009e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 28 43 6f 70 | | (Cop|
|000009f0| 79 72 69 67 68 74 20 31 | 39 39 31 2c 20 42 72 69 |yright 1|991, Bri|
|00000a00| 61 6e 20 53 6d 69 74 68 | 29 0a 0a 20 20 4d 6f 73 |an Smith|).. Mos|
|00000a10| 74 20 6c 69 63 65 6e 73 | 65 73 20 61 72 65 20 72 |t licens|es are r|
|00000a20| 65 73 74 72 69 63 74 69 | 76 65 20 69 6e 20 6f 6e |estricti|ve in on|
|00000a30| 65 20 77 61 79 20 6f 72 | 20 61 6e 6f 74 68 65 72 |e way or| another|
|00000a40| 2c 20 74 68 65 20 47 4e | 55 20 6c 69 63 65 6e 73 |, the GN|U licens|
|00000a50| 65 0a 61 73 20 77 65 6c | 6c 2e 20 20 54 68 65 20 |e.as wel|l. The |
|00000a60| 77 68 6f 6c 65 20 70 75 | 72 70 6f 73 65 20 6f 66 |whole pu|rpose of|
|00000a70| 20 74 68 69 73 20 65 78 | 63 65 72 63 69 73 65 20 | this ex|cercise |
|00000a80| 77 61 73 20 74 6f 20 62 | 65 6e 65 66 69 74 20 74 |was to b|enefit t|
|00000a90| 68 65 20 63 6f 6d 70 75 | 74 65 72 0a 63 6f 6d 6d |he compu|ter.comm|
|00000aa0| 75 6e 69 74 79 20 61 73 | 20 61 20 77 68 6f 6c 65 |unity as| a whole|
|00000ab0| 2c 20 69 6e 63 6c 75 64 | 69 6e 67 20 74 68 6f 73 |, includ|ing thos|
|00000ac0| 65 20 6f 66 20 75 73 20 | 75 6e 70 72 69 6e 63 69 |e of us |unprinci|
|00000ad0| 70 6c 65 64 20 65 6e 6f | 75 67 68 20 74 6f 20 77 |pled eno|ugh to w|
|00000ae0| 61 6e 74 0a 74 6f 20 6d | 61 6b 65 20 6d 6f 6e 65 |ant.to m|ake mone|
|00000af0| 79 20 6f 6e 20 73 6f 66 | 74 77 61 72 65 2e 20 3a |y on sof|tware. :|
|00000b00| 2d 29 0a 0a 20 20 46 6f | 72 20 6d 79 20 70 72 6f |-).. Fo|r my pro|
|00000b10| 74 65 63 74 69 6f 6e 2c | 20 69 74 20 6d 75 73 74 |tection,| it must|
|00000b20| 20 62 65 20 73 74 61 74 | 65 64 20 61 74 20 74 68 | be stat|ed at th|
|00000b30| 65 20 6f 75 74 73 65 74 | 20 74 68 61 74 20 74 68 |e outset| that th|
|00000b40| 65 72 65 20 69 73 20 4e | 4f 0a 73 74 61 74 65 64 |ere is N|O.stated|
|00000b50| 20 6f 72 20 69 6d 70 6c | 69 65 64 20 77 61 72 72 | or impl|ied warr|
|00000b60| 61 6e 74 79 20 66 6f 72 | 20 74 68 65 20 64 72 69 |anty for| the dri|
|00000b70| 76 65 72 20 6e 6f 72 20 | 69 73 20 74 68 65 72 65 |ver nor |is there|
|00000b80| 20 61 6e 79 20 73 74 61 | 74 65 64 20 6f 72 0a 69 | any sta|ted or.i|
|00000b90| 6d 70 6c 69 65 64 20 77 | 61 72 72 61 6e 74 79 20 |mplied w|arranty |
|00000ba0| 66 6f 72 20 61 6e 79 20 | 6f 66 20 74 68 65 20 61 |for any |of the a|
|00000bb0| 73 73 6f 63 69 61 74 65 | 64 20 75 73 65 72 20 70 |ssociate|d user p|
|00000bc0| 72 6f 67 72 61 6d 73 20 | 6e 6f 72 20 66 6f 72 20 |rograms |nor for |
|00000bd0| 74 68 65 0a 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |the.docu|mentatio|
|00000be0| 6e 2e 20 20 54 68 65 20 | 6d 69 73 74 61 6b 65 73 |n. The |mistakes|
|00000bf0| 20 61 72 65 20 6d 69 6e | 65 2c 20 74 68 65 20 72 | are min|e, the r|
|00000c00| 65 73 70 6f 6e 73 69 62 | 69 6c 69 74 79 20 69 73 |esponsib|ility is|
|00000c10| 20 79 6f 75 72 73 20 28 | 66 6f 72 0a 75 73 69 6e | yours (|for.usin|
|00000c20| 67 20 74 68 65 20 70 61 | 63 6b 61 67 65 29 2e 0a |g the pa|ckage)..|
|00000c30| 0a 43 4f 50 59 49 4e 47 | 20 41 4e 44 55 53 45 20 |.COPYING| ANDUSE |
|00000c40| 50 4f 4c 49 43 49 45 53 | 0a 0a 31 2e 20 59 6f 75 |POLICIES|..1. You|
|00000c50| 20 6d 61 79 20 75 73 65 | 20 74 68 69 73 20 75 6e | may use| this un|
|00000c60| 6d 6f 64 69 66 69 65 64 | 20 70 61 63 6b 61 67 65 |modified| package|
|00000c70| 20 6f 6e 20 61 6e 79 20 | 61 6e 64 20 61 6c 6c 20 | on any |and all |
|00000c80| 63 6f 6d 70 75 74 65 72 | 73 20 77 68 69 63 68 0a |computer|s which.|
|00000c90| 79 6f 75 20 77 69 73 68 | 20 74 6f 20 69 6e 73 74 |you wish| to inst|
|00000ca0| 61 6c 6c 20 74 68 69 73 | 20 70 61 63 6b 61 67 65 |all this| package|
|00000cb0| 2e 0a 0a 32 2e 20 59 6f | 75 20 6d 61 79 20 63 6f |...2. Yo|u may co|
|00000cc0| 70 79 20 61 6e 64 20 64 | 69 73 74 72 69 62 75 74 |py and d|istribut|
|00000cd0| 65 20 76 65 72 62 61 74 | 69 6d 20 63 6f 70 69 65 |e verbat|im copie|
|00000ce0| 73 20 6f 66 20 74 68 69 | 73 20 53 6f 75 6e 64 42 |s of thi|s SoundB|
|00000cf0| 6c 61 73 74 65 72 20 64 | 72 69 76 65 72 0a 61 6e |laster d|river.an|
|00000d00| 64 20 61 73 73 6f 63 69 | 61 74 65 64 20 75 73 65 |d associ|ated use|
|00000d10| 72 20 73 6f 66 74 77 61 | 72 65 20 61 73 20 79 6f |r softwa|re as yo|
|00000d20| 75 20 72 65 63 69 65 76 | 65 64 20 74 68 65 6d 2e |u reciev|ed them.|
|00000d30| 20 20 44 69 73 74 72 69 | 62 75 74 65 20 74 68 65 | Distri|bute the|
|00000d40| 6d 20 68 6f 77 65 76 65 | 72 0a 79 6f 75 20 6c 69 |m howeve|r.you li|
|00000d50| 6b 65 2c 20 61 73 20 6c | 6f 6e 67 20 61 73 20 74 |ke, as l|ong as t|
|00000d60| 68 65 79 20 61 72 65 20 | 64 69 73 74 72 69 62 75 |hey are |distribu|
|00000d70| 74 65 64 20 77 69 74 68 | 20 74 68 65 20 6f 72 69 |ted with| the ori|
|00000d80| 67 69 6e 61 6c 20 63 6f | 70 79 72 69 67 68 74 0a |ginal co|pyright.|
|00000d90| 61 6e 64 20 28 6c 61 63 | 6b 20 6f 66 29 20 77 61 |and (lac|k of) wa|
|00000da0| 72 72 61 6e 74 79 20 6d | 65 73 73 61 67 65 73 20 |rranty m|essages |
|00000db0| 69 6e 74 61 63 74 2e 0a | 0a 33 2e 20 59 6f 75 20 |intact..|.3. You |
|00000dc0| 6d 61 79 20 64 69 73 74 | 72 69 62 75 74 65 20 6d |may dist|ribute m|
|00000dd0| 6f 64 69 66 69 65 64 20 | 63 6f 70 69 65 73 20 6f |odified |copies o|
|00000de0| 66 20 74 68 69 73 20 64 | 72 69 76 65 72 20 69 6e |f this d|river in|
|00000df0| 20 73 6f 75 72 63 65 20 | 66 6f 72 6d 73 20 69 66 | source |forms if|
|00000e00| 0a 61 6e 64 20 6f 6e 6c | 79 20 69 66 20 6d 79 20 |.and onl|y if my |
|00000e10| 63 6f 70 79 72 69 67 68 | 74 20 61 6e 64 20 28 6c |copyrigh|t and (l|
|00000e20| 61 63 6b 20 6f 66 29 20 | 69 73 20 69 6e 74 61 63 |ack of) |is intac|
|00000e30| 74 20 69 6e 20 61 64 64 | 69 74 69 6f 6e 20 74 6f |t in add|ition to|
|00000e40| 20 61 6e 0a 61 70 70 65 | 6e 64 65 64 20 73 74 61 | an.appe|nded sta|
|00000e50| 74 65 6d 65 6e 74 20 6f | 66 20 79 6f 75 72 20 6d |tement o|f your m|
|00000e60| 6f 64 69 66 69 63 61 74 | 69 6f 6e 2e 20 20 49 20 |odificat|ion. I |
|00000e70| 6d 75 73 74 20 6e 6f 74 | 20 62 65 20 68 65 6c 64 |must not| be held|
|00000e80| 20 72 65 73 70 6f 6e 73 | 69 62 6c 65 0a 66 6f 72 | respons|ible.for|
|00000e90| 20 61 6e 79 20 6d 6f 64 | 69 66 69 63 61 74 69 6f | any mod|ificatio|
|00000ea0| 6e 73 20 6d 61 64 65 20 | 62 79 20 6f 74 68 65 72 |ns made |by other|
|00000eb0| 20 70 65 72 73 6f 6e 73 | 2e 0a 0a 34 2e 20 41 6e | persons|...4. An|
|00000ec0| 79 20 70 65 72 73 6f 6e | 73 20 6f 72 20 63 6f 6d |y person|s or com|
|00000ed0| 70 61 6e 69 65 73 20 6f | 72 20 70 65 72 73 6f 6e |panies o|r person|
|00000ee0| 73 20 77 68 6f 20 77 69 | 73 68 20 74 6f 20 6d 61 |s who wi|sh to ma|
|00000ef0| 6b 65 20 61 20 63 6f 6d | 6d 65 72 63 69 61 6c 0a |ke a com|mercial.|
|00000f00| 64 69 73 74 72 69 62 75 | 74 69 6f 6e 20 28 62 69 |distribu|tion (bi|
|00000f10| 6e 61 72 69 65 73 20 6f | 6e 6c 79 29 20 75 73 69 |naries o|nly) usi|
|00000f20| 6e 67 20 74 68 69 73 20 | 70 61 63 6b 61 67 65 20 |ng this |package |
|00000f30| 6f 72 20 61 6e 79 20 70 | 6f 72 74 69 6f 6e 20 6f |or any p|ortion o|
|00000f40| 66 20 74 68 69 73 0a 70 | 61 63 6b 61 67 65 20 6d |f this.p|ackage m|
|00000f50| 75 73 74 20 63 6f 6e 74 | 61 63 74 20 6d 65 20 66 |ust cont|act me f|
|00000f60| 69 72 73 74 2e 20 20 49 | 20 77 69 6c 6c 20 6d 6f |irst. I| will mo|
|00000f70| 73 74 20 6c 69 6b 65 6c | 79 20 6c 69 63 65 6e 73 |st likel|y licens|
|00000f80| 65 20 74 68 65 20 70 65 | 72 73 6f 6e 20 6f 72 0a |e the pe|rson or.|
|00000f90| 63 6f 6d 70 61 6e 79 20 | 66 6f 72 20 6c 69 74 74 |company |for litt|
|00000fa0| 6c 65 20 6f 72 20 6e 6f | 20 63 68 61 72 67 65 2e |le or no| charge.|
|00000fb0| 20 20 4d 6f 73 74 6c 79 | 2c 20 49 27 6d 20 61 20 | Mostly|, I'm a |
|00000fc0| 73 6e 6f 6f 70 3a 20 69 | 66 20 79 6f 75 20 61 72 |snoop: i|f you ar|
|00000fd0| 65 20 75 73 69 6e 67 0a | 6d 79 20 73 6f 66 74 77 |e using.|my softw|
|00000fe0| 61 72 65 20 6c 65 74 20 | 6d 65 20 6b 6e 6f 77 2e |are let |me know.|
|00000ff0| 20 3a 2d 29 0a 0a 41 73 | 20 49 20 61 6d 20 6e 6f | :-)..As| I am no|
|00001000| 74 20 61 20 6c 61 77 79 | 65 72 2c 20 73 6f 2c 20 |t a lawy|er, so, |
|00001010| 74 68 65 72 65 20 61 72 | 65 20 6c 69 6b 65 6c 79 |there ar|e likely|
|00001020| 20 6c 65 67 61 6c 20 68 | 6f 6c 65 73 20 74 68 65 | legal h|oles the|
|00001030| 20 73 69 7a 65 20 6f 66 | 0a 73 6d 61 6c 6c 20 63 | size of|.small c|
|00001040| 6f 6e 74 69 6e 65 6e 74 | 73 2c 20 62 75 74 20 70 |ontinent|s, but p|
|00001050| 6c 65 61 73 65 20 74 72 | 79 20 74 6f 20 6b 65 65 |lease tr|y to kee|
|00001060| 70 20 74 68 65 20 73 70 | 69 72 69 74 20 6f 66 20 |p the sp|irit of |
|00001070| 74 68 69 73 20 6c 69 63 | 65 6e 73 65 2e 20 20 54 |this lic|ense. T|
|00001080| 68 65 0a 69 6e 74 65 6e | 74 20 6f 66 20 74 68 69 |he.inten|t of thi|
|00001090| 73 20 77 61 73 20 66 6f | 72 20 62 65 74 74 65 72 |s was fo|r better|
|000010a0| 6d 65 6e 74 20 6f 66 20 | 74 68 65 20 63 6f 6d 6d |ment of |the comm|
|000010b0| 75 6e 69 74 79 2e 20 20 | 41 6e 79 20 63 68 61 6e |unity. |Any chan|
|000010c0| 67 65 73 20 73 68 6f 75 | 6c 64 0a 62 65 20 73 65 |ges shou|ld.be se|
|000010d0| 6e 74 20 74 6f 20 6d 65 | 20 66 6f 72 20 69 6e 74 |nt to me| for int|
|000010e0| 65 67 72 61 74 69 6f 6e | 20 28 65 69 74 68 65 72 |egration| (either|
|000010f0| 20 65 2d 6d 61 69 6c 20 | 6f 72 20 73 6e 61 69 6c | e-mail |or snail|
|00001100| 2d 6d 61 69 6c 29 2e 0a | 0a 43 55 52 52 45 4e 54 |-mail)..|.CURRENT|
|00001110| 20 41 44 44 52 45 53 53 | 45 53 0a 20 20 20 20 65 | ADDRESS|ES. e|
|00001120| 2d 6d 61 69 6c 3a 20 20 | 20 20 20 62 72 69 61 6e |-mail: | brian|
|00001130| 73 40 63 73 2e 70 64 78 | 2e 65 64 75 0a 20 20 20 |s@cs.pdx|.edu. |
|00001140| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2e 2e 2e | | ...|
|00001150| 21 75 75 6e 65 74 21 74 | 65 6b 74 72 6f 6e 69 78 |!uunet!t|ektronix|
|00001160| 21 70 64 78 67 61 74 65 | 21 65 65 63 73 21 62 72 |!pdxgate|!eecs!br|
|00001170| 69 61 6e 73 0a 20 20 20 | 20 55 53 20 4d 61 69 6c |ians. | US Mail|
|00001180| 3a 20 20 20 20 42 72 69 | 61 6e 20 53 6d 69 74 68 |: Bri|an Smith|
|00001190| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000011a0| 20 31 38 37 30 30 20 53 | 57 20 43 61 73 63 61 64 | 18700 S|W Cascad|
|000011b0| 69 61 20 43 6f 75 72 74 | 0a 20 20 20 20 20 20 20 |ia Court|. |
|000011c0| 20 20 20 20 20 20 20 20 | 20 41 6c 6f 68 61 2c 20 | | Aloha, |
|000011d0| 4f 52 20 39 37 30 30 37 | 0a 53 48 41 52 5f 45 4f |OR 97007|.SHAR_EO|
|000011e0| 46 0a 66 69 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |F.fi.if |test -f |
|000011f0| 27 4d 61 6b 65 66 69 6c | 65 27 0a 74 68 65 6e 0a |'Makefil|e'.then.|
|00001200| 09 65 63 68 6f 20 73 68 | 61 72 3a 20 22 77 69 6c |.echo sh|ar: "wil|
|00001210| 6c 20 6e 6f 74 20 6f 76 | 65 72 2d 77 72 69 74 65 |l not ov|er-write|
|00001220| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 27 | existin|g file '|
|00001230| 4d 61 6b 65 66 69 6c 65 | 27 22 0a 65 6c 73 65 0a |Makefile|'".else.|
|00001240| 63 61 74 20 3c 3c 20 5c | 53 48 41 52 5f 45 4f 46 |cat << \|SHAR_EOF|
|00001250| 20 3e 20 27 4d 61 6b 65 | 66 69 6c 65 27 0a 23 20 | > 'Make|file'.# |
|00001260| 0a 23 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.# | |
|00001270| 20 20 20 20 20 20 20 20 | 20 53 6f 75 6e 64 20 42 | | Sound B|
|00001280| 6c 61 73 74 65 72 28 74 | 6d 29 20 44 72 69 76 65 |laster(t|m) Drive|
|00001290| 72 0a 23 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |r.# | |
|000012a0| 20 20 20 20 20 20 20 20 | 28 43 6f 70 79 72 69 67 | |(Copyrig|
|000012b0| 68 74 20 31 39 39 31 2c | 20 42 72 69 61 6e 20 53 |ht 1991,| Brian S|
|000012c0| 6d 69 74 68 29 0a 23 0a | 0a 53 48 45 4c 4c 3d 2f |mith).#.|.SHELL=/|
|000012d0| 62 69 6e 2f 73 68 0a 49 | 4e 43 4c 53 59 53 20 3d |bin/sh.I|NCLSYS =|
|000012e0| 20 2f 75 73 72 2f 69 6e | 63 6c 75 64 65 2f 73 79 | /usr/in|clude/sy|
|000012f0| 73 0a 4c 4b 44 52 56 52 | 44 49 52 20 3d 20 2f 65 |s.LKDRVR|DIR = /e|
|00001300| 74 63 2f 63 6f 6e 66 2f | 70 61 63 6b 2e 64 2f 73 |tc/conf/|pack.d/s|
|00001310| 62 0a 4c 4b 53 43 4f 4e | 46 44 49 52 20 3d 20 2f |b.LKSCON|FDIR = /|
|00001320| 65 74 63 2f 63 6f 6e 66 | 2f 73 64 65 76 69 63 65 |etc/conf|/sdevice|
|00001330| 2e 64 0a 4c 4b 4e 43 4f | 4e 46 44 49 52 20 3d 20 |.d.LKNCO|NFDIR = |
|00001340| 2f 65 74 63 2f 63 6f 6e | 66 2f 6e 6f 64 65 2e 64 |/etc/con|f/node.d|
|00001350| 0a 4c 4b 49 43 4f 4e 46 | 44 49 52 20 3d 20 2f 65 |.LKICONF|DIR = /e|
|00001360| 74 63 2f 63 6f 6e 66 2f | 69 6e 69 74 2e 64 0a 4c |tc/conf/|init.d.L|
|00001370| 4b 4b 43 4f 4e 46 44 49 | 52 20 3d 20 2f 65 74 63 |KKCONFDI|R = /etc|
|00001380| 2f 63 6f 6e 66 2f 6b 63 | 6f 6e 66 69 67 2e 64 0a |/conf/kc|onfig.d.|
|00001390| 44 52 56 52 4e 41 4d 45 | 20 3d 20 44 72 69 76 65 |DRVRNAME| = Drive|
|000013a0| 72 2e 6f 0a 43 4f 4e 46 | 4e 41 4d 45 20 3d 20 73 |r.o.CONF|NAME = s|
|000013b0| 62 0a 0a 43 43 3d 63 63 | 0a 43 46 4c 41 47 53 20 |b..CC=cc|.CFLAGS |
|000013c0| 3d 20 2d 4f 20 2d 44 49 | 4e 4b 45 52 4e 45 4c 0a |= -O -DI|NKERNEL.|
|000013d0| 0a 4f 42 4a 53 20 3d 20 | 44 72 69 76 65 72 2e 6f |.OBJS = |Driver.o|
|000013e0| 0a 0a 61 6c 6c 3a 20 44 | 72 69 76 65 72 2e 6f 20 |..all: D|river.o |
|000013f0| 24 28 49 4e 43 4c 53 59 | 53 29 2f 73 62 2e 68 0a |$(INCLSY|S)/sb.h.|
|00001400| 0a 44 72 69 76 65 72 2e | 6f 3a 20 73 62 2e 63 20 |.Driver.|o: sb.c |
|00001410| 24 28 49 4e 43 4c 53 59 | 53 29 2f 73 62 2e 68 20 |$(INCLSY|S)/sb.h |
|00001420| 4d 61 6b 65 66 69 6c 65 | 0a 09 24 28 43 43 29 20 |Makefile|..$(CC) |
|00001430| 24 28 43 46 4c 41 47 53 | 29 20 2d 63 20 73 62 2e |$(CFLAGS|) -c sb.|
|00001440| 63 0a 09 6d 76 20 73 62 | 2e 6f 20 44 72 69 76 65 |c..mv sb|.o Drive|
|00001450| 72 2e 6f 0a 0a 69 6e 73 | 74 61 6c 6c 3a 20 24 28 |r.o..ins|tall: $(|
|00001460| 4c 4b 44 52 56 52 44 49 | 52 29 20 24 28 4c 4b 44 |LKDRVRDI|R) $(LKD|
|00001470| 52 56 52 44 49 52 29 2f | 24 28 44 52 56 52 4e 41 |RVRDIR)/|$(DRVRNA|
|00001480| 4d 45 29 20 24 28 4c 4b | 44 52 56 52 44 49 52 29 |ME) $(LK|DRVRDIR)|
|00001490| 2f 73 70 61 63 65 2e 63 | 20 5c 0a 09 24 28 49 4e |/space.c| \..$(IN|
|000014a0| 43 4c 53 59 53 29 2f 73 | 62 2e 68 0a 0a 23 20 4f |CLSYS)/s|b.h..# O|
|000014b0| 4c 44 20 69 6e 73 74 61 | 6c 6c 2c 20 6e 6f 77 20 |LD insta|ll, now |
|000014c0| 64 6f 6e 65 20 6d 61 6e | 75 61 6c 6c 79 0a 23 20 |done man|ually.# |
|000014d0| 69 6e 73 74 61 6c 6c 3a | 20 44 72 69 76 65 72 2e |install:| Driver.|
|000014e0| 6f 20 24 28 49 4e 43 4c | 53 59 53 29 2f 73 62 2e |o $(INCL|SYS)/sb.|
|000014f0| 68 20 4d 61 73 74 65 72 | 20 53 79 73 74 65 6d 20 |h Master| System |
|00001500| 53 70 61 63 65 2e 63 20 | 4e 6f 64 65 0a 23 20 09 |Space.c |Node.# .|
|00001510| 2f 65 74 63 2f 69 6e 73 | 64 72 69 76 65 72 0a 23 |/etc/ins|driver.#|
|00001520| 20 09 2f 65 74 63 2f 6b | 63 6f 6e 66 69 67 0a 0a | ./etc/k|config..|
|00001530| 24 28 4c 4b 44 52 56 52 | 44 49 52 29 3a 0a 09 2d |$(LKDRVR|DIR):..-|
|00001540| 6d 6b 64 69 72 20 24 28 | 4c 4b 44 52 56 52 44 49 |mkdir $(|LKDRVRDI|
|00001550| 52 29 20 32 3e 20 2f 64 | 65 76 2f 6e 75 6c 6c 0a |R) 2> /d|ev/null.|
|00001560| 09 63 68 6d 6f 64 20 37 | 35 35 20 24 28 4c 4b 44 |.chmod 7|55 $(LKD|
|00001570| 52 56 52 44 49 52 29 0a | 0a 24 28 49 4e 43 4c 53 |RVRDIR).|.$(INCLS|
|00001580| 59 53 29 2f 73 62 2e 68 | 3a 20 73 62 2e 68 0a 09 |YS)/sb.h|: sb.h..|
|00001590| 40 65 63 68 6f 20 2f 62 | 69 6e 2f 63 70 20 73 62 |@echo /b|in/cp sb|
|000015a0| 2e 68 20 24 28 49 4e 43 | 4c 53 59 53 29 2f 73 62 |.h $(INC|LSYS)/sb|
|000015b0| 2e 68 0a 09 2f 62 69 6e | 2f 63 70 20 73 62 2e 68 |.h../bin|/cp sb.h|
|000015c0| 20 24 28 49 4e 43 4c 53 | 59 53 29 2f 73 62 2e 68 | $(INCLS|YS)/sb.h|
|000015d0| 0a 0a 24 28 4c 4b 44 52 | 56 52 44 49 52 29 2f 44 |..$(LKDR|VRDIR)/D|
|000015e0| 72 69 76 65 72 2e 6f 3a | 20 44 72 69 76 65 72 2e |river.o:| Driver.|
|000015f0| 6f 0a 09 63 70 20 44 72 | 69 76 65 72 2e 6f 20 24 |o..cp Dr|iver.o $|
|00001600| 28 4c 4b 44 52 56 52 44 | 49 52 29 2f 24 28 44 52 |(LKDRVRD|IR)/$(DR|
|00001610| 56 52 4e 41 4d 45 29 0a | 09 63 68 6d 6f 64 20 36 |VRNAME).|.chmod 6|
|00001620| 34 34 20 24 28 4c 4b 44 | 52 56 52 44 49 52 29 2f |44 $(LKD|RVRDIR)/|
|00001630| 24 28 44 52 56 52 4e 41 | 4d 45 29 0a 0a 24 28 4c |$(DRVRNA|ME)..$(L|
|00001640| 4b 44 52 56 52 44 49 52 | 29 2f 73 70 61 63 65 2e |KDRVRDIR|)/space.|
|00001650| 63 3a 20 53 70 61 63 65 | 2e 63 0a 09 63 70 20 53 |c: Space|.c..cp S|
|00001660| 70 61 63 65 2e 63 20 24 | 28 4c 4b 44 52 56 52 44 |pace.c $|(LKDRVRD|
|00001670| 49 52 29 2f 73 70 61 63 | 65 2e 63 0a 09 63 68 6d |IR)/spac|e.c..chm|
|00001680| 6f 64 20 36 34 34 20 24 | 28 4c 4b 44 52 56 52 44 |od 644 $|(LKDRVRD|
|00001690| 49 52 29 2f 73 70 61 63 | 65 2e 63 0a 0a 63 6c 65 |IR)/spac|e.c..cle|
|000016a0| 61 6e 3a 0a 09 72 6d 20 | 2d 66 20 44 72 69 76 65 |an:..rm |-f Drive|
|000016b0| 72 2e 6f 0a 53 48 41 52 | 5f 45 4f 46 0a 66 69 0a |r.o.SHAR|_EOF.fi.|
|000016c0| 69 66 20 74 65 73 74 20 | 2d 66 20 27 4d 61 73 74 |if test |-f 'Mast|
|000016d0| 65 72 27 0a 74 68 65 6e | 0a 09 65 63 68 6f 20 73 |er'.then|..echo s|
|000016e0| 68 61 72 3a 20 22 77 69 | 6c 6c 20 6e 6f 74 20 6f |har: "wi|ll not o|
|000016f0| 76 65 72 2d 77 72 69 74 | 65 20 65 78 69 73 74 69 |ver-writ|e existi|
|00001700| 6e 67 20 66 69 6c 65 20 | 27 4d 61 73 74 65 72 27 |ng file |'Master'|
|00001710| 22 0a 65 6c 73 65 0a 63 | 61 74 20 3c 3c 20 5c 53 |".else.c|at << \S|
|00001720| 48 41 52 5f 45 4f 46 20 | 3e 20 27 4d 61 73 74 65 |HAR_EOF |> 'Maste|
|00001730| 72 27 0a 73 62 20 6f 63 | 72 77 69 49 20 69 48 63 |r'.sb oc|rwiI iHc|
|00001740| 20 73 62 20 30 20 30 20 | 31 20 33 20 31 0a 53 48 | sb 0 0 |1 3 1.SH|
|00001750| 41 52 5f 45 4f 46 0a 66 | 69 0a 69 66 20 74 65 73 |AR_EOF.f|i.if tes|
|00001760| 74 20 2d 66 20 27 4e 61 | 6d 65 27 0a 74 68 65 6e |t -f 'Na|me'.then|
|00001770| 0a 09 65 63 68 6f 20 73 | 68 61 72 3a 20 22 77 69 |..echo s|har: "wi|
|00001780| 6c 6c 20 6e 6f 74 20 6f | 76 65 72 2d 77 72 69 74 |ll not o|ver-writ|
|00001790| 65 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |e existi|ng file |
|000017a0| 27 4e 61 6d 65 27 22 0a | 65 6c 73 65 0a 63 61 74 |'Name'".|else.cat|
|000017b0| 20 3c 3c 20 5c 53 48 41 | 52 5f 45 4f 46 20 3e 20 | << \SHA|R_EOF > |
|000017c0| 27 4e 61 6d 65 27 0a 53 | 6f 75 6e 64 42 6c 61 73 |'Name'.S|oundBlas|
|000017d0| 74 65 72 20 44 72 69 76 | 65 72 0a 53 48 41 52 5f |ter Driv|er.SHAR_|
|000017e0| 45 4f 46 0a 66 69 0a 69 | 66 20 74 65 73 74 20 2d |EOF.fi.i|f test -|
|000017f0| 66 20 27 4e 6f 64 65 27 | 0a 74 68 65 6e 0a 09 65 |f 'Node'|.then..e|
|00001800| 63 68 6f 20 73 68 61 72 | 3a 20 22 77 69 6c 6c 20 |cho shar|: "will |
|00001810| 6e 6f 74 20 6f 76 65 72 | 2d 77 72 69 74 65 20 65 |not over|-write e|
|00001820| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 27 4e 6f |xisting |file 'No|
|00001830| 64 65 27 22 0a 65 6c 73 | 65 0a 63 61 74 20 3c 3c |de'".els|e.cat <<|
|00001840| 20 5c 53 48 41 52 5f 45 | 4f 46 20 3e 20 27 4e 6f | \SHAR_E|OF > 'No|
|00001850| 64 65 27 0a 73 62 20 20 | 73 62 63 6d 73 20 20 63 |de'.sb |sbcms c|
|00001860| 20 20 30 0a 73 62 20 20 | 73 62 66 6d 20 20 20 63 | 0.sb |sbfm c|
|00001870| 20 20 31 0a 73 62 20 20 | 73 62 64 73 70 20 20 63 | 1.sb |sbdsp c|
|00001880| 20 20 32 0a 53 48 41 52 | 5f 45 4f 46 0a 66 69 0a | 2.SHAR|_EOF.fi.|
|00001890| 69 66 20 74 65 73 74 20 | 2d 66 20 27 52 45 41 44 |if test |-f 'READ|
|000018a0| 4d 45 27 0a 74 68 65 6e | 0a 09 65 63 68 6f 20 73 |ME'.then|..echo s|
|000018b0| 68 61 72 3a 20 22 77 69 | 6c 6c 20 6e 6f 74 20 6f |har: "wi|ll not o|
|000018c0| 76 65 72 2d 77 72 69 74 | 65 20 65 78 69 73 74 69 |ver-writ|e existi|
|000018d0| 6e 67 20 66 69 6c 65 20 | 27 52 45 41 44 4d 45 27 |ng file |'README'|
|000018e0| 22 0a 65 6c 73 65 0a 63 | 61 74 20 3c 3c 20 5c 53 |".else.c|at << \S|
|000018f0| 48 41 52 5f 45 4f 46 20 | 3e 20 27 52 45 41 44 4d |HAR_EOF |> 'READM|
|00001900| 45 27 0a 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |E'.. | |
|00001910| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 53 6f 75 | | Sou|
|00001920| 6e 64 20 42 6c 61 73 74 | 65 72 28 74 6d 29 20 44 |nd Blast|er(tm) D|
|00001930| 72 69 76 65 72 0a 20 20 | 20 20 20 20 20 20 20 20 |river. | |
|00001940| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 28 43 6f | | (Co|
|00001950| 70 79 72 69 67 68 74 20 | 31 39 39 31 2c 20 42 72 |pyright |1991, Br|
|00001960| 69 61 6e 20 53 6d 69 74 | 68 29 0a 0a 0a 52 45 51 |ian Smit|h)...REQ|
|00001970| 55 49 52 45 4d 45 4e 54 | 53 0a 0a 54 68 69 73 20 |UIREMENT|S..This |
|00001980| 64 72 69 76 65 72 20 61 | 6e 64 20 74 68 65 20 61 |driver a|nd the a|
|00001990| 73 73 6f 63 69 61 74 65 | 64 20 75 73 65 72 20 70 |ssociate|d user p|
|000019a0| 72 6f 67 72 61 6d 73 20 | 72 65 71 75 69 72 65 20 |rograms |require |
|000019b0| 61 20 33 38 36 2f 34 38 | 36 20 73 79 73 74 65 6d |a 386/48|6 system|
|000019c0| 0a 72 75 6e 6e 69 6e 67 | 20 53 79 73 74 65 6d 20 |.running| System |
|000019d0| 56 20 33 2e 32 20 55 6e | 69 78 2e 20 20 49 74 20 |V 3.2 Un|ix. It |
|000019e0| 68 61 73 20 62 65 65 6e | 20 74 65 73 74 65 64 20 |has been| tested |
|000019f0| 6f 6e 20 49 53 43 20 55 | 6e 69 78 20 76 65 72 73 |on ISC U|nix vers|
|00001a00| 69 6f 6e 73 0a 32 2e 30 | 2e 32 20 74 68 72 6f 75 |ions.2.0|.2 throu|
|00001a10| 67 68 20 32 2e 32 2e 31 | 2e 20 20 49 20 62 65 6c |gh 2.2.1|. I bel|
|00001a20| 69 65 76 65 20 69 74 20 | 77 69 6c 6c 20 77 6f 72 |ieve it |will wor|
|00001a30| 6b 20 63 6f 72 72 65 63 | 74 6c 79 20 6f 6e 20 45 |k correc|tly on E|
|00001a40| 73 69 78 2c 20 49 6e 74 | 65 6c 2c 0a 61 6e 64 20 |six, Int|el,.and |
|00001a50| 41 54 26 54 20 55 6e 69 | 78 2e 20 20 53 43 4f 20 |AT&T Uni|x. SCO |
|00001a60| 69 73 20 61 20 6d 79 73 | 74 65 72 79 20 74 6f 20 |is a mys|tery to |
|00001a70| 6d 65 20 28 61 73 20 77 | 65 6c 6c 20 61 73 20 6d |me (as w|ell as m|
|00001a80| 61 6e 79 20 6f 74 68 65 | 72 73 29 2e 20 20 49 20 |any othe|rs). I |
|00001a90| 64 6f 0a 6e 6f 74 20 62 | 65 6c 69 65 76 65 20 69 |do.not b|elieve i|
|00001aa0| 74 20 77 69 6c 6c 20 77 | 6f 72 6b 20 69 6e 20 53 |t will w|ork in S|
|00001ab0| 79 73 56 20 34 2e 30 20 | 61 6e 64 20 61 62 6f 76 |ysV 4.0 |and abov|
|00001ac0| 65 2c 20 62 75 74 20 74 | 68 65 20 6d 6f 64 69 66 |e, but t|he modif|
|00001ad0| 69 63 61 74 69 6f 6e 73 | 0a 73 68 6f 75 6c 64 20 |ications|.should |
|00001ae0| 62 65 20 66 61 69 72 6c | 79 20 6d 69 6e 69 6d 61 |be fairl|y minima|
|00001af0| 6c 2e 20 20 52 65 6d 65 | 6d 62 65 72 2c 20 74 68 |l. Reme|mber, th|
|00001b00| 6f 75 67 68 2c 20 54 48 | 45 52 45 20 49 53 20 4e |ough, TH|ERE IS N|
|00001b10| 4f 20 57 41 52 52 41 4e | 54 59 2e 0a 20 0a 0a 47 |O WARRAN|TY.. ..G|
|00001b20| 45 4e 45 52 41 4c 20 49 | 4e 46 4f 52 4d 41 54 49 |ENERAL I|NFORMATI|
|00001b30| 4f 4e 0a 0a 54 68 69 73 | 20 64 72 69 76 65 72 20 |ON..This| driver |
|00001b40| 69 73 20 66 6f 72 20 74 | 68 65 20 53 6f 75 6e 64 |is for t|he Sound|
|00001b50| 20 42 6c 61 73 74 65 72 | 20 73 6f 75 6e 64 20 63 | Blaster| sound c|
|00001b60| 61 72 64 20 64 65 73 69 | 67 6e 65 64 20 62 79 20 |ard desi|gned by |
|00001b70| 43 72 65 61 74 69 76 65 | 0a 4c 61 62 73 2c 20 49 |Creative|.Labs, I|
|00001b80| 6e 63 6f 72 70 6f 72 61 | 74 65 64 2e 20 20 54 68 |ncorpora|ted. Th|
|00001b90| 65 20 53 6f 75 6e 64 20 | 42 6c 61 73 74 65 72 20 |e Sound |Blaster |
|00001ba0| 69 73 20 61 20 73 6f 75 | 6e 64 20 63 61 72 64 20 |is a sou|nd card |
|00001bb0| 66 6f 72 20 74 68 65 0a | 49 42 4d 2d 50 43 28 74 |for the.|IBM-PC(t|
|00001bc0| 6d 29 20 74 79 70 65 20 | 49 2f 4f 20 62 75 73 2e |m) type |I/O bus.|
|00001bd0| 20 20 54 68 65 20 63 61 | 72 64 20 69 73 20 63 61 | The ca|rd is ca|
|00001be0| 70 61 62 6c 65 20 6f 66 | 20 73 61 6d 70 6c 69 6e |pable of| samplin|
|00001bf0| 67 20 73 6f 75 6e 64 20 | 66 72 6f 6d 20 61 0a 6d |g sound |from a.m|
|00001c00| 69 63 72 6f 70 68 6f 6e | 65 20 6a 61 63 6b 20 66 |icrophon|e jack f|
|00001c10| 72 6f 6d 20 34 4b 48 7a | 20 74 6f 20 32 33 4b 48 |rom 4KHz| to 23KH|
|00001c20| 7a 20 28 6f 72 20 32 34 | 4b 48 7a 2c 20 64 65 70 |z (or 24|KHz, dep|
|00001c30| 65 6e 64 69 6e 67 20 75 | 70 6f 6e 20 77 68 69 63 |ending u|pon whic|
|00001c40| 68 0a 70 6f 72 74 69 6f | 6e 20 6f 66 20 74 68 65 |h.portio|n of the|
|00001c50| 20 6d 61 6e 75 61 6c 20 | 79 6f 75 20 62 65 6c 69 | manual |you beli|
|00001c60| 65 76 65 29 20 61 74 20 | 38 20 72 61 77 20 62 69 |eve) at |8 raw bi|
|00001c70| 74 73 20 6f 66 20 72 65 | 73 6f 6c 75 74 69 6f 6e |ts of re|solution|
|00001c80| 2e 20 20 49 74 20 69 73 | 0a 61 6c 73 6f 20 63 61 |. It is|.also ca|
|00001c90| 70 61 62 6c 65 20 6f 66 | 20 70 6c 61 79 69 6e 67 |pable of| playing|
|00001ca0| 20 73 61 6d 70 6c 65 73 | 20 61 74 20 73 70 65 65 | samples| at spee|
|00001cb0| 64 73 20 66 72 6f 6d 20 | 34 4b 48 7a 20 75 70 20 |ds from |4KHz up |
|00001cc0| 74 6f 20 31 32 4b 48 7a | 2e 20 20 54 68 65 0a 62 |to 12KHz|. The.b|
|00001cd0| 6f 61 72 64 20 63 61 6e | 20 70 6c 61 79 20 72 61 |oard can| play ra|
|00001ce0| 77 20 38 20 62 69 74 20 | 73 61 6d 70 6c 65 73 2c |w 8 bit |samples,|
|00001cf0| 20 6f 72 20 32 20 62 69 | 74 2c 20 32 2e 36 20 62 | or 2 bi|t, 2.6 b|
|00001d00| 69 74 2c 20 6f 72 20 34 | 20 62 69 74 20 41 44 50 |it, or 4| bit ADP|
|00001d10| 43 4d 0a 70 61 63 6b 65 | 64 20 73 61 6d 70 6c 65 |CM.packe|d sample|
|00001d20| 73 2e 20 20 41 44 43 50 | 4d 20 69 73 20 61 20 6c |s. ADCP|M is a l|
|00001d30| 6f 73 73 79 20 6d 65 74 | 68 6f 64 20 6f 66 20 64 |ossy met|hod of d|
|00001d40| 61 74 61 20 63 6f 6d 70 | 72 65 73 73 69 6f 6e 2e |ata comp|ression.|
|00001d50| 20 20 54 68 65 0a 73 61 | 6d 70 6c 69 6e 67 20 61 | The.sa|mpling a|
|00001d60| 6e 64 20 6f 75 74 70 75 | 74 20 6d 61 79 20 62 65 |nd outpu|t may be|
|00001d70| 20 64 69 72 65 63 74 6c | 79 20 64 72 69 76 65 6e | directl|y driven|
|00001d80| 20 62 79 20 74 68 65 20 | 43 50 55 2c 20 6f 72 20 | by the |CPU, or |
|00001d90| 69 74 20 6d 61 79 20 62 | 65 0a 64 72 69 76 65 6e |it may b|e.driven|
|00001da0| 20 62 79 20 44 4d 41 2e | 20 20 54 68 65 20 63 61 | by DMA.| The ca|
|00001db0| 72 64 20 69 73 20 61 6c | 73 6f 20 63 61 70 61 62 |rd is al|so capab|
|00001dc0| 6c 65 20 6f 66 20 70 6c | 61 79 69 6e 67 20 6d 75 |le of pl|aying mu|
|00001dd0| 73 69 63 20 74 68 72 6f | 75 67 68 20 61 6e 0a 6f |sic thro|ugh an.o|
|00001de0| 6e 2d 62 6f 61 72 64 20 | 46 4d 20 73 79 6e 74 68 |n-board |FM synth|
|00001df0| 65 73 69 7a 65 72 20 63 | 68 69 70 2e 20 20 54 68 |esizer c|hip. Th|
|00001e00| 65 20 63 68 69 70 20 6d | 61 79 20 70 6c 61 79 20 |e chip m|ay play |
|00001e10| 39 20 73 69 6d 75 6c 74 | 61 6e 65 6f 75 73 0a 69 |9 simult|aneous.i|
|00001e20| 6e 73 74 72 75 6d 65 6e | 74 73 2c 20 6f 72 20 69 |nstrumen|ts, or i|
|00001e30| 74 20 63 61 6e 20 70 6c | 61 79 20 36 20 73 69 6d |t can pl|ay 6 sim|
|00001e40| 75 6c 74 61 6e 65 6f 75 | 73 20 76 6f 69 63 65 73 |ultaneou|s voices|
|00001e50| 20 77 69 74 68 20 35 20 | 61 64 64 69 74 69 6f 6e | with 5 |addition|
|00001e60| 61 6c 0a 72 68 79 74 68 | 6d 20 69 6e 73 74 72 75 |al.rhyth|m instru|
|00001e70| 6d 65 6e 74 73 2e 20 20 | 49 6e 20 61 64 64 69 74 |ments. |In addit|
|00001e80| 69 6f 6e 2c 20 74 68 65 | 20 62 6f 61 72 64 20 28 |ion, the| board (|
|00001e90| 62 75 74 20 4e 4f 54 20 | 6d 79 20 64 72 69 76 65 |but NOT |my drive|
|00001ea0| 72 29 20 61 6c 73 6f 0a | 73 75 70 70 6f 72 74 73 |r) also.|supports|
|00001eb0| 20 74 68 65 20 61 64 64 | 69 74 69 6f 6e 20 6f 66 | the add|ition of|
|00001ec0| 20 32 20 43 2f 4d 53 20 | 63 68 69 70 73 2e 20 46 | 2 C/MS |chips. F|
|00001ed0| 6f 72 20 6d 6f 72 65 20 | 69 6e 66 6f 72 6d 61 74 |or more |informat|
|00001ee0| 69 6f 6e 2c 20 72 65 61 | 64 20 74 68 65 0a 61 64 |ion, rea|d the.ad|
|00001ef0| 76 65 72 74 69 73 69 6e | 67 20 62 6c 75 72 62 2c |vertisin|g blurb,|
|00001f00| 20 65 72 72 72 2e 2e 2e | 20 20 6d 61 6e 75 61 6c | errr...| manual|
|00001f10| 20 77 68 69 63 68 20 63 | 6f 6d 65 73 20 77 69 74 | which c|omes wit|
|00001f20| 68 20 74 68 65 20 53 6f | 75 6e 64 20 42 6c 61 73 |h the So|und Blas|
|00001f30| 74 65 72 2e 0a 0a 54 68 | 65 20 64 72 69 76 65 72 |ter...Th|e driver|
|00001f40| 20 69 73 20 63 61 70 61 | 62 6c 65 20 6f 66 20 75 | is capa|ble of u|
|00001f50| 74 69 6c 69 7a 69 6e 67 | 20 6f 6e 6c 79 20 61 20 |tilizing| only a |
|00001f60| 73 75 62 73 65 74 20 6f | 66 20 74 68 65 20 63 61 |subset o|f the ca|
|00001f70| 70 61 62 69 6c 69 74 69 | 65 73 0a 6f 66 20 74 68 |pabiliti|es.of th|
|00001f80| 65 20 53 6f 75 6e 64 20 | 42 6c 61 73 74 65 72 20 |e Sound |Blaster |
|00001f90| 63 61 72 64 2e 20 20 54 | 68 65 20 64 72 69 76 65 |card. T|he drive|
|00001fa0| 72 20 69 73 20 61 63 63 | 65 73 73 65 64 20 74 68 |r is acc|essed th|
|00001fb0| 72 6f 75 67 68 20 74 68 | 72 65 65 0a 64 65 76 69 |rough th|ree.devi|
|00001fc0| 63 65 20 6e 6f 64 65 73 | 2e 0a 0a 54 68 65 20 2f |ce nodes|...The /|
|00001fd0| 64 65 76 2f 73 62 64 73 | 70 20 6e 6f 64 65 20 61 |dev/sbds|p node a|
|00001fe0| 63 63 65 73 73 65 73 20 | 74 68 65 20 44 53 50 20 |ccesses |the DSP |
|00001ff0| 63 68 69 70 20 77 68 69 | 63 68 20 63 6f 6e 74 72 |chip whi|ch contr|
|00002000| 6f 6c 73 20 73 61 6d 70 | 6c 69 6e 67 20 61 6e 64 |ols samp|ling and|
|00002010| 0a 73 61 6d 70 6c 65 20 | 70 6c 61 79 62 61 63 6b |.sample |playback|
|00002020| 2e 20 20 4f 6e 6c 79 20 | 38 2d 62 69 74 20 73 6f |. Only |8-bit so|
|00002030| 75 6e 64 20 69 73 20 73 | 75 70 70 6f 72 74 65 64 |und is s|upported|
|00002040| 20 74 68 75 73 20 66 61 | 72 2e 20 20 54 68 65 20 | thus fa|r. The |
|00002050| 64 72 69 76 65 72 0a 75 | 74 69 6c 69 7a 65 73 20 |driver.u|tilizes |
|00002060| 44 4d 41 2c 20 61 6e 64 | 20 74 68 65 72 65 66 6f |DMA, and| therefo|
|00002070| 72 65 20 69 73 20 76 65 | 72 79 20 75 6e 6f 62 74 |re is ve|ry unobt|
|00002080| 72 75 73 69 76 65 20 74 | 6f 20 74 68 65 20 73 79 |rusive t|o the sy|
|00002090| 73 74 65 6d 20 6c 6f 61 | 64 2e 0a 54 68 65 20 6c |stem loa|d..The l|
|000020a0| 73 20 75 74 69 6c 69 74 | 79 20 69 73 20 68 61 72 |s utilit|y is har|
|000020b0| 64 65 72 20 75 70 6f 6e | 20 74 68 65 20 73 79 73 |der upon| the sys|
|000020c0| 74 65 6d 2e 20 20 52 65 | 61 64 28 32 29 20 61 6e |tem. Re|ad(2) an|
|000020d0| 64 20 77 72 69 74 65 28 | 32 29 20 75 70 6f 6e 0a |d write(|2) upon.|
|000020e0| 2f 64 65 76 2f 73 62 64 | 73 70 20 73 61 6d 70 6c |/dev/sbd|sp sampl|
|000020f0| 65 20 73 6f 75 6e 64 20 | 61 6e 64 20 70 6c 61 79 |e sound |and play|
|00002100| 20 62 61 63 6b 20 73 6f | 75 6e 64 20 73 61 6d 70 | back so|und samp|
|00002110| 6c 65 73 2c 20 72 65 73 | 70 65 63 74 69 76 65 6c |les, res|pectivel|
|00002120| 79 2e 0a 53 65 76 65 72 | 61 6c 20 69 6f 63 74 6c |y..Sever|al ioctl|
|00002130| 28 32 29 27 73 20 63 6f | 6e 74 72 6f 6c 20 73 61 |(2)'s co|ntrol sa|
|00002140| 6d 70 6c 69 6e 67 2f 70 | 6c 61 79 62 61 63 6b 20 |mpling/p|layback |
|00002150| 73 70 65 65 64 2c 20 72 | 65 73 65 74 73 2c 20 65 |speed, r|esets, e|
|00002160| 74 63 2e 2e 2e 20 0a 54 | 68 65 20 70 6c 61 79 5f |tc... .T|he play_|
|00002170| 73 6e 64 20 75 74 69 6c | 69 74 79 20 64 65 6d 6f |snd util|ity demo|
|00002180| 6e 73 74 72 61 74 65 73 | 20 74 68 65 20 75 73 65 |nstrates| the use|
|00002190| 20 6f 66 20 74 68 65 20 | 2f 64 65 76 2f 73 62 64 | of the |/dev/sbd|
|000021a0| 73 70 20 6e 6f 64 65 2e | 0a 0a 54 68 65 20 2f 64 |sp node.|..The /d|
|000021b0| 65 76 2f 73 62 66 6d 20 | 6e 6f 64 65 20 61 63 63 |ev/sbfm |node acc|
|000021c0| 65 73 73 65 73 20 74 68 | 65 20 46 4d 20 63 68 69 |esses th|e FM chi|
|000021d0| 70 73 2e 20 20 54 68 65 | 20 6f 6e 6c 79 20 61 63 |ps. The| only ac|
|000021e0| 63 65 73 73 20 74 6f 20 | 74 68 65 20 46 4d 0a 63 |cess to |the FM.c|
|000021f0| 68 69 70 73 20 61 72 65 | 20 74 68 72 6f 75 67 68 |hips are| through|
|00002200| 20 69 6f 63 74 6c 28 32 | 29 27 73 2e 20 20 54 68 | ioctl(2|)'s. Th|
|00002210| 65 20 70 6c 61 79 5f 63 | 6d 66 20 75 74 69 6c 69 |e play_c|mf utili|
|00002220| 74 79 20 64 65 6d 6f 6e | 73 74 72 61 74 65 73 20 |ty demon|strates |
|00002230| 74 68 65 0a 75 73 65 20 | 6f 66 20 74 68 65 20 46 |the.use |of the F|
|00002240| 4d 20 63 68 69 70 73 20 | 62 79 20 28 6d 6f 73 74 |M chips |by (most|
|00002250| 6c 79 29 20 69 6e 74 65 | 72 70 72 65 74 69 6e 67 |ly) inte|rpreting|
|00002260| 20 61 6e 64 20 70 6c 61 | 79 69 6e 67 20 43 4d 46 | and pla|ying CMF|
|00002270| 20 66 69 6c 65 73 2e 0a | 54 68 65 20 76 61 72 69 | files..|The vari|
|00002280| 6f 75 73 20 6f 70 74 69 | 6f 6e 73 20 63 6f 6e 74 |ous opti|ons cont|
|00002290| 72 6f 6c 6c 69 6e 67 20 | 74 68 65 20 76 6f 69 63 |rolling |the voic|
|000022a0| 65 73 20 63 61 6e 20 62 | 65 20 64 75 6d 70 65 64 |es can b|e dumped|
|000022b0| 20 66 72 6f 6d 20 61 20 | 43 4d 46 0a 66 69 6c 65 | from a |CMF.file|
|000022c0| 20 62 79 20 74 68 65 20 | 67 65 74 5f 69 6e 73 74 | by the |get_inst|
|000022d0| 72 75 6d 65 6e 74 73 20 | 75 74 69 6c 69 74 79 2e |ruments |utility.|
|000022e0| 20 20 54 68 6f 73 65 20 | 66 61 6d 69 6c 69 61 72 | Those |familiar|
|000022f0| 20 77 69 74 68 20 73 79 | 6e 74 68 65 73 69 7a 65 | with sy|nthesize|
|00002300| 72 73 0a 63 61 6e 20 74 | 68 65 6e 20 6c 65 61 72 |rs.can t|hen lear|
|00002310| 6e 20 68 6f 77 20 74 6f | 20 63 72 65 61 74 65 20 |n how to| create |
|00002320| 74 68 65 69 72 20 6f 77 | 6e 20 69 6e 73 74 72 75 |their ow|n instru|
|00002330| 6d 65 6e 74 73 2e 20 20 | 49 20 63 61 6e 27 74 20 |ments. |I can't |
|00002340| 70 72 6f 76 69 64 65 0a | 64 69 72 65 63 74 20 64 |provide.|direct d|
|00002350| 6f 63 75 6d 65 6e 74 61 | 74 69 6f 6e 2c 20 61 73 |ocumenta|tion, as|
|00002360| 20 49 20 62 65 6c 69 65 | 76 65 20 74 68 61 74 20 | I belie|ve that |
|00002370| 77 6f 75 6c 64 20 62 65 | 20 61 20 76 69 6f 6c 61 |would be| a viola|
|00002380| 74 69 6f 6e 20 6f 66 0a | 43 72 65 61 74 69 76 65 |tion of.|Creative|
|00002390| 20 4c 61 62 27 73 20 63 | 6f 70 79 72 69 67 68 74 | Lab's c|opyright|
|000023a0| 73 2e 20 20 54 68 6f 73 | 65 20 68 61 76 69 6e 67 |s. Thos|e having|
|000023b0| 20 71 75 65 73 74 69 6f | 6e 73 2c 20 73 65 6e 64 | questio|ns, send|
|000023c0| 20 6d 65 20 65 2d 6d 61 | 69 6c 2e 20 20 49 0a 74 | me e-ma|il. I.t|
|000023d0| 68 69 6e 6b 20 69 74 20 | 77 6f 75 6c 64 20 62 65 |hink it |would be|
|000023e0| 20 4f 4b 20 74 6f 20 61 | 6e 73 77 65 72 20 71 75 | OK to a|nswer qu|
|000023f0| 65 73 74 69 6f 6e 73 2e | 0a 0a 54 68 65 20 2f 64 |estions.|..The /d|
|00002400| 65 76 2f 73 62 63 6d 73 | 20 6e 6f 64 65 20 61 63 |ev/sbcms| node ac|
|00002410| 63 65 73 73 65 73 20 61 | 62 73 6f 6c 75 74 65 6c |cesses a|bsolutel|
|00002420| 79 20 6e 6f 74 68 69 6e | 67 2e 20 20 49 20 64 6f |y nothin|g. I do|
|00002430| 20 6e 6f 74 20 68 61 76 | 65 20 74 68 65 0a 43 2f | not hav|e the.C/|
|00002440| 4d 53 20 63 68 69 70 73 | 20 77 69 74 68 20 77 68 |MS chips| with wh|
|00002450| 69 63 68 20 74 6f 20 65 | 78 70 65 72 69 6d 65 6e |ich to e|xperimen|
|00002460| 74 2e 0a 0a 54 68 69 73 | 20 64 72 69 76 65 72 20 |t...This| driver |
|00002470| 69 73 20 6d 65 72 65 6c | 79 20 74 68 65 20 72 6f |is merel|y the ro|
|00002480| 75 67 68 20 6f 75 74 6c | 69 6e 65 73 20 6f 66 20 |ugh outl|ines of |
|00002490| 77 68 61 74 20 69 74 20 | 63 6f 75 6c 64 20 62 65 |what it |could be|
|000024a0| 2e 20 20 53 75 70 70 6f | 72 74 0a 63 6f 75 6c 64 |. Suppo|rt.could|
|000024b0| 20 62 65 20 61 64 64 65 | 64 20 66 6f 72 20 6f 6f | be adde|d for oo|
|000024c0| 64 6c 65 73 20 6f 66 20 | 66 65 61 74 75 72 65 73 |dles of |features|
|000024d0| 2c 20 6c 69 6b 65 20 65 | 66 66 69 63 69 65 6e 63 |, like e|fficienc|
|000024e0| 79 20 69 6d 70 72 6f 76 | 65 6d 65 6e 74 73 2c 20 |y improv|ements, |
|000024f0| 61 6e 64 0a 41 44 43 50 | 4d 20 69 6e 74 65 72 70 |and.ADCP|M interp|
|00002500| 72 65 74 69 6f 6e 20 66 | 6f 72 20 74 68 65 20 2f |retion f|or the /|
|00002510| 64 65 76 2f 73 62 64 73 | 70 20 6e 6f 64 65 2e 20 |dev/sbds|p node. |
|00002520| 20 49 66 20 79 6f 75 20 | 77 69 73 68 20 74 6f 20 | If you |wish to |
|00002530| 61 64 64 20 74 6f 20 74 | 68 69 73 0a 64 72 69 76 |add to t|his.driv|
|00002540| 65 72 2c 20 70 6c 65 61 | 73 65 20 62 65 20 6d 79 |er, plea|se be my|
|00002550| 20 67 75 65 73 74 20 28 | 61 66 74 65 72 20 72 65 | guest (|after re|
|00002560| 61 64 69 6e 67 20 74 68 | 65 20 6c 69 63 65 6e 73 |ading th|e licens|
|00002570| 65 20 66 69 6c 65 29 2e | 20 20 57 68 65 6e 20 79 |e file).| When y|
|00002580| 6f 75 0a 68 61 76 65 20 | 70 61 74 63 68 65 73 2c |ou.have |patches,|
|00002590| 20 73 65 6e 64 20 74 68 | 6f 73 65 20 74 6f 20 6d | send th|ose to m|
|000025a0| 65 2e 20 20 49 20 77 69 | 6c 6c 20 74 68 65 6e 20 |e. I wi|ll then |
|000025b0| 69 6e 74 65 67 72 61 74 | 65 2c 20 64 6f 20 72 75 |integrat|e, do ru|
|000025c0| 64 69 6d 65 6e 74 61 72 | 79 0a 74 65 73 74 69 6e |dimentar|y.testin|
|000025d0| 67 2c 20 61 6e 64 20 73 | 65 6e 64 20 74 68 65 20 |g, and s|end the |
|000025e0| 70 61 74 63 68 65 73 20 | 74 6f 20 55 73 65 6e 65 |patches |to Usene|
|000025f0| 74 2e 20 20 54 68 61 74 | 20 77 61 79 2c 20 74 68 |t. That| way, th|
|00002600| 65 72 65 20 77 6f 6e 27 | 74 20 62 65 0a 62 69 6c |ere won'|t be.bil|
|00002610| 6c 69 6f 6e 73 20 6f 66 | 20 76 65 72 73 69 6f 6e |lions of| version|
|00002620| 73 20 6f 66 20 74 68 69 | 73 20 64 72 69 76 65 72 |s of thi|s driver|
|00002630| 20 74 6f 20 63 6f 6e 74 | 65 6e 64 20 77 69 74 68 | to cont|end with|
|00002640| 2e 0a 0a 49 20 61 6d 20 | 6e 6f 74 20 72 65 71 75 |...I am |not requ|
|00002650| 69 72 69 6e 67 20 64 6f | 6e 61 74 69 6f 6e 73 20 |iring do|nations |
|00002660| 74 6f 20 6d 79 2c 20 6e | 6f 20 64 6f 75 62 74 20 |to my, n|o doubt |
|00002670| 77 6f 72 74 68 79 20 63 | 61 75 73 65 2c 20 68 6f |worthy c|ause, ho|
|00002680| 77 65 76 65 72 2c 0a 74 | 68 65 79 20 61 72 65 20 |wever,.t|hey are |
|00002690| 77 69 6c 6c 69 6e 67 6c | 79 20 61 63 63 65 70 74 |willingl|y accept|
|000026a0| 65 64 2e 20 3a 2d 29 20 | 20 54 68 65 79 20 77 69 |ed. :-) | They wi|
|000026b0| 6c 6c 20 68 65 6c 70 20 | 6d 65 20 69 6e 20 66 75 |ll help |me in fu|
|000026c0| 74 75 72 65 0a 70 72 6f | 6a 65 63 74 73 2c 20 61 |ture.pro|jects, a|
|000026d0| 6e 64 20 69 66 20 74 68 | 65 72 65 20 61 72 65 20 |nd if th|ere are |
|000026e0| 65 6e 6f 75 67 68 20 72 | 65 71 75 65 73 74 73 20 |enough r|equests |
|000026f0| 28 6c 6f 75 64 6e 65 73 | 73 20 64 6f 65 73 20 6e |(loudnes|s does n|
|00002700| 6f 74 20 63 6f 75 6e 74 | 29 2c 0a 49 20 77 69 6c |ot count|),.I wil|
|00002710| 6c 20 63 6f 6e 74 69 6e | 75 65 20 77 6f 72 6b 20 |l contin|ue work |
|00002720| 6f 6e 20 74 68 69 73 20 | 64 72 69 76 65 72 20 61 |on this |driver a|
|00002730| 6e 64 20 77 72 69 74 65 | 20 6d 6f 72 65 20 73 6f |nd write| more so|
|00002740| 66 74 77 61 72 65 20 74 | 6f 20 75 73 65 0a 69 74 |ftware t|o use.it|
|00002750| 2e 0a 53 48 41 52 5f 45 | 4f 46 0a 66 69 0a 69 66 |..SHAR_E|OF.fi.if|
|00002760| 20 74 65 73 74 20 2d 66 | 20 27 53 70 61 63 65 2e | test -f| 'Space.|
|00002770| 63 27 0a 74 68 65 6e 0a | 09 65 63 68 6f 20 73 68 |c'.then.|.echo sh|
|00002780| 61 72 3a 20 22 77 69 6c | 6c 20 6e 6f 74 20 6f 76 |ar: "wil|l not ov|
|00002790| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|000027a0| 67 20 66 69 6c 65 20 27 | 53 70 61 63 65 2e 63 27 |g file '|Space.c'|
|000027b0| 22 0a 65 6c 73 65 0a 63 | 61 74 20 3c 3c 20 5c 53 |".else.c|at << \S|
|000027c0| 48 41 52 5f 45 4f 46 20 | 3e 20 27 53 70 61 63 65 |HAR_EOF |> 'Space|
|000027d0| 2e 63 27 0a 2f 2a 0a 20 | 2a 20 43 6f 70 79 72 69 |.c'./*. |* Copyri|
|000027e0| 67 68 74 65 64 20 61 73 | 20 61 6e 20 75 6e 70 75 |ghted as| an unpu|
|000027f0| 62 6c 69 73 68 65 64 20 | 77 6f 72 6b 2e 0a 20 2a |blished |work.. *|
|00002800| 20 28 63 29 20 43 6f 70 | 79 72 69 67 68 74 20 31 | (c) Cop|yright 1|
|00002810| 39 39 31 20 42 72 69 61 | 6e 20 53 6d 69 74 68 0a |991 Bria|n Smith.|
|00002820| 20 2a 20 41 6c 6c 20 72 | 69 67 68 74 73 20 72 65 | * All r|ights re|
|00002830| 73 65 72 76 65 64 2e 0a | 20 2a 0a 20 2a 20 52 65 |served..| *. * Re|
|00002840| 61 64 20 74 68 65 20 4c | 49 43 45 4e 53 45 20 66 |ad the L|ICENSE f|
|00002850| 69 6c 65 20 66 6f 72 20 | 64 65 74 61 69 6c 73 20 |ile for |details |
|00002860| 6f 6e 20 64 69 73 74 72 | 69 62 75 74 69 6f 6e 20 |on distr|ibution |
|00002870| 61 6e 64 20 75 73 65 2e | 0a 20 2a 0a 20 2a 2f 0a |and use.|. *. */.|
|00002880| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 73 79 73 2f 74 |.#includ|e <sys/t|
|00002890| 79 70 65 73 2e 68 3e 0a | 23 69 6e 63 6c 75 64 65 |ypes.h>.|#include|
|000028a0| 20 3c 73 79 73 2f 69 6f | 62 75 66 2e 68 3e 0a 23 | <sys/io|buf.h>.#|
|000028b0| 69 6e 63 6c 75 64 65 20 | 3c 63 6f 6e 66 69 67 2e |include |<config.|
|000028c0| 68 3e 0a 0a 23 69 6e 63 | 6c 75 64 65 20 3c 73 79 |h>..#inc|lude <sy|
|000028d0| 73 2f 73 62 2e 68 3e 0a | 0a 75 73 68 6f 72 74 20 |s/sb.h>.|.ushort |
|000028e0| 73 62 5f 63 6f 6e 66 69 | 67 75 72 65 64 20 3d 20 |sb_confi|gured = |
|000028f0| 53 42 3b 0a 75 73 68 6f | 72 74 20 73 62 5f 64 6d |SB;.usho|rt sb_dm|
|00002900| 61 5f 63 68 61 6e 20 3d | 20 53 42 5f 43 48 41 4e |a_chan =| SB_CHAN|
|00002910| 3b 0a 75 73 68 6f 72 74 | 20 73 62 5f 69 6e 74 65 |;.ushort| sb_inte|
|00002920| 72 72 75 70 74 20 3d 20 | 53 42 5f 30 5f 56 45 43 |rrupt = |SB_0_VEC|
|00002930| 54 3b 0a 73 74 72 75 63 | 74 20 69 6f 62 75 66 20 |T;.struc|t iobuf |
|00002940| 73 62 74 61 62 5b 33 5d | 3b 0a 53 48 41 52 5f 45 |sbtab[3]|;.SHAR_E|
|00002950| 4f 46 0a 66 69 0a 69 66 | 20 74 65 73 74 20 2d 66 |OF.fi.if| test -f|
|00002960| 20 27 53 79 73 74 65 6d | 27 0a 74 68 65 6e 0a 09 | 'System|'.then..|
|00002970| 65 63 68 6f 20 73 68 61 | 72 3a 20 22 77 69 6c 6c |echo sha|r: "will|
|00002980| 20 6e 6f 74 20 6f 76 65 | 72 2d 77 72 69 74 65 20 | not ove|r-write |
|00002990| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 27 53 |existing| file 'S|
|000029a0| 79 73 74 65 6d 27 22 0a | 65 6c 73 65 0a 63 61 74 |ystem'".|else.cat|
|000029b0| 20 3c 3c 20 5c 53 48 41 | 52 5f 45 4f 46 20 3e 20 | << \SHA|R_EOF > |
|000029c0| 27 53 79 73 74 65 6d 27 | 0a 73 62 20 20 59 20 20 |'System'|.sb Y |
|000029d0| 33 20 20 36 20 20 33 20 | 20 35 20 20 32 32 30 20 |3 6 3 | 5 220 |
|000029e0| 20 32 32 46 20 20 30 20 | 20 30 0a 53 48 41 52 5f | 22F 0 | 0.SHAR_|
|000029f0| 45 4f 46 0a 66 69 0a 69 | 66 20 74 65 73 74 20 2d |EOF.fi.i|f test -|
|00002a00| 66 20 27 73 62 2e 63 27 | 0a 74 68 65 6e 0a 09 65 |f 'sb.c'|.then..e|
|00002a10| 63 68 6f 20 73 68 61 72 | 3a 20 22 77 69 6c 6c 20 |cho shar|: "will |
|00002a20| 6e 6f 74 20 6f 76 65 72 | 2d 77 72 69 74 65 20 65 |not over|-write e|
|00002a30| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 27 73 62 |xisting |file 'sb|
|00002a40| 2e 63 27 22 0a 65 6c 73 | 65 0a 63 61 74 20 3c 3c |.c'".els|e.cat <<|
|00002a50| 20 5c 53 48 41 52 5f 45 | 4f 46 20 3e 20 27 73 62 | \SHAR_E|OF > 'sb|
|00002a60| 2e 63 27 0a 2f 2a 0a 20 | 2a 20 43 6f 70 79 72 69 |.c'./*. |* Copyri|
|00002a70| 67 68 74 65 64 20 61 73 | 20 61 6e 20 75 6e 70 75 |ghted as| an unpu|
|00002a80| 62 6c 69 73 68 65 64 20 | 77 6f 72 6b 2e 0a 20 2a |blished |work.. *|
|00002a90| 20 28 63 29 20 43 6f 70 | 79 72 69 67 68 74 20 31 | (c) Cop|yright 1|
|00002aa0| 39 39 31 20 42 72 69 61 | 6e 20 53 6d 69 74 68 0a |991 Bria|n Smith.|
|00002ab0| 20 2a 20 41 6c 6c 20 72 | 69 67 68 74 73 20 72 65 | * All r|ights re|
|00002ac0| 73 65 72 76 65 64 2e 0a | 20 2a 0a 20 2a 20 52 65 |served..| *. * Re|
|00002ad0| 61 64 20 74 68 65 20 4c | 49 43 45 4e 53 45 20 66 |ad the L|ICENSE f|
|00002ae0| 69 6c 65 20 66 6f 72 20 | 64 65 74 61 69 6c 73 20 |ile for |details |
|00002af0| 6f 6e 20 64 69 73 74 72 | 69 62 75 74 69 6f 6e 20 |on distr|ibution |
|00002b00| 61 6e 64 20 75 73 65 2e | 0a 20 2a 0a 20 2a 2f 0a |and use.|. *. */.|
|00002b10| 0a 0a 23 69 6e 63 6c 75 | 64 65 20 3c 73 79 73 2f |..#inclu|de <sys/|
|00002b20| 74 79 70 65 73 2e 68 3e | 0a 23 69 6e 63 6c 75 64 |types.h>|.#includ|
|00002b30| 65 20 3c 73 79 73 2f 70 | 61 72 61 6d 2e 68 3e 0a |e <sys/p|aram.h>.|
|00002b40| 23 69 6e 63 6c 75 64 65 | 20 3c 73 79 73 2f 66 69 |#include| <sys/fi|
|00002b50| 6c 65 2e 68 3e 0a 23 69 | 6e 63 6c 75 64 65 20 3c |le.h>.#i|nclude <|
|00002b60| 73 79 73 2f 69 6f 63 74 | 6c 2e 68 3e 0a 23 69 6e |sys/ioct|l.h>.#in|
|00002b70| 63 6c 75 64 65 20 3c 73 | 79 73 2f 64 69 72 2e 68 |clude <s|ys/dir.h|
|00002b80| 3e 0a 23 69 6e 63 6c 75 | 64 65 20 3c 73 79 73 2f |>.#inclu|de <sys/|
|00002b90| 62 75 66 2e 68 3e 0a 23 | 69 6e 63 6c 75 64 65 20 |buf.h>.#|include |
|00002ba0| 3c 73 79 73 2f 69 6f 62 | 75 66 2e 68 3e 0a 23 69 |<sys/iob|uf.h>.#i|
|00002bb0| 6e 63 6c 75 64 65 20 3c | 73 79 73 2f 73 69 67 6e |nclude <|sys/sign|
|00002bc0| 61 6c 2e 68 3e 0a 23 69 | 6e 63 6c 75 64 65 20 3c |al.h>.#i|nclude <|
|00002bd0| 73 79 73 2f 75 73 65 72 | 2e 68 3e 0a 23 69 6e 63 |sys/user|.h>.#inc|
|00002be0| 6c 75 64 65 20 3c 73 79 | 73 2f 73 79 73 6d 61 63 |lude <sy|s/sysmac|
|00002bf0| 72 6f 73 2e 68 3e 0a 23 | 69 6e 63 6c 75 64 65 20 |ros.h>.#|include |
|00002c00| 3c 73 79 73 2f 64 6d 61 | 2e 68 3e 0a 23 69 6e 63 |<sys/dma|.h>.#inc|
|00002c10| 6c 75 64 65 20 3c 73 79 | 73 2f 63 6d 6e 5f 65 72 |lude <sy|s/cmn_er|
|00002c20| 72 2e 68 3e 0a 23 69 6e | 63 6c 75 64 65 20 3c 73 |r.h>.#in|clude <s|
|00002c30| 79 73 2f 65 72 72 6e 6f | 2e 68 3e 0a 23 69 6e 63 |ys/errno|.h>.#inc|
|00002c40| 6c 75 64 65 20 3c 73 79 | 73 2f 69 6e 6c 69 6e 65 |lude <sy|s/inline|
|00002c50| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 22 73 62 |.h>.#inc|lude "sb|
|00002c60| 2e 68 22 0a 0a 2f 2a 20 | 64 65 66 73 20 6e 65 65 |.h"../* |defs nee|
|00002c70| 64 65 64 20 62 65 63 61 | 75 73 65 20 6f 66 20 6f |ded beca|use of o|
|00002c80| 6d 6d 69 73 69 6f 6e 73 | 20 49 53 43 21 20 2a 2f |mmisions| ISC! */|
|00002c90| 0a 23 69 66 6e 64 65 66 | 20 44 4d 41 5f 52 64 6d |.#ifndef| DMA_Rdm|
|00002ca0| 6f 64 65 0a 23 64 65 66 | 69 6e 65 20 44 4d 41 5f |ode.#def|ine DMA_|
|00002cb0| 52 64 6d 6f 64 65 20 30 | 78 34 34 0a 23 65 6e 64 |Rdmode 0|x44.#end|
|00002cc0| 69 66 0a 23 69 66 6e 64 | 65 66 20 44 4d 41 5f 57 |if.#ifnd|ef DMA_W|
|00002cd0| 72 6d 6f 64 65 0a 23 64 | 65 66 69 6e 65 20 44 4d |rmode.#d|efine DM|
|00002ce0| 41 5f 57 72 6d 6f 64 65 | 20 30 78 34 38 0a 23 65 |A_Wrmode| 0x48.#e|
|00002cf0| 6e 64 69 66 0a 23 69 66 | 6e 64 65 66 20 44 4d 41 |ndif.#if|ndef DMA|
|00002d00| 5f 42 4c 4f 43 4b 0a 23 | 64 65 66 69 6e 65 20 44 |_BLOCK.#|define D|
|00002d10| 4d 41 5f 42 4c 4f 43 4b | 20 30 0a 23 65 6e 64 69 |MA_BLOCK| 0.#endi|
|00002d20| 66 0a 23 69 66 6e 64 65 | 66 20 44 4d 41 5f 4e 42 |f.#ifnde|f DMA_NB|
|00002d30| 4c 4f 43 4b 0a 23 64 65 | 66 69 6e 65 20 44 4d 41 |LOCK.#de|fine DMA|
|00002d40| 5f 4e 42 4c 4f 43 4b 20 | 31 0a 23 65 6e 64 69 66 |_NBLOCK |1.#endif|
|00002d50| 0a 0a 65 78 74 65 72 6e | 20 75 73 68 6f 72 74 20 |..extern| ushort |
|00002d60| 73 62 5f 63 6f 6e 66 69 | 67 75 72 65 64 3b 0a 65 |sb_confi|gured;.e|
|00002d70| 78 74 65 72 6e 20 75 73 | 68 6f 72 74 20 73 62 5f |xtern us|hort sb_|
|00002d80| 64 6d 61 5f 63 68 61 6e | 3b 0a 65 78 74 65 72 6e |dma_chan|;.extern|
|00002d90| 20 75 73 68 6f 72 74 20 | 73 62 5f 69 6e 74 65 72 | ushort |sb_inter|
|00002da0| 72 75 70 74 3b 0a 0a 2f | 2a 20 47 4c 4f 42 41 4c |rupt;../|* GLOBAL|
|00002db0| 53 20 2a 2f 0a 73 74 72 | 75 63 74 20 73 62 5f 73 |S */.str|uct sb_s|
|00002dc0| 74 61 74 5f 74 79 70 65 | 20 73 62 5f 73 74 61 74 |tat_type| sb_stat|
|00002dd0| 75 73 3b 20 20 20 20 20 | 20 20 20 20 20 2f 2a 20 |us; | /* |
|00002de0| 53 6f 75 6e 64 62 6c 61 | 73 74 65 72 20 53 74 61 |Soundbla|ster Sta|
|00002df0| 74 75 73 20 2a 2f 0a 65 | 78 74 65 72 6e 20 74 69 |tus */.e|xtern ti|
|00002e00| 6d 65 5f 74 20 6c 62 6f | 6c 74 3b 0a 0a 0a 2f 2a |me_t lbo|lt;.../*|
|00002e10| 0a 20 2a 20 72 65 73 65 | 74 20 44 53 50 20 63 68 |. * rese|t DSP ch|
|00002e20| 69 70 2c 20 61 6e 64 20 | 72 65 74 75 72 6e 20 54 |ip, and |return T|
|00002e30| 52 55 45 20 69 66 20 73 | 75 63 63 65 73 73 66 75 |RUE if s|uccessfu|
|00002e40| 6c 0a 20 2a 2f 0a 73 74 | 61 74 69 63 20 69 6e 74 |l. */.st|atic int|
|00002e50| 20 64 73 70 5f 72 65 73 | 65 74 28 29 0a 7b 0a 20 | dsp_res|et().{. |
|00002e60| 20 20 20 69 6e 74 20 69 | 3b 0a 20 20 20 20 72 65 | int i|;. re|
|00002e70| 67 69 73 74 65 72 20 75 | 6e 73 69 67 6e 65 64 20 |gister u|nsigned |
|00002e80| 63 68 61 72 20 72 63 3b | 0a 0a 20 20 20 20 2f 2a |char rc;|.. /*|
|00002e90| 20 72 65 73 65 74 20 64 | 73 70 20 2a 2f 0a 20 20 | reset d|sp */. |
|00002ea0| 20 20 6f 75 74 62 28 44 | 53 50 5f 52 45 53 45 54 | outb(D|SP_RESET|
|00002eb0| 2c 20 30 78 30 31 29 3b | 0a 20 20 20 20 74 65 6e |, 0x01);|. ten|
|00002ec0| 6d 69 63 72 6f 73 65 63 | 28 29 3b 0a 20 20 20 20 |microsec|();. |
|00002ed0| 6f 75 74 62 28 44 53 50 | 5f 52 45 53 45 54 2c 20 |outb(DSP|_RESET, |
|00002ee0| 30 78 30 30 29 3b 0a 20 | 20 20 20 66 6f 72 20 28 |0x00);. | for (|
|00002ef0| 69 3d 30 3b 20 69 3c 32 | 30 30 3b 20 69 2b 2b 29 |i=0; i<2|00; i++)|
|00002f00| 0a 20 20 20 20 7b 0a 20 | 20 20 20 20 20 20 20 72 |. {. | r|
|00002f10| 63 20 3d 20 28 75 6e 73 | 69 67 6e 65 64 20 63 68 |c = (uns|igned ch|
|00002f20| 61 72 29 69 6e 62 28 44 | 53 50 5f 52 44 41 56 41 |ar)inb(D|SP_RDAVA|
|00002f30| 49 4c 29 3b 0a 20 20 20 | 20 20 20 20 20 69 66 20 |IL);. | if |
|00002f40| 28 72 63 20 26 20 31 32 | 38 29 0a 20 20 20 20 20 |(rc & 12|8). |
|00002f50| 20 20 20 7b 0a 20 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|00002f60| 20 72 63 20 3d 20 69 6e | 62 28 44 53 50 5f 52 44 | rc = in|b(DSP_RD|
|00002f70| 44 41 54 41 29 3b 0a 20 | 20 20 20 20 20 20 20 20 |DATA);. | |
|00002f80| 20 20 20 69 66 20 28 72 | 63 20 3d 3d 20 30 78 41 | if (r|c == 0xA|
|00002f90| 41 29 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |A). | |
|00002fa0| 20 20 20 62 72 65 61 6b | 3b 0a 20 20 20 20 20 20 | break|;. |
|00002fb0| 20 20 7d 0a 0a 20 20 20 | 20 20 20 20 20 69 2d 2d | }.. | i--|
|00002fc0| 3b 0a 20 20 20 20 20 20 | 20 20 63 6f 6e 74 69 6e |;. | contin|
|00002fd0| 75 65 3b 0a 20 20 20 20 | 7d 0a 20 20 20 20 69 66 |ue;. |}. if|
|00002fe0| 20 28 69 3e 3d 32 30 30 | 29 0a 20 20 20 20 20 20 | (i>=200|). |
|00002ff0| 20 20 63 6d 6e 5f 65 72 | 72 28 43 45 5f 57 41 52 | cmn_er|r(CE_WAR|
|00003000| 4e 2c 20 22 53 6f 75 6e | 64 42 6c 61 73 74 65 72 |N, "Soun|dBlaster|
|00003010| 28 74 6d 29 20 44 53 50 | 20 66 61 69 6c 65 64 20 |(tm) DSP| failed |
|00003020| 69 6e 69 74 69 61 6c 69 | 7a 61 74 69 6f 6e 5c 6e |initiali|zation\n|
|00003030| 22 29 3b 0a 0a 20 20 20 | 20 2f 2a 20 72 65 73 65 |");.. | /* rese|
|00003040| 74 20 73 61 6d 70 6c 69 | 6e 67 20 73 70 65 65 64 |t sampli|ng speed|
|00003050| 20 2a 2f 0a 20 20 20 20 | 64 73 70 5f 73 70 65 65 | */. |dsp_spee|
|00003060| 64 28 29 3b 0a 0a 20 20 | 20 20 72 65 74 75 72 6e |d();.. | return|
|00003070| 28 54 52 55 45 29 3b 0a | 7d 0a 0a 0a 2f 2a 0a 20 |(TRUE);.|}.../*. |
|00003080| 2a 20 70 72 6f 67 72 61 | 6d 20 74 68 65 20 44 53 |* progra|m the DS|
|00003090| 50 27 73 20 74 69 6d 65 | 20 63 6f 6e 73 74 61 6e |P's time| constan|
|000030a0| 74 3a 20 74 68 65 20 73 | 61 6d 70 6c 69 6e 67 2f |t: the s|ampling/|
|000030b0| 6f 75 74 70 75 74 20 72 | 61 74 65 0a 20 2a 2f 0a |output r|ate. */.|
|000030c0| 69 6e 74 20 64 73 70 5f | 73 70 65 65 64 28 29 0a |int dsp_|speed().|
|000030d0| 7b 0a 20 20 20 20 75 6e | 63 68 61 72 20 74 69 6d |{. un|char tim|
|000030e0| 65 5f 63 6f 6e 73 74 61 | 6e 74 3b 0a 20 20 20 20 |e_consta|nt;. |
|000030f0| 75 6e 63 68 61 72 20 64 | 73 70 5f 72 65 74 75 72 |unchar d|sp_retur|
|00003100| 6e 3b 0a 0a 20 20 20 20 | 74 69 6d 65 5f 63 6f 6e |n;.. |time_con|
|00003110| 73 74 61 6e 74 20 3d 20 | 28 63 68 61 72 29 28 32 |stant = |(char)(2|
|00003120| 35 36 20 2d 20 28 31 30 | 30 30 30 30 30 2f 73 62 |56 - (10|00000/sb|
|00003130| 5f 73 74 61 74 75 73 2e | 64 73 70 5f 73 70 65 65 |_status.|dsp_spee|
|00003140| 64 29 29 3b 0a 0a 20 20 | 20 20 2f 2a 20 73 65 6e |d));.. | /* sen|
|00003150| 64 20 63 6f 6d 6d 61 6e | 64 20 53 45 54 5f 54 49 |d comman|d SET_TI|
|00003160| 4d 45 5f 43 4f 4e 53 54 | 41 4e 54 20 28 30 78 34 |ME_CONST|ANT (0x4|
|00003170| 30 29 20 2a 2f 0a 20 20 | 20 20 64 6f 0a 20 20 20 |0) */. | do. |
|00003180| 20 7b 0a 20 20 20 20 20 | 20 20 20 64 73 70 5f 72 | {. | dsp_r|
|00003190| 65 74 75 72 6e 20 3d 20 | 69 6e 62 28 44 53 50 5f |eturn = |inb(DSP_|
|000031a0| 53 54 41 54 55 53 29 3b | 0a 20 20 20 20 7d 20 77 |STATUS);|. } w|
|000031b0| 68 69 6c 65 20 28 64 73 | 70 5f 72 65 74 75 72 6e |hile (ds|p_return|
|000031c0| 20 26 20 28 31 3c 3c 37 | 29 29 3b 0a 20 20 20 20 | & (1<<7|));. |
|000031d0| 6f 75 74 62 28 44 53 50 | 5f 43 4f 4d 4d 41 4e 44 |outb(DSP|_COMMAND|
|000031e0| 2c 20 30 78 34 30 29 3b | 0a 0a 20 20 20 20 2f 2a |, 0x40);|.. /*|
|000031f0| 20 73 65 6e 64 20 6f 6e | 65 20 62 79 74 65 20 74 | send on|e byte t|
|00003200| 69 6d 65 5f 63 6f 6e 73 | 74 61 6e 74 20 2a 2f 0a |ime_cons|tant */.|
|00003210| 20 20 20 20 64 6f 0a 20 | 20 20 20 7b 0a 20 20 20 | do. | {. |
|00003220| 20 20 20 20 20 64 73 70 | 5f 72 65 74 75 72 6e 20 | dsp|_return |
|00003230| 3d 20 69 6e 62 28 44 53 | 50 5f 53 54 41 54 55 53 |= inb(DS|P_STATUS|
|00003240| 29 3b 0a 20 20 20 20 7d | 20 77 68 69 6c 65 20 28 |);. }| while (|
|00003250| 64 73 70 5f 72 65 74 75 | 72 6e 20 26 20 28 31 3c |dsp_retu|rn & (1<|
|00003260| 3c 37 29 29 3b 0a 20 20 | 20 20 6f 75 74 62 28 44 |<7));. | outb(D|
|00003270| 53 50 5f 43 4f 4d 4d 41 | 4e 44 2c 20 74 69 6d 65 |SP_COMMA|ND, time|
|00003280| 5f 63 6f 6e 73 74 61 6e | 74 29 3b 0a 0a 20 20 20 |_constan|t);.. |
|00003290| 20 72 65 74 75 72 6e 28 | 54 52 55 45 29 3b 0a 7d | return(|TRUE);.}|
|000032a0| 0a 0a 0a 2f 2a 0a 20 2a | 20 63 61 6c 6c 65 64 20 |.../*. *| called |
|000032b0| 61 74 20 4f 53 20 73 74 | 61 72 74 75 70 20 74 69 |at OS st|artup ti|
|000032c0| 6d 65 20 74 6f 20 69 6e | 69 74 69 61 6c 69 7a 65 |me to in|itialize|
|000032d0| 20 74 68 65 20 53 6f 75 | 6e 64 42 6c 61 73 74 65 | the Sou|ndBlaste|
|000032e0| 72 0a 20 2a 2f 0a 69 6e | 74 20 73 62 69 6e 69 74 |r. */.in|t sbinit|
|000032f0| 28 29 0a 7b 0a 20 20 20 | 20 69 6e 74 20 66 61 69 |().{. | int fai|
|00003300| 6c 75 72 65 20 3d 20 46 | 41 4c 53 45 3b 0a 0a 20 |lure = F|ALSE;.. |
|00003310| 20 20 20 69 66 20 28 21 | 73 62 5f 63 6f 6e 66 69 | if (!|sb_confi|
|00003320| 67 75 72 65 64 29 0a 20 | 20 20 20 20 20 20 20 63 |gured). | c|
|00003330| 6d 6e 5f 65 72 72 28 43 | 45 5f 57 41 52 4e 2c 20 |mn_err(C|E_WARN, |
|00003340| 22 73 62 69 6e 69 74 28 | 29 3a 20 53 6f 75 6e 64 |"sbinit(|): Sound|
|00003350| 42 6c 61 73 74 65 72 28 | 74 6d 29 20 6e 6f 74 20 |Blaster(|tm) not |
|00003360| 63 6f 6e 66 69 67 75 72 | 65 64 5c 6e 22 29 3b 0a |configur|ed\n");.|
|00003370| 0a 20 20 20 20 73 62 74 | 61 62 5b 30 5d 2e 62 5f |. sbt|ab[0].b_|
|00003380| 61 63 74 66 20 3d 20 4e | 55 4c 4c 3b 0a 20 20 20 |actf = N|ULL;. |
|00003390| 20 73 62 74 61 62 5b 30 | 5d 2e 62 5f 61 63 74 6c | sbtab[0|].b_actl|
|000033a0| 20 3d 20 4e 55 4c 4c 3b | 0a 20 20 20 20 73 62 74 | = NULL;|. sbt|
|000033b0| 61 62 5b 30 5d 2e 62 5f | 61 63 74 69 76 65 20 3d |ab[0].b_|active =|
|000033c0| 20 46 41 4c 53 45 3b 0a | 0a 20 20 20 20 2f 2a 20 | FALSE;.|. /* |
|000033d0| 69 6e 69 74 20 63 6d 73 | 20 63 68 69 70 73 27 20 |init cms| chips' |
|000033e0| 73 74 61 74 65 20 2a 2f | 0a 20 20 20 20 73 62 5f |state */|. sb_|
|000033f0| 73 74 61 74 75 73 2e 63 | 6d 73 5f 6f 70 65 6e 20 |status.c|ms_open |
|00003400| 3d 20 4e 4f 54 5f 4f 50 | 45 4e 3b 0a 20 20 20 20 |= NOT_OP|EN;. |
|00003410| 73 62 5f 73 74 61 74 75 | 73 2e 63 6d 73 5f 77 61 |sb_statu|s.cms_wa|
|00003420| 69 74 69 6e 67 20 3d 20 | 30 3b 0a 0a 20 20 20 20 |iting = |0;.. |
|00003430| 2f 2a 20 69 6e 69 74 20 | 66 6d 20 63 68 69 70 73 |/* init |fm chips|
|00003440| 27 20 73 74 61 74 65 20 | 2a 2f 0a 20 20 20 20 73 |' state |*/. s|
|00003450| 62 5f 73 74 61 74 75 73 | 2e 66 6d 5f 6f 70 65 6e |b_status|.fm_open|
|00003460| 20 3d 20 4e 4f 54 5f 4f | 50 45 4e 3b 0a 20 20 20 | = NOT_O|PEN;. |
|00003470| 20 73 62 5f 73 74 61 74 | 75 73 2e 66 6d 5f 77 61 | sb_stat|us.fm_wa|
|00003480| 69 74 69 6e 67 20 3d 20 | 30 3b 0a 0a 20 20 20 20 |iting = |0;.. |
|00003490| 2f 2a 20 69 6e 69 74 20 | 64 73 70 20 63 68 69 70 |/* init |dsp chip|
|000034a0| 28 73 29 27 20 73 74 61 | 74 65 20 2a 2f 0a 20 20 |(s)' sta|te */. |
|000034b0| 20 20 73 62 5f 73 74 61 | 74 75 73 2e 64 73 70 5f | sb_sta|tus.dsp_|
|000034c0| 6f 70 65 6e 20 3d 20 4e | 4f 54 5f 4f 50 45 4e 3b |open = N|OT_OPEN;|
|000034d0| 0a 20 20 20 20 73 62 5f | 73 74 61 74 75 73 2e 64 |. sb_|status.d|
|000034e0| 73 70 5f 73 70 65 65 64 | 20 3d 20 31 31 30 30 30 |sp_speed| = 11000|
|000034f0| 3b 0a 20 20 20 20 73 62 | 5f 73 74 61 74 75 73 2e |;. sb|_status.|
|00003500| 64 73 70 5f 63 6f 6d 70 | 72 65 73 73 69 6f 6e 20 |dsp_comp|ression |
|00003510| 3d 20 41 44 43 50 4d 5f | 38 3b 0a 20 20 20 20 69 |= ADCPM_|8;. i|
|00003520| 66 20 28 21 64 73 70 5f | 72 65 73 65 74 28 29 29 |f (!dsp_|reset())|
|00003530| 0a 20 20 20 20 20 20 20 | 20 66 61 69 6c 75 72 65 |. | failure|
|00003540| 20 3d 20 54 52 55 45 3b | 0a 0a 20 20 20 20 2f 2a | = TRUE;|.. /*|
|00003550| 20 61 6c 6c 20 4f 4b 2c | 20 73 65 6e 64 20 6e 6f | all OK,| send no|
|00003560| 74 69 66 69 63 61 74 69 | 6f 6e 20 74 6f 20 63 6f |tificati|on to co|
|00003570| 6e 73 6f 6c 65 20 2a 2f | 0a 20 20 20 20 69 66 20 |nsole */|. if |
|00003580| 28 21 66 61 69 6c 75 72 | 65 29 0a 20 20 20 20 7b |(!failur|e). {|
|00003590| 0a 20 20 20 20 20 20 20 | 20 63 6d 6e 5f 65 72 72 |. | cmn_err|
|000035a0| 28 43 45 5f 43 4f 4e 54 | 2c 20 22 53 6f 75 6e 64 |(CE_CONT|, "Sound|
|000035b0| 42 6c 61 73 74 65 72 28 | 74 6d 29 20 69 73 20 72 |Blaster(|tm) is r|
|000035c0| 65 63 6f 67 6e 69 7a 65 | 64 20 61 6e 64 20 69 6e |ecognize|d and in|
|000035d0| 69 74 69 61 6c 69 7a 65 | 64 5c 6e 22 29 3b 0a 23 |itialize|d\n");.#|
|000035e0| 69 66 64 65 66 20 44 45 | 42 55 47 0a 20 20 20 20 |ifdef DE|BUG. |
|000035f0| 20 20 20 20 63 6d 6e 5f | 65 72 72 28 43 45 5f 43 | cmn_|err(CE_C|
|00003600| 4f 4e 54 2c 20 22 6f 70 | 65 72 61 74 69 6e 67 20 |ONT, "op|erating |
|00003610| 75 70 6f 6e 20 44 4d 41 | 20 63 68 61 6e 6e 65 6c |upon DMA| channel|
|00003620| 20 25 64 5c 6e 22 2c 20 | 73 62 5f 64 6d 61 5f 63 | %d\n", |sb_dma_c|
|00003630| 68 61 6e 29 3b 0a 20 20 | 20 20 20 20 20 20 63 6d |han);. | cm|
|00003640| 6e 5f 65 72 72 28 43 45 | 5f 43 4f 4e 54 2c 20 22 |n_err(CE|_CONT, "|
|00003650| 6f 70 65 72 61 74 69 6e | 67 20 75 70 6f 6e 20 69 |operatin|g upon i|
|00003660| 6e 74 65 72 72 75 70 74 | 20 76 65 63 74 6f 72 20 |nterrupt| vector |
|00003670| 25 64 5c 6e 22 2c 20 73 | 62 5f 69 6e 74 65 72 72 |%d\n", s|b_interr|
|00003680| 75 70 74 29 3b 0a 23 65 | 6e 64 69 66 0a 20 20 20 |upt);.#e|ndif. |
|00003690| 20 7d 0a 20 20 20 20 65 | 6c 73 65 0a 20 20 20 20 | }. e|lse. |
|000036a0| 7b 0a 20 20 20 20 20 20 | 20 20 63 6d 6e 5f 65 72 |{. | cmn_er|
|000036b0| 72 28 43 45 5f 57 41 52 | 4e 2c 20 22 53 6f 75 6e |r(CE_WAR|N, "Soun|
|000036c0| 64 42 6c 61 73 74 65 72 | 28 74 6d 29 20 69 6e 69 |dBlaster|(tm) ini|
|000036d0| 74 69 61 6c 69 7a 61 74 | 69 6f 6e 20 66 61 69 6c |tializat|ion fail|
|000036e0| 65 64 5c 6e 22 29 3b 0a | 20 20 20 20 20 20 20 20 |ed\n");.| |
|000036f0| 73 62 5f 73 74 61 74 75 | 73 2e 64 73 70 5f 6f 70 |sb_statu|s.dsp_op|
|00003700| 65 6e 20 3d 20 4f 50 45 | 4e 5f 52 45 41 44 20 7c |en = OPE|N_READ ||
|00003710| 20 4f 50 45 4e 5f 57 52 | 49 54 45 3b 0a 20 20 20 | OPEN_WR|ITE;. |
|00003720| 20 20 20 20 20 73 62 5f | 73 74 61 74 75 73 2e 66 | sb_|status.f|
|00003730| 6d 5f 6f 70 65 6e 20 20 | 3d 20 4f 50 45 4e 5f 52 |m_open |= OPEN_R|
|00003740| 45 41 44 20 7c 20 4f 50 | 45 4e 5f 57 52 49 54 45 |EAD | OP|EN_WRITE|
|00003750| 3b 0a 20 20 20 20 20 20 | 20 20 73 62 5f 73 74 61 |;. | sb_sta|
|00003760| 74 75 73 2e 63 6d 73 5f | 6f 70 65 6e 20 3d 20 4f |tus.cms_|open = O|
|00003770| 50 45 4e 5f 52 45 41 44 | 20 7c 20 4f 50 45 4e 5f |PEN_READ| | OPEN_|
|00003780| 57 52 49 54 45 3b 0a 20 | 20 20 20 7d 0a 0a 20 20 |WRITE;. | }.. |
|00003790| 20 20 72 65 74 75 72 6e | 28 30 29 3b 0a 7d 0a 0a | return|(0);.}..|
|000037a0| 0a 2f 2a 0a 20 2a 20 74 | 75 72 6e 20 74 68 65 20 |./*. * t|urn the |
|000037b0| 64 73 70 20 76 6f 69 63 | 65 20 6f 6e 20 69 66 20 |dsp voic|e on if |
|000037c0| 70 61 72 61 6d 20 69 73 | 20 74 72 75 65 0a 20 2a |param is| true. *|
|000037d0| 2f 0a 76 6f 69 64 20 64 | 73 70 5f 76 6f 69 63 65 |/.void d|sp_voice|
|000037e0| 28 6f 6e 29 0a 69 6e 74 | 20 6f 6e 3b 0a 7b 0a 20 |(on).int| on;.{. |
|000037f0| 20 20 20 75 6e 63 68 61 | 72 20 64 73 70 5f 72 65 | uncha|r dsp_re|
|00003800| 74 75 72 6e 3b 0a 0a 20 | 20 20 20 64 6f 0a 20 20 |turn;.. | do. |
|00003810| 20 20 7b 0a 20 20 20 20 | 20 20 20 20 64 73 70 5f | {. | dsp_|
|00003820| 72 65 74 75 72 6e 20 3d | 20 69 6e 62 28 44 53 50 |return =| inb(DSP|
|00003830| 5f 53 54 41 54 55 53 29 | 3b 0a 20 20 20 20 7d 20 |_STATUS)|;. } |
|00003840| 77 68 69 6c 65 20 28 64 | 73 70 5f 72 65 74 75 72 |while (d|sp_retur|
|00003850| 6e 20 26 20 28 31 3c 3c | 37 29 29 3b 0a 0a 20 20 |n & (1<<|7));.. |
|00003860| 20 20 69 66 20 28 6f 6e | 29 0a 20 20 20 20 7b 0a | if (on|). {.|
|00003870| 20 20 20 20 20 20 20 20 | 6f 75 74 62 28 44 53 50 | |outb(DSP|
|00003880| 5f 43 4f 4d 4d 41 4e 44 | 2c 20 30 78 44 31 29 3b |_COMMAND|, 0xD1);|
|00003890| 0a 23 69 66 64 65 66 20 | 44 45 42 55 47 0a 20 20 |.#ifdef |DEBUG. |
|000038a0| 20 20 20 20 20 20 63 6d | 6e 5f 65 72 72 28 43 45 | cm|n_err(CE|
|000038b0| 5f 43 4f 4e 54 2c 20 22 | 64 73 70 5f 76 6f 69 63 |_CONT, "|dsp_voic|
|000038c0| 65 28 29 3a 20 76 6f 69 | 63 65 20 6f 6e 5c 6e 22 |e(): voi|ce on\n"|
|000038d0| 29 3b 0a 23 65 6e 64 69 | 66 0a 20 20 20 20 7d 0a |);.#endi|f. }.|
|000038e0| 20 20 20 20 65 6c 73 65 | 0a 20 20 20 20 7b 0a 20 | else|. {. |
|000038f0| 20 20 20 20 20 20 20 6f | 75 74 62 28 44 53 50 5f | o|utb(DSP_|
|00003900| 43 4f 4d 4d 41 4e 44 2c | 20 30 78 44 33 29 3b 0a |COMMAND,| 0xD3);.|
|00003910| 23 69 66 64 65 66 20 44 | 45 42 55 47 0a 20 20 20 |#ifdef D|EBUG. |
|00003920| 20 20 20 20 20 63 6d 6e | 5f 65 72 72 28 43 45 5f | cmn|_err(CE_|
|00003930| 43 4f 4e 54 2c 20 22 64 | 73 70 5f 76 6f 69 63 65 |CONT, "d|sp_voice|
|00003940| 28 29 3a 20 76 6f 69 63 | 65 20 6f 66 66 5c 6e 22 |(): voic|e off\n"|
|00003950| 29 3b 0a 23 65 6e 64 69 | 66 0a 20 20 20 20 7d 0a |);.#endi|f. }.|
|00003960| 0a 20 20 20 20 72 65 74 | 75 72 6e 3b 0a 7d 0a 0a |. ret|urn;.}..|
|00003970| 0a 2f 2a 0a 20 2a 20 67 | 72 61 62 73 20 74 68 65 |./*. * g|rabs the|
|00003980| 20 44 53 50 20 63 68 69 | 70 20 66 6f 72 20 61 20 | DSP chi|p for a |
|00003990| 70 72 6f 63 65 73 73 2e | 0a 20 2a 20 73 65 74 73 |process.|. * sets|
|000039a0| 20 75 2e 75 5f 65 72 72 | 6f 72 20 74 6f 20 45 42 | u.u_err|or to EB|
|000039b0| 55 53 59 20 69 66 20 61 | 6c 72 65 61 64 79 20 6f |USY if a|lready o|
|000039c0| 70 65 6e 65 64 20 62 79 | 20 6f 74 68 65 72 20 64 |pened by| other d|
|000039d0| 65 76 69 63 65 0a 20 2a | 2f 0a 73 74 61 74 69 63 |evice. *|/.static|
|000039e0| 20 76 6f 69 64 20 64 73 | 70 5f 6f 70 65 6e 28 66 | void ds|p_open(f|
|000039f0| 6c 61 67 29 0a 69 6e 74 | 20 66 6c 61 67 3b 0a 7b |lag).int| flag;.{|
|00003a00| 0a 20 20 20 20 69 6e 74 | 20 6f 6c 64 5f 70 72 69 |. int| old_pri|
|00003a10| 3b 0a 20 20 20 20 69 6e | 74 20 72 63 3b 0a 0a 0a |;. in|t rc;...|
|00003a20| 20 20 20 20 2f 2a 20 63 | 68 65 63 6b 20 69 66 20 | /* c|heck if |
|00003a30| 61 6c 72 65 61 64 79 20 | 6f 70 65 6e 20 2a 2f 0a |already |open */.|
|00003a40| 20 20 20 20 6f 6c 64 5f | 70 72 69 20 3d 20 73 70 | old_|pri = sp|
|00003a50| 6c 36 28 29 3b 0a 20 20 | 20 20 69 66 20 28 73 62 |l6();. | if (sb|
|00003a60| 5f 73 74 61 74 75 73 2e | 64 73 70 5f 6f 70 65 6e |_status.|dsp_open|
|00003a70| 29 0a 20 20 20 20 7b 0a | 20 20 20 20 20 20 20 20 |). {.| |
|00003a80| 75 2e 75 5f 65 72 72 6f | 72 20 3d 20 45 42 55 53 |u.u_erro|r = EBUS|
|00003a90| 59 3b 0a 20 20 20 20 20 | 20 20 20 73 70 6c 78 28 |Y;. | splx(|
|00003aa0| 6f 6c 64 5f 70 72 69 29 | 3b 0a 20 20 20 20 20 20 |old_pri)|;. |
|00003ab0| 20 20 72 65 74 75 72 6e | 3b 0a 20 20 20 20 7d 0a | return|;. }.|
|00003ac0| 0a 20 20 20 20 2f 2a 20 | 67 72 61 62 20 64 6d 61 |. /* |grab dma|
|00003ad0| 20 61 6e 64 20 64 65 76 | 69 63 65 20 2a 2f 0a 20 | and dev|ice */. |
|00003ae0| 20 20 20 64 6d 61 5f 61 | 6c 6c 6f 63 28 53 42 5f | dma_a|lloc(SB_|
|00003af0| 44 4d 41 5f 43 48 41 4e | 2c 20 44 4d 41 5f 42 4c |DMA_CHAN|, DMA_BL|
|00003b00| 4f 43 4b 29 3b 0a 20 20 | 20 20 64 73 70 5f 72 65 |OCK);. | dsp_re|
|00003b10| 73 65 74 28 29 3b 0a 20 | 20 20 20 64 73 70 5f 76 |set();. | dsp_v|
|00003b20| 6f 69 63 65 28 46 41 4c | 53 45 29 3b 0a 20 20 20 |oice(FAL|SE);. |
|00003b30| 20 69 66 20 28 66 6c 61 | 67 20 26 20 46 57 52 49 | if (fla|g & FWRI|
|00003b40| 54 45 29 0a 20 20 20 20 | 7b 0a 20 20 20 20 20 20 |TE). |{. |
|00003b50| 20 20 69 66 20 28 66 6c | 61 67 20 26 20 46 52 45 | if (fl|ag & FRE|
|00003b60| 41 44 29 0a 20 20 20 20 | 20 20 20 20 7b 0a 20 20 |AD). | {. |
|00003b70| 20 20 20 20 20 20 20 20 | 20 20 73 62 5f 73 74 61 | | sb_sta|
|00003b80| 74 75 73 2e 64 73 70 5f | 6f 70 65 6e 20 3d 20 4f |tus.dsp_|open = O|
|00003b90| 50 45 4e 5f 57 52 49 54 | 45 20 7c 20 4f 50 45 4e |PEN_WRIT|E | OPEN|
|00003ba0| 5f 52 45 41 44 3b 0a 23 | 69 66 64 65 66 20 44 45 |_READ;.#|ifdef DE|
|00003bb0| 42 55 47 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |BUG. | |
|00003bc0| 63 6d 6e 5f 65 72 72 28 | 43 45 5f 43 4f 4e 54 2c |cmn_err(|CE_CONT,|
|00003bd0| 20 22 6f 70 65 6e 20 72 | 65 61 64 2f 77 72 69 74 | "open r|ead/writ|
|00003be0| 65 20 25 64 5c 6e 22 2c | 20 66 6c 61 67 29 3b 0a |e %d\n",| flag);.|
|00003bf0| 23 65 6e 64 69 66 0a 20 | 20 20 20 20 20 20 20 7d |#endif. | }|
|00003c00| 0a 20 20 20 20 20 20 20 | 20 65 6c 73 65 0a 20 20 |. | else. |
|00003c10| 20 20 20 20 20 20 7b 0a | 20 20 20 20 20 20 20 20 | {.| |
|00003c20| 20 20 20 20 73 62 5f 73 | 74 61 74 75 73 2e 64 73 | sb_s|tatus.ds|
|00003c30| 70 5f 6f 70 65 6e 20 3d | 20 4f 50 45 4e 5f 57 52 |p_open =| OPEN_WR|
|00003c40| 49 54 45 3b 0a 23 69 66 | 64 65 66 20 44 45 42 55 |ITE;.#if|def DEBU|
|00003c50| 47 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 63 6d |G. | cm|
|00003c60| 6e 5f 65 72 72 28 43 45 | 5f 43 4f 4e 54 2c 20 22 |n_err(CE|_CONT, "|
|00003c70| 6f 70 65 6e 20 77 72 69 | 74 65 20 25 64 5c 6e 22 |open wri|te %d\n"|
|00003c80| 2c 20 66 6c 61 67 29 3b | 0a 23 65 6e 64 69 66 0a |, flag);|.#endif.|
|00003c90| 20 20 20 20 20 20 20 20 | 20 20 20 20 64 73 70 5f | | dsp_|
|00003ca0| 76 6f 69 63 65 28 54 52 | 55 45 29 3b 0a 20 20 20 |voice(TR|UE);. |
|00003cb0| 20 20 20 20 20 7d 0a 20 | 20 20 20 7d 0a 20 20 20 | }. | }. |
|00003cc0| 20 65 6c 73 65 20 69 66 | 20 28 66 6c 61 67 20 26 | else if| (flag &|
|00003cd0| 20 46 52 45 41 44 29 0a | 20 20 20 20 7b 0a 20 20 | FREAD).| {. |
|00003ce0| 20 20 20 20 20 20 73 62 | 5f 73 74 61 74 75 73 2e | sb|_status.|
|00003cf0| 64 73 70 5f 6f 70 65 6e | 20 3d 20 4f 50 45 4e 5f |dsp_open| = OPEN_|
|00003d00| 52 45 41 44 3b 0a 23 69 | 66 64 65 66 20 44 45 42 |READ;.#i|fdef DEB|
|00003d10| 55 47 0a 20 20 20 20 20 | 20 20 20 63 6d 6e 5f 65 |UG. | cmn_e|
|00003d20| 72 72 28 43 45 5f 43 4f | 4e 54 2c 20 22 6f 70 65 |rr(CE_CO|NT, "ope|
|00003d30| 6e 20 72 65 61 64 2f 77 | 72 69 74 65 20 25 64 5c |n read/w|rite %d\|
|00003d40| 6e 22 2c 20 66 6c 61 67 | 29 3b 0a 23 65 6e 64 69 |n", flag|);.#endi|
|00003d50| 66 0a 20 20 20 20 7d 0a | 20 20 20 20 65 6c 73 65 |f. }.| else|
|00003d60| 0a 20 20 20 20 7b 0a 23 | 69 66 64 65 66 20 44 45 |. {.#|ifdef DE|
|00003d70| 42 55 47 0a 20 20 20 20 | 20 20 20 20 63 6d 6e 5f |BUG. | cmn_|
|00003d80| 65 72 72 28 43 45 5f 43 | 4f 4e 54 2c 20 22 75 6e |err(CE_C|ONT, "un|
|00003d90| 6b 6e 6f 77 6e 20 66 6c | 61 67 73 20 6f 6e 20 6f |known fl|ags on o|
|00003da0| 70 65 6e 20 25 64 5c 6e | 22 2c 20 66 6c 61 67 29 |pen %d\n|", flag)|
|00003db0| 3b 0a 23 65 6e 64 69 66 | 0a 20 20 20 20 20 20 20 |;.#endif|. |
|00003dc0| 20 75 2e 75 5f 65 72 72 | 6f 72 20 3d 20 45 4e 58 | u.u_err|or = ENX|
|00003dd0| 49 4f 3b 0a 20 20 20 20 | 7d 0a 0a 20 20 20 20 2f |IO;. |}.. /|
|00003de0| 2a 20 45 4e 44 20 43 52 | 49 54 49 43 41 4c 20 2a |* END CR|ITICAL *|
|00003df0| 2f 0a 20 20 20 20 73 70 | 6c 78 28 6f 6c 64 5f 70 |/. sp|lx(old_p|
|00003e00| 72 69 29 3b 0a 0a 20 20 | 20 20 72 65 74 75 72 6e |ri);.. | return|
|00003e10| 3b 0a 7d 0a 0a 0a 2f 2a | 0a 20 2a 20 67 72 61 62 |;.}.../*|. * grab|
|00003e20| 73 20 74 68 65 20 46 4d | 20 63 68 69 70 73 20 66 |s the FM| chips f|
|00003e30| 6f 72 20 61 20 70 72 6f | 63 65 73 73 2e 0a 20 2a |or a pro|cess.. *|
|00003e40| 20 73 65 74 73 20 75 2e | 75 5f 65 72 72 6f 72 20 | sets u.|u_error |
|00003e50| 74 6f 20 45 42 55 53 59 | 20 69 66 20 61 6c 72 65 |to EBUSY| if alre|
|00003e60| 61 64 79 20 6f 70 65 6e | 65 64 20 62 79 20 6f 74 |ady open|ed by ot|
|00003e70| 68 65 72 20 64 65 76 69 | 63 65 0a 20 2a 2f 0a 73 |her devi|ce. */.s|
|00003e80| 74 61 74 69 63 20 76 6f | 69 64 20 66 6d 5f 6f 70 |tatic vo|id fm_op|
|00003e90| 65 6e 28 66 6c 61 67 29 | 0a 69 6e 74 20 66 6c 61 |en(flag)|.int fla|
|00003ea0| 67 3b 0a 7b 0a 20 20 20 | 20 69 6e 74 20 6f 6c 64 |g;.{. | int old|
|00003eb0| 5f 70 72 69 3b 0a 20 20 | 20 20 69 6e 74 20 72 63 |_pri;. | int rc|
|00003ec0| 3b 0a 0a 0a 20 20 20 20 | 2f 2a 20 63 68 65 63 6b |;... |/* check|
|00003ed0| 20 69 66 20 61 6c 72 65 | 61 64 79 20 6f 70 65 6e | if alre|ady open|
|00003ee0| 20 2a 2f 0a 20 20 20 20 | 6f 6c 64 5f 70 72 69 20 | */. |old_pri |
|00003ef0| 3d 20 73 70 6c 36 28 29 | 3b 0a 20 20 20 20 69 66 |= spl6()|;. if|
|00003f00| 20 28 73 62 5f 73 74 61 | 74 75 73 2e 66 6d 5f 6f | (sb_sta|tus.fm_o|
|00003f10| 70 65 6e 20 21 3d 20 4e | 4f 54 5f 4f 50 45 4e 29 |pen != N|OT_OPEN)|
|00003f20| 0a 20 20 20 20 7b 0a 20 | 20 20 20 20 20 20 20 75 |. {. | u|
|00003f30| 2e 75 5f 65 72 72 6f 72 | 20 3d 20 45 42 55 53 59 |.u_error| = EBUSY|
|00003f40| 3b 0a 20 20 20 20 20 20 | 20 20 73 70 6c 78 28 6f |;. | splx(o|
|00003f50| 6c 64 5f 70 72 69 29 3b | 0a 20 20 20 20 20 20 20 |ld_pri);|. |
|00003f60| 20 72 65 74 75 72 6e 3b | 0a 20 20 20 20 7d 0a 0a | return;|. }..|
|00003f70| 20 20 20 20 2f 2a 20 67 | 72 61 62 20 64 65 76 69 | /* g|rab devi|
|00003f80| 63 65 20 61 6e 64 20 61 | 66 66 69 72 6d 20 74 68 |ce and a|ffirm th|
|00003f90| 61 74 20 6f 6e 6c 79 20 | 6f 70 65 6e 61 62 6c 65 |at only |openable|
|00003fa0| 20 77 69 74 68 20 77 72 | 69 74 65 20 70 65 72 6d | with wr|ite perm|
|00003fb0| 69 73 73 69 6f 6e 20 2a | 2f 0a 20 20 20 20 66 6d |ission *|/. fm|
|00003fc0| 5f 72 65 73 65 74 28 29 | 3b 0a 20 20 20 20 69 66 |_reset()|;. if|
|00003fd0| 20 28 66 6c 61 67 20 26 | 20 46 57 52 49 54 45 29 | (flag &| FWRITE)|
|00003fe0| 0a 20 20 20 20 20 20 20 | 20 73 62 5f 73 74 61 74 |. | sb_stat|
|00003ff0| 75 73 2e 66 6d 5f 6f 70 | 65 6e 20 3d 20 4f 50 45 |us.fm_op|en = OPE|
|00004000| 4e 5f 57 52 49 54 45 3b | 0a 20 20 20 20 65 6c 73 |N_WRITE;|. els|
|00004010| 65 0a 20 20 20 20 20 20 | 20 20 75 2e 75 5f 65 72 |e. | u.u_er|
|00004020| 72 6f 72 20 3d 20 45 4e | 58 49 4f 3b 0a 0a 20 20 |ror = EN|XIO;.. |
|00004030| 20 20 2f 2a 20 45 4e 44 | 20 43 52 49 54 49 43 41 | /* END| CRITICA|
|00004040| 4c 20 2a 2f 0a 20 20 20 | 20 73 70 6c 78 28 6f 6c |L */. | splx(ol|
|00004050| 64 5f 70 72 69 29 3b 0a | 0a 20 20 20 20 72 65 74 |d_pri);.|. ret|
|00004060| 75 72 6e 3b 0a 7d 0a 0a | 0a 0a 2f 2a 0a 20 2a 20 |urn;.}..|../*. * |
|00004070| 6d 75 6c 74 69 70 6c 65 | 78 65 73 20 6f 70 65 6e |multiple|xes open|
|00004080| 73 20 74 6f 20 64 73 70 | 5f 6f 70 65 6e 28 29 2c |s to dsp|_open(),|
|00004090| 20 66 6d 5f 6f 70 65 6e | 28 29 2c 20 61 6e 64 20 | fm_open|(), and |
|000040a0| 63 6d 73 5f 6f 70 65 6e | 28 29 0a 20 2a 20 64 65 |cms_open|(). * de|
|000040b0| 70 65 6e 64 69 6e 67 20 | 75 70 6f 6e 20 77 68 69 |pending |upon whi|
|000040c0| 63 68 20 6d 69 6e 6f 72 | 20 64 65 76 20 77 61 73 |ch minor| dev was|
|000040d0| 20 75 73 65 64 0a 20 2a | 2f 0a 69 6e 74 20 73 62 | used. *|/.int sb|
|000040e0| 6f 70 65 6e 28 64 65 76 | 2c 20 66 6c 61 67 29 0a |open(dev|, flag).|
|000040f0| 69 6e 74 20 64 65 76 3b | 0a 69 6e 74 20 66 6c 61 |int dev;|.int fla|
|00004100| 67 3b 0a 7b 0a 20 20 20 | 20 69 6e 74 20 6d 69 6e |g;.{. | int min|
|00004110| 6f 72 5f 6e 75 6d 3b 0a | 0a 23 69 66 64 65 66 20 |or_num;.|.#ifdef |
|00004120| 44 45 42 55 47 0a 20 20 | 20 20 63 6d 6e 5f 65 72 |DEBUG. | cmn_er|
|00004130| 72 28 43 45 5f 43 4f 4e | 54 2c 20 22 6f 70 65 6e |r(CE_CON|T, "open|
|00004140| 65 64 20 77 69 74 68 20 | 66 6c 61 67 20 25 64 5c |ed with |flag %d\|
|00004150| 6e 22 2c 20 66 6c 61 67 | 29 3b 0a 23 65 6e 64 69 |n", flag|);.#endi|
|00004160| 66 0a 0a 20 20 20 20 6d | 69 6e 6f 72 5f 6e 75 6d |f.. m|inor_num|
|00004170| 20 3d 20 6d 69 6e 6f 72 | 28 64 65 76 29 3b 0a 20 | = minor|(dev);. |
|00004180| 20 20 20 73 77 69 74 63 | 68 20 28 6d 69 6e 6f 72 | switc|h (minor|
|00004190| 5f 6e 75 6d 29 0a 20 20 | 20 20 7b 0a 20 20 20 20 |_num). | {. |
|000041a0| 20 20 20 20 63 61 73 65 | 20 53 42 5f 43 4d 53 5f | case| SB_CMS_|
|000041b0| 4e 55 4d 3a 0a 20 20 20 | 20 20 20 20 20 20 20 20 |NUM:. | |
|000041c0| 20 75 2e 75 5f 65 72 72 | 6f 72 20 3d 20 45 4e 58 | u.u_err|or = ENX|
|000041d0| 49 4f 3b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |IO;. | |
|000041e0| 62 72 65 61 6b 3b 0a 20 | 20 20 20 20 20 20 20 63 |break;. | c|
|000041f0| 61 73 65 20 53 42 5f 46 | 4d 5f 4e 55 4d 3a 0a 20 |ase SB_F|M_NUM:. |
|00004200| 20 20 20 20 20 20 20 20 | 20 20 20 66 6d 5f 6f 70 | | fm_op|
|00004210| 65 6e 28 66 6c 61 67 29 | 3b 0a 20 20 20 20 20 20 |en(flag)|;. |
|00004220| 20 20 20 20 20 20 62 72 | 65 61 6b 3b 0a 20 20 20 | br|eak;. |
|00004230| 20 20 20 20 20 63 61 73 | 65 20 53 42 5f 44 53 50 | cas|e SB_DSP|
|00004240| 5f 4e 55 4d 3a 0a 20 20 | 20 20 20 20 20 20 20 20 |_NUM:. | |
|00004250| 20 20 64 73 70 5f 6f 70 | 65 6e 28 66 6c 61 67 29 | dsp_op|en(flag)|
|00004260| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 62 72 |;. | br|
|00004270| 65 61 6b 3b 0a 20 20 20 | 20 20 20 20 20 64 65 66 |eak;. | def|
|00004280| 61 75 6c 74 3a 0a 20 20 | 20 20 20 20 20 20 20 20 |ault:. | |
|00004290| 20 20 75 2e 75 5f 65 72 | 72 6f 72 20 3d 20 45 4e | u.u_er|ror = EN|
|000042a0| 58 49 4f 3b 0a 20 20 20 | 20 7d 0a 0a 20 20 20 20 |XIO;. | }.. |
|000042b0| 72 65 74 75 72 6e 28 30 | 29 3b 0a 7d 0a 0a 0a 2f |return(0|);.}.../|
|000042c0| 2a 0a 20 2a 20 52 65 6c | 65 61 73 65 20 61 6e 64 |*. * Rel|ease and|
|000042d0| 20 72 65 73 65 74 20 74 | 68 65 20 64 73 70 20 63 | reset t|he dsp c|
|000042e0| 68 69 70 0a 20 2a 2f 0a | 76 6f 69 64 20 64 73 70 |hip. */.|void dsp|
|000042f0| 5f 63 6c 6f 73 65 28 29 | 0a 7b 0a 20 20 20 20 69 |_close()|.{. i|
|00004300| 6e 74 20 6f 6c 64 5f 70 | 72 69 3b 0a 0a 20 20 20 |nt old_p|ri;.. |
|00004310| 20 6f 6c 64 5f 70 72 69 | 20 3d 20 73 70 6c 36 28 | old_pri| = spl6(|
|00004320| 29 3b 0a 20 20 20 20 73 | 62 5f 73 74 61 74 75 73 |);. s|b_status|
|00004330| 2e 64 73 70 5f 6f 70 65 | 6e 20 3d 20 4e 4f 54 5f |.dsp_ope|n = NOT_|
|00004340| 4f 50 45 4e 3b 0a 20 20 | 20 20 64 73 70 5f 72 65 |OPEN;. | dsp_re|
|00004350| 73 65 74 28 29 3b 0a 20 | 20 20 20 64 73 70 5f 76 |set();. | dsp_v|
|00004360| 6f 69 63 65 28 46 41 4c | 53 45 29 3b 0a 20 20 20 |oice(FAL|SE);. |
|00004370| 20 64 6d 61 5f 72 65 6c | 73 65 28 53 42 5f 44 4d | dma_rel|se(SB_DM|
|00004380| 41 5f 43 48 41 4e 29 3b | 0a 20 20 20 20 73 70 6c |A_CHAN);|. spl|
|00004390| 78 28 6f 6c 64 5f 70 72 | 69 29 3b 0a 0a 20 20 20 |x(old_pr|i);.. |
|000043a0| 20 72 65 74 75 72 6e 3b | 0a 7d 0a 0a 0a 2f 2a 0a | return;|.}.../*.|
|000043b0| 20 2a 20 52 65 6c 65 61 | 73 65 20 61 6e 64 20 72 | * Relea|se and r|
|000043c0| 65 73 65 74 20 74 68 65 | 20 66 6d 20 63 68 69 70 |eset the| fm chip|
|000043d0| 0a 20 2a 2f 0a 76 6f 69 | 64 20 66 6d 5f 63 6c 6f |. */.voi|d fm_clo|
|000043e0| 73 65 28 29 0a 7b 0a 20 | 20 20 20 69 6e 74 20 6f |se().{. | int o|
|000043f0| 6c 64 5f 70 72 69 3b 0a | 0a 20 20 20 20 6f 6c 64 |ld_pri;.|. old|
|00004400| 5f 70 72 69 20 3d 20 73 | 70 6c 36 28 29 3b 0a 20 |_pri = s|pl6();. |
|00004410| 20 20 20 73 62 5f 73 74 | 61 74 75 73 2e 66 6d 5f | sb_st|atus.fm_|
|00004420| 6f 70 65 6e 20 3d 20 4e | 4f 54 5f 4f 50 45 4e 3b |open = N|OT_OPEN;|
|00004430| 0a 20 20 20 20 66 6d 5f | 72 65 73 65 74 28 29 3b |. fm_|reset();|
|00004440| 0a 20 20 20 20 73 70 6c | 78 28 6f 6c 64 5f 70 72 |. spl|x(old_pr|
|00004450| 69 29 3b 0a 0a 20 20 20 | 20 72 65 74 75 72 6e 3b |i);.. | return;|
|00004460| 0a 7d 0a 0a 0a 2f 2a 0a | 20 2a 20 4d 75 6c 74 69 |.}.../*.| * Multi|
|00004470| 70 6c 65 78 65 73 20 62 | 65 74 77 65 65 6e 20 74 |plexes b|etween t|
|00004480| 68 65 20 63 6c 6f 73 65 | 73 20 66 6f 72 20 64 73 |he close|s for ds|
|00004490| 70 2c 20 66 6d 2c 20 61 | 6e 64 20 63 6d 73 20 63 |p, fm, a|nd cms c|
|000044a0| 68 69 70 73 0a 20 2a 2f | 0a 69 6e 74 20 73 62 63 |hips. */|.int sbc|
|000044b0| 6c 6f 73 65 28 64 65 76 | 29 0a 69 6e 74 20 64 65 |lose(dev|).int de|
|000044c0| 76 3b 0a 7b 0a 20 20 20 | 20 69 6e 74 20 6d 69 6e |v;.{. | int min|
|000044d0| 6f 72 5f 6e 75 6d 3b 0a | 0a 20 20 20 20 6d 69 6e |or_num;.|. min|
|000044e0| 6f 72 5f 6e 75 6d 20 3d | 20 6d 69 6e 6f 72 28 64 |or_num =| minor(d|
|000044f0| 65 76 29 3b 0a 20 20 20 | 20 73 77 69 74 63 68 20 |ev);. | switch |
|00004500| 28 6d 69 6e 6f 72 5f 6e | 75 6d 29 0a 20 20 20 20 |(minor_n|um). |
|00004510| 7b 0a 20 20 20 20 20 20 | 20 20 63 61 73 65 20 53 |{. | case S|
|00004520| 42 5f 43 4d 53 5f 4e 55 | 4d 3a 0a 20 20 20 20 20 |B_CMS_NU|M:. |
|00004530| 20 20 20 20 20 20 20 62 | 72 65 61 6b 3b 0a 20 20 | b|reak;. |
|00004540| 20 20 20 20 20 20 63 61 | 73 65 20 53 42 5f 46 4d | ca|se SB_FM|
|00004550| 5f 4e 55 4d 3a 0a 20 20 | 20 20 20 20 20 20 20 20 |_NUM:. | |
|00004560| 20 20 66 6d 5f 63 6c 6f | 73 65 28 29 3b 0a 20 20 | fm_clo|se();. |
|00004570| 20 20 20 20 20 20 20 20 | 20 20 62 72 65 61 6b 3b | | break;|
|00004580| 0a 20 20 20 20 20 20 20 | 20 63 61 73 65 20 53 42 |. | case SB|
|00004590| 5f 44 53 50 5f 4e 55 4d | 3a 0a 20 20 20 20 20 20 |_DSP_NUM|:. |
|000045a0| 20 20 20 20 20 20 64 73 | 70 5f 63 6c 6f 73 65 28 | ds|p_close(|
|000045b0| 29 3b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 62 |);. | b|
|000045c0| 72 65 61 6b 3b 0a 20 20 | 20 20 20 20 20 20 64 65 |reak;. | de|
|000045d0| 66 61 75 6c 74 3a 0a 20 | 20 20 20 20 20 20 20 20 |fault:. | |
|000045e0| 20 20 20 75 2e 75 5f 65 | 72 72 6f 72 20 3d 20 45 | u.u_e|rror = E|
|000045f0| 4e 58 49 4f 3b 0a 20 20 | 20 20 7d 0a 0a 20 20 20 |NXIO;. | }.. |
|00004600| 20 72 65 74 75 72 6e 28 | 30 29 3b 0a 7d 0a 0a 0a | return(|0);.}...|
|00004610| 2f 2a 0a 20 2a 20 73 74 | 61 72 74 20 44 4d 41 20 |/*. * st|art DMA |
|00004620| 72 6f 6c 6c 69 6e 67 20 | 66 6f 72 20 44 53 50 0a |rolling |for DSP.|
|00004630| 20 2a 20 6f 6e 6c 79 20 | 75 73 65 64 20 62 79 20 | * only |used by |
|00004640| 44 53 50 20 63 68 69 70 | 73 2c 20 73 6f 20 6e 6f |DSP chip|s, so no|
|00004650| 20 6e 65 65 64 20 66 6f | 72 20 6d 75 6c 74 69 70 | need fo|r multip|
|00004660| 6c 65 78 69 6e 67 20 6f | 6e 20 6d 69 6e 6f 72 20 |lexing o|n minor |
|00004670| 6e 75 6d 0a 20 2a 2f 0a | 69 6e 74 20 73 62 5f 69 |num. */.|int sb_i|
|00004680| 6f 73 74 61 72 74 28 29 | 0a 7b 0a 20 20 20 20 69 |ostart()|.{. i|
|00004690| 6e 74 20 6f 6c 64 5f 70 | 72 69 3b 0a 20 20 20 20 |nt old_p|ri;. |
|000046a0| 70 61 64 64 72 5f 74 20 | 70 68 79 73 5f 61 64 64 |paddr_t |phys_add|
|000046b0| 72 65 73 73 3b 0a 20 20 | 20 20 75 6e 73 69 67 6e |ress;. | unsign|
|000046c0| 65 64 20 63 68 61 72 20 | 74 6d 70 5f 62 79 74 65 |ed char |tmp_byte|
|000046d0| 3b 0a 20 20 20 20 75 6e | 73 69 67 6e 65 64 20 69 |;. un|signed i|
|000046e0| 6e 74 20 6c 65 6e 67 74 | 68 3b 0a 0a 20 20 20 20 |nt lengt|h;.. |
|000046f0| 2f 2a 20 62 65 67 69 6e | 20 63 72 69 74 69 63 61 |/* begin| critica|
|00004700| 6c 20 2a 2f 0a 20 20 20 | 20 6f 6c 64 5f 70 72 69 |l */. | old_pri|
|00004710| 20 3d 20 73 70 6c 36 28 | 29 3b 0a 0a 20 20 20 20 | = spl6(|);.. |
|00004720| 2f 2a 20 63 68 65 63 6b | 20 66 6f 72 20 69 6e 76 |/* check| for inv|
|00004730| 61 6c 69 64 20 6c 65 6e | 67 74 68 20 6f 66 20 62 |alid len|gth of b|
|00004740| 75 66 20 2a 2f 0a 20 20 | 20 20 69 66 20 28 28 73 |uf */. | if ((s|
|00004750| 62 74 61 62 5b 30 5d 2e | 62 5f 61 63 74 66 2d 3e |btab[0].|b_actf->|
|00004760| 62 5f 62 63 6f 75 6e 74 | 20 3c 20 31 29 20 7c 7c |b_bcount| < 1) |||
|00004770| 20 28 73 62 74 61 62 5b | 30 5d 2e 62 5f 61 63 74 | (sbtab[|0].b_act|
|00004780| 66 2d 3e 62 5f 62 63 6f | 75 6e 74 20 3e 20 30 78 |f->b_bco|unt > 0x|
|00004790| 46 46 46 46 29 29 0a 20 | 20 20 20 7b 0a 20 20 20 |FFFF)). | {. |
|000047a0| 20 20 20 20 20 63 6d 6e | 5f 65 72 72 28 43 45 5f | cmn|_err(CE_|
|000047b0| 57 41 52 4e 2c 20 22 73 | 62 5f 69 6f 73 74 61 72 |WARN, "s|b_iostar|
|000047c0| 74 28 29 3a 20 69 6e 76 | 61 6c 69 64 20 6c 65 6e |t(): inv|alid len|
|000047d0| 67 74 68 20 6f 66 20 62 | 75 66 2c 20 25 64 5c 6e |gth of b|uf, %d\n|
|000047e0| 22 2c 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 73 |",. | s|
|000047f0| 62 74 61 62 5b 30 5d 2e | 62 5f 61 63 74 66 2d 3e |btab[0].|b_actf->|
|00004800| 62 5f 62 63 6f 75 6e 74 | 29 3b 0a 0a 20 20 20 20 |b_bcount|);.. |
|00004810| 20 20 20 20 2f 2a 20 61 | 72 74 69 66 69 63 69 61 | /* a|rtificia|
|00004820| 6c 6c 79 20 74 65 72 6d | 69 6e 61 74 65 20 2a 2f |lly term|inate */|
|00004830| 0a 20 20 20 20 20 20 20 | 20 73 62 74 61 62 5b 30 |. | sbtab[0|
|00004840| 5d 2e 62 5f 61 63 74 66 | 2d 3e 62 5f 72 65 73 69 |].b_actf|->b_resi|
|00004850| 64 20 3d 20 30 3b 0a 20 | 20 20 20 20 20 20 20 73 |d = 0;. | s|
|00004860| 62 74 61 62 5b 30 5d 2e | 62 5f 61 63 74 66 20 3d |btab[0].|b_actf =|
|00004870| 20 73 62 74 61 62 5b 30 | 5d 2e 62 5f 61 63 74 66 | sbtab[0|].b_actf|
|00004880| 2d 3e 61 76 5f 66 6f 72 | 77 3b 0a 20 20 20 20 20 |->av_for|w;. |
|00004890| 20 20 20 69 6f 64 6f 6e | 65 28 73 62 74 61 62 5b | iodon|e(sbtab[|
|000048a0| 30 5d 2e 62 5f 61 63 74 | 66 29 3b 0a 20 20 20 20 |0].b_act|f);. |
|000048b0| 20 20 20 20 73 70 6c 78 | 28 6f 6c 64 5f 70 72 69 | splx|(old_pri|
|000048c0| 29 3b 0a 20 20 20 20 20 | 20 20 20 72 65 74 75 72 |);. | retur|
|000048d0| 6e 28 30 29 3b 0a 20 20 | 20 20 7d 0a 0a 20 20 20 |n(0);. | }.. |
|000048e0| 20 2f 2a 20 6d 61 72 6b | 20 64 65 76 69 63 65 20 | /* mark| device |
|000048f0| 69 6e 20 73 62 74 61 62 | 20 61 73 20 61 63 74 69 |in sbtab| as acti|
|00004900| 76 65 20 2a 2f 0a 20 20 | 20 20 73 62 74 61 62 5b |ve */. | sbtab[|
|00004910| 30 5d 2e 62 5f 61 63 74 | 69 76 65 20 3d 20 54 52 |0].b_act|ive = TR|
|00004920| 55 45 3b 0a 0a 20 20 20 | 20 2f 2a 20 70 72 65 70 |UE;.. | /* prep|
|00004930| 20 44 4d 41 20 63 68 61 | 6e 6e 65 6c 20 2a 2f 0a | DMA cha|nnel */.|
|00004940| 20 20 20 20 70 68 79 73 | 5f 61 64 64 72 65 73 73 | phys|_address|
|00004950| 20 3d 20 76 74 6f 70 28 | 70 61 64 64 72 28 73 62 | = vtop(|paddr(sb|
|00004960| 74 61 62 5b 30 5d 2e 62 | 5f 61 63 74 66 29 2c 20 |tab[0].b|_actf), |
|00004970| 73 62 74 61 62 5b 30 5d | 2e 62 5f 61 63 74 66 2d |sbtab[0]|.b_actf-|
|00004980| 3e 62 5f 70 72 6f 63 29 | 3b 0a 20 20 20 20 69 66 |>b_proc)|;. if|
|00004990| 20 28 73 62 74 61 62 5b | 30 5d 2e 62 5f 61 63 74 | (sbtab[|0].b_act|
|000049a0| 66 2d 3e 62 5f 66 6c 61 | 67 73 20 26 20 42 5f 52 |f->b_fla|gs & B_R|
|000049b0| 45 41 44 29 0a 20 20 20 | 20 20 20 20 20 64 6d 61 |EAD). | dma|
|000049c0| 5f 70 61 72 61 6d 28 53 | 42 5f 44 4d 41 5f 43 48 |_param(S|B_DMA_CH|
|000049d0| 41 4e 2c 20 44 4d 41 5f | 52 64 6d 6f 64 65 2c 20 |AN, DMA_|Rdmode, |
|000049e0| 70 68 79 73 5f 61 64 64 | 72 65 73 73 2c 0a 20 20 |phys_add|ress,. |
|000049f0| 20 20 20 20 20 20 20 20 | 20 20 73 62 74 61 62 5b | | sbtab[|
|00004a00| 30 5d 2e 62 5f 61 63 74 | 66 2d 3e 62 5f 62 63 6f |0].b_act|f->b_bco|
|00004a10| 75 6e 74 29 3b 0a 20 20 | 20 20 65 6c 73 65 0a 20 |unt);. | else. |
|00004a20| 20 20 20 20 20 20 20 64 | 6d 61 5f 70 61 72 61 6d | d|ma_param|
|00004a30| 28 53 42 5f 44 4d 41 5f | 43 48 41 4e 2c 20 44 4d |(SB_DMA_|CHAN, DM|
|00004a40| 41 5f 57 72 6d 6f 64 65 | 2c 20 70 68 79 73 5f 61 |A_Wrmode|, phys_a|
|00004a50| 64 64 72 65 73 73 2c 0a | 20 20 20 20 20 20 20 20 |ddress,.| |
|00004a60| 20 20 20 20 73 62 74 61 | 62 5b 30 5d 2e 62 5f 61 | sbta|b[0].b_a|
|00004a70| 63 74 66 2d 3e 62 5f 62 | 63 6f 75 6e 74 29 3b 0a |ctf->b_b|count);.|
|00004a80| 20 20 20 20 64 6d 61 5f | 65 6e 61 62 6c 65 28 53 | dma_|enable(S|
|00004a90| 42 5f 44 4d 41 5f 43 48 | 41 4e 29 3b 0a 0a 20 20 |B_DMA_CH|AN);.. |
|00004aa0| 20 20 2f 2a 20 70 72 65 | 70 20 53 6f 75 6e 64 42 | /* pre|p SoundB|
|00004ab0| 6c 61 73 74 65 72 20 66 | 6f 72 20 38 2d 62 69 74 |laster f|or 8-bit|
|00004ac0| 20 44 4d 41 20 2a 2f 0a | 20 20 20 20 64 6f 20 7b | DMA */.| do {|
|00004ad0| 0a 20 20 20 20 20 20 20 | 20 74 6d 70 5f 62 79 74 |. | tmp_byt|
|00004ae0| 65 20 3d 20 69 6e 62 28 | 44 53 50 5f 53 54 41 54 |e = inb(|DSP_STAT|
|00004af0| 55 53 29 3b 0a 20 20 20 | 20 7d 20 77 68 69 6c 65 |US);. | } while|
|00004b00| 20 28 74 6d 70 5f 62 79 | 74 65 20 26 20 28 31 3c | (tmp_by|te & (1<|
|00004b10| 3c 37 29 29 3b 0a 20 20 | 20 20 69 66 20 28 73 62 |<7));. | if (sb|
|00004b20| 74 61 62 5b 30 5d 2e 62 | 5f 61 63 74 66 2d 3e 62 |tab[0].b|_actf->b|
|00004b30| 5f 66 6c 61 67 73 20 26 | 20 42 5f 52 45 41 44 29 |_flags &| B_READ)|
|00004b40| 0a 20 20 20 20 20 20 20 | 20 6f 75 74 62 28 44 53 |. | outb(DS|
|00004b50| 50 5f 43 4f 4d 4d 41 4e | 44 2c 20 30 78 32 34 29 |P_COMMAN|D, 0x24)|
|00004b60| 3b 0a 20 20 20 20 65 6c | 73 65 0a 20 20 20 20 20 |;. el|se. |
|00004b70| 20 20 20 6f 75 74 62 28 | 44 53 50 5f 43 4f 4d 4d | outb(|DSP_COMM|
|00004b80| 41 4e 44 2c 20 30 78 31 | 34 29 3b 0a 0a 20 20 20 |AND, 0x1|4);.. |
|00004b90| 20 2f 2a 20 70 72 65 70 | 20 53 6f 75 6e 64 42 6c | /* prep| SoundBl|
|00004ba0| 61 73 74 65 72 20 66 6f | 72 20 6c 65 6e 67 74 68 |aster fo|r length|
|00004bb0| 20 2a 2f 0a 20 20 20 20 | 6c 65 6e 67 74 68 20 3d | */. |length =|
|00004bc0| 20 73 62 74 61 62 5b 30 | 5d 2e 62 5f 61 63 74 66 | sbtab[0|].b_actf|
|00004bd0| 2d 3e 62 5f 62 63 6f 75 | 6e 74 2d 31 3b 0a 20 20 |->b_bcou|nt-1;. |
|00004be0| 20 20 64 6f 20 7b 0a 20 | 20 20 20 20 20 20 20 74 | do {. | t|
|00004bf0| 6d 70 5f 62 79 74 65 20 | 3d 20 69 6e 62 28 44 53 |mp_byte |= inb(DS|
|00004c00| 50 5f 53 54 41 54 55 53 | 29 3b 0a 20 20 20 20 7d |P_STATUS|);. }|
|00004c10| 20 77 68 69 6c 65 20 28 | 74 6d 70 5f 62 79 74 65 | while (|tmp_byte|
|00004c20| 20 26 20 28 31 3c 3c 37 | 29 29 3b 0a 20 20 20 20 | & (1<<7|));. |
|00004c30| 74 6d 70 5f 62 79 74 65 | 20 3d 20 6c 65 6e 67 74 |tmp_byte| = lengt|
|00004c40| 68 20 26 20 30 78 46 46 | 3b 0a 20 20 20 20 6f 75 |h & 0xFF|;. ou|
|00004c50| 74 62 28 44 53 50 5f 43 | 4f 4d 4d 41 4e 44 2c 20 |tb(DSP_C|OMMAND, |
|00004c60| 74 6d 70 5f 62 79 74 65 | 29 3b 0a 20 20 20 20 64 |tmp_byte|);. d|
|00004c70| 6f 20 7b 0a 20 20 20 20 | 20 20 20 20 74 6d 70 5f |o {. | tmp_|
|00004c80| 62 79 74 65 20 3d 20 69 | 6e 62 28 44 53 50 5f 53 |byte = i|nb(DSP_S|
|00004c90| 54 41 54 55 53 29 3b 0a | 20 20 20 20 7d 20 77 68 |TATUS);.| } wh|
|00004ca0| 69 6c 65 20 28 74 6d 70 | 5f 62 79 74 65 20 26 20 |ile (tmp|_byte & |
|00004cb0| 28 31 3c 3c 37 29 29 3b | 0a 20 20 20 20 74 6d 70 |(1<<7));|. tmp|
|00004cc0| 5f 62 79 74 65 20 3d 20 | 28 6c 65 6e 67 74 68 20 |_byte = |(length |
|00004cd0| 26 20 30 78 46 46 30 30 | 29 20 3e 3e 20 38 3b 0a |& 0xFF00|) >> 8;.|
|00004ce0| 20 20 20 20 6f 75 74 62 | 28 44 53 50 5f 43 4f 4d | outb|(DSP_COM|
|00004cf0| 4d 41 4e 44 2c 20 74 6d | 70 5f 62 79 74 65 29 3b |MAND, tm|p_byte);|
|00004d00| 0a 0a 20 20 20 20 2f 2a | 20 65 6e 64 20 63 72 69 |.. /*| end cri|
|00004d10| 74 69 63 61 6c 20 2a 2f | 0a 20 20 20 20 73 70 6c |tical */|. spl|
|00004d20| 78 28 6f 6c 64 5f 70 72 | 69 29 3b 0a 0a 20 20 20 |x(old_pr|i);.. |
|00004d30| 20 72 65 74 75 72 6e 28 | 30 29 3b 0a 7d 0a 0a 0a | return(|0);.}...|
|00004d40| 2f 2a 0a 20 2a 20 77 72 | 69 74 65 20 73 6f 75 6e |/*. * wr|ite soun|
|00004d50| 64 20 73 61 6d 70 6c 65 | 73 20 74 6f 20 64 73 70 |d sample|s to dsp|
|00004d60| 0a 20 2a 2f 0a 69 6e 74 | 20 73 62 5f 73 74 72 61 |. */.int| sb_stra|
|00004d70| 74 65 67 79 28 62 75 66 | 68 65 61 64 29 0a 72 65 |tegy(buf|head).re|
|00004d80| 67 69 73 74 65 72 20 73 | 74 72 75 63 74 20 62 75 |gister s|truct bu|
|00004d90| 66 20 2a 62 75 66 68 65 | 61 64 3b 0a 7b 0a 20 20 |f *bufhe|ad;.{. |
|00004da0| 20 20 69 6e 74 20 6f 6c | 64 5f 70 72 69 3b 0a 0a | int ol|d_pri;..|
|00004db0| 20 20 20 20 2f 2a 20 73 | 74 61 72 74 20 63 72 69 | /* s|tart cri|
|00004dc0| 74 69 63 61 6c 20 73 65 | 63 74 69 6f 6e 20 2a 2f |tical se|ction */|
|00004dd0| 0a 20 20 20 20 6f 6c 64 | 5f 70 72 69 20 3d 20 73 |. old|_pri = s|
|00004de0| 70 6c 36 28 29 3b 0a 0a | 20 20 20 20 2f 2a 20 70 |pl6();..| /* p|
|00004df0| 72 65 70 20 62 75 66 66 | 65 72 20 66 6f 72 20 61 |rep buff|er for a|
|00004e00| 64 64 69 74 69 6f 6e 20 | 74 6f 20 71 75 65 75 65 |ddition |to queue|
|00004e10| 20 2a 2f 0a 20 20 20 20 | 62 75 66 68 65 61 64 2d | */. |bufhead-|
|00004e20| 3e 62 5f 73 74 61 72 74 | 20 3d 20 6c 62 6f 6c 74 |>b_start| = lbolt|
|00004e30| 3b 0a 20 20 20 20 62 75 | 66 68 65 61 64 2d 3e 61 |;. bu|fhead->a|
|00004e40| 76 5f 66 6f 72 77 20 3d | 20 4e 55 4c 4c 3b 0a 0a |v_forw =| NULL;..|
|00004e50| 20 20 20 20 2f 2a 20 61 | 64 64 20 62 75 66 66 65 | /* a|dd buffe|
|00004e60| 72 20 74 6f 20 71 75 65 | 75 65 20 2a 2f 0a 20 20 |r to que|ue */. |
|00004e70| 20 20 69 66 20 28 73 62 | 74 61 62 5b 30 5d 2e 62 | if (sb|tab[0].b|
|00004e80| 5f 61 63 74 66 20 3d 3d | 20 4e 55 4c 4c 29 0a 20 |_actf ==| NULL). |
|00004e90| 20 20 20 7b 0a 20 20 20 | 20 20 20 20 20 2f 2a 20 | {. | /* |
|00004ea0| 61 64 64 20 74 6f 20 65 | 6d 70 74 79 20 71 75 65 |add to e|mpty que|
|00004eb0| 75 65 20 2a 2f 0a 20 20 | 20 20 20 20 20 20 73 62 |ue */. | sb|
|00004ec0| 74 61 62 5b 30 5d 2e 62 | 5f 61 63 74 66 20 3d 20 |tab[0].b|_actf = |
|00004ed0| 62 75 66 68 65 61 64 3b | 0a 20 20 20 20 20 20 20 |bufhead;|. |
|00004ee0| 20 73 62 74 61 62 5b 30 | 5d 2e 62 5f 61 63 74 6c | sbtab[0|].b_actl|
|00004ef0| 20 3d 20 62 75 66 68 65 | 61 64 3b 0a 0a 20 20 20 | = bufhe|ad;.. |
|00004f00| 20 20 20 20 20 2f 2a 20 | 73 74 61 72 74 20 69 6f | /* |start io|
|00004f10| 20 2a 2f 0a 20 20 20 20 | 20 20 20 20 73 62 5f 69 | */. | sb_i|
|00004f20| 6f 73 74 61 72 74 28 29 | 3b 0a 20 20 20 20 7d 0a |ostart()|;. }.|
|00004f30| 20 20 20 20 65 6c 73 65 | 0a 20 20 20 20 7b 0a 20 | else|. {. |
|00004f40| 20 20 20 20 20 20 20 2f | 2a 20 61 64 64 20 74 6f | /|* add to|
|00004f50| 20 61 6c 72 65 61 64 79 | 20 73 74 61 72 74 65 64 | already| started|
|00004f60| 20 71 75 65 75 65 20 2a | 2f 0a 20 20 20 20 20 20 | queue *|/. |
|00004f70| 20 20 73 62 74 61 62 5b | 30 5d 2e 62 5f 61 63 74 | sbtab[|0].b_act|
|00004f80| 6c 2d 3e 61 76 5f 66 6f | 72 77 20 3d 20 62 75 66 |l->av_fo|rw = buf|
|00004f90| 68 65 61 64 3b 0a 20 20 | 20 20 20 20 20 20 73 62 |head;. | sb|
|00004fa0| 74 61 62 5b 30 5d 2e 62 | 5f 61 63 74 6c 20 3d 20 |tab[0].b|_actl = |
|00004fb0| 62 75 66 68 65 61 64 3b | 0a 20 20 20 20 7d 0a 0a |bufhead;|. }..|
|00004fc0| 20 20 20 20 2f 2a 20 65 | 6e 64 20 63 72 69 74 69 | /* e|nd criti|
|00004fd0| 63 61 6c 20 73 65 63 74 | 69 6f 6e 20 2a 2f 0a 20 |cal sect|ion */. |
|00004fe0| 20 20 20 73 70 6c 78 28 | 6f 6c 64 5f 70 72 69 29 | splx(|old_pri)|
|00004ff0| 3b 0a 0a 20 20 20 20 72 | 65 74 75 72 6e 28 30 29 |;.. r|eturn(0)|
|00005000| 3b 0a 7d 0a 0a 0a 2f 2a | 0a 20 2a 20 62 72 65 61 |;.}.../*|. * brea|
|00005010| 6b 73 20 75 70 20 69 6f | 20 72 65 71 75 65 73 74 |ks up io| request|
|00005020| 73 20 73 6f 20 74 68 61 | 74 20 44 4d 41 20 63 61 |s so tha|t DMA ca|
|00005030| 6e 20 62 65 20 64 6f 6e | 65 0a 20 2a 2f 0a 73 74 |n be don|e. */.st|
|00005040| 61 74 69 63 20 69 6e 74 | 20 73 62 5f 62 72 65 61 |atic int| sb_brea|
|00005050| 6b 75 70 28 62 70 29 0a | 72 65 67 69 73 74 65 72 |kup(bp).|register|
|00005060| 20 73 74 72 75 63 74 20 | 62 75 66 20 2a 62 70 3b | struct |buf *bp;|
|00005070| 0a 7b 0a 20 20 20 20 64 | 6d 61 5f 62 72 65 61 6b |.{. d|ma_break|
|00005080| 75 70 28 73 62 5f 73 74 | 72 61 74 65 67 79 2c 20 |up(sb_st|rategy, |
|00005090| 62 70 29 3b 0a 20 20 20 | 20 72 65 74 75 72 6e 28 |bp);. | return(|
|000050a0| 30 29 3b 0a 7d 0a 0a 0a | 2f 2a 0a 20 2a 20 53 74 |0);.}...|/*. * St|
|000050b0| 61 72 74 73 20 74 68 65 | 20 44 4d 41 20 77 72 69 |arts the| DMA wri|
|000050c0| 74 65 20 74 6f 20 74 68 | 65 20 20 53 6f 75 6e 64 |te to th|e Sound|
|000050d0| 62 6c 61 73 74 65 72 0a | 20 2a 2f 0a 69 6e 74 20 |blaster.| */.int |
|000050e0| 64 73 70 5f 77 72 69 74 | 65 28 64 65 76 29 0a 69 |dsp_writ|e(dev).i|
|000050f0| 6e 74 20 64 65 76 3b 0a | 7b 0a 20 20 20 20 70 68 |nt dev;.|{. ph|
|00005100| 79 73 69 6f 28 73 62 5f | 62 72 65 61 6b 75 70 2c |ysio(sb_|breakup,|
|00005110| 20 30 2c 20 64 65 76 2c | 20 42 5f 57 52 49 54 45 | 0, dev,| B_WRITE|
|00005120| 29 3b 0a 20 20 20 20 72 | 65 74 75 72 6e 28 30 29 |);. r|eturn(0)|
|00005130| 3b 0a 7d 0a 0a 0a 2f 2a | 0a 20 2a 20 6d 75 6c 74 |;.}.../*|. * mult|
|00005140| 69 70 6c 65 78 65 73 20 | 77 72 69 74 65 73 20 74 |iplexes |writes t|
|00005150| 6f 20 64 73 70 2c 20 63 | 6d 2f 73 20 61 6e 64 20 |o dsp, c|m/s and |
|00005160| 66 6d 20 63 68 69 70 73 | 0a 20 2a 2f 0a 69 6e 74 |fm chips|. */.int|
|00005170| 20 73 62 77 72 69 74 65 | 28 64 65 76 29 0a 69 6e | sbwrite|(dev).in|
|00005180| 74 20 64 65 76 3b 0a 7b | 0a 20 20 20 20 69 6e 74 |t dev;.{|. int|
|00005190| 20 6d 69 6e 6f 72 5f 6e | 75 6d 3b 0a 0a 20 20 20 | minor_n|um;.. |
|000051a0| 20 6d 69 6e 6f 72 5f 6e | 75 6d 20 3d 20 6d 69 6e | minor_n|um = min|
|000051b0| 6f 72 28 64 65 76 29 3b | 0a 20 20 20 20 73 77 69 |or(dev);|. swi|
|000051c0| 74 63 68 20 28 6d 69 6e | 6f 72 5f 6e 75 6d 29 0a |tch (min|or_num).|
|000051d0| 20 20 20 20 7b 0a 20 20 | 20 20 20 20 20 20 63 61 | {. | ca|
|000051e0| 73 65 20 53 42 5f 43 4d | 53 5f 4e 55 4d 3a 0a 20 |se SB_CM|S_NUM:. |
|000051f0| 20 20 20 20 20 20 20 20 | 20 20 20 63 6d 6e 5f 65 | | cmn_e|
|00005200| 72 72 28 43 45 5f 43 4f | 4e 54 2c 20 22 73 62 77 |rr(CE_CO|NT, "sbw|
|00005210| 72 69 74 65 28 29 3a 20 | 65 72 72 6f 72 2c 20 63 |rite(): |error, c|
|00005220| 6d 73 20 64 65 76 69 63 | 65 20 61 63 63 65 73 73 |ms devic|e access|
|00005230| 65 64 5c 6e 22 29 3b 0a | 20 20 20 20 20 20 20 20 |ed\n");.| |
|00005240| 20 20 20 20 75 2e 75 5f | 65 72 72 6f 72 20 3d 20 | u.u_|error = |
|00005250| 45 4e 58 49 4f 3b 0a 20 | 20 20 20 20 20 20 20 20 |ENXIO;. | |
|00005260| 20 20 20 62 72 65 61 6b | 3b 0a 20 20 20 20 20 20 | break|;. |
|00005270| 20 20 63 61 73 65 20 53 | 42 5f 46 4d 5f 4e 55 4d | case S|B_FM_NUM|
|00005280| 3a 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 75 2e |:. | u.|
|00005290| 75 5f 65 72 72 6f 72 20 | 3d 20 45 4e 58 49 4f 3b |u_error |= ENXIO;|
|000052a0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 62 72 65 |. | bre|
|000052b0| 61 6b 3b 0a 20 20 20 20 | 20 20 20 20 63 61 73 65 |ak;. | case|
|000052c0| 20 53 42 5f 44 53 50 5f | 4e 55 4d 3a 0a 20 20 20 | SB_DSP_|NUM:. |
|000052d0| 20 20 20 20 20 20 20 20 | 20 64 73 70 5f 77 72 69 | | dsp_wri|
|000052e0| 74 65 28 64 65 76 29 3b | 0a 20 20 20 20 20 20 20 |te(dev);|. |
|000052f0| 20 20 20 20 20 62 72 65 | 61 6b 3b 0a 20 20 20 20 | bre|ak;. |
|00005300| 20 20 20 20 64 65 66 61 | 75 6c 74 3a 0a 20 20 20 | defa|ult:. |
|00005310| 20 20 20 20 20 20 20 20 | 20 63 6d 6e 5f 65 72 72 | | cmn_err|
|00005320| 28 43 45 5f 43 4f 4e 54 | 2c 20 22 73 62 77 72 69 |(CE_CONT|, "sbwri|
|00005330| 74 65 28 29 3a 20 75 6e | 6b 6e 6f 77 6e 20 6d 69 |te(): un|known mi|
|00005340| 6e 6f 72 20 64 65 76 69 | 63 65 20 25 64 5c 6e 22 |nor devi|ce %d\n"|
|00005350| 2c 20 6d 69 6e 6f 72 5f | 6e 75 6d 29 3b 0a 20 20 |, minor_|num);. |
|00005360| 20 20 20 20 20 20 20 20 | 20 20 75 2e 75 5f 65 72 | | u.u_er|
|00005370| 72 6f 72 20 3d 20 45 4e | 58 49 4f 3b 0a 20 20 20 |ror = EN|XIO;. |
|00005380| 20 7d 0a 20 20 20 20 72 | 65 74 75 72 6e 28 30 29 | }. r|eturn(0)|
|00005390| 3b 0a 7d 0a 0a 0a 2f 2a | 0a 20 2a 20 53 74 61 72 |;.}.../*|. * Star|
|000053a0| 74 73 20 74 68 65 20 44 | 4d 41 20 72 65 61 64 20 |ts the D|MA read |
|000053b0| 66 72 6f 6d 20 74 68 65 | 20 53 6f 75 6e 64 62 6c |from the| Soundbl|
|000053c0| 61 73 74 65 72 0a 20 2a | 2f 0a 69 6e 74 20 64 73 |aster. *|/.int ds|
|000053d0| 70 5f 72 65 61 64 28 64 | 65 76 29 0a 69 6e 74 20 |p_read(d|ev).int |
|000053e0| 64 65 76 3b 0a 7b 0a 20 | 20 20 20 70 68 79 73 69 |dev;.{. | physi|
|000053f0| 6f 28 73 62 5f 62 72 65 | 61 6b 75 70 2c 20 30 2c |o(sb_bre|akup, 0,|
|00005400| 20 64 65 76 2c 20 42 5f | 52 45 41 44 29 3b 0a 20 | dev, B_|READ);. |
|00005410| 20 20 20 72 65 74 75 72 | 6e 28 30 29 3b 0a 7d 0a | retur|n(0);.}.|
|00005420| 0a 0a 2f 2a 0a 20 2a 20 | 6d 75 6c 74 69 70 6c 65 |../*. * |multiple|
|00005430| 78 65 73 20 72 65 61 64 | 2f 77 72 69 74 65 73 20 |xes read|/writes |
|00005440| 74 6f 20 64 69 66 66 65 | 72 65 6e 74 20 66 75 6e |to diffe|rent fun|
|00005450| 63 74 69 6f 6e 73 0a 20 | 2a 2f 0a 69 6e 74 20 73 |ctions. |*/.int s|
|00005460| 62 72 65 61 64 28 64 65 | 76 29 0a 69 6e 74 20 64 |bread(de|v).int d|
|00005470| 65 76 3b 0a 7b 0a 20 20 | 20 20 69 6e 74 20 6d 69 |ev;.{. | int mi|
|00005480| 6e 6f 72 5f 6e 75 6d 3b | 0a 0a 20 20 20 20 6d 69 |nor_num;|.. mi|
|00005490| 6e 6f 72 5f 6e 75 6d 20 | 3d 20 6d 69 6e 6f 72 28 |nor_num |= minor(|
|000054a0| 64 65 76 29 3b 0a 20 20 | 20 20 73 77 69 74 63 68 |dev);. | switch|
|000054b0| 20 28 6d 69 6e 6f 72 5f | 6e 75 6d 29 0a 20 20 20 | (minor_|num). |
|000054c0| 20 7b 0a 20 20 20 20 20 | 20 20 20 63 61 73 65 20 | {. | case |
|000054d0| 53 42 5f 43 4d 53 5f 4e | 55 4d 3a 0a 20 20 20 20 |SB_CMS_N|UM:. |
|000054e0| 20 20 20 20 20 20 20 20 | 63 6d 6e 5f 65 72 72 28 | |cmn_err(|
|000054f0| 43 45 5f 43 4f 4e 54 2c | 20 22 73 62 72 65 61 64 |CE_CONT,| "sbread|
|00005500| 28 29 3a 20 65 72 72 6f | 72 2c 20 63 6d 73 20 64 |(): erro|r, cms d|
|00005510| 65 76 69 63 65 20 61 63 | 63 65 73 73 65 64 5c 6e |evice ac|cessed\n|
|00005520| 22 29 3b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |");. | |
|00005530| 75 2e 75 5f 65 72 72 6f | 72 20 3d 20 45 4e 58 49 |u.u_erro|r = ENXI|
|00005540| 4f 3b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 62 |O;. | b|
|00005550| 72 65 61 6b 3b 0a 20 20 | 20 20 20 20 20 20 63 61 |reak;. | ca|
|00005560| 73 65 20 53 42 5f 46 4d | 5f 4e 55 4d 3a 0a 20 20 |se SB_FM|_NUM:. |
|00005570| 20 20 20 20 20 20 20 20 | 20 20 75 2e 75 5f 65 72 | | u.u_er|
|00005580| 72 6f 72 20 3d 20 45 4e | 58 49 4f 3b 0a 20 20 20 |ror = EN|XIO;. |
|00005590| 20 20 20 20 20 20 20 20 | 20 62 72 65 61 6b 3b 0a | | break;.|
|000055a0| 20 20 20 20 20 20 20 20 | 63 61 73 65 20 53 42 5f | |case SB_|
|000055b0| 44 53 50 5f 4e 55 4d 3a | 0a 20 20 20 20 20 20 20 |DSP_NUM:|. |
|000055c0| 20 20 20 20 20 64 73 70 | 5f 72 65 61 64 28 64 65 | dsp|_read(de|
|000055d0| 76 29 3b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |v);. | |
|000055e0| 62 72 65 61 6b 3b 0a 20 | 20 20 20 20 20 20 20 64 |break;. | d|
|000055f0| 65 66 61 75 6c 74 3a 0a | 20 20 20 20 20 20 20 20 |efault:.| |
|00005600| 20 20 20 20 63 6d 6e 5f | 65 72 72 28 43 45 5f 43 | cmn_|err(CE_C|
|00005610| 4f 4e 54 2c 20 22 73 62 | 72 65 61 64 28 29 3a 20 |ONT, "sb|read(): |
|00005620| 75 6e 6b 6e 6f 77 6e 20 | 6d 69 6e 6f 72 20 64 65 |unknown |minor de|
|00005630| 76 69 63 65 20 25 64 5c | 6e 22 2c 20 6d 69 6e 6f |vice %d\|n", mino|
|00005640| 72 5f 6e 75 6d 29 3b 0a | 20 20 20 20 20 20 20 20 |r_num);.| |
|00005650| 20 20 20 20 75 2e 75 5f | 65 72 72 6f 72 20 3d 20 | u.u_|error = |
|00005660| 45 4e 58 49 4f 3b 0a 20 | 20 20 20 7d 0a 20 20 20 |ENXIO;. | }. |
|00005670| 20 72 65 74 75 72 6e 28 | 30 29 3b 0a 7d 0a 0a 0a | return(|0);.}...|
|00005680| 2f 2a 0a 20 2a 20 6d 69 | 6e 6f 72 20 63 6f 6e 74 |/*. * mi|nor cont|
|00005690| 72 6f 6c 20 66 75 6e 63 | 74 69 6f 6e 20 66 6f 72 |rol func|tion for|
|000056a0| 20 74 68 65 20 64 73 70 | 0a 20 2a 2f 0a 76 6f 69 | the dsp|. */.voi|
|000056b0| 64 20 64 73 70 5f 69 6f | 63 74 6c 28 63 6d 64 2c |d dsp_io|ctl(cmd,|
|000056c0| 20 61 72 67 31 2c 20 61 | 72 67 32 29 0a 69 6e 74 | arg1, a|rg2).int|
|000056d0| 20 63 6d 64 3b 0a 63 61 | 64 64 72 5f 74 20 61 72 | cmd;.ca|ddr_t ar|
|000056e0| 67 31 2c 20 61 72 67 32 | 3b 0a 7b 0a 20 20 20 20 |g1, arg2|;.{. |
|000056f0| 73 77 69 74 63 68 28 63 | 6d 64 29 0a 20 20 20 20 |switch(c|md). |
|00005700| 7b 0a 20 20 20 20 20 20 | 20 20 63 61 73 65 20 44 |{. | case D|
|00005710| 53 50 5f 49 4f 43 54 4c | 5f 52 45 53 45 54 3a 0a |SP_IOCTL|_RESET:.|
|00005720| 20 20 20 20 20 20 20 20 | 20 20 20 20 64 73 70 5f | | dsp_|
|00005730| 72 65 73 65 74 28 29 3b | 0a 20 20 20 20 20 20 20 |reset();|. |
|00005740| 20 20 20 20 20 62 72 65 | 61 6b 3b 0a 20 20 20 20 | bre|ak;. |
|00005750| 20 20 20 20 63 61 73 65 | 20 44 53 50 5f 49 4f 43 | case| DSP_IOC|
|00005760| 54 4c 5f 53 50 45 45 44 | 3a 0a 20 20 20 20 20 20 |TL_SPEED|:. |
|00005770| 20 20 20 20 20 20 73 62 | 5f 73 74 61 74 75 73 2e | sb|_status.|
|00005780| 64 73 70 5f 73 70 65 65 | 64 20 3d 20 28 69 6e 74 |dsp_spee|d = (int|
|00005790| 29 61 72 67 31 3b 0a 20 | 20 20 20 20 20 20 20 20 |)arg1;. | |
|000057a0| 20 20 20 64 73 70 5f 73 | 70 65 65 64 28 29 3b 0a | dsp_s|peed();.|
|000057b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 62 72 65 61 | | brea|
|000057c0| 6b 3b 0a 20 20 20 20 20 | 20 20 20 63 61 73 65 20 |k;. | case |
|000057d0| 44 53 50 5f 49 4f 43 54 | 4c 5f 56 4f 49 43 45 3a |DSP_IOCT|L_VOICE:|
|000057e0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 64 73 70 |. | dsp|
|000057f0| 5f 76 6f 69 63 65 28 28 | 69 6e 74 29 61 72 67 31 |_voice((|int)arg1|
|00005800| 29 3b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 62 |);. | b|
|00005810| 72 65 61 6b 3b 0a 20 20 | 20 20 20 20 20 20 64 65 |reak;. | de|
|00005820| 66 61 75 6c 74 3a 0a 20 | 20 20 20 20 20 20 20 20 |fault:. | |
|00005830| 20 20 20 62 72 65 61 6b | 3b 0a 20 20 20 20 7d 0a | break|;. }.|
|00005840| 0a 20 20 20 20 72 65 74 | 75 72 6e 3b 0a 7d 0a 0a |. ret|urn;.}..|
|00005850| 0a 2f 2a 0a 20 2a 20 74 | 75 72 6e 73 20 61 20 6e |./*. * t|urns a n|
|00005860| 6f 74 65 2f 6b 65 79 20 | 6f 66 66 0a 20 2a 2f 0a |ote/key |off. */.|
|00005870| 76 6f 69 64 20 66 6d 5f | 6b 65 79 5f 6f 66 66 28 |void fm_|key_off(|
|00005880| 76 6f 69 63 65 5f 6e 75 | 6d 29 0a 69 6e 74 20 76 |voice_nu|m).int v|
|00005890| 6f 69 63 65 5f 6e 75 6d | 3b 0a 7b 0a 20 20 20 20 |oice_num|;.{. |
|000058a0| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 20 72 65 |unsigned| char re|
|000058b0| 67 5f 6e 75 6d 3b 0a 20 | 20 20 20 0a 20 20 20 20 |g_num;. | . |
|000058c0| 2f 2a 20 65 72 72 6f 72 | 20 63 68 65 63 6b 69 6e |/* error| checkin|
|000058d0| 67 20 74 6f 20 61 76 6f | 69 64 20 6d 75 6e 63 68 |g to avo|id munch|
|000058e0| 69 6e 67 20 6b 65 72 6e | 65 6c 20 2a 2f 0a 20 20 |ing kern|el */. |
|000058f0| 20 20 69 66 20 28 28 76 | 6f 69 63 65 5f 6e 75 6d | if ((v|oice_num|
|00005900| 20 3c 20 30 29 20 7c 7c | 20 28 76 6f 69 63 65 5f | < 0) ||| (voice_|
|00005910| 6e 75 6d 20 3e 3d 20 4d | 41 58 5f 46 4d 5f 4e 4f |num >= M|AX_FM_NO|
|00005920| 54 45 53 29 29 0a 20 20 | 20 20 7b 0a 20 20 20 20 |TES)). | {. |
|00005930| 20 20 20 20 75 2e 75 5f | 65 72 72 6f 72 20 3d 20 | u.u_|error = |
|00005940| 45 46 41 55 4c 54 3b 0a | 20 20 20 20 20 20 20 20 |EFAULT;.| |
|00005950| 72 65 74 75 72 6e 3b 0a | 20 20 20 20 7d 0a 20 20 |return;.| }. |
|00005960| 20 20 0a 20 20 20 20 2f | 2a 20 74 75 72 6e 20 76 | . /|* turn v|
|00005970| 6f 69 63 65 20 6f 66 66 | 20 2a 2f 0a 20 20 20 20 |oice off| */. |
|00005980| 72 65 67 5f 6e 75 6d 20 | 3d 20 28 75 6e 73 69 67 |reg_num |= (unsig|
|00005990| 6e 65 64 20 63 68 61 72 | 29 30 78 42 30 20 2b 20 |ned char|)0xB0 + |
|000059a0| 28 75 6e 73 69 67 6e 65 | 64 20 63 68 61 72 29 76 |(unsigne|d char)v|
|000059b0| 6f 69 63 65 5f 6e 75 6d | 3b 0a 23 69 66 64 65 66 |oice_num|;.#ifdef|
|000059c0| 20 44 45 42 55 47 0a 20 | 20 20 20 63 6d 6e 5f 65 | DEBUG. | cmn_e|
|000059d0| 72 72 28 43 45 5f 43 4f | 4e 54 2c 20 22 74 75 72 |rr(CE_CO|NT, "tur|
|000059e0| 6e 69 6e 67 20 6f 66 66 | 20 76 6f 69 63 65 20 66 |ning off| voice f|
|000059f0| 6f 72 20 76 6f 69 63 65 | 20 25 64 5c 6e 22 2c 20 |or voice| %d\n", |
|00005a00| 76 6f 69 63 65 5f 6e 75 | 6d 29 3b 0a 20 20 20 20 |voice_nu|m);. |
|00005a10| 63 6d 6e 5f 65 72 72 28 | 43 45 5f 43 4f 4e 54 2c |cmn_err(|CE_CONT,|
|00005a20| 20 22 72 65 67 5f 6e 75 | 6d 20 69 73 20 25 78 5c | "reg_nu|m is %x\|
|00005a30| 6e 22 2c 20 72 65 67 5f | 6e 75 6d 29 3b 0a 23 65 |n", reg_|num);.#e|
|00005a40| 6e 64 69 66 0a 20 20 20 | 20 6f 75 74 62 28 46 4d |ndif. | outb(FM|
|00005a50| 5f 53 45 4c 45 43 54 2c | 20 72 65 67 5f 6e 75 6d |_SELECT,| reg_num|
|00005a60| 29 3b 0a 20 20 20 20 74 | 65 6e 6d 69 63 72 6f 73 |);. t|enmicros|
|00005a70| 65 63 28 29 3b 0a 20 20 | 20 20 6f 75 74 62 28 46 |ec();. | outb(F|
|00005a80| 4d 5f 52 45 47 2c 20 30 | 29 3b 0a 20 20 20 20 74 |M_REG, 0|);. t|
|00005a90| 65 6e 6d 69 63 72 6f 73 | 65 63 28 29 3b 0a 20 20 |enmicros|ec();. |
|00005aa0| 20 20 74 65 6e 6d 69 63 | 72 6f 73 65 63 28 29 3b | tenmic|rosec();|
|00005ab0| 0a 20 20 20 20 74 65 6e | 6d 69 63 72 6f 73 65 63 |. ten|microsec|
|00005ac0| 28 29 3b 0a 0a 20 20 20 | 20 72 65 74 75 72 6e 3b |();.. | return;|
|00005ad0| 0a 7d 0a 0a 2f 2a 0a 20 | 2a 20 74 75 72 6e 73 20 |.}../*. |* turns |
|00005ae0| 61 20 6b 65 79 20 6f 6e | 2c 20 77 69 74 68 20 74 |a key on|, with t|
|00005af0| 68 65 20 66 72 65 71 75 | 65 6e 63 79 20 61 6e 64 |he frequ|ency and|
|00005b00| 20 6f 63 74 61 76 65 20 | 73 6f 20 69 6e 64 69 63 | octave |so indic|
|00005b10| 61 74 65 64 20 69 6e 20 | 74 68 65 0a 20 2a 20 6c |ated in |the. * l|
|00005b20| 6f 77 20 32 20 62 79 74 | 65 73 20 6f 66 20 74 68 |ow 2 byt|es of th|
|00005b30| 65 20 64 61 74 61 20 69 | 6e 74 65 67 65 72 0a 20 |e data i|nteger. |
|00005b40| 2a 2f 0a 76 6f 69 64 20 | 66 6d 5f 6b 65 79 5f 6f |*/.void |fm_key_o|
|00005b50| 6e 28 75 73 72 5f 6e 6f | 74 65 29 0a 69 6e 74 20 |n(usr_no|te).int |
|00005b60| 75 73 72 5f 6e 6f 74 65 | 3b 0a 7b 0a 20 20 20 20 |usr_note|;.{. |
|00005b70| 72 65 67 69 73 74 65 72 | 20 75 6e 73 69 67 6e 65 |register| unsigne|
|00005b80| 64 20 63 68 61 72 20 72 | 65 67 5f 6e 75 6d 3b 0a |d char r|eg_num;.|
|00005b90| 20 20 20 20 69 6e 74 20 | 74 6d 70 5f 69 6e 74 3b | int |tmp_int;|
|00005ba0| 0a 0a 23 69 66 64 65 66 | 20 44 45 42 55 47 0a 20 |..#ifdef| DEBUG. |
|00005bb0| 20 20 20 63 6d 6e 5f 65 | 72 72 28 43 45 5f 43 4f | cmn_e|rr(CE_CO|
|00005bc0| 4e 54 2c 20 22 74 75 72 | 6e 69 6e 67 20 6f 6e 20 |NT, "tur|ning on |
|00005bd0| 76 6f 69 63 65 20 66 6f | 72 20 76 6f 69 63 65 20 |voice fo|r voice |
|00005be0| 25 64 5c 6e 22 2c 20 6e | 6f 74 65 5f 6e 75 6d 28 |%d\n", n|ote_num(|
|00005bf0| 75 73 72 5f 6e 6f 74 65 | 29 29 3b 0a 20 20 20 20 |usr_note|));. |
|00005c00| 63 6d 6e 5f 65 72 72 28 | 43 45 5f 43 4f 4e 54 2c |cmn_err(|CE_CONT,|
|00005c10| 20 22 66 6e 75 6d 5f 6c | 6f 77 20 28 64 65 63 29 | "fnum_l|ow (dec)|
|00005c20| 3a 20 25 64 5c 6e 22 2c | 20 66 6e 75 6d 5f 6c 6f |: %d\n",| fnum_lo|
|00005c30| 77 28 75 73 72 5f 6e 6f | 74 65 29 29 3b 0a 20 20 |w(usr_no|te));. |
|00005c40| 20 20 63 6d 6e 5f 65 72 | 72 28 43 45 5f 43 4f 4e | cmn_er|r(CE_CON|
|00005c50| 54 2c 20 22 66 6e 75 6d | 5f 6c 6f 77 20 28 68 65 |T, "fnum|_low (he|
|00005c60| 78 29 3a 20 25 78 5c 6e | 22 2c 20 66 6e 75 6d 5f |x): %x\n|", fnum_|
|00005c70| 6c 6f 77 28 75 73 72 5f | 6e 6f 74 65 29 29 3b 0a |low(usr_|note));.|
|00005c80| 20 20 20 20 63 6d 6e 5f | 65 72 72 28 43 45 5f 43 | cmn_|err(CE_C|
|00005c90| 4f 4e 54 2c 20 22 6b 65 | 79 6f 6e 5f 62 6c 6b 5f |ONT, "ke|yon_blk_|
|00005ca0| 66 6e 75 6d 20 28 64 65 | 63 29 3a 20 25 64 5c 6e |fnum (de|c): %d\n|
|00005cb0| 22 2c 20 6b 65 79 6f 6e | 5f 62 6c 6b 5f 66 6e 75 |", keyon|_blk_fnu|
|00005cc0| 6d 28 75 73 72 5f 6e 6f | 74 65 29 29 3b 0a 20 20 |m(usr_no|te));. |
|00005cd0| 20 20 63 6d 6e 5f 65 72 | 72 28 43 45 5f 43 4f 4e | cmn_er|r(CE_CON|
|00005ce0| 54 2c 20 22 6b 65 79 6f | 6e 5f 62 6c 6b 5f 66 6e |T, "keyo|n_blk_fn|
|00005cf0| 75 6d 20 28 68 65 78 29 | 3a 20 25 78 5c 6e 22 2c |um (hex)|: %x\n",|
|00005d00| 20 6b 65 79 6f 6e 5f 62 | 6c 6b 5f 66 6e 75 6d 28 | keyon_b|lk_fnum(|
|00005d10| 75 73 72 5f 6e 6f 74 65 | 29 29 3b 0a 23 65 6e 64 |usr_note|));.#end|
|00005d20| 69 66 0a 0a 20 20 20 20 | 2f 2a 20 70 75 74 20 6f |if.. |/* put o|
|00005d30| 75 74 20 66 69 72 73 74 | 20 62 79 74 65 20 2a 2f |ut first| byte */|
|00005d40| 0a 20 20 20 20 72 65 67 | 5f 6e 75 6d 20 3d 20 28 |. reg|_num = (|
|00005d50| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 29 30 78 |unsigned| char)0x|
|00005d60| 41 30 20 2b 20 6e 6f 74 | 65 5f 6e 75 6d 28 75 73 |A0 + not|e_num(us|
|00005d70| 72 5f 6e 6f 74 65 29 3b | 0a 23 69 66 64 65 66 20 |r_note);|.#ifdef |
|00005d80| 44 45 42 55 47 0a 20 20 | 20 20 63 6d 6e 5f 65 72 |DEBUG. | cmn_er|
|00005d90| 72 28 43 45 5f 43 4f 4e | 54 2c 20 22 72 65 67 5f |r(CE_CON|T, "reg_|
|00005da0| 6e 75 6d 20 69 73 20 25 | 78 5c 6e 22 2c 20 72 65 |num is %|x\n", re|
|00005db0| 67 5f 6e 75 6d 29 3b 0a | 23 65 6e 64 69 66 0a 20 |g_num);.|#endif. |
|00005dc0| 20 20 20 6f 75 74 62 28 | 46 4d 5f 53 45 4c 45 43 | outb(|FM_SELEC|
|00005dd0| 54 2c 20 72 65 67 5f 6e | 75 6d 29 3b 0a 20 20 20 |T, reg_n|um);. |
|00005de0| 20 74 65 6e 6d 69 63 72 | 6f 73 65 63 28 29 3b 0a | tenmicr|osec();.|
|00005df0| 20 20 20 20 6f 75 74 62 | 28 46 4d 5f 52 45 47 2c | outb|(FM_REG,|
|00005e00| 20 66 6e 75 6d 5f 6c 6f | 77 28 75 73 72 5f 6e 6f | fnum_lo|w(usr_no|
|00005e10| 74 65 29 29 3b 0a 20 20 | 20 20 74 65 6e 6d 69 63 |te));. | tenmic|
|00005e20| 72 6f 73 65 63 28 29 3b | 0a 20 20 20 20 74 65 6e |rosec();|. ten|
|00005e30| 6d 69 63 72 6f 73 65 63 | 28 29 3b 0a 20 20 20 20 |microsec|();. |
|00005e40| 74 65 6e 6d 69 63 72 6f | 73 65 63 28 29 3b 0a 0a |tenmicro|sec();..|
|00005e50| 20 20 20 20 2f 2a 20 70 | 75 74 20 6f 75 74 20 73 | /* p|ut out s|
|00005e60| 65 63 6f 6e 64 20 62 79 | 74 65 20 2a 2f 0a 20 20 |econd by|te */. |
|00005e70| 20 20 72 65 67 5f 6e 75 | 6d 20 3d 20 28 75 6e 73 | reg_nu|m = (uns|
|00005e80| 69 67 6e 65 64 20 63 68 | 61 72 29 30 78 42 30 20 |igned ch|ar)0xB0 |
|00005e90| 2b 20 6e 6f 74 65 5f 6e | 75 6d 28 75 73 72 5f 6e |+ note_n|um(usr_n|
|00005ea0| 6f 74 65 29 3b 0a 23 69 | 66 64 65 66 20 44 45 42 |ote);.#i|fdef DEB|
|00005eb0| 55 47 0a 20 20 20 20 63 | 6d 6e 5f 65 72 72 28 43 |UG. c|mn_err(C|
|00005ec0| 45 5f 43 4f 4e 54 2c 20 | 22 72 65 67 5f 6e 75 6d |E_CONT, |"reg_num|
|00005ed0| 20 69 73 20 25 78 5c 6e | 22 2c 20 72 65 67 5f 6e | is %x\n|", reg_n|
|00005ee0| 75 6d 29 3b 0a 23 65 6e | 64 69 66 0a 20 20 20 20 |um);.#en|dif. |
|00005ef0| 6f 75 74 62 28 46 4d 5f | 53 45 4c 45 43 54 2c 20 |outb(FM_|SELECT, |
|00005f00| 72 65 67 5f 6e 75 6d 29 | 3b 0a 20 20 20 20 74 65 |reg_num)|;. te|
|00005f10| 6e 6d 69 63 72 6f 73 65 | 63 28 29 3b 0a 20 20 20 |nmicrose|c();. |
|00005f20| 20 6f 75 74 62 28 46 4d | 5f 52 45 47 2c 20 6b 65 | outb(FM|_REG, ke|
|00005f30| 79 6f 6e 5f 62 6c 6b 5f | 66 6e 75 6d 28 75 73 72 |yon_blk_|fnum(usr|
|00005f40| 5f 6e 6f 74 65 29 29 3b | 0a 20 20 20 20 74 65 6e |_note));|. ten|
|00005f50| 6d 69 63 72 6f 73 65 63 | 28 29 3b 0a 20 20 20 20 |microsec|();. |
|00005f60| 74 65 6e 6d 69 63 72 6f | 73 65 63 28 29 3b 0a 20 |tenmicro|sec();. |
|00005f70| 20 20 20 74 65 6e 6d 69 | 63 72 6f 73 65 63 28 29 | tenmi|crosec()|
|00005f80| 3b 0a 20 20 20 20 0a 20 | 20 20 20 72 65 74 75 72 |;. . | retur|
|00005f90| 6e 3b 0a 7d 0a 0a 2f 2a | 20 61 74 20 74 68 69 73 |n;.}../*| at this|
|00005fa0| 20 70 6f 69 6e 74 2c 20 | 69 74 20 6a 75 73 74 20 | point, |it just |
|00005fb0| 74 75 72 6e 73 20 61 6c | 6c 20 6e 6f 74 65 73 20 |turns al|l notes |
|00005fc0| 74 6f 20 6f 66 66 20 2a | 2f 0a 69 6e 74 20 66 6d |to off *|/.int fm|
|00005fd0| 5f 72 65 73 65 74 28 29 | 0a 7b 0a 20 20 20 20 69 |_reset()|.{. i|
|00005fe0| 6e 74 20 69 3b 0a 0a 20 | 20 20 20 2f 2a 20 6d 75 |nt i;.. | /* mu|
|00005ff0| 73 74 20 62 65 20 69 6e | 69 74 69 61 6c 69 7a 65 |st be in|itialize|
|00006000| 64 3f 20 2a 2f 0a 20 20 | 20 20 6f 75 74 62 28 46 |d? */. | outb(F|
|00006010| 4d 5f 53 45 4c 45 43 54 | 2c 20 31 29 3b 0a 20 20 |M_SELECT|, 1);. |
|00006020| 20 20 74 65 6e 6d 69 63 | 72 6f 73 65 63 28 29 3b | tenmic|rosec();|
|00006030| 0a 20 20 20 20 6f 75 74 | 62 28 46 4d 5f 52 45 47 |. out|b(FM_REG|
|00006040| 2c 20 30 29 3b 0a 20 20 | 20 20 74 65 6e 6d 69 63 |, 0);. | tenmic|
|00006050| 72 6f 73 65 63 28 29 3b | 0a 20 20 20 20 74 65 6e |rosec();|. ten|
|00006060| 6d 69 63 72 6f 73 65 63 | 28 29 3b 0a 20 20 20 20 |microsec|();. |
|00006070| 74 65 6e 6d 69 63 72 6f | 73 65 63 28 29 3b 0a 0a |tenmicro|sec();..|
|00006080| 20 20 20 20 2f 2a 20 64 | 69 73 70 65 6e 73 65 20 | /* d|ispense |
|00006090| 66 6f 72 20 74 69 6d 65 | 20 62 65 69 6e 67 20 2a |for time| being *|
|000060a0| 2f 0a 20 20 20 20 66 6f | 72 20 28 69 3d 30 3b 20 |/. fo|r (i=0; |
|000060b0| 69 3c 4d 41 58 5f 46 4d | 5f 4e 4f 54 45 53 3b 20 |i<MAX_FM|_NOTES; |
|000060c0| 69 2b 2b 29 0a 20 20 20 | 20 20 20 20 20 66 6d 5f |i++). | fm_|
|000060d0| 6b 65 79 5f 6f 66 66 28 | 69 29 3b 0a 0a 20 20 20 |key_off(|i);.. |
|000060e0| 20 72 65 74 75 72 6e 28 | 30 29 3b 0a 7d 0a 0a 0a | return(|0);.}...|
|000060f0| 2f 2a 0a 20 2a 20 73 65 | 74 20 63 68 61 72 61 63 |/*. * se|t charac|
|00006100| 74 65 72 69 73 74 69 63 | 73 20 6f 6e 20 61 20 76 |teristic|s on a v|
|00006110| 6f 69 63 65 0a 20 2a 2f | 0a 76 6f 69 64 20 66 6d |oice. */|.void fm|
|00006120| 5f 73 65 74 5f 76 6f 69 | 63 65 28 75 73 72 5f 63 |_set_voi|ce(usr_c|
|00006130| 68 61 72 61 63 74 65 72 | 29 0a 73 62 5f 66 6d 5f |haracter|).sb_fm_|
|00006140| 63 68 61 72 61 63 74 65 | 72 20 2a 75 73 72 5f 63 |characte|r *usr_c|
|00006150| 68 61 72 61 63 74 65 72 | 3b 0a 7b 0a 20 20 20 20 |haracter|;.{. |
|00006160| 72 65 67 69 73 74 65 72 | 20 75 6e 73 69 67 6e 65 |register| unsigne|
|00006170| 64 20 63 68 61 72 20 6f | 70 5f 63 65 6c 6c 5f 6e |d char o|p_cell_n|
|00006180| 75 6d 3b 0a 20 20 20 20 | 69 6e 74 20 63 65 6c 6c |um;. |int cell|
|00006190| 5f 6f 66 66 73 65 74 3b | 0a 20 20 20 20 73 62 5f |_offset;|. sb_|
|000061a0| 66 6d 5f 63 68 61 72 61 | 63 74 65 72 20 76 6f 69 |fm_chara|cter voi|
|000061b0| 63 65 5f 64 61 74 61 3b | 0a 20 20 20 20 69 6e 74 |ce_data;|. int|
|000061c0| 20 69 3b 0a 0a 20 20 20 | 20 2f 2a 20 63 6f 70 79 | i;.. | /* copy|
|000061d0| 20 69 6e 20 63 68 61 72 | 61 63 74 65 72 69 73 74 | in char|acterist|
|000061e0| 69 63 73 20 2a 2f 0a 20 | 20 20 20 69 66 20 28 63 |ics */. | if (c|
|000061f0| 6f 70 79 69 6e 28 75 73 | 72 5f 63 68 61 72 61 63 |opyin(us|r_charac|
|00006200| 74 65 72 2c 20 26 76 6f | 69 63 65 5f 64 61 74 61 |ter, &vo|ice_data|
|00006210| 2c 20 73 69 7a 65 6f 66 | 28 73 62 5f 66 6d 5f 63 |, sizeof|(sb_fm_c|
|00006220| 68 61 72 61 63 74 65 72 | 29 29 20 3d 3d 20 2d 31 |haracter|)) == -1|
|00006230| 29 0a 20 20 20 20 7b 0a | 23 69 66 64 65 66 20 44 |). {.|#ifdef D|
|00006240| 45 42 55 47 0a 20 20 20 | 20 20 20 20 20 63 6d 6e |EBUG. | cmn|
|00006250| 5f 65 72 72 28 43 45 5f | 43 4f 4e 54 2c 20 22 66 |_err(CE_|CONT, "f|
|00006260| 6d 5f 73 65 74 5f 76 6f | 69 63 65 28 29 3a 20 62 |m_set_vo|ice(): b|
|00006270| 61 64 20 61 64 64 72 65 | 73 73 5c 6e 22 29 3b 0a |ad addre|ss\n");.|
|00006280| 23 65 6e 64 69 66 0a 20 | 20 20 20 20 20 20 20 75 |#endif. | u|
|00006290| 2e 75 5f 65 72 72 6f 72 | 20 3d 20 45 46 41 55 4c |.u_error| = EFAUL|
|000062a0| 54 3b 0a 20 20 20 20 20 | 20 20 20 72 65 74 75 72 |T;. | retur|
|000062b0| 6e 3b 0a 20 20 20 20 7d | 0a 0a 20 20 20 20 2f 2a |n;. }|.. /*|
|000062c0| 20 65 63 68 6f 20 76 6f | 69 63 65 20 63 68 61 72 | echo vo|ice char|
|000062d0| 61 63 74 65 72 69 73 74 | 69 63 73 20 2a 2f 0a 23 |acterist|ics */.#|
|000062e0| 69 66 64 65 66 20 44 45 | 42 55 47 0a 20 20 20 20 |ifdef DE|BUG. |
|000062f0| 63 6d 6e 5f 65 72 72 28 | 43 45 5f 43 4f 4e 54 2c |cmn_err(|CE_CONT,|
|00006300| 20 22 73 65 74 74 69 6e | 67 20 76 6f 69 63 65 20 | "settin|g voice |
|00006310| 6e 75 6d 62 65 72 20 25 | 64 5c 6e 22 2c 20 76 6f |number %|d\n", vo|
|00006320| 69 63 65 5f 64 61 74 61 | 2e 76 6f 69 63 65 5f 6e |ice_data|.voice_n|
|00006330| 75 6d 29 3b 0a 20 20 20 | 20 63 6d 6e 5f 65 72 72 |um);. | cmn_err|
|00006340| 28 43 45 5f 43 4f 4e 54 | 2c 20 22 73 65 74 74 69 |(CE_CONT|, "setti|
|00006350| 6e 67 20 76 6f 69 63 65 | 20 6e 75 6d 62 65 72 28 |ng voice| number(|
|00006360| 68 65 78 29 20 25 78 5c | 6e 22 2c 20 76 6f 69 63 |hex) %x\|n", voic|
|00006370| 65 5f 64 61 74 61 2e 76 | 6f 69 63 65 5f 6e 75 6d |e_data.v|oice_num|
|00006380| 29 3b 0a 20 20 20 20 63 | 6d 6e 5f 65 72 72 28 43 |);. c|mn_err(C|
|00006390| 45 5f 43 4f 4e 54 2c 20 | 22 64 61 74 61 3a 20 22 |E_CONT, |"data: "|
|000063a0| 29 3b 0a 20 20 20 20 66 | 6f 72 20 28 69 3d 30 3b |);. f|or (i=0;|
|000063b0| 20 69 3c 31 36 3b 20 69 | 2b 2b 29 0a 20 20 20 20 | i<16; i|++). |
|000063c0| 20 20 20 20 63 6d 6e 5f | 65 72 72 28 43 45 5f 43 | cmn_|err(CE_C|
|000063d0| 4f 4e 54 2c 20 22 25 78 | 20 22 2c 20 28 75 6e 73 |ONT, "%x| ", (uns|
|000063e0| 69 67 6e 65 64 20 69 6e | 74 29 76 6f 69 63 65 5f |igned in|t)voice_|
|000063f0| 64 61 74 61 2e 64 61 74 | 61 5b 69 5d 29 3b 0a 20 |data.dat|a[i]);. |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.