ascreg.h revision 1.1 1 1.1 nat /* $NetBSD: ascreg.h,v 1.1 2024/03/13 07:55:28 nat Exp $ */
2 1.1 nat
3 1.1 nat /*-
4 1.1 nat * Copyright (c) 2017, 2023 Nathanial Sloss <nathanialsloss (at) yahoo.com.au>
5 1.1 nat * All rights reserved.
6 1.1 nat *
7 1.1 nat * Redistribution and use in source and binary forms, with or without
8 1.1 nat * modification, are permitted provided that the following conditions
9 1.1 nat * are met:
10 1.1 nat * 1. Redistributions of source code must retain the above copyright
11 1.1 nat * notice, this list of conditions and the following disclaimer.
12 1.1 nat * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 nat * notice, this list of conditions and the following disclaimer in the
14 1.1 nat * documentation and/or other materials provided with the distribution.
15 1.1 nat *
16 1.1 nat * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
17 1.1 nat * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18 1.1 nat * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 1.1 nat * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20 1.1 nat * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 1.1 nat * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 1.1 nat * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 1.1 nat * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 1.1 nat * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 1.1 nat * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 1.1 nat * POSSIBILITY OF SUCH DAMAGE.
27 1.1 nat */
28 1.1 nat
29 1.1 nat #ifndef _SYS_ARCH_MAC68K_OBIO_ASCREG_H
30 1.1 nat #define _SYS_ARCH_MAC68K_OBIO_ASCREG_H
31 1.1 nat
32 1.1 nat #define ASCIRQ 5
33 1.1 nat
34 1.1 nat #define FIFO_A 0
35 1.1 nat #define FIFO_B 0x400
36 1.1 nat #define FIFO_LEN 0x400
37 1.1 nat
38 1.1 nat #define VERLOC 0x800
39 1.1 nat
40 1.1 nat #define ASCMODE 0x801
41 1.1 nat #define MODESTOP 0
42 1.1 nat #define MODEFIFO 1
43 1.1 nat #define MODEWAVE 2 /* not in easc */
44 1.1 nat
45 1.1 nat #define ASCTRL 0x802
46 1.1 nat #define UNDERRUN __BIT(7)
47 1.1 nat #define STEREO __BIT(1)
48 1.1 nat #define ANAPWM __BIT(0)
49 1.1 nat
50 1.1 nat #define FIFOPARAM 0x803
51 1.1 nat #define CLEARFIFO __BIT(7)
52 1.1 nat #define NONCOMP __BIT(1)
53 1.1 nat #define ROMCOMP __BIT(0)
54 1.1 nat
55 1.1 nat #define FIFOSTATUS 0x804
56 1.1 nat #define A_HALF __BIT(0)
57 1.1 nat #define A_FULL __BIT(1)
58 1.1 nat #define B_HALF __BIT(2)
59 1.1 nat #define B_FULL __BIT(3)
60 1.1 nat
61 1.1 nat #define INTVOL 0x806 /* b2-b4 Int volume. b5-b7 ext. */
62 1.1 nat
63 1.1 nat #define ASCRATE 0x807
64 1.1 nat #define MACFREQ 0 /* 22254 Hz */
65 1.1 nat #define F22KHZ 2 /* 22050 Hz */
66 1.1 nat #define F44KHZ 3 /* 44100 Hz */
67 1.1 nat
68 1.1 nat #define APLAYREC 0x80a
69 1.1 nat #define RECORDA __BIT(0)
70 1.1 nat #define REC22KHZ __BIT(1)
71 1.1 nat
72 1.1 nat #define ASCTEST 0x80f
73 1.1 nat
74 1.1 nat #define A_WRITEPTRHI 0xf00
75 1.1 nat #define A_WRITEPTRLO 0xf01
76 1.1 nat #define A_READPTRHI 0xf02
77 1.1 nat #define A_READPTRLO 0xf03
78 1.1 nat #define B_WRITEPTRHI 0xf20
79 1.1 nat #define B_WRITEPTRLO 0xf21
80 1.1 nat #define B_READPTRHI 0xf22
81 1.1 nat #define B_READPTRLO 0xf23
82 1.1 nat
83 1.1 nat #define A_LEFT_VOL 0xf06
84 1.1 nat #define A_RIGHT_VOL 0xf07
85 1.1 nat #define B_LEFT_VOL 0xf26
86 1.1 nat #define B_RIGHT_VOL 0xf27
87 1.1 nat
88 1.1 nat #define FIFOCTRLA 0xf08
89 1.1 nat #define FIFOCTRLB 0xf28
90 1.1 nat #define CDQUALITY 0x81
91 1.1 nat #define MACDEFAULTS 0x80
92 1.1 nat
93 1.1 nat #define IRQA 0xf09
94 1.1 nat #define IRQB 0xf29
95 1.1 nat #define DISABLEHALFIRQ __BIT(0)
96 1.1 nat
97 1.1 nat #endif /* !_SYS_ARCH_MAC68K_OBIO_ASCREG_H */
98