Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
cs42l51.h File Reference

Go to the source code of this file.

Macros

#define CS42L51_CHIP_ID   0x1B
 
#define CS42L51_CHIP_REV_A   0x00
 
#define CS42L51_CHIP_REV_B   0x01
 
#define CS42L51_CHIP_REV_ID   0x01
 
#define CS42L51_MK_CHIP_REV(a, b)   ((a)<<3|(b))
 
#define CS42L51_POWER_CTL1   0x02
 
#define CS42L51_POWER_CTL1_PDN_DACB   (1<<6)
 
#define CS42L51_POWER_CTL1_PDN_DACA   (1<<5)
 
#define CS42L51_POWER_CTL1_PDN_PGAB   (1<<4)
 
#define CS42L51_POWER_CTL1_PDN_PGAA   (1<<3)
 
#define CS42L51_POWER_CTL1_PDN_ADCB   (1<<2)
 
#define CS42L51_POWER_CTL1_PDN_ADCA   (1<<1)
 
#define CS42L51_POWER_CTL1_PDN   (1<<0)
 
#define CS42L51_MIC_POWER_CTL   0x03
 
#define CS42L51_MIC_POWER_CTL_AUTO   (1<<7)
 
#define CS42L51_MIC_POWER_CTL_SPEED(x)   (((x)&3)<<5)
 
#define CS42L51_QSM_MODE   3
 
#define CS42L51_HSM_MODE   2
 
#define CS42L51_SSM_MODE   1
 
#define CS42L51_DSM_MODE   0
 
#define CS42L51_MIC_POWER_CTL_3ST_SP   (1<<4)
 
#define CS42L51_MIC_POWER_CTL_PDN_MICB   (1<<3)
 
#define CS42L51_MIC_POWER_CTL_PDN_MICA   (1<<2)
 
#define CS42L51_MIC_POWER_CTL_PDN_BIAS   (1<<1)
 
#define CS42L51_MIC_POWER_CTL_MCLK_DIV2   (1<<0)
 
#define CS42L51_INTF_CTL   0x04
 
#define CS42L51_INTF_CTL_LOOPBACK   (1<<7)
 
#define CS42L51_INTF_CTL_MASTER   (1<<6)
 
#define CS42L51_INTF_CTL_DAC_FORMAT(x)   (((x)&7)<<3)
 
#define CS42L51_DAC_DIF_LJ24   0x00
 
#define CS42L51_DAC_DIF_I2S   0x01
 
#define CS42L51_DAC_DIF_RJ24   0x02
 
#define CS42L51_DAC_DIF_RJ20   0x03
 
#define CS42L51_DAC_DIF_RJ18   0x04
 
#define CS42L51_DAC_DIF_RJ16   0x05
 
#define CS42L51_INTF_CTL_ADC_I2S   (1<<2)
 
#define CS42L51_INTF_CTL_DIGMIX   (1<<1)
 
#define CS42L51_INTF_CTL_MICMIX   (1<<0)
 
#define CS42L51_MIC_CTL   0x05
 
#define CS42L51_MIC_CTL_ADC_SNGVOL   (1<<7)
 
#define CS42L51_MIC_CTL_ADCD_DBOOST   (1<<6)
 
#define CS42L51_MIC_CTL_ADCA_DBOOST   (1<<5)
 
#define CS42L51_MIC_CTL_MICBIAS_SEL   (1<<4)
 
#define CS42L51_MIC_CTL_MICBIAS_LVL(x)   (((x)&3)<<2)
 
#define CS42L51_MIC_CTL_MICB_BOOST   (1<<1)
 
#define CS42L51_MIC_CTL_MICA_BOOST   (1<<0)
 
#define CS42L51_ADC_CTL   0x06
 
#define CS42L51_ADC_CTL_ADCB_HPFEN   (1<<7)
 
#define CS42L51_ADC_CTL_ADCB_HPFRZ   (1<<6)
 
#define CS42L51_ADC_CTL_ADCA_HPFEN   (1<<5)
 
#define CS42L51_ADC_CTL_ADCA_HPFRZ   (1<<4)
 
#define CS42L51_ADC_CTL_SOFTB   (1<<3)
 
#define CS42L51_ADC_CTL_ZCROSSB   (1<<2)
 
#define CS42L51_ADC_CTL_SOFTA   (1<<1)
 
#define CS42L51_ADC_CTL_ZCROSSA   (1<<0)
 
#define CS42L51_ADC_INPUT   0x07
 
#define CS42L51_ADC_INPUT_AINB_MUX(x)   (((x)&3)<<6)
 
#define CS42L51_ADC_INPUT_AINA_MUX(x)   (((x)&3)<<4)
 
#define CS42L51_ADC_INPUT_INV_ADCB   (1<<3)
 
#define CS42L51_ADC_INPUT_INV_ADCA   (1<<2)
 
#define CS42L51_ADC_INPUT_ADCB_MUTE   (1<<1)
 
#define CS42L51_ADC_INPUT_ADCA_MUTE   (1<<0)
 
#define CS42L51_DAC_OUT_CTL   0x08
 
#define CS42L51_DAC_OUT_CTL_HP_GAIN(x)   (((x)&7)<<5)
 
#define CS42L51_DAC_OUT_CTL_DAC_SNGVOL   (1<<4)
 
#define CS42L51_DAC_OUT_CTL_INV_PCMB   (1<<3)
 
#define CS42L51_DAC_OUT_CTL_INV_PCMA   (1<<2)
 
#define CS42L51_DAC_OUT_CTL_DACB_MUTE   (1<<1)
 
#define CS42L51_DAC_OUT_CTL_DACA_MUTE   (1<<0)
 
#define CS42L51_DAC_CTL   0x09
 
#define CS42L51_DAC_CTL_DATA_SEL(x)   (((x)&3)<<6)
 
#define CS42L51_DAC_CTL_FREEZE   (1<<5)
 
#define CS42L51_DAC_CTL_DEEMPH   (1<<3)
 
#define CS42L51_DAC_CTL_AMUTE   (1<<2)
 
#define CS42L51_DAC_CTL_DACSZ(x)   (((x)&3)<<0)
 
#define CS42L51_ALC_PGA_CTL   0x0A
 
#define CS42L51_ALC_PGB_CTL   0x0B
 
#define CS42L51_ALC_PGX_ALCX_SRDIS   (1<<7)
 
#define CS42L51_ALC_PGX_ALCX_ZCDIS   (1<<6)
 
#define CS42L51_ALC_PGX_PGX_VOL(x)   (((x)&0x1f)<<0)
 
#define CS42L51_ADCA_ATT   0x0C
 
#define CS42L51_ADCB_ATT   0x0D
 
#define CS42L51_ADCA_VOL   0x0E
 
#define CS42L51_ADCB_VOL   0x0F
 
#define CS42L51_PCMA_VOL   0x10
 
#define CS42L51_PCMB_VOL   0x11
 
#define CS42L51_MIX_MUTE_ADCMIX   (1<<7)
 
#define CS42L51_MIX_VOLUME(x)   (((x)&0x7f)<<0)
 
#define CS42L51_BEEP_FREQ   0x12
 
#define CS42L51_BEEP_VOL   0x13
 
#define CS42L51_BEEP_CONF   0x14
 
#define CS42L51_TONE_CTL   0x15
 
#define CS42L51_TONE_CTL_TREB(x)   (((x)&0xf)<<4)
 
#define CS42L51_TONE_CTL_BASS(x)   (((x)&0xf)<<0)
 
#define CS42L51_AOUTA_VOL   0x16
 
#define CS42L51_AOUTB_VOL   0x17
 
#define CS42L51_PCM_MIXER   0x18
 
#define CS42L51_LIMIT_THRES_DIS   0x19
 
#define CS42L51_LIMIT_REL   0x1A
 
#define CS42L51_LIMIT_ATT   0x1B
 
#define CS42L51_ALC_EN   0x1C
 
#define CS42L51_ALC_REL   0x1D
 
#define CS42L51_ALC_THRES   0x1E
 
#define CS42L51_NOISE_CONF   0x1F
 
#define CS42L51_STATUS   0x20
 
#define CS42L51_STATUS_SP_CLKERR   (1<<6)
 
#define CS42L51_STATUS_SPEA_OVFL   (1<<5)
 
#define CS42L51_STATUS_SPEB_OVFL   (1<<4)
 
#define CS42L51_STATUS_PCMA_OVFL   (1<<3)
 
#define CS42L51_STATUS_PCMB_OVFL   (1<<2)
 
#define CS42L51_STATUS_ADCA_OVFL   (1<<1)
 
#define CS42L51_STATUS_ADCB_OVFL   (1<<0)
 
#define CS42L51_CHARGE_FREQ   0x21
 
#define CS42L51_FIRSTREG   0x01
 
#define CS42L51_LASTREG   0x20
 
#define CS42L51_NUMREGS   (CS42L51_LASTREG - CS42L51_FIRSTREG + 1)
 

Macro Definition Documentation

#define CS42L51_ADC_CTL   0x06

Definition at line 73 of file cs42l51.h.

#define CS42L51_ADC_CTL_ADCA_HPFEN   (1<<5)

Definition at line 76 of file cs42l51.h.

#define CS42L51_ADC_CTL_ADCA_HPFRZ   (1<<4)

Definition at line 77 of file cs42l51.h.

#define CS42L51_ADC_CTL_ADCB_HPFEN   (1<<7)

Definition at line 74 of file cs42l51.h.

#define CS42L51_ADC_CTL_ADCB_HPFRZ   (1<<6)

Definition at line 75 of file cs42l51.h.

#define CS42L51_ADC_CTL_SOFTA   (1<<1)

Definition at line 80 of file cs42l51.h.

#define CS42L51_ADC_CTL_SOFTB   (1<<3)

Definition at line 78 of file cs42l51.h.

#define CS42L51_ADC_CTL_ZCROSSA   (1<<0)

Definition at line 81 of file cs42l51.h.

#define CS42L51_ADC_CTL_ZCROSSB   (1<<2)

Definition at line 79 of file cs42l51.h.

#define CS42L51_ADC_INPUT   0x07

Definition at line 83 of file cs42l51.h.

#define CS42L51_ADC_INPUT_ADCA_MUTE   (1<<0)

Definition at line 89 of file cs42l51.h.

#define CS42L51_ADC_INPUT_ADCB_MUTE   (1<<1)

Definition at line 88 of file cs42l51.h.

#define CS42L51_ADC_INPUT_AINA_MUX (   x)    (((x)&3)<<4)

Definition at line 85 of file cs42l51.h.

#define CS42L51_ADC_INPUT_AINB_MUX (   x)    (((x)&3)<<6)

Definition at line 84 of file cs42l51.h.

#define CS42L51_ADC_INPUT_INV_ADCA   (1<<2)

Definition at line 87 of file cs42l51.h.

#define CS42L51_ADC_INPUT_INV_ADCB   (1<<3)

Definition at line 86 of file cs42l51.h.

#define CS42L51_ADCA_ATT   0x0C

Definition at line 112 of file cs42l51.h.

#define CS42L51_ADCA_VOL   0x0E

Definition at line 115 of file cs42l51.h.

#define CS42L51_ADCB_ATT   0x0D

Definition at line 113 of file cs42l51.h.

#define CS42L51_ADCB_VOL   0x0F

Definition at line 116 of file cs42l51.h.

#define CS42L51_ALC_EN   0x1C

Definition at line 136 of file cs42l51.h.

#define CS42L51_ALC_PGA_CTL   0x0A

Definition at line 106 of file cs42l51.h.

#define CS42L51_ALC_PGB_CTL   0x0B

Definition at line 107 of file cs42l51.h.

#define CS42L51_ALC_PGX_ALCX_SRDIS   (1<<7)

Definition at line 108 of file cs42l51.h.

#define CS42L51_ALC_PGX_ALCX_ZCDIS   (1<<6)

Definition at line 109 of file cs42l51.h.

#define CS42L51_ALC_PGX_PGX_VOL (   x)    (((x)&0x1f)<<0)

Definition at line 110 of file cs42l51.h.

#define CS42L51_ALC_REL   0x1D

Definition at line 137 of file cs42l51.h.

#define CS42L51_ALC_THRES   0x1E

Definition at line 138 of file cs42l51.h.

#define CS42L51_AOUTA_VOL   0x16

Definition at line 130 of file cs42l51.h.

#define CS42L51_AOUTB_VOL   0x17

Definition at line 131 of file cs42l51.h.

#define CS42L51_BEEP_CONF   0x14

Definition at line 124 of file cs42l51.h.

#define CS42L51_BEEP_FREQ   0x12

Definition at line 122 of file cs42l51.h.

#define CS42L51_BEEP_VOL   0x13

Definition at line 123 of file cs42l51.h.

#define CS42L51_CHARGE_FREQ   0x21

Definition at line 150 of file cs42l51.h.

#define CS42L51_CHIP_ID   0x1B

Definition at line 21 of file cs42l51.h.

#define CS42L51_CHIP_REV_A   0x00

Definition at line 22 of file cs42l51.h.

#define CS42L51_CHIP_REV_B   0x01

Definition at line 23 of file cs42l51.h.

#define CS42L51_CHIP_REV_ID   0x01

Definition at line 25 of file cs42l51.h.

#define CS42L51_DAC_CTL   0x09

Definition at line 99 of file cs42l51.h.

#define CS42L51_DAC_CTL_AMUTE   (1<<2)

Definition at line 103 of file cs42l51.h.

#define CS42L51_DAC_CTL_DACSZ (   x)    (((x)&3)<<0)

Definition at line 104 of file cs42l51.h.

#define CS42L51_DAC_CTL_DATA_SEL (   x)    (((x)&3)<<6)

Definition at line 100 of file cs42l51.h.

#define CS42L51_DAC_CTL_DEEMPH   (1<<3)

Definition at line 102 of file cs42l51.h.

#define CS42L51_DAC_CTL_FREEZE   (1<<5)

Definition at line 101 of file cs42l51.h.

#define CS42L51_DAC_DIF_I2S   0x01

Definition at line 55 of file cs42l51.h.

#define CS42L51_DAC_DIF_LJ24   0x00

Definition at line 54 of file cs42l51.h.

#define CS42L51_DAC_DIF_RJ16   0x05

Definition at line 59 of file cs42l51.h.

#define CS42L51_DAC_DIF_RJ18   0x04

Definition at line 58 of file cs42l51.h.

#define CS42L51_DAC_DIF_RJ20   0x03

Definition at line 57 of file cs42l51.h.

#define CS42L51_DAC_DIF_RJ24   0x02

Definition at line 56 of file cs42l51.h.

#define CS42L51_DAC_OUT_CTL   0x08

Definition at line 91 of file cs42l51.h.

#define CS42L51_DAC_OUT_CTL_DAC_SNGVOL   (1<<4)

Definition at line 93 of file cs42l51.h.

#define CS42L51_DAC_OUT_CTL_DACA_MUTE   (1<<0)

Definition at line 97 of file cs42l51.h.

#define CS42L51_DAC_OUT_CTL_DACB_MUTE   (1<<1)

Definition at line 96 of file cs42l51.h.

#define CS42L51_DAC_OUT_CTL_HP_GAIN (   x)    (((x)&7)<<5)

Definition at line 92 of file cs42l51.h.

#define CS42L51_DAC_OUT_CTL_INV_PCMA   (1<<2)

Definition at line 95 of file cs42l51.h.

#define CS42L51_DAC_OUT_CTL_INV_PCMB   (1<<3)

Definition at line 94 of file cs42l51.h.

#define CS42L51_DSM_MODE   0

Definition at line 43 of file cs42l51.h.

#define CS42L51_FIRSTREG   0x01

Definition at line 152 of file cs42l51.h.

#define CS42L51_HSM_MODE   2

Definition at line 41 of file cs42l51.h.

#define CS42L51_INTF_CTL   0x04

Definition at line 50 of file cs42l51.h.

#define CS42L51_INTF_CTL_ADC_I2S   (1<<2)

Definition at line 60 of file cs42l51.h.

#define CS42L51_INTF_CTL_DAC_FORMAT (   x)    (((x)&7)<<3)

Definition at line 53 of file cs42l51.h.

#define CS42L51_INTF_CTL_DIGMIX   (1<<1)

Definition at line 61 of file cs42l51.h.

#define CS42L51_INTF_CTL_LOOPBACK   (1<<7)

Definition at line 51 of file cs42l51.h.

#define CS42L51_INTF_CTL_MASTER   (1<<6)

Definition at line 52 of file cs42l51.h.

#define CS42L51_INTF_CTL_MICMIX   (1<<0)

Definition at line 62 of file cs42l51.h.

#define CS42L51_LASTREG   0x20

Definition at line 158 of file cs42l51.h.

#define CS42L51_LIMIT_ATT   0x1B

Definition at line 135 of file cs42l51.h.

#define CS42L51_LIMIT_REL   0x1A

Definition at line 134 of file cs42l51.h.

#define CS42L51_LIMIT_THRES_DIS   0x19

Definition at line 133 of file cs42l51.h.

#define CS42L51_MIC_CTL   0x05

Definition at line 64 of file cs42l51.h.

#define CS42L51_MIC_CTL_ADC_SNGVOL   (1<<7)

Definition at line 65 of file cs42l51.h.

#define CS42L51_MIC_CTL_ADCA_DBOOST   (1<<5)

Definition at line 67 of file cs42l51.h.

#define CS42L51_MIC_CTL_ADCD_DBOOST   (1<<6)

Definition at line 66 of file cs42l51.h.

#define CS42L51_MIC_CTL_MICA_BOOST   (1<<0)

Definition at line 71 of file cs42l51.h.

#define CS42L51_MIC_CTL_MICB_BOOST   (1<<1)

Definition at line 70 of file cs42l51.h.

#define CS42L51_MIC_CTL_MICBIAS_LVL (   x)    (((x)&3)<<2)

Definition at line 69 of file cs42l51.h.

#define CS42L51_MIC_CTL_MICBIAS_SEL   (1<<4)

Definition at line 68 of file cs42l51.h.

#define CS42L51_MIC_POWER_CTL   0x03

Definition at line 37 of file cs42l51.h.

#define CS42L51_MIC_POWER_CTL_3ST_SP   (1<<4)

Definition at line 44 of file cs42l51.h.

#define CS42L51_MIC_POWER_CTL_AUTO   (1<<7)

Definition at line 38 of file cs42l51.h.

#define CS42L51_MIC_POWER_CTL_MCLK_DIV2   (1<<0)

Definition at line 48 of file cs42l51.h.

#define CS42L51_MIC_POWER_CTL_PDN_BIAS   (1<<1)

Definition at line 47 of file cs42l51.h.

#define CS42L51_MIC_POWER_CTL_PDN_MICA   (1<<2)

Definition at line 46 of file cs42l51.h.

#define CS42L51_MIC_POWER_CTL_PDN_MICB   (1<<3)

Definition at line 45 of file cs42l51.h.

#define CS42L51_MIC_POWER_CTL_SPEED (   x)    (((x)&3)<<5)

Definition at line 39 of file cs42l51.h.

#define CS42L51_MIX_MUTE_ADCMIX   (1<<7)

Definition at line 119 of file cs42l51.h.

#define CS42L51_MIX_VOLUME (   x)    (((x)&0x7f)<<0)

Definition at line 120 of file cs42l51.h.

#define CS42L51_MK_CHIP_REV (   a,
  b 
)    ((a)<<3|(b))

Definition at line 26 of file cs42l51.h.

#define CS42L51_NOISE_CONF   0x1F

Definition at line 139 of file cs42l51.h.

#define CS42L51_NUMREGS   (CS42L51_LASTREG - CS42L51_FIRSTREG + 1)

Definition at line 159 of file cs42l51.h.

#define CS42L51_PCM_MIXER   0x18

Definition at line 132 of file cs42l51.h.

#define CS42L51_PCMA_VOL   0x10

Definition at line 117 of file cs42l51.h.

#define CS42L51_PCMB_VOL   0x11

Definition at line 118 of file cs42l51.h.

#define CS42L51_POWER_CTL1   0x02

Definition at line 28 of file cs42l51.h.

#define CS42L51_POWER_CTL1_PDN   (1<<0)

Definition at line 35 of file cs42l51.h.

#define CS42L51_POWER_CTL1_PDN_ADCA   (1<<1)

Definition at line 34 of file cs42l51.h.

#define CS42L51_POWER_CTL1_PDN_ADCB   (1<<2)

Definition at line 33 of file cs42l51.h.

#define CS42L51_POWER_CTL1_PDN_DACA   (1<<5)

Definition at line 30 of file cs42l51.h.

#define CS42L51_POWER_CTL1_PDN_DACB   (1<<6)

Definition at line 29 of file cs42l51.h.

#define CS42L51_POWER_CTL1_PDN_PGAA   (1<<3)

Definition at line 32 of file cs42l51.h.

#define CS42L51_POWER_CTL1_PDN_PGAB   (1<<4)

Definition at line 31 of file cs42l51.h.

#define CS42L51_QSM_MODE   3

Definition at line 40 of file cs42l51.h.

#define CS42L51_SSM_MODE   1

Definition at line 42 of file cs42l51.h.

#define CS42L51_STATUS   0x20

Definition at line 141 of file cs42l51.h.

#define CS42L51_STATUS_ADCA_OVFL   (1<<1)

Definition at line 147 of file cs42l51.h.

#define CS42L51_STATUS_ADCB_OVFL   (1<<0)

Definition at line 148 of file cs42l51.h.

#define CS42L51_STATUS_PCMA_OVFL   (1<<3)

Definition at line 145 of file cs42l51.h.

#define CS42L51_STATUS_PCMB_OVFL   (1<<2)

Definition at line 146 of file cs42l51.h.

#define CS42L51_STATUS_SP_CLKERR   (1<<6)

Definition at line 142 of file cs42l51.h.

#define CS42L51_STATUS_SPEA_OVFL   (1<<5)

Definition at line 143 of file cs42l51.h.

#define CS42L51_STATUS_SPEB_OVFL   (1<<4)

Definition at line 144 of file cs42l51.h.

#define CS42L51_TONE_CTL   0x15

Definition at line 126 of file cs42l51.h.

#define CS42L51_TONE_CTL_BASS (   x)    (((x)&0xf)<<0)

Definition at line 128 of file cs42l51.h.

#define CS42L51_TONE_CTL_TREB (   x)    (((x)&0xf)<<4)

Definition at line 127 of file cs42l51.h.