?? help_aic23.c
字號:
/* Codec configuration settings */
AIC23_Params yourCodecCfg = { \
AIC23_REG0_RMK( // Left line input channel volume
AIC23_REG0_LRS_DISABLE, //
AIC23_REG0_LIM_NORMAL, //
AIC23_REG0_LIV_OF(0) //0db
),
AIC23_REG1_RMK( //Right line input channel volume
AIC23_REG1_RLS_DISABLE,
AIC23_REG1_RIM_NORMAL,
AIC23_REG1_RIV_OF(0)
),
AIC23_REG2_RMK( // Left channel headphone volume
AIC23_REG2_LRS_DISABLE,
AIC23_REG2_LZC_ON,
AIC23_REG2_LHV_OF(0)
),
AIC23_REG3_RMK( //Right channel headphone volume
AIC23_REG3_RLS_DISABLE,
AIC23_REG3_RZC_ON,
AIC23_REG3_RHV_OF(0)
),
AIC23_REG4_RMK( //Analog audio path control
AIC23_REG4_SIDETONE_DISABLE,
AIC23_REG4_DAC_ON,
AIC23_REG4_BYP_DISABLE,
AIC23_REG4_INSEL_LINE,
AIC23_REG4_MICM_NORMAL,
AIC23_REG4_MICB_0DB
),
0x0000, /* reg5 Digital audio path control */ \
0x0000, /* reg6 Power down control */ \
0x0043, /* reg7 Digital audio interface format */ \
0x000d, /* reg8 Sample rate control */ \
0x0001 /* reg9 Digital interface activation */ \
};
/* The eighth register of CODEC determine the Codec sample rate
* Refrence the following table:
* Sample Rate REG VALUE[對于目標板沒有使用CLKOUT就沒有差別]
* ---------------------------------------------
* 96KHz 0X001D/0X009D
* 48KHz 0X0001/0X0081
* 44.1KHz 0X0023/0X00A3
* 32KHz 0X0019/0X0099
* 24KHz 0X0041/0X00C1
* 16KHz 0X0059/0X00D9
* 8KHz 0X000D/0X008D
* ----------------------------------------------
*/
AIC23_Params yourCodecCfg = {
AIC23_9BITWORD( /* REG 0: left input ch. volume control */ \
0, /* simultaneous left/right volume: disabled*/ \
0, /* left line input mute: disabled */ \
0,0, /* reserved */ \
1,0,1,1,1 /* left line input volume: 0 dB */ \
)
AIC23_9BITWORD( /* REG 1: right input ch. volume control*/ \
0, /* simultaneous right/left volume: disabled*/ \
0, /* right line input mute: disabled */ \
0,0, /* reserved */ \
1,0,1,1,1 /* right line input volume: 0 dB */ \
)
AIC23_9BITWORD( /* REG 2: left ch. headphone volume control*/ \
1, /* simultaneous left/right volume: enabled */ \
1, /* left channel zero-cross detect: enabled */ \
1,1,1,1,0,0,1 /* left headphone volume: 0 dB */ \
)
AIC23_9BITWORD( /* REG 3: right ch. headphone volume ctrl */ \
1, /* simultaneous right/left volume: enabled */ \
1, /* right channel zero-cross detect: enabled*/ \
1,1,1,1,0,0,1 /* right headphone volume: 0 dB */ \
)
AIC23_9BITWORD( /* REG 4: analog audio path control */ \
0, /* reserved */ \
0,0, /* sidetone attenuation: 6 dB */ \
0, /* sidetone: disabled */ \
1, /* DAC: selected */ \
0, /* bypass: off */ \
0, /* input select for ADC: line */ \
0, /* microphone mute: disabled */ \
1 /* microphone boost: enabled */ \
)
AIC23_9BITWORD( /* REG 5: digital audio path control */ \
0,0,0,0,0, /* reserved */ \
0, /* DAC soft mute: disabled */ \
0,0, /* deemphasis control: 48khz */ \
0 /* ADC high-pass filter: disabled */ \
)
AIC23_9BITWORD( /* REG 6: power down control */ \
0, /* reserved */ \
0, /* device power: on (i.e. not off) */ \
0, /* clock: on */ \
0, /* oscillator: on */ \
0, /* outputs: on */ \
0, /* DAC: on */ \
0, /* ADC: on */ \
0, /* microphone: on */ \
0 /* line input: on */ \
)
AIC23_9BITWORD( /* REG 7: digital audio interf. format ctrl*/ \
0,0, /* reserved */ \
1, /* master/slave mode: master */ \
0, /* DEC left/right swap: disabled */ \
0, /* no delay before transmitting MSB */ \
0,0, /* input bit length: 16 bit */ \
1,1 /* data format: DSP format */ \
)
AIC23_9BITWORD( /* REG 8: sample rate control */ \
0, /* reserved */ \
0, /* clock output divider: 1 (MCLK) */ \
0, /* clock input divider: 1 (MCLK) */ \
0,0,1,1,0, /* sampling rate: ADC 8kHz DAC 8kHz */ \
1 /* clock mode select (USB/normal): USB */ \
)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -