summaryrefslogtreecommitdiffstats
path: root/man4/dsp56k.4
blob: a7b2682adf7ee8f0e39c8ec486e87b4fe94a3237 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
.\" Copyright (c) 2000 lars brinkhoff <lars@nocrew.org>
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.\" Modified, Thu Jan 27 19:16:19 CET 2000, lars@nocrew.org
.\"
.TH dsp56k 4 2023-03-08 "Linux man-pages 6.05.01"
.SH NAME
dsp56k \- DSP56001 interface device
.SH SYNOPSIS
.nf
.B #include <asm/dsp56k.h>
.PP
.BI "ssize_t read(int " fd ", void *" data ", size_t " length );
.BI "ssize_t write(int " fd ", void *" data ", size_t " length );
.PP
.BI "int ioctl(int " fd ", DSP56K_UPLOAD, struct dsp56k_upload *" program );
.BI "int ioctl(int " fd ", DSP56K_SET_TX_WSIZE, int " wsize );
.BI "int ioctl(int " fd ", DSP56K_SET_RX_WSIZE, int " wsize );
.BI "int ioctl(int " fd ", DSP56K_HOST_FLAGS, struct dsp56k_host_flags *" flags );
.BI "int ioctl(int " fd ", DSP56K_HOST_CMD, int " cmd );
.fi
.SH CONFIGURATION
The
.I dsp56k
device is a character device with major number 55 and minor
number 0.
.SH DESCRIPTION
The Motorola DSP56001 is a fully programmable 24-bit digital signal
processor found in Atari Falcon030-compatible computers.
The \fIdsp56k\fP special file is used to control the DSP56001, and
to send and receive data using the bidirectional handshaked host
port.
.PP
To send a data stream to the signal processor, use
.BR write (2)
to the
device, and
.BR read (2)
to receive processed data.
The data can be sent or
received in 8, 16, 24, or 32-bit quantities on the host side, but will
always be seen as 24-bit quantities in the DSP56001.
.PP
The following
.BR ioctl (2)
calls are used to control the
\fIdsp56k\fP device:
.TP
.B DSP56K_UPLOAD
resets the DSP56001 and uploads a program.
The third
.BR ioctl (2)
argument must be a pointer to a \fIstruct dsp56k_upload\fP with members
\fIbin\fP pointing to a DSP56001 binary program, and \fIlen\fP set to
the length of the program, counted in 24-bit words.
.TP
.B DSP56K_SET_TX_WSIZE
sets the transmit word size.
Allowed values are in the range 1 to 4,
and is the number of bytes that will be sent at a time to the
DSP56001.
These data quantities will either be padded with bytes containing zero,
or truncated to fit the native 24-bit data format of the
DSP56001.
.TP
.B DSP56K_SET_RX_WSIZE
sets the receive word size.
Allowed values are in the range 1 to 4,
and is the number of bytes that will be received at a time from the DSP56001.
These data quantities will either truncated,
or padded with a null byte (\[aq]\e0\[aq]),
to fit the native 24-bit data format of the DSP56001.
.TP
.B DSP56K_HOST_FLAGS
read and write the host flags.
The host flags are four
general-purpose bits that can be read by both the hosting computer and
the DSP56001.
Bits 0 and 1 can be written by the host, and bits 2 and
3 can be written by the DSP56001.
.IP
To access the host flags, the third
.BR ioctl (2)
argument must be a pointer
to a \fIstruct dsp56k_host_flags\fP.
If bit 0 or 1 is set in the
\fIdir\fP member, the corresponding bit in \fIout\fP will be written
to the host flags.
The state of all host flags will be returned in
the lower four bits of the \fIstatus\fP member.
.TP
.B DSP56K_HOST_CMD
sends a host command.
Allowed values are in the range 0 to 31, and is a
user-defined command handled by the program running in the DSP56001.
.SH FILES
.I /dev/dsp56k
.\" .SH AUTHORS
.\" Fredrik Noring <noring@nocrew.org>, lars brinkhoff <lars@nocrew.org>,
.\" Tomas Berndtsson <tomas@nocrew.org>.
.SH SEE ALSO
.IR linux/include/asm\-m68k/dsp56k.h ,
.IR linux/drivers/char/dsp56k.c ,
.UR http://dsp56k.nocrew.org/
.UE ,
DSP56000/DSP56001 Digital Signal Processor User's Manual