malloc.3: Clarify that realloc() may move the memory block
[man-pages.git] / man4 / dsp56k.4
blob65c2b478616c8a9fd9ff4b746fc495558de54d2c
1 .\" Copyright (c) 2000 lars brinkhoff <lars@nocrew.org>
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\"
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
13 .\"
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, see
21 .\" <http://www.gnu.org/licenses/>.
22 .\" %%%LICENSE_END
23 .\"
24 .\" Modified, Thu Jan 27 19:16:19 CET 2000, lars@nocrew.org
25 .\"
26 .TH DSP56K 4 2021-03-22 "Linux" "Linux Programmer's Manual"
27 .SH NAME
28 dsp56k \- DSP56001 interface device
29 .SH SYNOPSIS
30 .nf
31 .B #include <asm/dsp56k.h>
32 .PP
33 .BI "ssize_t read(int " fd ", void *" data ", size_t " length );
34 .BI "ssize_t write(int " fd ", void *" data ", size_t " length );
35 .PP
36 .BI "int ioctl(int " fd ", DSP56K_UPLOAD, struct dsp56k_upload *" program );
37 .BI "int ioctl(int " fd ", DSP56K_SET_TX_WSIZE, int " wsize );
38 .BI "int ioctl(int " fd ", DSP56K_SET_RX_WSIZE, int " wsize );
39 .BI "int ioctl(int " fd ", DSP56K_HOST_FLAGS, struct dsp56k_host_flags *" flags );
40 .BI "int ioctl(int " fd ", DSP56K_HOST_CMD, int " cmd );
41 .fi
42 .SH CONFIGURATION
43 The
44 .B dsp56k
45 device is a character device with major number 55 and minor
46 number 0.
47 .SH DESCRIPTION
48 The Motorola DSP56001 is a fully programmable 24-bit digital signal
49 processor found in Atari Falcon030-compatible computers.
50 The \fIdsp56k\fP special file is used to control the DSP56001, and
51 to send and receive data using the bidirectional handshaked host
52 port.
53 .PP
54 To send a data stream to the signal processor, use
55 .BR write (2)
56 to the
57 device, and
58 .BR read (2)
59 to receive processed data.
60 The data can be sent or
61 received in 8, 16, 24, or 32-bit quantities on the host side, but will
62 always be seen as 24-bit quantities in the DSP56001.
63 .PP
64 The following
65 .BR ioctl (2)
66 calls are used to control the
67 \fIdsp56k\fP device:
68 .IP \fBDSP56K_UPLOAD\fP
69 resets the DSP56001 and uploads a program.
70 The third
71 .BR ioctl (2)
72 argument must be a pointer to a \fIstruct dsp56k_upload\fP with members
73 \fIbin\fP pointing to a DSP56001 binary program, and \fIlen\fP set to
74 the length of the program, counted in 24-bit words.
75 .IP \fBDSP56K_SET_TX_WSIZE\fP
76 sets the transmit word size.
77 Allowed values are in the range 1 to 4,
78 and is the number of bytes that will be sent at a time to the
79 DSP56001.
80 These data quantities will either be padded with bytes containing zero,
81 or truncated to fit the native 24-bit data format of the
82 DSP56001.
83 .IP \fBDSP56K_SET_RX_WSIZE\fP
84 sets the receive word size.
85 Allowed values are in the range 1 to 4,
86 and is the number of bytes that will be received at a time from the
87 DSP56001.
88 These data quantities will either truncated, or padded with
89 a null byte (\(aq\e0\(aq) to fit the native 24-bit data format of the DSP56001.
90 .IP \fBDSP56K_HOST_FLAGS\fP
91 read and write the host flags.
92 The host flags are four
93 general-purpose bits that can be read by both the hosting computer and
94 the DSP56001.
95 Bits 0 and 1 can be written by the host, and bits 2 and
96 3 can be written by the DSP56001.
97 .IP
98 To access the host flags, the third
99 .BR ioctl (2)
100 argument must be a pointer
101 to a \fIstruct dsp56k_host_flags\fP.
102 If bit 0 or 1 is set in the
103 \fIdir\fP member, the corresponding bit in \fIout\fP will be written
104 to the host flags.
105 The state of all host flags will be returned in
106 the lower four bits of the \fIstatus\fP member.
107 .IP \fBDSP56K_HOST_CMD\fP
108 sends a host command.
109 Allowed values are in the range 0 to 31, and is a
110 user-defined command handled by the program running in the DSP56001.
111 .SH FILES
112 .I /dev/dsp56k
113 .\" .SH AUTHORS
114 .\" Fredrik Noring <noring@nocrew.org>, lars brinkhoff <lars@nocrew.org>,
115 .\" Tomas Berndtsson <tomas@nocrew.org>.
116 .SH SEE ALSO
117 .IR linux/include/asm\-m68k/dsp56k.h ,
118 .IR linux/drivers/char/dsp56k.c ,
119 .UR http://dsp56k.nocrew.org/
120 .UE ,
121 DSP56000/DSP56001 Digital Signal Processor User's Manual