//-----WolfSon " WM8987L "-----//
typedef struct
   { BYTE Dev;
     union WTYPE RegX;                           // For " WM8987L "
     BYTE Power_Stage;                           // Check Power Status 
     WORD Cnt;
   } WOLFSON;

#define    R0                  0x0000            // Left Input volume
        #define     LINVOL_0DB           0x0017  // 
        #define     LINMUTE              0x0080  // 
        #define     LIVU                 0x0100  //
#define    R1                  0x0200            // Right Input volume
        #define     RINVOL_0DB           0x0017  // 
        #define     RINMUTE              0x0080  // 
        #define     RIVU                 0x0100  //
#define    R2                  0x0400
#define    R3                  0x0600
#define    R4                  0x0800
#define    R5                  0x0A00            // ADC/DAC Control
        #define     DACMU                0x0008    // 
#define    R6                  0x0C00
#define    R7                  0x0E00            // For audio interface
        #define     LJF                  0x0001  // LJF
        #define     IIS                  0x0002  // IIS
        #define     PCM                  0x0003  // PCM
        #define     WL_32                0x000C  // 32bit
        #define     WL_16                0x0000  // 16bit
#define    R8                  0x1000
#define    R9                  0x1200
#define    R10                 0x1400
#define    R11                 0x1600
#define    R12                 0x1800            // For Bass Control
        #define     BB                   0x0080  //
        #define     BC                   0x0040  //
#define    R13                 0x1A00            // For Treble Control
        #define     TC                   0x0040  //
#define    R15                 0x1E00
#define    R16                 0x2000
#define    R17                 0x2200
#define    R18                 0x2400
#define    R19                 0x2600
#define    R20                 0x2800
#define    R21                 0x2A00
#define    R22                 0x2C00
#define    R23                 0x2E00
#define    R24                 0x3000
#define    R25                 0x3200            // Power manager control 0
        #define     DIGENB               0x0001  // 
        #define     MICB                 0x0002  // 
        #define     ADCR                 0x0004  // 
        #define     ADCL                 0x0008  // 
        #define     AINR                 0x0010  // 
        #define     AINL                 0x0020  // 
        #define     VREF                 0x0040  // 
        #define     VMIDSEL_500K         0x0080  // For Power Down
        #define     VMIDSEL_50K          0x0100  // For Normal Playing
        #define     VMIDSEL_5K           0x0180  // For Power ON      
#define    R26                 0x3400            // Power manager control 1
        #define     OUT3                 0x0002  // 
        #define     MONO                 0x0004  // 
        #define     ROUT2                0x0008  // 
        #define     LOUT2                0x0010  // 
        #define     ROUT1                0x0020  // 
        #define     DACR                 0x0080  // 
        #define     DACL                 0x0100  // 
#define    R27                 0x3600
#define    R31                 0x3E00
#define    R32                 0x4000            // ADCL Singal path & Boost control
        #define     LINPUT1              0x0000  //
        #define     LINPUT2              0x0040  //
        #define     LMICBOOST_0DB        0x0000  //
        #define     LMICBOOST_13DB       0x0010  // 
        #define     LMICBOOST_20DB       0x0020  // 
        #define     LMICBOOST_29DB       0x0030  // 
#define    R33                 0x4200            // ADCR Singal path & Boost control
        #define     RINPUT1              0x0000  //
        #define     RINPUT2              0x0040  //
        #define     RMICBOOST_0DB        0x0000  // 
        #define     RMICBOOST_13DB       0x0010  // 
        #define     RMICBOOST_20DB       0x0020  // 
        #define     RMICBOOST_29DB       0x0030  // 
#define    R34                 0x4400            // Left Output Mixer
        #define     LD2LO                0x0100  // 
#define    R35                 0x4600
#define    R36                 0x4800
#define    R37                 0x4A00            // Right Output Mixer
        #define     RD2RO                0x0100  // 
#define    R38                 0x4C00
#define    R39                 0x4E00
#define    R40                 0x5000
#define    R41                 0x5200
#define    R42                 0x5400


#define    POWER_DOWN          0x00
#define    POWER_START         0x5A
#define    POWER_RISING        0xA5
#define    POWER_UP_OK         0x55
#define    POWER_STABLE        0xAA