1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * CDDL HEADER START 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*0Sstevel@tonic-gate * with the License. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*0Sstevel@tonic-gate * See the License for the specific language governing permissions 12*0Sstevel@tonic-gate * and limitations under the License. 13*0Sstevel@tonic-gate * 14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*0Sstevel@tonic-gate * 20*0Sstevel@tonic-gate * CDDL HEADER END 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate /* 23*0Sstevel@tonic-gate * Copyright (c) 2000-2001 by Sun Microsystems, Inc. 24*0Sstevel@tonic-gate * All rights reserved. 25*0Sstevel@tonic-gate * 26*0Sstevel@tonic-gate * CAUTION: This header file has not gone through a formal review process. 27*0Sstevel@tonic-gate * Thus its commitment level is very low and may change or be removed 28*0Sstevel@tonic-gate * at any time. 29*0Sstevel@tonic-gate */ 30*0Sstevel@tonic-gate 31*0Sstevel@tonic-gate #ifndef _SYS_AC97_H 32*0Sstevel@tonic-gate #define _SYS_AC97_H 33*0Sstevel@tonic-gate 34*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 35*0Sstevel@tonic-gate 36*0Sstevel@tonic-gate #ifdef __cplusplus 37*0Sstevel@tonic-gate extern "C" { 38*0Sstevel@tonic-gate #endif 39*0Sstevel@tonic-gate 40*0Sstevel@tonic-gate #ifdef _KERNEL 41*0Sstevel@tonic-gate 42*0Sstevel@tonic-gate /* 43*0Sstevel@tonic-gate * This header file describes the AC-97 V2.1 Codec register set. See the 44*0Sstevel@tonic-gate * spec for a detailed description of each register. 45*0Sstevel@tonic-gate */ 46*0Sstevel@tonic-gate 47*0Sstevel@tonic-gate struct ac97_v21 { 48*0Sstevel@tonic-gate uint16_t ac97_reset; /* 00h */ 49*0Sstevel@tonic-gate uint16_t ac97_master_volume; /* 02h */ 50*0Sstevel@tonic-gate uint16_t ac97_headphone_volume; /* 04h, optional */ 51*0Sstevel@tonic-gate uint16_t ac97_master_mono_volume; /* 06h, optional */ 52*0Sstevel@tonic-gate uint16_t ac97_master_tone; /* 08h, optional */ 53*0Sstevel@tonic-gate uint16_t ac97_pc_beep_volume; /* 0ah, optional */ 54*0Sstevel@tonic-gate uint16_t ac97_phone_volume; /* 0ch, optional */ 55*0Sstevel@tonic-gate uint16_t ac97_mic_volume; /* 0eh */ 56*0Sstevel@tonic-gate uint16_t ac97_line_in_volume; /* 10h */ 57*0Sstevel@tonic-gate uint16_t ac97_cd_volume; /* 12h */ 58*0Sstevel@tonic-gate uint16_t ac97_video_volume; /* 14h, optional */ 59*0Sstevel@tonic-gate uint16_t ac97_aux_volume; /* 16h, optional */ 60*0Sstevel@tonic-gate uint16_t ac97_PCM_out_volume; /* 18h */ 61*0Sstevel@tonic-gate uint16_t ac97_record_select; /* 1ah */ 62*0Sstevel@tonic-gate uint16_t ac97_record_gain; /* 1ch */ 63*0Sstevel@tonic-gate uint16_t ac97_record_gain_mic; /* 1eh, optional */ 64*0Sstevel@tonic-gate uint16_t ac97_general_purpose; /* 20h, optional */ 65*0Sstevel@tonic-gate uint16_t ac97_threeD_control; /* 22h, optional */ 66*0Sstevel@tonic-gate uint16_t ac97_reserved_1; /* 24h */ 67*0Sstevel@tonic-gate uint16_t ac97_pwrdwn_ctrl_stat; /* 26h */ 68*0Sstevel@tonic-gate 69*0Sstevel@tonic-gate /* extended audio registers */ 70*0Sstevel@tonic-gate 71*0Sstevel@tonic-gate uint16_t ac97_ext_audio_id; /* 28h, optional */ 72*0Sstevel@tonic-gate uint16_t ac97_ext_audio_stat_ctrl; /* 2ah, optional */ 73*0Sstevel@tonic-gate uint16_t ac97_ext_front_DAC_rate; /* 2ch, optional */ 74*0Sstevel@tonic-gate uint16_t ac97_ext_surround_DAC_rate; /* 2eh, optional */ 75*0Sstevel@tonic-gate uint16_t ac97_ext_LFE_DAC_rate; /* 30h, optional */ 76*0Sstevel@tonic-gate uint16_t ac97_ext_LR_ADC_rate; /* 32h, optional */ 77*0Sstevel@tonic-gate uint16_t ac97_ext_mic_ADC_rate; /* 34h, optional */ 78*0Sstevel@tonic-gate uint16_t ac97_ext_C_LFE_volume; /* 36h, optional */ 79*0Sstevel@tonic-gate uint16_t ac97_ext_LR_surround_volume; /* 38h, optional */ 80*0Sstevel@tonic-gate uint16_t ac97_ext_reserved_1; /* 3ah, optional */ 81*0Sstevel@tonic-gate 82*0Sstevel@tonic-gate /* extended modem registers */ 83*0Sstevel@tonic-gate 84*0Sstevel@tonic-gate uint16_t ac97_ext_modem_id; /* 3ch, optional */ 85*0Sstevel@tonic-gate uint16_t ac97_ext_modem_stat_ctrl; /* 3eh, optional */ 86*0Sstevel@tonic-gate uint16_t ac97_ext_line1_DAC_ADC_rate; /* 40h, optional */ 87*0Sstevel@tonic-gate uint16_t ac97_ext_line2_DAC_ADC_rate; /* 42h, optional */ 88*0Sstevel@tonic-gate uint16_t ac97_ext_hndst_DAC_ADC_rate; /* 44h, optional */ 89*0Sstevel@tonic-gate uint16_t ac97_ext_line1_DAC_ADC_level; /* 46h, optional */ 90*0Sstevel@tonic-gate uint16_t ac97_ext_line2_DAC_ADC_level; /* 48h, optional */ 91*0Sstevel@tonic-gate uint16_t ac97_ext_hndst_DAC_ADC_level; /* 4ah, optional */ 92*0Sstevel@tonic-gate uint16_t ac97_ext_GPIO_pin_config; /* 4ch, optional */ 93*0Sstevel@tonic-gate uint16_t ac97_ext_GPIO_pin_polarity; /* 4eh, optional */ 94*0Sstevel@tonic-gate uint16_t ac97_ext_GPIO_pin_sticky; /* 50h, optional */ 95*0Sstevel@tonic-gate uint16_t ac97_ext_GPIO_pin_wakeup; /* 52h, optional */ 96*0Sstevel@tonic-gate uint16_t ac97_ext_GPIO_pin_status; /* 54h, optional */ 97*0Sstevel@tonic-gate uint16_t ac97_ext_modem_AFE_stat_ctrl; /* 56h, optional */ 98*0Sstevel@tonic-gate uint16_t ac97_ext_reserved_2; /* 58h, optional */ 99*0Sstevel@tonic-gate 100*0Sstevel@tonic-gate /* reserved for vendor usage */ 101*0Sstevel@tonic-gate uint16_t ac97_vendor_01; /* 5ah, optional */ 102*0Sstevel@tonic-gate uint16_t ac97_vendor_02; /* 5ch, optional */ 103*0Sstevel@tonic-gate uint16_t ac97_vendor_03; /* 5eh, optional */ 104*0Sstevel@tonic-gate uint16_t ac97_vendor_04; /* 60h, optional */ 105*0Sstevel@tonic-gate uint16_t ac97_vendor_05; /* 62h, optional */ 106*0Sstevel@tonic-gate uint16_t ac97_vendor_06; /* 64h, optional */ 107*0Sstevel@tonic-gate uint16_t ac97_vendor_07; /* 66h, optional */ 108*0Sstevel@tonic-gate uint16_t ac97_vendor_08; /* 68h, optional */ 109*0Sstevel@tonic-gate uint16_t ac97_vendor_09; /* 6ah, optional */ 110*0Sstevel@tonic-gate uint16_t ac97_vendor_10; /* 6ch, optional */ 111*0Sstevel@tonic-gate uint16_t ac97_vendor_11; /* 6eh, optional */ 112*0Sstevel@tonic-gate uint16_t ac97_vendor_12; /* 70h, optional */ 113*0Sstevel@tonic-gate uint16_t ac97_vendor_13; /* 72h, optional */ 114*0Sstevel@tonic-gate uint16_t ac97_vendor_14; /* 74h, optional */ 115*0Sstevel@tonic-gate uint16_t ac97_vendor_15; /* 76h, optional */ 116*0Sstevel@tonic-gate uint16_t ac97_vendor_16; /* 78h, optional */ 117*0Sstevel@tonic-gate uint16_t ac97_vendor_17; /* 7ah, optional */ 118*0Sstevel@tonic-gate 119*0Sstevel@tonic-gate uint16_t ac97_vendor_id1; /* 7ch */ 120*0Sstevel@tonic-gate uint16_t ac97_vendor_id2; /* 7eh */ 121*0Sstevel@tonic-gate }; 122*0Sstevel@tonic-gate typedef struct ac97_v21 ac97_v21_t; 123*0Sstevel@tonic-gate 124*0Sstevel@tonic-gate /* 125*0Sstevel@tonic-gate * Defines for the V2.1 registers. 126*0Sstevel@tonic-gate */ 127*0Sstevel@tonic-gate 128*0Sstevel@tonic-gate /* Reset Register Index 00h */ 129*0Sstevel@tonic-gate #define AC97_RESET_REGISTER 0x00 130*0Sstevel@tonic-gate #define RR_DEDICATED_MIC 0x0001 131*0Sstevel@tonic-gate #define RR_RESERVED 0x0002 132*0Sstevel@tonic-gate #define RR_BASS_TREBLE 0x0004 133*0Sstevel@tonic-gate #define RR_PSEUDO_STEREO 0x0008 134*0Sstevel@tonic-gate #define RR_HEADPHONE_SUPPORT 0x0010 135*0Sstevel@tonic-gate #define RR_LOUDNESS_SUPPORT 0x0020 136*0Sstevel@tonic-gate #define RR_18_BIT_DAC 0x0040 137*0Sstevel@tonic-gate #define RR_20_BIT_DAC 0x0080 138*0Sstevel@tonic-gate #define RR_18_BIT_ADC 0x0100 139*0Sstevel@tonic-gate #define RR_20_BIT_ADC 0x0200 140*0Sstevel@tonic-gate #define RR_3D_STEREO_ENHANCE_MASK 0x7c00 141*0Sstevel@tonic-gate 142*0Sstevel@tonic-gate /* Master Volume Register Index 02h */ 143*0Sstevel@tonic-gate #define AC97_MASTER_VOLUME_REGISTER 0x02 144*0Sstevel@tonic-gate #define MVR_RIGHT_MASK 0x001f 145*0Sstevel@tonic-gate #define MVR_RIGHT_0dB_ATTEN 0x0000 146*0Sstevel@tonic-gate #define MVR_RIGHT_OPTIONAL_MASK 0x003f 147*0Sstevel@tonic-gate #define MVR_LEFT_MASK 0x1f00 148*0Sstevel@tonic-gate #define MVR_LEFT_0dB_ATTEN 0x0000 149*0Sstevel@tonic-gate #define MVR_LEFT_OPTIONAL_MASK 0x3f00 150*0Sstevel@tonic-gate #define MVR_MUTE 0x8000 151*0Sstevel@tonic-gate 152*0Sstevel@tonic-gate /* Headphone Volume Register Index 04h - Optional */ 153*0Sstevel@tonic-gate #define AC97_HEADPHONE_VOLUME_REGISTER 0x04 154*0Sstevel@tonic-gate #define HPVR_RIGHT_MASK 0x001f 155*0Sstevel@tonic-gate #define HPVR_RIGHT_0dB_ATTEN 0x0000 156*0Sstevel@tonic-gate #define HPVR_RIGHT_OPTIONAL_MASK 0x003f 157*0Sstevel@tonic-gate #define HPVR_LEFT_MASK 0x1f00 158*0Sstevel@tonic-gate #define HPVR_LEFT_0dB_ATTEN 0x0000 159*0Sstevel@tonic-gate #define HPVR_LEFT_OPTIONAL_MASK 0x3f00 160*0Sstevel@tonic-gate #define HPVR_MUTE 0x8000 161*0Sstevel@tonic-gate 162*0Sstevel@tonic-gate /* Mono Master Volume Register Index 06h - Optional */ 163*0Sstevel@tonic-gate #define AC97_MONO_MASTER_VOLUME_REGSITER 0x06 164*0Sstevel@tonic-gate #define MMVR_MASK 0x001f 165*0Sstevel@tonic-gate #define MMVR_0dB_ATTEN 0x0000 166*0Sstevel@tonic-gate #define MMVR_OPTIONAL_MASK 0x003f 167*0Sstevel@tonic-gate #define MMVR_MUTE 0x8000 168*0Sstevel@tonic-gate 169*0Sstevel@tonic-gate /* Master Tone Control Register Index 08h - Optional */ 170*0Sstevel@tonic-gate #define AC97_MASTER_TONE_CONTROL_REGISTER 0x08 171*0Sstevel@tonic-gate #define MTCR_TREBLE_MASK 0x000e 172*0Sstevel@tonic-gate #define MTCR_TREBLE_OPTIONAL_MASK 0x000f 173*0Sstevel@tonic-gate #define MTCR_TREBLE_BYPASS 0x000f 174*0Sstevel@tonic-gate #define MTCR_BASS_MASK 0x0e00 175*0Sstevel@tonic-gate #define MTCR_BASS_OPTIONAL_MASK 0x0f00 176*0Sstevel@tonic-gate #define MTCR_BASS_BYPASS 0x0f00 177*0Sstevel@tonic-gate 178*0Sstevel@tonic-gate /* PC Beep Register Index 0ah - Optional */ 179*0Sstevel@tonic-gate #define AC97_PC_BEEP_REGISTER 0x0a 180*0Sstevel@tonic-gate #define PCBR_VOLUME_MASK 0x001e 181*0Sstevel@tonic-gate #define PCBR_0dB_ATTEN 0x0000 182*0Sstevel@tonic-gate #define PCBR_MUTE 0x8000 183*0Sstevel@tonic-gate 184*0Sstevel@tonic-gate /* Phone Volume Register Index 0ch - Optional */ 185*0Sstevel@tonic-gate #define AC97_PHONE_VOLUME_REGISTER 0x0c 186*0Sstevel@tonic-gate #define PVR_GAIN_MASK 0x001f 187*0Sstevel@tonic-gate #define PVR_0dB_GAIN 0x0010 188*0Sstevel@tonic-gate #define PVR_MAX_ATTEN 0x001f 189*0Sstevel@tonic-gate #define PVR_MUTE 0x8000 190*0Sstevel@tonic-gate 191*0Sstevel@tonic-gate /* Mic Volume Register Index 0eh */ 192*0Sstevel@tonic-gate #define AC97_MIC_VOLUME_REGISTER 0x0e 193*0Sstevel@tonic-gate #define MICVR_GAIN_MASK 0x001f 194*0Sstevel@tonic-gate #define MICVR_0dB_GAIN 0x0008 195*0Sstevel@tonic-gate #define MICVR_MAX_ATTEN 0x001f 196*0Sstevel@tonic-gate #define MICVR_20dB_BOOST 0x0040 197*0Sstevel@tonic-gate #define MICVR_20dB_NOBOOST 0x0000 198*0Sstevel@tonic-gate #define MICVR_MUTE 0x8000 199*0Sstevel@tonic-gate 200*0Sstevel@tonic-gate /* Line In Volume Register Index 10h */ 201*0Sstevel@tonic-gate #define AC97_LINE_IN_VOLUME_REGISTER 0x10 202*0Sstevel@tonic-gate #define LIVR_RIGHT_GAIN_MASK 0x001f 203*0Sstevel@tonic-gate #define LIVR_RIGHT_0dB_GAIN 0x0010 204*0Sstevel@tonic-gate #define LIVR_RIGHT_MAX_ATTEN 0x001f 205*0Sstevel@tonic-gate #define LIVR_LEFT_GAIN_MASK 0x1f00 206*0Sstevel@tonic-gate #define LIVR_LEFT_0dB_GAIN 0x1000 207*0Sstevel@tonic-gate #define LIVR_LEFT_MAX_ATTEN 0x1f00 208*0Sstevel@tonic-gate #define LIVR_MUTE 0x8000 209*0Sstevel@tonic-gate 210*0Sstevel@tonic-gate /* CD Volume Register Index 12h */ 211*0Sstevel@tonic-gate #define AC97_CD_VOLUME_REGISTER 0x12 212*0Sstevel@tonic-gate #define CDVR_RIGHT_GAIN_MASK 0x001f 213*0Sstevel@tonic-gate #define CDVR_RIGHT_0dB_GAIN 0x0010 214*0Sstevel@tonic-gate #define CDVR_RIGHT_MAX_ATTEN 0x001f 215*0Sstevel@tonic-gate #define CDVR_LEFT_GAIN_MASK 0x1f00 216*0Sstevel@tonic-gate #define CDVR_LEFT_0dB_GAIN 0x1000 217*0Sstevel@tonic-gate #define CDVR_LEFT_MAX_ATTEN 0x1f00 218*0Sstevel@tonic-gate #define CDVR_MUTE 0x8000 219*0Sstevel@tonic-gate 220*0Sstevel@tonic-gate /* Video Volume Register Index 14h - Optional */ 221*0Sstevel@tonic-gate #define AC97_VIDEO_VOLUME_REGISTER 0x14 222*0Sstevel@tonic-gate #define VIDVR_RIGHT_GAIN_MASK 0x001f 223*0Sstevel@tonic-gate #define VIDVR_RIGHT_0dB_GAIN 0x0010 224*0Sstevel@tonic-gate #define VIDVR_RIGHT_MAX_ATTEN 0x001f 225*0Sstevel@tonic-gate #define VIDVR_LEFT_GAIN_MASK 0x1f00 226*0Sstevel@tonic-gate #define VIDVR_LEFT_0dB_GAIN 0x1000 227*0Sstevel@tonic-gate #define VIDVR_LEFT_MAX_ATTEN 0x1f00 228*0Sstevel@tonic-gate #define VIDVR_MUTE 0x8000 229*0Sstevel@tonic-gate 230*0Sstevel@tonic-gate /* Aux Volume Register Index 16h - Optional */ 231*0Sstevel@tonic-gate #define AC97_AUX_VOLUME_REGISTER 0x16 232*0Sstevel@tonic-gate #define AUXVR_RIGHT_GAIN_MASK 0x001f 233*0Sstevel@tonic-gate #define AUXVR_RIGHT_0dB_GAIN 0x0010 234*0Sstevel@tonic-gate #define AUXVR_RIGHT_MAX_ATTEN 0x001f 235*0Sstevel@tonic-gate #define AUXVR_LEFT_GAIN_MASK 0x1f00 236*0Sstevel@tonic-gate #define AUXVR_LEFT_0dB_GAIN 0x1000 237*0Sstevel@tonic-gate #define AUXVR_LEFT_MAX_ATTEN 0x1f00 238*0Sstevel@tonic-gate #define AUXVR_MUTE 0x8000 239*0Sstevel@tonic-gate 240*0Sstevel@tonic-gate /* PCM Out Input Volume Register Index 18h */ 241*0Sstevel@tonic-gate #define AC97_PCM_OUT_VOLUME_REGISTER 0x18 242*0Sstevel@tonic-gate #define PCMOVR_RIGHT_GAIN_MASK 0x001f 243*0Sstevel@tonic-gate #define PCMOVR_RIGHT_0dB_GAIN 0x0010 244*0Sstevel@tonic-gate #define PCMOVR_RIGHT_MAX_ATTEN 0x001f 245*0Sstevel@tonic-gate #define PCMOVR_LEFT_GAIN_MASK 0x1f00 246*0Sstevel@tonic-gate #define PCMOVR_LEFT_0dB_GAIN 0x1000 247*0Sstevel@tonic-gate #define PCMOVR_LEFT_MAX_ATTEN 0x1f00 248*0Sstevel@tonic-gate #define PCMOVR_MUTE 0x8000 249*0Sstevel@tonic-gate 250*0Sstevel@tonic-gate /* Record Select Control Register Index 1ah */ 251*0Sstevel@tonic-gate #define AC97_RECORD_SELECT_CTRL_REGISTER 0x1a 252*0Sstevel@tonic-gate #define RSCR_R_MIC 0x0000 253*0Sstevel@tonic-gate #define RSCR_R_CD 0x0001 254*0Sstevel@tonic-gate #define RSCR_R_VIDEO 0x0002 255*0Sstevel@tonic-gate #define RSCR_R_AUX 0x0003 256*0Sstevel@tonic-gate #define RSCR_R_LINE_IN 0x0004 257*0Sstevel@tonic-gate #define RSCR_R_STEREO_MIX 0x0005 258*0Sstevel@tonic-gate #define RSCR_R_MONO_MIX 0x0006 259*0Sstevel@tonic-gate #define RSCR_R_PHONE 0x0007 260*0Sstevel@tonic-gate #define RSCR_L_MIC 0x0000 261*0Sstevel@tonic-gate #define RSCR_L_CD 0x0100 262*0Sstevel@tonic-gate #define RSCR_L_VIDEO 0x0200 263*0Sstevel@tonic-gate #define RSCR_L_AUX 0x0300 264*0Sstevel@tonic-gate #define RSCR_L_LINE_IN 0x0400 265*0Sstevel@tonic-gate #define RSCR_L_STEREO_MIX 0x0500 266*0Sstevel@tonic-gate #define RSCR_L_MONO_MIX 0x0600 267*0Sstevel@tonic-gate #define RSCR_L_PHONE 0x0700 268*0Sstevel@tonic-gate 269*0Sstevel@tonic-gate /* Record Gain Register Index 1ch */ 270*0Sstevel@tonic-gate #define AC97_RECORD_GAIN_REGISTER 0x1c 271*0Sstevel@tonic-gate #define RGR_RIGHT_MASK 0x000f 272*0Sstevel@tonic-gate #define RGR_RIGHT_0db_GAIN 0x0000 273*0Sstevel@tonic-gate #define RGR_RIGHT_MAX_GAIN 0x000f 274*0Sstevel@tonic-gate #define RGR_LEFT_MASK 0x0f00 275*0Sstevel@tonic-gate #define RGR_LEFT_0db_GAIN 0x0000 276*0Sstevel@tonic-gate #define RGR_LEFT_MAX_GAIN 0x0f00 277*0Sstevel@tonic-gate #define RGR_MUTE 0x8000 278*0Sstevel@tonic-gate 279*0Sstevel@tonic-gate /* Record Gain Mic Register Index 1eh - Optional */ 280*0Sstevel@tonic-gate #define AC97_RECORD_GAIN_MIC_REGISTER 0x1e 281*0Sstevel@tonic-gate #define RGMR_MASK 0x000f 282*0Sstevel@tonic-gate #define RGMR_MUTE 0x8000 283*0Sstevel@tonic-gate #define RGMR_MASK 0x000f 284*0Sstevel@tonic-gate #define RGMR_0db_GAIN 0x0000 285*0Sstevel@tonic-gate #define RGMR_MAX_GAIN 0x000f 286*0Sstevel@tonic-gate 287*0Sstevel@tonic-gate /* General Purpose Register Index 20h - Optional */ 288*0Sstevel@tonic-gate #define AC97_GENERAL_PURPOSE_REGISTER 0x20 289*0Sstevel@tonic-gate #define GPR_LPBK 0x0080 290*0Sstevel@tonic-gate #define GPR_MS_MIC1 0x0000 291*0Sstevel@tonic-gate #define GPR_MS_MIC2 0x0100 292*0Sstevel@tonic-gate #define GPR_MONO_MIX_IN 0x0000 293*0Sstevel@tonic-gate #define GPR_MONO_MIC_IN 0x0200 294*0Sstevel@tonic-gate #define GPR_BASS_BOOST 0x1000 295*0Sstevel@tonic-gate #define GPR_3D_STEREO_ENHANCE 0x2000 296*0Sstevel@tonic-gate #define GPR_ST 0x4000 297*0Sstevel@tonic-gate #define GPR_POP_PRE_3D 0x0000 298*0Sstevel@tonic-gate #define GPR_POP_POST_3D 0x8000 299*0Sstevel@tonic-gate 300*0Sstevel@tonic-gate /* 3D Control Regsiter Index 22h - Optional */ 301*0Sstevel@tonic-gate #define AC97_THREE_D_CONTROL_REGISTER 0x22 302*0Sstevel@tonic-gate #define TDCR_DEPTH_MASK 0x000f 303*0Sstevel@tonic-gate #define TDCR_CENTER_MASK 0x0f00 304*0Sstevel@tonic-gate #define TDCR_NULL 0x0000 305*0Sstevel@tonic-gate 306*0Sstevel@tonic-gate /* Powerdown Control Status Register Index 26h */ 307*0Sstevel@tonic-gate #define AC97_POWERDOWN_CTRL_STAT_REGISTER 0x26 308*0Sstevel@tonic-gate #define PCSR_ADC 0x0001 309*0Sstevel@tonic-gate #define PCSR_DAC 0x0002 310*0Sstevel@tonic-gate #define PCSR_ANL 0x0004 311*0Sstevel@tonic-gate #define PCSR_REF 0x0008 312*0Sstevel@tonic-gate #define PCSR_POWERD_UP (PCSR_ADC|PCSR_DAC|\ 313*0Sstevel@tonic-gate PCSR_ANL|PCSR_REF) 314*0Sstevel@tonic-gate #define PCSR_PR0 0x0100 315*0Sstevel@tonic-gate #define PCSR_PR1 0x0200 316*0Sstevel@tonic-gate #define PCSR_PR2 0x0400 317*0Sstevel@tonic-gate #define PCSR_PR3 0x0800 318*0Sstevel@tonic-gate #define PCSR_PR4 0x1000 319*0Sstevel@tonic-gate #define PCSR_PR5 0x2000 320*0Sstevel@tonic-gate #define PCSR_PR6 0x4000 321*0Sstevel@tonic-gate #define PCSR_EAPD 0x8000 322*0Sstevel@tonic-gate 323*0Sstevel@tonic-gate /* Extended Audio Register Index 28h - Optional */ 324*0Sstevel@tonic-gate #define AC97_EXTENDED_AUDIO_REGISTER 0x28 325*0Sstevel@tonic-gate #define EAR_VRA 0x0001 326*0Sstevel@tonic-gate #define EAR_DRA 0x0002 327*0Sstevel@tonic-gate #define EAR_VRM 0x0008 328*0Sstevel@tonic-gate #define EAR_CDAC 0x0040 329*0Sstevel@tonic-gate #define EAR_SDAC 0x0080 330*0Sstevel@tonic-gate #define EAR_LDAC 0x0100 331*0Sstevel@tonic-gate #define EAR_AMAP 0x0200 332*0Sstevel@tonic-gate #define EAR_PRIMARY_CODEC 0x0000 333*0Sstevel@tonic-gate #define EAR_SECONDARY_01_CODEC 0x4000 334*0Sstevel@tonic-gate #define EAR_SECONDARY_10_CODEC 0x8000 335*0Sstevel@tonic-gate #define EAR_SECONDARY_11_CODEC 0xc000 336*0Sstevel@tonic-gate 337*0Sstevel@tonic-gate /* Extended Audio Status and Control Register Index 2ah - Optional */ 338*0Sstevel@tonic-gate #define AC97_EXTENDED_AUDIO_STAT_CTRL_REGISTER 0x2a 339*0Sstevel@tonic-gate #define EASCR_VRA 0x0001 340*0Sstevel@tonic-gate #define EASCR_DRA 0x0002 341*0Sstevel@tonic-gate #define EASCR_VRM 0x0008 342*0Sstevel@tonic-gate #define EASCR_CDAC 0x0040 343*0Sstevel@tonic-gate #define EASCR_SDAC 0x0080 344*0Sstevel@tonic-gate #define EASCR_LDAC 0x0100 345*0Sstevel@tonic-gate #define EASCR_MADC 0x0200 346*0Sstevel@tonic-gate #define EASCR_PRI 0x0800 347*0Sstevel@tonic-gate #define EASCR_PRJ 0x1000 348*0Sstevel@tonic-gate #define EASCR_PRK 0x2000 349*0Sstevel@tonic-gate #define EASCR_PRL 0x4000 350*0Sstevel@tonic-gate 351*0Sstevel@tonic-gate /* Extended Front DAC Rate Register 2ch - Optional */ 352*0Sstevel@tonic-gate #define AC97_EXTENDED_FRONT_DAC_RATE_REGISTER 0x2c 353*0Sstevel@tonic-gate #define AC97_SAMPLE_RATE_48000 0xbb80 354*0Sstevel@tonic-gate 355*0Sstevel@tonic-gate /* Extended Surround DAC Rate Register 2eh - Optional */ 356*0Sstevel@tonic-gate #define AC97_EXTENDED_SURROUND_DAC_RATE_REGISTER 0x2e 357*0Sstevel@tonic-gate 358*0Sstevel@tonic-gate /* Extended LFE DAC Rate Register 30h - Optional */ 359*0Sstevel@tonic-gate #define AC97_EXTENDED_LFE_DAC_RATE_REGISTER 0x30 360*0Sstevel@tonic-gate 361*0Sstevel@tonic-gate /* Extended LR DAC Rate Register 32h - Optional */ 362*0Sstevel@tonic-gate #define AC97_EXTENDED_LR_DAC_RATE_REGISTER 0x32 363*0Sstevel@tonic-gate 364*0Sstevel@tonic-gate /* Extended Mic ADC Rate Register 34h - Optional */ 365*0Sstevel@tonic-gate #define AC97_EXTENDED_MIC_ADC_RATE_REGISTER 0x34 366*0Sstevel@tonic-gate 367*0Sstevel@tonic-gate /* Extended Center and LFE Volume Register 36h - Optional */ 368*0Sstevel@tonic-gate #define AC97_EXTENDED_C_LFE_VOLUME_REGISTER 0x36 369*0Sstevel@tonic-gate #define EXLFEVR_CENTER_MASK 0x001f 370*0Sstevel@tonic-gate #define EXLFEVR_CENTER_OPTIONAL_MASK 0x003f 371*0Sstevel@tonic-gate #define EXLFEVR_CENTER_MTUE 0x0080 372*0Sstevel@tonic-gate #define EXLFEVR_LFE_MASK 0x1f00 373*0Sstevel@tonic-gate #define EXLFEVR_LFE_OPTIONAL_MASK 0x3f00 374*0Sstevel@tonic-gate #define EXLFEVR_LFE_MUTE 0x8000 375*0Sstevel@tonic-gate 376*0Sstevel@tonic-gate /* Extended Left and Right Surround Volume Register 38h - Optional */ 377*0Sstevel@tonic-gate #define AC97_EXTENDED_LRS_VOLUME_REGISTER 0x38 378*0Sstevel@tonic-gate #define EXLFEVR_RIGHT_MASK 0x001f 379*0Sstevel@tonic-gate #define EXLFEVR_RIGHT_OPTIONAL_MASK 0x003f 380*0Sstevel@tonic-gate #define EXLFEVR_RIGHT_MTUE 0x0080 381*0Sstevel@tonic-gate #define EXLFEVR_LEFT_MASK 0x1f00 382*0Sstevel@tonic-gate #define EXLFEVR_LEFT_OPTIONAL_MASK 0x3f00 383*0Sstevel@tonic-gate #define EXLFEVR_LEFT_MUTE 0x8000 384*0Sstevel@tonic-gate 385*0Sstevel@tonic-gate /* Extended Modem ID Register 3ch - Optional */ 386*0Sstevel@tonic-gate #define AC97_EXTENDED_MODEM_ID_REGISTER 0x3c 387*0Sstevel@tonic-gate #define EMIDR_LINE1 0x0001 388*0Sstevel@tonic-gate #define EMIDR_LINE2 0x0002 389*0Sstevel@tonic-gate #define EMIDR_HSET 0x0004 390*0Sstevel@tonic-gate #define EMIDR_CID1 0x0008 391*0Sstevel@tonic-gate #define EMIDR_CID2 0x0010 392*0Sstevel@tonic-gate #define EMIDR_PRIMARY_CODEC 0x0000 393*0Sstevel@tonic-gate #define EMIDR_SECONDARY_01_CODEC 0x4000 394*0Sstevel@tonic-gate #define EMIDR_SECONDARY_10_CODEC 0x8000 395*0Sstevel@tonic-gate #define EMIDR_SECONDARY_11_CODEC 0xc000 396*0Sstevel@tonic-gate 397*0Sstevel@tonic-gate /* Extended Modem Status and Control Register 3eh - Optional */ 398*0Sstevel@tonic-gate #define AC97_EXTENDED_MODE_STAT_CTRL_REGISTER 0x3e 399*0Sstevel@tonic-gate #define EMSCR_BPIO 0x0001 400*0Sstevel@tonic-gate #define EMSCR_MREF 0x0002 401*0Sstevel@tonic-gate #define EMSCR_ADC1 0x0004 402*0Sstevel@tonic-gate #define EMSCR_DAC1 0x0008 403*0Sstevel@tonic-gate #define EMSCR_ADC2 0x0010 404*0Sstevel@tonic-gate #define EMSCR_DAC2 0x0020 405*0Sstevel@tonic-gate #define EMSCR_HADC 0x0040 406*0Sstevel@tonic-gate #define EMSCR_HDAC 0x0080 407*0Sstevel@tonic-gate #define EMSCR_PRA 0x0100 408*0Sstevel@tonic-gate #define EMSCR_PRB 0x0200 409*0Sstevel@tonic-gate #define EMSCR_PRC 0x0400 410*0Sstevel@tonic-gate #define EMSCR_PRD 0x0800 411*0Sstevel@tonic-gate #define EMSCR_PRE 0x1000 412*0Sstevel@tonic-gate #define EMSCR_PRF 0x2000 413*0Sstevel@tonic-gate #define EMSCR_PRG 0x4000 414*0Sstevel@tonic-gate #define EMSCR_PRH 0x8000 415*0Sstevel@tonic-gate 416*0Sstevel@tonic-gate /* Extended Modem Line 1 DAC/ADC Sample Rate Register 40h - Optional */ 417*0Sstevel@tonic-gate #define AC97_EXTENDED_MODEM_LINE1_RATE_REGISTER 0x40 418*0Sstevel@tonic-gate 419*0Sstevel@tonic-gate /* Extended Modem Line 2 DAC/ADC Sample Rate Register 42h - Optional */ 420*0Sstevel@tonic-gate #define AC97_EXTENDED_MODEM_LINE2_RATE_REGISTER 0x42 421*0Sstevel@tonic-gate 422*0Sstevel@tonic-gate /* Extended Modem Handset Sample Rate Register 44h - Optional */ 423*0Sstevel@tonic-gate #define AC97_EXTENDED_MODEM_HANDSET_RATE_REGISTER 0x44 424*0Sstevel@tonic-gate 425*0Sstevel@tonic-gate /* Extended Modem Line 1 DAC/ADC Level Register 46h - Optional */ 426*0Sstevel@tonic-gate #define AC97_EXTENDED_MODEM_LINE1_LEVEL_REGISTER 0x46 427*0Sstevel@tonic-gate #define EML1LR_ADC_LEVEL_MASK 0x000f 428*0Sstevel@tonic-gate #define EML1LR_ADC_LEVEL_MUTE 0x0080 429*0Sstevel@tonic-gate #define EML1LR_DAC_LEVEL_MASK 0x0f00 430*0Sstevel@tonic-gate #define EML1LR_DAC_LEVEL_MUTE 0x8000 431*0Sstevel@tonic-gate 432*0Sstevel@tonic-gate /* Extended Modem Line 2 DAC/ADC Level Register 48h - Optional */ 433*0Sstevel@tonic-gate #define AC97_EXTENDED_MODEM_LINE2_LEVEL_REGISTER 0x48 434*0Sstevel@tonic-gate #define EML2LR_ADC_LEVEL_MASK 0x000f 435*0Sstevel@tonic-gate #define EML2LR_ADC_LEVEL_MUTE 0x0080 436*0Sstevel@tonic-gate #define EML2LR_DAC_LEVEL_MASK 0x0f00 437*0Sstevel@tonic-gate #define EML2LR_DAC_LEVEL_MUTE 0x8000 438*0Sstevel@tonic-gate 439*0Sstevel@tonic-gate /* Extended Modem Handset DAC/ADC Level Register 4ah - Optional */ 440*0Sstevel@tonic-gate #define AC97_EXTENDED_MODEM_HANDSET_LEVEL_REGISTER 0x4a 441*0Sstevel@tonic-gate #define EMHLR_ADC_LEVEL_MASK 0x000f 442*0Sstevel@tonic-gate #define EMHLR_ADC_LEVEL_MUTE 0x0080 443*0Sstevel@tonic-gate #define EMHLR_DAC_LEVEL_MASK 0x0f00 444*0Sstevel@tonic-gate #define EMHLR_DAC_LEVEL_MUTE 0x8000 445*0Sstevel@tonic-gate 446*0Sstevel@tonic-gate /* Extended Modem GPIO Pin Configuration Register 4ch - Optional */ 447*0Sstevel@tonic-gate #define AC97_EXTENDED_MODEM_GPIO_PIN_REGISTER 0x4c 448*0Sstevel@tonic-gate 449*0Sstevel@tonic-gate /* Extended Modem GPIO Pin Polarity Register 4eh - Optional */ 450*0Sstevel@tonic-gate #define AC97_EXTENDED_MODEM_GPIO_POLARITY_REGISTER 0x4e 451*0Sstevel@tonic-gate 452*0Sstevel@tonic-gate /* Extended Modem GPIO Pin Sticky Register 50h - Optional */ 453*0Sstevel@tonic-gate #define AC97_EXTENDED_MODEM_GPIO_STICKY_REGISTER 0x50 454*0Sstevel@tonic-gate 455*0Sstevel@tonic-gate /* Extended Modem GPIO Pin Wake-up Mask Register 52h - Optional */ 456*0Sstevel@tonic-gate #define AC97_EXTENDED_MODEM_GPIO_WAKEUP_REGISTER 0x52 457*0Sstevel@tonic-gate 458*0Sstevel@tonic-gate /* Extended Modem GPIO Pin Status Mask Register 54h - Optional */ 459*0Sstevel@tonic-gate #define AC97_EXTENDED_MODEM_GPIO_STATUS_REGISTER 0x54 460*0Sstevel@tonic-gate 461*0Sstevel@tonic-gate /* Extended Modem AFE Status and Control Register 56h - Optional */ 462*0Sstevel@tonic-gate #define AC97_EXTENDED_MODEM_AFE_STAT_CTRL_REGISTER 0x56 463*0Sstevel@tonic-gate #define EMAFESCR_L1B0 0x0001 464*0Sstevel@tonic-gate #define EMAFESCR_L1B1 0x0002 465*0Sstevel@tonic-gate #define EMAFESCR_L1B2 0x0004 466*0Sstevel@tonic-gate #define EMAFESCR_L2B0 0x0010 467*0Sstevel@tonic-gate #define EMAFESCR_L2B1 0x0020 468*0Sstevel@tonic-gate #define EMAFESCR_L2B2 0x0040 469*0Sstevel@tonic-gate #define EMAFESCR_HSB0 0x0100 470*0Sstevel@tonic-gate #define EMAFESCR_HSB1 0x0200 471*0Sstevel@tonic-gate #define EMAFESCR_HSB2 0x0400 472*0Sstevel@tonic-gate #define EMAFESCR_MLINK_ON 0x0000 473*0Sstevel@tonic-gate #define EMAFESCR_MLINK_OFF 0x1000 474*0Sstevel@tonic-gate #define EMAFESCR_CIDR 0x2000 475*0Sstevel@tonic-gate #define EMAFESCR_CID1 0x4000 476*0Sstevel@tonic-gate #define EMAFESCR_CID2 0x8000 477*0Sstevel@tonic-gate 478*0Sstevel@tonic-gate /* Vender Reserved Registers 5ah - 7ah - Optional */ 479*0Sstevel@tonic-gate #define AC97_VENDOR_REGISTER_01 0x5a 480*0Sstevel@tonic-gate #define AC97_VENDOR_REGISTER_02 0x5c 481*0Sstevel@tonic-gate #define AC97_VENDOR_REGISTER_03 0x5e 482*0Sstevel@tonic-gate #define AC97_VENDOR_REGISTER_04 0x60 483*0Sstevel@tonic-gate #define AC97_VENDOR_REGISTER_05 0x62 484*0Sstevel@tonic-gate #define AC97_VENDOR_REGISTER_06 0x64 485*0Sstevel@tonic-gate #define AC97_VENDOR_REGISTER_07 0x66 486*0Sstevel@tonic-gate #define AC97_VENDOR_REGISTER_08 0x68 487*0Sstevel@tonic-gate #define AC97_VENDOR_REGISTER_09 0x6a 488*0Sstevel@tonic-gate #define AC97_VENDOR_REGISTER_10 0x6c 489*0Sstevel@tonic-gate #define AC97_VENDOR_REGISTER_11 0x6e 490*0Sstevel@tonic-gate #define AC97_VENDOR_REGISTER_12 0x70 491*0Sstevel@tonic-gate #define AC97_VENDOR_REGISTER_13 0x72 492*0Sstevel@tonic-gate #define AC97_VENDOR_REGISTER_14 0x74 493*0Sstevel@tonic-gate #define AC97_VENDOR_REGISTER_15 0x76 494*0Sstevel@tonic-gate #define AC97_VENDOR_REGISTER_16 0x78 495*0Sstevel@tonic-gate #define AC97_VENDOR_REGISTER_17 0x7a 496*0Sstevel@tonic-gate 497*0Sstevel@tonic-gate /* Vendor ID1 Register 7ch */ 498*0Sstevel@tonic-gate #define AC97_VENDOR_ID1_REGISTER 0x7c 499*0Sstevel@tonic-gate #define VID1R_CHAR2_MASK 0x00ff 500*0Sstevel@tonic-gate #define VID1R_CHAR1_MASK 0xff00 501*0Sstevel@tonic-gate 502*0Sstevel@tonic-gate /* Vendor ID2 Register 7eh */ 503*0Sstevel@tonic-gate #define AC97_VENDOR_ID2_REGISTER 0x7e 504*0Sstevel@tonic-gate #define VID2R_REVISION_MASK 0x00ff 505*0Sstevel@tonic-gate #define VID2R_CHAR3_MASK 0xff00 506*0Sstevel@tonic-gate 507*0Sstevel@tonic-gate #endif /* _KERNEL */ 508*0Sstevel@tonic-gate 509*0Sstevel@tonic-gate #ifdef __cplusplus 510*0Sstevel@tonic-gate } 511*0Sstevel@tonic-gate #endif 512*0Sstevel@tonic-gate 513*0Sstevel@tonic-gate #endif /* _SYS_AC97_H */ 514