Home | History | Annotate | Line # | Download | only in obio
ascreg.h revision 1.2
      1  1.2  nat /* $NetBSD: ascreg.h,v 1.2 2025/01/12 09:28:26 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.2  nat #define FIFO_A_ALT	0x1000
     37  1.2  nat #define FIFO_B_ALT	0x1800
     38  1.1  nat #define FIFO_LEN	0x400
     39  1.1  nat 
     40  1.1  nat #define VERLOC		0x800
     41  1.1  nat 
     42  1.1  nat #define ASCMODE		0x801
     43  1.1  nat #define MODESTOP	0
     44  1.1  nat #define MODEFIFO	1
     45  1.1  nat #define MODEWAVE	2 		/* not in easc */
     46  1.1  nat 
     47  1.1  nat #define ASCTRL		0x802
     48  1.1  nat #define UNDERRUN	__BIT(7)
     49  1.1  nat #define STEREO		__BIT(1)
     50  1.1  nat #define ANAPWM		__BIT(0)
     51  1.1  nat 
     52  1.1  nat #define FIFOPARAM	0x803
     53  1.1  nat #define CLEARFIFO	__BIT(7)
     54  1.1  nat #define NONCOMP		__BIT(1)
     55  1.1  nat #define ROMCOMP		__BIT(0)
     56  1.1  nat 
     57  1.1  nat #define FIFOSTATUS	0x804
     58  1.1  nat #define A_HALF		__BIT(0)
     59  1.1  nat #define A_FULL		__BIT(1)
     60  1.1  nat #define B_HALF		__BIT(2)
     61  1.1  nat #define B_FULL		__BIT(3)
     62  1.1  nat 
     63  1.1  nat #define INTVOL		0x806		/* b2-b4 Int volume. b5-b7 ext. */
     64  1.1  nat 
     65  1.1  nat #define ASCRATE		0x807
     66  1.1  nat #define MACFREQ		0 		/* 22254 Hz */
     67  1.1  nat #define F22KHZ		2		/* 22050 Hz */
     68  1.1  nat #define F44KHZ		3		/* 44100 Hz */
     69  1.1  nat 
     70  1.1  nat #define APLAYREC	0x80a
     71  1.1  nat #define RECORDA		__BIT(0)
     72  1.1  nat #define REC22KHZ	__BIT(1)
     73  1.1  nat 
     74  1.1  nat #define ASCTEST		0x80f
     75  1.1  nat 
     76  1.1  nat #define	A_WRITEPTRHI	0xf00
     77  1.1  nat #define	A_WRITEPTRLO	0xf01
     78  1.1  nat #define	A_READPTRHI	0xf02
     79  1.1  nat #define	A_READPTRLO	0xf03
     80  1.1  nat #define	B_WRITEPTRHI	0xf20
     81  1.1  nat #define	B_WRITEPTRLO	0xf21
     82  1.1  nat #define	B_READPTRHI	0xf22
     83  1.1  nat #define	B_READPTRLO	0xf23
     84  1.1  nat 
     85  1.2  nat #define MACOS_HIGH_VOL	0x36  /* Should NOT exceed this value */
     86  1.2  nat 
     87  1.1  nat #define A_LEFT_VOL	0xf06
     88  1.1  nat #define A_RIGHT_VOL	0xf07
     89  1.1  nat #define B_LEFT_VOL	0xf26
     90  1.1  nat #define B_RIGHT_VOL	0xf27
     91  1.1  nat 
     92  1.1  nat #define FIFOCTRLA	0xf08
     93  1.1  nat #define FIFOCTRLB	0xf28
     94  1.1  nat #define CDQUALITY	0x81
     95  1.1  nat #define MACDEFAULTS	0x80
     96  1.1  nat 
     97  1.1  nat #define IRQA		0xf09
     98  1.1  nat #define IRQB		0xf29
     99  1.1  nat #define DISABLEHALFIRQ	__BIT(0)
    100  1.1  nat 
    101  1.1  nat #endif /* !_SYS_ARCH_MAC68K_OBIO_ASCREG_H */
    102