⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ac97ucb1400.h

📁 pxa270触摸屏驱动程序
💻 H
字号:
/******************************************************************************
**
**  COPYRIGHT (C) 2001 Intel Corporation.
**
**  This file and the software in it is furnished under 
**  license and may only be used or copied in accordance with the terms of the 
**  license. The information in this file is furnished for informational use 
**  only, is subject to change without notice, and should not be construed as 
**  a commitment by Intel Corporation. Intel Corporation assumes no 
**  responsibility or liability for any errors or inaccuracies that may appear 
**  in this document or any software that may be provided in association with 
**  this document. 
**  Except as permitted by such license, no part of this document may be 
**  reproduced, stored in a retrieval system, or transmitted in any form or by 
**  any means without the express written consent of Intel Corporation. 
**
**  FILENAME:       Ac97.h
**
**  PURPOSE:        Module private constants, structure and variable  
**                  declarations for the AC'97 codec device driver.
**
**  Valid for    :  Subset of AC '97 Rev 2.1
**
**  $Modtime: 7/17/03 1:01p $ 
******************************************************************************/
#ifndef _AC97_UCB1400_H
#define _AC97_UCB1400_H

#ifdef  _DEFINING_AC97_UCB1400
#define EXTRN
#else
#define EXTRN   extern
#endif


// This table assumes the UCB1400 codec.  It is also assumed that the driver of 
//   the UCB1400's touch screen controller capabilities is ignorant of this
//   module; that is one reason some of the registers are listed as not 
//   supported.  We don't want to overwrite another driver's values.
// A more complex system would require one of these for each supported codec,
//   plus an "active" version for each codec in the system.

// Default values are mostly per the UCB1400 documentation, if they are 
//  specified.  Variable rate is enabled and set for 44.1 KHz.
// All registers must have an initialization value for syntactic reasons,
//  even if they are read-only or not supported.  Many none-supported registers
//  are given the default values found in the AC'97 specification.
// Read-only registers have the expected readable value in the default value 
//  position of the entry.

static
// Ac97MixerRegUsageTableT Ac97MixerRegInitUsageTblUCB1400 =
Ac97MixerRegUsageAndInitTableT Ac97MixerRegInitUsageTblUCB1400 =
{
    AC97_MR_USAGE_DO_NOT_INIT,     0x02A0,   // 0x00 
    AC97_MR_USAGE_AUDIO,           0x8000,   // 0x02 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x8000,   // 0x04 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x8000,   // 0x06 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0F0F,   // 0x08 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x8000,   // 0x0A 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x8008,   // 0x0C 
    AC97_MR_USAGE_AUDIO,           0x0040,   // 0x0E Mic boost enabled
    AC97_MR_USAGE_NOT_SUPPORTED,   0x8808,   // 0x10 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x8808,   // 0x12 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x8808,   // 0x14 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x8808,   // 0x16 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x8808,   // 0x18 
    AC97_MR_USAGE_AUDIO,           0x0000,   // 0x1A Mic in selected, L+R
    AC97_MR_USAGE_AUDIO,           0x8000,   // 0x1C 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x8000,   // 0x1E 
    AC97_MR_USAGE_AUDIO,           0x0000,   // 0x20 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x22 
    AC97_MR_USAGE_RESERVED,        0x0000,   // 0x24
    AC97_MR_USAGE_DO_NOT_INIT,     0x0000,   // 0x26  

/*********** AC97 Extended (r2.0) Audio mixer registers (0x28-0x3A) **********/
    AC97_MR_USAGE_READ_ONLY,       0x0001,   // 0x28 Expect VRA support
    AC97_MR_USAGE_AUDIO,           0x0001,   // 0x2A Variable rates enabled
    AC97_MR_USAGE_AUDIO,           AC97_DEFAULT_SAMPLE_RATE,   // 0x2C PCM out
    AC97_MR_USAGE_NOT_SUPPORTED,   AC97_DEFAULT_SAMPLE_RATE,   // 0x2E 
    AC97_MR_USAGE_NOT_SUPPORTED,   AC97_DEFAULT_SAMPLE_RATE,   // 0x30 
    AC97_MR_USAGE_AUDIO,           AC97_DEFAULT_SAMPLE_RATE,   // 0x32 PCM in
    AC97_MR_USAGE_NOT_SUPPORTED,   AC97_DEFAULT_SAMPLE_RATE,   // 0x34 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x8080,   // 0x36 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x8080,   // 0x38 
    AC97_MR_USAGE_RESERVED,        0x0000,   // 0x3A 

/*********** AC97 Extended (r2.0) Modem mixer registers (0x3C-0x58) **********/
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x3C 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x3E 
    AC97_MR_USAGE_NOT_SUPPORTED,   AC97_DEFAULT_SAMPLE_RATE,   // 0x40 
    AC97_MR_USAGE_NOT_SUPPORTED,   AC97_DEFAULT_SAMPLE_RATE,   // 0x42 
    AC97_MR_USAGE_NOT_SUPPORTED,   AC97_DEFAULT_SAMPLE_RATE,   // 0x44 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x8080,   // 0x46
    AC97_MR_USAGE_NOT_SUPPORTED,   0x8080,   // 0x48 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x8080,   // 0x4A 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x4C 
    AC97_MR_USAGE_NOT_SUPPORTED,   0xFFFF,   // 0x4E 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x50 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x52 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x54 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x56 
    AC97_MR_USAGE_RESERVED,        0x0000,   // 0x58 

/***************  Vendor reserved mixer registers (0x5A-0x7A) ****************/
// Note: UCB1400 uses registers 0x5A .. 0x6E; however, they are not supported
//        by this driver.  They supply GPIO interface, touch screen and device
//        test mode control.
//      UCB1400 registers 0x6A and 0x6B also provide access to certain advanced
//        audio and power mode capabilities.  The first release of this driver
//        does not support them.

    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x5A UCB1400 uses this
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x5C UCB1400 uses this
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x5E UCB1400 uses this
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x60 UCB1400 uses this
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x62 UCB1400 uses this
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x64 UCB1400 uses this
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x66 UCB1400 uses this
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x68 UCB1400 uses this
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x6A UCB1400 uses this
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x6C UCB1400 uses this
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x6E UCB1400 uses this
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x70 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x72 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x74 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x76 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x78 
    AC97_MR_USAGE_NOT_SUPPORTED,   0x0000,   // 0x7A 

/***************  Final standard mixer registers (0x7C, 0x7E) ****************/

    AC97_MR_USAGE_READ_ONLY,       0x5053,   // 0x7C 
    AC97_MR_USAGE_READ_ONLY,       0x4304    // 0x7E 

};  // Ac97MixerRegInitUsageTblUCB1400

// Special masks values for UCB1400, from the data sheet.
//  Supported features and powerable subsystems.

static
Ac97MixerRegsSpecialMasksT  Ac97MixerRegsSpecialMasks1400 =
{
    
   (1u << AC97_MR_REC_SEL_MIC |
    1u << AC97_MR_REC_SEL_LINE_IN), // mr0x1aRecSelSupport
    AC97_MR_GPR_LPBK_ENAB,          // mr0x20GPRSupport
    0x3F0B,                         // mr0x26EaPCSRSupport
    0x000B,                         // mr0x26EaAudioReadyVal
    0x0001,                         // mr0x2aEaSCRSupport 
    0x0000                          // mr0x3eEmSCRSupport 
} ;

/*----------------------------------------------------------------------
 * Function typedefs
 */


/*----------------------------------------------------------------------*/

/*-------------------------------------------------------------------------
  AC '97 menu miscellaneous variables
-------------------------------------------------------------------------*/

/*----------------------------------------------------------------------
 * Local globals
 */

static
PCHAR NameUcb1400P = "UCB1400";

/*
*******************************************************************************
    Function prototypes for private (static) functions
*******************************************************************************
*/


#undef EXTRN

#endif //  _AC97_UCB1400_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -