audiop16x.h revision d9cbf529b0d117a7aa5d5184c898dd1dc234366a
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Purpose: Definitions for the CS 4281 AC97 driver
*/
/*
* This file is part of Open Sound System
*
* Copyright (C) 4Front Technologies 1996-2009.
*
* This software is released under CDDL 1.0 source license.
* See the COPYING file included in the main directory of this source
* distribution for the license terms and conditions.
*/
#ifndef AUDIOP16X_H
#define AUDIOP16X_H
#define P16X_NAME "audiop16x"
#define P16X_NUM_PORT 2
#define CREATIVE_VENDOR_ID 0x1102
#define SB_P16X_ID 0x0006
#define P16X_MAX_INTRS 256
#define P16X_MIN_INTRS 24
#define P16X_DEF_INTRS 175
typedef struct _p16x_dev_t p16x_dev_t;
typedef struct _p16x_port_t p16x_port_t;
struct _p16x_port_t
{
unsigned intrs;
int port_num;
#define P16X_PLAY 0
#define P16X_REC 1
int syncdir;
int nchan;
unsigned fragfr;
unsigned nfrags;
unsigned fragsz;
unsigned nframes;
};
struct _p16x_dev_t
{
};
/*
* SB P16X Registers
*/
#define PTR 0x00
#define DR 0x04
#define IP 0x08
#define IE 0x0C
#define HC 0x14
#define GPIO 0x18
#define AC97D 0x1C
#define AC97A 0x1E
/*
* Indirect registers
*/
#define PTBA 0x000
#define PTBS 0x001
#define PTCA 0x002
#define PFBA 0x004
#define PFBS 0x005
#define CPFA 0x006
#define PFEA 0x007
#define CPCAV 0x008
#define RFBA 0x010
#define RFBS 0x011
#define CRFA 0x012
#define CRCAV 0x013
#define CDL 0x020
#define CDR 0x030
#define SA 0x040
#define EA_aux 0x041
#define SCS0 0x042
#define SCS1 0x043
#define SCS2 0x044
#define SPC 0x045
#define WMARK 0x046
#define MUDAT 0x047
#define MUCMD 0x048
#define RCD 0x050
/*
* Interrupt bits
*/
#define INTR_PCI 1
#define INTR_UART_RX 2
#define INTR_UART_TX 4
#define INTR_AC97 0x10
#define INTR_GPIO 0x40
#endif /* AUDIOP16X_H */