i2sreg.h revision 1.1 1 1.1 macallan /* $NetBSD: i2sreg.h,v 1.1 2025/09/08 07:28:03 macallan Exp $ */
2 1.1 macallan
3 1.1 macallan /*-
4 1.1 macallan * Copyright (c) 2002, 2003 Tsubai Masanari. All rights reserved.
5 1.1 macallan *
6 1.1 macallan * Redistribution and use in source and binary forms, with or without
7 1.1 macallan * modification, are permitted provided that the following conditions
8 1.1 macallan * are met:
9 1.1 macallan * 1. Redistributions of source code must retain the above copyright
10 1.1 macallan * notice, this list of conditions and the following disclaimer.
11 1.1 macallan * 2. Redistributions in binary form must reproduce the above copyright
12 1.1 macallan * notice, this list of conditions and the following disclaimer in the
13 1.1 macallan * documentation and/or other materials provided with the distribution.
14 1.1 macallan * 3. The name of the author may not be used to endorse or promote products
15 1.1 macallan * derived from this software without specific prior written permission.
16 1.1 macallan *
17 1.1 macallan * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 1.1 macallan * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 1.1 macallan * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 1.1 macallan * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 1.1 macallan * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 1.1 macallan * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 1.1 macallan * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 1.1 macallan * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 1.1 macallan * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 1.1 macallan * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 1.1 macallan */
28 1.1 macallan
29 1.1 macallan /* I2S registers */
30 1.1 macallan #define I2S_INT 0x00
31 1.1 macallan #define I2S_FORMAT 0x10
32 1.1 macallan #define I2S_FRAMECOUNT 0x40
33 1.1 macallan #define I2S_FRAMEMATCH 0x50
34 1.1 macallan #define I2S_WORDSIZE 0x60
35 1.1 macallan
36 1.1 macallan /* I2S_INT register definitions */
37 1.1 macallan #define I2S_INT_CLKSTOPPEND 0x01000000 /* clock-stop interrupt pending */
38 1.1 macallan
39 1.1 macallan /* I2S_WORDSIZE register definitions */
40 1.1 macallan #define INPUT_STEREO (2 << 24)
41 1.1 macallan #define INPUT_MONO (1 << 24)
42 1.1 macallan #define INPUT_16BIT (0 << 16)
43 1.1 macallan #define INPUT_24BIT (3 << 16)
44 1.1 macallan #define OUTPUT_STEREO (2 << 8)
45 1.1 macallan #define OUTPUT_MONO (1 << 8)
46 1.1 macallan #define OUTPUT_16BIT (0 << 0)
47 1.1 macallan #define OUTPUT_24BIT (3 << 0)
48