1 /* $OpenBSD: fmsreg.h,v 1.3 2008/06/26 05:42:17 ray 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 * 20 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 * POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33 34 #ifndef _DEV_PCI_FMSREG_H_ 35 #define _DEV_PCI_FMSREG_H_ 36 37 #define FM_PCM_VOLUME 0x00 38 #define FM_FM_VOLUME 0x02 39 #define FM_I2S_VOLUME 0x04 40 #define FM_RECORD_SOURCE 0x06 41 42 #define FM_PLAY_CTL 0x08 43 #define FM_PLAY_RATE_MASK 0x0f00 44 #define FM_PLAY_BUF1_LAST 0x0001 45 #define FM_PLAY_BUF2_LAST 0x0002 46 #define FM_PLAY_START 0x0020 47 #define FM_PLAY_PAUSE 0x0040 48 #define FM_PLAY_STOPNOW 0x0080 49 #define FM_PLAY_16BIT 0x4000 50 #define FM_PLAY_STEREO 0x8000 51 52 #define FM_PLAY_DMALEN 0x0a 53 #define FM_PLAY_DMABUF1 0x0c 54 #define FM_PLAY_DMABUF2 0x10 55 56 57 #define FM_REC_CTL 0x14 58 #define FM_REC_RATE_MASK 0x0f00 59 #define FM_REC_BUF1_LAST 0x0001 60 #define FM_REC_BUF2_LAST 0x0002 61 #define FM_REC_START 0x0020 62 #define FM_REC_PAUSE 0x0040 63 #define FM_REC_STOPNOW 0x0080 64 #define FM_REC_16BIT 0x4000 65 #define FM_REC_STEREO 0x8000 66 67 68 #define FM_REC_DMALEN 0x16 69 #define FM_REC_DMABUF1 0x18 70 #define FM_REC_DMABUF2 0x1c 71 72 #define FM_CODEC_CTL 0x22 73 #define FM_VOLUME 0x26 74 #define FM_VOLUME_MUTE 0x8000 75 76 #define FM_CODEC_CMD 0x2a 77 #define FM_CODEC_CMD_READ 0x0080 78 #define FM_CODEC_CMD_VALID 0x0100 79 #define FM_CODEC_CMD_BUSY 0x0200 80 81 #define FM_CODEC_DATA 0x2c 82 83 #define FM_IO_CTL 0x52 84 #define FM_IO_GPIO(x) ((x) << 12) 85 #define FM_IO_GPIO_ALL FM_IO_GPIO(0xf) 86 #define FM_IO_GPIO_IN(x) ((x) << 8) 87 #define FM_IO_PIN0 0x0001 88 #define FM_IO_PIN1 0x0002 89 #define FM_IO_PIN2 0x0004 90 #define FM_IO_PIN3 0x0008 91 92 #define FM_CARD_CTL 0x54 93 94 #define FM_INTMASK 0x56 95 #define FM_INTMASK_PLAY 0x0001 96 #define FM_INTMASK_REC 0x0002 97 #define FM_INTMASK_VOL 0x0040 98 #define FM_INTMASK_MPU 0x0080 99 100 #define FM_INTSTATUS 0x5a 101 #define FM_INTSTATUS_PLAY 0x0100 102 #define FM_INTSTATUS_REC 0x0200 103 #define FM_INTSTATUS_VOL 0x4000 104 #define FM_INTSTATUS_MPU 0x8000 105 106 #endif /* _DEV_PCI_FMSREG_H_ */ 107