Annotation of sys/dev/pci/fmsreg.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: fmsreg.h,v 1.2 2002/05/28 04:19:53 mickey Exp $ */
2: /* $NetBSD: fms.c,v 1.5.4.1 2000/06/30 16:27:50 simonb Exp $ */
3:
4: /*-
5: * Copyright (c) 1999 The NetBSD Foundation, Inc.
6: * All rights reserved.
7: *
8: * This code is derived from software contributed to The NetBSD Foundation
9: * by Witold J. Wnuk.
10: *
11: * Redistribution and use in source and binary forms, with or without
12: * modification, are permitted provided that the following conditions
13: * are met:
14: * 1. Redistributions of source code must retain the above copyright
15: * notice, this list of conditions and the following disclaimer.
16: * 2. Redistributions in binary form must reproduce the above copyright
17: * notice, this list of conditions and the following disclaimer in the
18: * documentation and/or other materials provided with the distribution.
19: * 3. All advertising materials mentioning features or use of this software
20: * must display the following acknowledgement:
21: * This product includes software developed by the NetBSD
22: * Foundation, Inc. and its contributors.
23: * 4. Neither the name of The NetBSD Foundation nor the names of its
24: * contributors may be used to endorse or promote products derived
25: * from this software without specific prior written permission.
26: *
27: * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
28: * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
29: * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30: * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
31: * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37: * POSSIBILITY OF SUCH DAMAGE.
38: */
39:
40:
41: #ifndef _DEV_PCI_FMSREG_H_
42: #define _DEV_PCI_FMSREG_H_
43:
44: #define FM_PCM_VOLUME 0x00
45: #define FM_FM_VOLUME 0x02
46: #define FM_I2S_VOLUME 0x04
47: #define FM_RECORD_SOURCE 0x06
48:
49: #define FM_PLAY_CTL 0x08
50: #define FM_PLAY_RATE_MASK 0x0f00
51: #define FM_PLAY_BUF1_LAST 0x0001
52: #define FM_PLAY_BUF2_LAST 0x0002
53: #define FM_PLAY_START 0x0020
54: #define FM_PLAY_PAUSE 0x0040
55: #define FM_PLAY_STOPNOW 0x0080
56: #define FM_PLAY_16BIT 0x4000
57: #define FM_PLAY_STEREO 0x8000
58:
59: #define FM_PLAY_DMALEN 0x0a
60: #define FM_PLAY_DMABUF1 0x0c
61: #define FM_PLAY_DMABUF2 0x10
62:
63:
64: #define FM_REC_CTL 0x14
65: #define FM_REC_RATE_MASK 0x0f00
66: #define FM_REC_BUF1_LAST 0x0001
67: #define FM_REC_BUF2_LAST 0x0002
68: #define FM_REC_START 0x0020
69: #define FM_REC_PAUSE 0x0040
70: #define FM_REC_STOPNOW 0x0080
71: #define FM_REC_16BIT 0x4000
72: #define FM_REC_STEREO 0x8000
73:
74:
75: #define FM_REC_DMALEN 0x16
76: #define FM_REC_DMABUF1 0x18
77: #define FM_REC_DMABUF2 0x1c
78:
79: #define FM_CODEC_CTL 0x22
80: #define FM_VOLUME 0x26
81: #define FM_VOLUME_MUTE 0x8000
82:
83: #define FM_CODEC_CMD 0x2a
84: #define FM_CODEC_CMD_READ 0x0080
85: #define FM_CODEC_CMD_VALID 0x0100
86: #define FM_CODEC_CMD_BUSY 0x0200
87:
88: #define FM_CODEC_DATA 0x2c
89:
90: #define FM_IO_CTL 0x52
91: #define FM_IO_GPIO(x) ((x) << 12)
92: #define FM_IO_GPIO_ALL FM_IO_GPIO(0xf)
93: #define FM_IO_GPIO_IN(x) ((x) << 8)
94: #define FM_IO_PIN0 0x0001
95: #define FM_IO_PIN1 0x0002
96: #define FM_IO_PIN2 0x0004
97: #define FM_IO_PIN3 0x0008
98:
99: #define FM_CARD_CTL 0x54
100:
101: #define FM_INTMASK 0x56
102: #define FM_INTMASK_PLAY 0x0001
103: #define FM_INTMASK_REC 0x0002
104: #define FM_INTMASK_VOL 0x0040
105: #define FM_INTMASK_MPU 0x0080
106:
107: #define FM_INTSTATUS 0x5a
108: #define FM_INTSTATUS_PLAY 0x0100
109: #define FM_INTSTATUS_REC 0x0200
110: #define FM_INTSTATUS_VOL 0x4000
111: #define FM_INTSTATUS_MPU 0x8000
112:
113: #endif /* _DEV_PCI_FMSREG_H_ */
CVSweb