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

📄 ac97api.h

📁 pxa270触摸屏驱动程序
💻 H
📖 第 1 页 / 共 4 页
字号:
// lower priority       ac97SetMasterVolMono...FnP;

    // 0x08

Bass boost Left / Right
Treble boost Left / Right


    static
    UINT32 Ac97GetMasterToneFnP (Ac97ContextT* ctxP, unsigned char *toneLeft, unsigned char *toneRight);

    static
    UINT32 Ac97SetMasterToneFnP (Ac97ContextT* ctxP, unsigned char  toneLeft, unsigned char toneRight);

    // 0x0A: PC BEEP does not use any TS
// lower priority         ac97GetPcBeepVol...FnP;
// lower priority         ac97SetPcBeepVol...FnP;

    // 0x0C: Phone is candidate for use of TS 3,4
// lower priority         ac97GetPhoneVol...FnP;
// lower priority         ac97SetPhoneVol...FnP;

    // 0x0E
// UCB1400 only supports boost enable.
// lower priority         ac97GetMicVol...FnP;
// lower priority         ac97SetMicVol...FnP;

@@@ Need microphone boost enable functions

    // 0x10
// lower priority        ac97GetLineInVol...FnP;
// lower priority        ac97SetLineInVol...FnP;

    // 0x12
// lower priority        ac97GetCdVol...FnP;
// lower priority        ac97SetCdVol...FnP;

    // 0x14
// lower priority        ac97GetVideoVol...FnP;
// lower priority        ac97SetVideoVol...FnP;

    // 0x16
// lower priority        ac97GetAuxVol...FnP;
// lower priority        ac97SetAuxVol...FnP;


    // 0x18
// lower priority        ac97GetPcmOutVol...FnP;
// lower priority        ac97SetPcmOutVol...FnP;

    // 0x1A
    Ac97GetStereoSideValueFnPT Ac97GetRecordSelectLeftFnP; 
    Ac97GetStereoSideValueFnPT Ac97GetRecordSelectRightFnP;
    Ac97SetStereoSideValueFnPT Ac97SetRecordSelectLeftFnP; 
    Ac97SetStereoSideValueFnPT Ac97SetRecordSelectRightFnP;
    
    // 0x1C
    Ac97GetStereoSideValueFnPT Ac97GetRecordGainLeftFnP; 
    Ac97GetStereoSideValueFnPT Ac97GetRecordGainRightFnP;
    Ac97GetEnableFnPT          Ac97GetRecordGainMuteFnP;

    Ac97SetStereoSideValueFnPT Ac97SetRecordGainLeftFnP; 
    Ac97SetStereoSideValueFnPT Ac97SetRecordGainRightFnP;
    Ac97SetEnableFnPT          Ac97SetRecordGainMuteFnP;

    // 0x1E
// lower priority        ac97GetRecordGainMicFnP;
// lower priority        ac97SetRecordGainMicFnP;

    // 0x20
// Only special purpose functions for GPR access?

    Ac97GetEnableFnPT Ac97SetHWLoopAdcToDacFnP;

    // 0x26
// Explicit reset and power control: deferred


    /**********  AC97 Extended (2.0) Audio mixer registers (0x28-0x3A) ***********/

    // 0x28
    Ac97GetWholeRegFnPT

    static
    UINT32 ac97GetExtendedAudioIDFnP (Ac97ContextT* ctxP, PUINT16 eaCapabilitiesP);

    // 0x2A
    // Targeted controls only?
//
// lower priority    ac97GetExtendedAudioStatCtrlFnP;
// lower priority    ac97SetExtendedAudioStatCtrlFnP;

    ac97GetEnableFnPT ac97SetPcmVariableRateEnableFnP;
    ac97SetEnableFnPT ac97GetPcmVariableRateEnableFnP;

// lower priority    ac97GetEnableFnPT ac97SetMicVariableRateEnableFnP;
// lower priority    ac97SetEnableFnPT ac97GetMicVariableRateEnableFnP;

    // 0x2C: Controls variable rate for SDAT_OUT slots 3, 4 & 6
    Ac97GetWholeRegFnPT ac97GetPcmFrontDacRateFnP;
    Ac97SetWholeRegFnPT ac97SetPcmFrontDacRateFnP;

    // 0x2E: Controls variable rate for SDAT_OUT slots 7, 8
    // Not supported by target controller

    // 0x30: Controls variable rate for SDATA_OUT TS 9
    // Not supported by target controller

    // 0x32: Controls variable rate for SDATA_IN slots 3, 4
    Ac97GetWholeRegFnPT ac97GetPcmLrAdcRateFnP;
    Ac97SetWholeRegFnPT ac97SetPcmLrAdcRateFnP;

    // 0x34: Controls variable rate for SDATA_IN slot 5
// lower priority    Ac97GetWholeRegFnPT ac97GetMicAdcRateFnP;
// lower priority    Ac97SetWholeRegFnPT ac97SetMicAdcRateFnP;

// 0x36: PCM Center and PCM LFE use SDATA_OUT TS 6 & 9
// Not supported by target controller

// 0x38: Left + Right Surround Sound use SDATA_OUT TS 7 & 8
// Not supported by target controller

// 0x3A: Reserved


/*********** AC97 Extended (r2.0) Modem mixer registers (0x3C-0x58) **********/
// No support for in the near term.
//  See ac97.h for notes on future possible functions.
// 0x3C
// 0x3E
// 0x40: Line1 uses TS 5
// 0x42: Line2 uses TS 10
// 0x44: Handset uses TS 11
// 0x46: Line1 uses TS 5
// 0x48: Line2 uses TS 10
// 0x4A: Handset uses TS 11
// Standard GPIO processing involves the use of TS12
// 0x4C
// 0x4E
// 0x50
// 0x52
// 0x54: Standard GPIO processing also uses TS 12 for reporting levels (status)
//       Standard GPIO processing uses only TS 12 for setting levels  
//       Some codecs perform the GPIO operations via Vendor reserved registers.
//          These structure members will be used for them anyway, because 
//          the logical operation is equivalent.
           // Check Bit 0 of SDATA_IN TS 12, clear record of change to 1
// 0x56
// 0x58 Reserved
/***************  Vendor reserved mixer registers (0x5A-0x7A) ****************/
// Vendor A
// 0x5A
// 0x5C
// 0x5E
// 0x60
// 0x62
// 0x64
// 0x66
// 0x68
// 0x6A
// 0x6C
// 0x6E
// 0x70
// 0x72
// 0x74
// 0x76
// 0x78
// 0x7A

// Vendor B
// 0x5A
// 0x5C
// 0x5E
// 0x60
// 0x62
// 0x64
// 0x66
// 0x68
// 0x6A
// 0x6C
// 0x6E
// 0x70
// 0x72
// 0x74
// 0x76
// 0x78
// 0x7A

/********************* Last two original AC97 mixer registers ****************/

// 0x7C, 0x7E
    Ac97GetVendorIDandRevFnPT ac97GetVendorIDandRevFnP;

/***************  Services not mediated by mixer registers ****************/

static
int AC07_MuteAllUnimplementedFnPT (Ac97ContextT* ctxP);


#endif
// Update mixer shadow registers
// ? Compare shadow registers?
    
} Ac97ServicesT; 


/*
*******************************************************************************

*******************************************************************************
*/

// Special-purpose masks, mostly for variability in target codec and platform
//  capabilities.  Features and controls that are supported have bit set.

// Masks and shifts for Powerdown Control/Status Register 0x26
#define AC97_MR_SM_26_PWRDOWN_STAT_MSK    0x0F
#define AC97_MR_SM_26_PWRDOWN_CTRL_MSK    0xFF
#define AC97_MR_SM_26_PWRDOWN_CTRL_SHFT      8

// Masks and shifts for Extended Audio Status and Control Register 0x2A
#define AC97_MR_SM_2A_FEAT_ENAB_MSK       0x0B
#define AC97_MR_SM_2A_FEAT_PWR_MSK        0x0F
#define AC97_MR_SM_2A_FEAT_PWR_SHFT         11
#define AC97_MR_SM_2A_FEAT_RDY_SHFT          6

// Masks and shifts for Extended Modem Status and Control Register 0x3E
#define AC97_MR_SM_3E_SUBSYS_PWR_MSK      0xFF
#define AC97_MR_SM_3E_SUBSYS_PWR_SHFT        8
#define AC97_MR_SM_3E_SUBSYS_RDY_SHFT        0

typedef struct Ac97MixerRegsSpecialMasksS
{
    UINT32  mr0x1aRecSelSupport;   // Record Select Register 0x1a: Assume L=R
    UINT32  mr0x20GPRSupport;      // General Purpose Register 0x20
    UINT32  mr0x26EaPCSRSupport;   // Powerdown Control/Status Register 0x26
    UINT32  mr0x26EaAudioReadyVal; // PCS value when all audio systems ready.
    UINT32  mr0x2aEaSCRSupport;    // Extended Audio Status and Cntl Reg 0x2A
    UINT32  mr0x3eEmSCRSupport;    // Extended Modem Status and Cntl Reg 0x3E

} Ac97MixerRegsSpecialMasksT;



/*
*******************************************************************************
   Function pointer types
*******************************************************************************
*/
                                    // Function pointer type required for  
                                    // notification of special events.
typedef void (*Ac97ClientCallbackFnPT)(void *); 

/*
*******************************************************************************
    Client audio, mic and modem buffer header definition
*******************************************************************************
*/


// Notes: Buf is available for client use if bytesProcessed == logicalBufSize
//        bytesProcessed field must be set to 0 when header is passed to driver

typedef struct Ac97ClientDataBufHeaderS
{                             // How many bytes for driver to read or write
    INT     logicalBufSize;   //  - must be in increments of 4 bytes
                              // How many bytes the driver has transferred
    INT     bytesProcessed;   //  between this buffer and the driver's own bufs
    PCHAR   bufBaseP;         // Pointer to base of client data buffer area
                              // TRUE if next buffer header is ready to be 
                              //  processed.  Used to pause processing without
    BOOL    nextProcessing;   //  breaking a linked list.
                              // Pointer to next buffer header; may be NULL
    struct Ac97ClientDataBufHeaderT* nextP;
    UINT32  clientPrivate;    // Available for client usage.
    
} Ac97ClientDataBufHeaderT;

/*
*******************************************************************************

*******************************************************************************
*/

typedef enum Ac97MixerRegUsageCategoryS 
{
    AC97_MR_USAGE_AUDIO   = 1,  // Including extended audio
    AC97_MR_USAGE_MODEM,
    AC97_MR_USAGE_BOTH,         // Both audio and modem.  More detail needed.
    AC97_MR_USAGE_READ_ONLY,
    AC97_MR_USAGE_RESERVED,     // Reserved per AC'97 spec
    AC97_MR_USAGE_NOT_SUPPORTED,  // Including codec "reserved"
    AC97_MR_USAGE_DO_NOT_INIT,  // Including codec "reserved"
    AC97_MR_USAGE_END           // End-of-list marker

⌨️ 快捷键说明

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