📄 xllp_acodec.cod
字号:
; 181 : (pDeviceContext->pGpioReg)->GAFR3_U |= ( XLLP_GPIO_AF_BIT_I2S_SYSCLK );
; 182 :
; 183 : XllpOstDelayMicroSeconds( pDeviceContext->pOSTRegs,100);
0000c e3a01064 mov r1, #0x64
00010 e5923058 ldr r3, [r2, #0x58]
00014 e3c334ff bic r3, r3, #0xFF, 8
00018 e5823058 str r3, [r2, #0x58]
0001c e5942004 ldr r2, [r4, #4]
00020 e5923070 ldr r3, [r2, #0x70]
00024 e3c3300c bic r3, r3, #0xC
00028 e5823070 str r3, [r2, #0x70]
0002c e5942004 ldr r2, [r4, #4]
00030 e592300c ldr r3, [r2, #0xC]
00034 e383320d orr r3, r3, #0xD, 4
00038 e582300c str r3, [r2, #0xC]
0003c e5942004 ldr r2, [r4, #4]
00040 e592300c ldr r3, [r2, #0xC]
00044 e3c33202 bic r3, r3, #2, 4
00048 e582300c str r3, [r2, #0xC]
0004c e5942004 ldr r2, [r4, #4]
00050 e592310c ldr r3, [r2, #0x10C]
00054 e3833802 orr r3, r3, #2, 16
00058 e582310c str r3, [r2, #0x10C]
0005c e5942004 ldr r2, [r4, #4]
00060 e5923058 ldr r3, [r2, #0x58]
00064 e3833459 orr r3, r3, #0x59, 8
00068 e5823058 str r3, [r2, #0x58]
0006c e5942004 ldr r2, [r4, #4]
00070 e5923070 ldr r3, [r2, #0x70]
00074 e3833004 orr r3, r3, #4
00078 e5823070 str r3, [r2, #0x70]
0007c e5940024 ldr r0, [r4, #0x24]
00080 eb000000 bl XllpOstDelayMicroSeconds
; 184 :
; 185 : // ensuring the I2S clock is on
; 186 : (pDeviceContext->pClockReg)->cken |= XLLP_CLKEN_I2S;
00084 e5942010 ldr r2, [r4, #0x10]
; 187 : //XllpOstDelayMicroSeconds( pDeviceContext->pOSTRegs,10);
; 188 :
; 189 : // choose the normal I2S mode of operation, recording path is disabled
; 190 : //(pDeviceContext->pPCMReg)->SACR1 |= XLLP_SACR1_DREC ;
; 191 : //(pDeviceContext->pPCMReg)->SACR1 |= XLLP_SACR1_DRPL ;
; 192 : (pDeviceContext->pPCMReg)->SACR1 &= ~(XLLP_SACR1_AMSL |XLLP_SACR1_ENLBF |XLLP_SACR1_DRPL|XLLP_SACR1_DREC ); //XLLP_SACR1_DRPL
; 193 : // priming Transmit IO
; 194 : (pDeviceContext->pPCMReg)->SAICR |= (XLLP_SAICR_TUR |XLLP_SAICR_ROR);
; 195 : for (k=0; k<16; k++)
00088 e3a00000 mov r0, #0
0008c e5923004 ldr r3, [r2, #4]
00090 e3833c01 orr r3, r3, #1, 24
00094 e5823004 str r3, [r2, #4]
00098 e5942008 ldr r2, [r4, #8]
0009c e5923004 ldr r3, [r2, #4]
000a0 e3c33039 bic r3, r3, #0x39
000a4 e5823004 str r3, [r2, #4]
000a8 e5942008 ldr r2, [r4, #8]
000ac e5923018 ldr r3, [r2, #0x18]
000b0 e3833060 orr r3, r3, #0x60
000b4 e5823018 str r3, [r2, #0x18]
000b8 |$L1544|
; 196 : (pDeviceContext->pPCMReg)->SADR = (k<<15 | k);
000b8 e2803001 add r3, r0, #1
000bc e5941008 ldr r1, [r4, #8]
000c0 e1802780 orr r2, r0, r0, lsl #15
000c4 e1a00803 mov r0, r3, lsl #16
000c8 e1a00820 mov r0, r0, lsr #16
000cc e3500010 cmp r0, #0x10
000d0 e5812080 str r2, [r1, #0x80]
000d4 3afffff7 bcc |$L1544|
; 197 :
; 198 : // enable I2SLINK, maintain the bit clock direction
; 199 :
; 200 : (pDeviceContext->pPCMReg)->SACR0 = 0;
000d8 e5943008 ldr r3, [r4, #8]
000dc e3a02000 mov r2, #0
; 201 :
; 202 : (pDeviceContext->pPCMReg)->SACR0 |= (XLLP_SACR0_ENB |XLLP_SACR0_BCKD | (0x8<<8) | (0x8<<12));
000e0 e3a01b22 mov r1, #0x22, 22
000e4 e5832000 str r2, [r3]
000e8 e5942008 ldr r2, [r4, #8]
000ec e3811005 orr r1, r1, #5
; 203 :
; 204 : (pDeviceContext->pPCMReg)->SADIV = 0x48; //0x1a; //appx 22.05KHZ
000f0 e3a0e048 mov lr, #0x48
; 205 :
; 206 : //EdbgOutputDebugString ( "exit I2S init \r\n");
; 207 :
; 208 : return XLLP_ACODEC_SUCCESS;
000f4 e5923000 ldr r3, [r2]
000f8 e3a00000 mov r0, #0
000fc e1833001 orr r3, r3, r1
00100 e5823000 str r3, [r2]
00104 e5943008 ldr r3, [r4, #8]
00108 e583e060 str lr, [r3, #0x60]
; 209 : }
0010c e8bd4010 ldmia sp!, {r4, lr}
00110 e12fff1e bx lr
00114 |$M1655|
ENDP ; |XllpACodecI2SInit|
EXPORT |XllpACodecInit|
IMPORT |XllpAkSetMasterVol|
IMPORT |XllpAkGetInSampleRate|
IMPORT |XllpAkGetOutSampleRate|
IMPORT |XllpAkSetInSampleRate|
IMPORT |XllpAkSetOutSampleRate|
IMPORT |XllpAkEnableSspPath|
IMPORT |XllpAkDisableSspPath|
IMPORT |XllpAkCodecSpecificInit|
IMPORT |XllpAKCodecWrite|
IMPORT |XllpAKCodecRead|
IMPORT |XllpAkCodecSpecificDeinit|
IMPORT |XllpAKEnterEuipmentState|
IMPORT |XllpAKQueryEquipmentState|
IMPORT |XllpWm8753SetMasterVol|
IMPORT |XllpWm8753GetInSampleRate|
IMPORT |XllpWm8753GetOutSampleRate|
IMPORT |XllpWm8753SetInSampleRate|
IMPORT |XllpWm8753SetOutSampleRate|
IMPORT |XllpWm8753EnableSspPath|
IMPORT |XllpWm8753DisableSspPath|
IMPORT |XllpWm8753CodecSpecificInit|
IMPORT |XllpWm8753CodecWrite|
IMPORT |XllpWm8753CodecRead|
IMPORT |XllpWm8753CodecSpecificDeinit|
IMPORT |XllpWm8753EnterEuipmentState|
IMPORT |XllpWm8753QueryEquipmentState|
IMPORT |XllpWm9712SetMasterVol|
IMPORT |XllpWm9712SetMasterInputGain|
IMPORT |XllpWm9712GetOutSampleRate|
IMPORT |XllpWm9712SetInSampleRate|
IMPORT |XllpWm9712SetOutSampleRate|
IMPORT |XllpWm9712EnterEquipmentState|
IMPORT |XllpWm9712GetEquipmentState|
IMPORT |XllpWm9712SpecificInit|
IMPORT |XllpWm9712SpecificDeInit|
IMPORT |XllpAc97ACodecRead|
IMPORT |XllpAc97ACodecWrite|
IMPORT |XllpAc97ACodecInit|
IMPORT |XLLPUCBSetMasterVol|
IMPORT |XLLPUCBSetMasterInputGain|
IMPORT |XllpUCBGetInSampleRate|
IMPORT |XllpUCBGetOutSampleRate|
IMPORT |XllpUCBSetInSampleRate|
IMPORT |XllpUCBSetOutSampleRate|
IMPORT |XllpUCBEnterEquipmentState|
IMPORT |XllpUCBGetEquipmentState|
IMPORT |XllpUCBSpecificInit|
IMPORT |XllpUCBSpecificDeInit|
00000 AREA |.text| { |XllpACodecInit| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$XllpACodecInit|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpACodecInit| } ; comdat associative
|$T1668| DCD |$L1667|
DCD 0x4000b602
; Function compile flags: /Ogsy
00000 AREA |.text| { |XllpACodecInit| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |XllpACodecInit| PROC
; 220 : {
00000 |$L1667|
00000 e92d4ff0 stmdb sp!, {r4 - r11, lr}
00004 e24dd004 sub sp, sp, #4
00008 |$M1665|
00008 e1a02000 mov r2, r0
0000c e58d2000 str r2, [sp]
; 221 :
; 222 :
; 223 : switch (pDeviceContext->ACodecId)
00010 e5921000 ldr r1, [r2]
00014 e3510003 cmp r1, #3
00018 0a00005b beq |$L1557|
0001c e3510034 cmp r1, #0x34
00020 0a00003c beq |$L1555|
00024 e351009e cmp r1, #0x9E
00028 0a00001b beq |$L1554|
0002c e3a03c43 mov r3, #0x43, 24
00030 e3833004 orr r3, r3, #4
00034 e1510003 cmp r1, r3
00038 1a00006f bne |$L1551|
; 283 :
; 284 : case UCB_1400_ID:
; 285 : XllpAc97ACodecInit(pDeviceContext); //codec init common to ac97
0003c eb000000 bl XllpAc97ACodecInit
; 286 :
; 287 : //UCB1400-specific functions
; 288 : (pDeviceContext->g_pfnSetMasterVol)= XLLPUCBSetMasterVol;
; 289 : (pDeviceContext->g_pfnSetMasterInputGain)= XLLPUCBSetMasterInputGain;
00040 e59f228c ldr r2, [pc, #0x28C]
; 290 : (pDeviceContext->g_pfnGetInSampleRate)= XllpUCBGetInSampleRate;
; 291 : (pDeviceContext->g_pfnGetOutSampleRate)= XllpUCBGetOutSampleRate;
; 292 : (pDeviceContext->g_pfnSetInSampleRate)= XllpUCBSetInSampleRate;
; 293 : (pDeviceContext->g_pfnSetOutSampleRate)= XllpUCBSetOutSampleRate;
; 294 : (pDeviceContext->g_pfnEnableSspPath)= NULL;
; 295 : (pDeviceContext->g_pfnDisableSspPath)= NULL;
; 296 : (pDeviceContext->g_pfnCodecSpecificInit)= XllpUCBSpecificInit;
; 297 : (pDeviceContext->g_pfnCodecSpecificDeInit)= XllpUCBSpecificDeInit;
; 298 : (pDeviceContext->g_pfnACodecRead)= XllpAc97ACodecRead;
; 299 : (pDeviceContext->g_pfnACodecWrite)= XllpAc97ACodecWrite;
; 300 : (pDeviceContext->g_pfnEnterEquipmentState)= XllpUCBEnterEquipmentState;
; 301 : (pDeviceContext->g_pfnQueryEquipmentState)= XllpUCBGetEquipmentState;
00044 e59db000 ldr r11, [sp]
00048 e59f11f4 ldr r1, [pc, #0x1F4]
0004c e59fe27c ldr lr, [pc, #0x27C]
00050 e59f4274 ldr r4, [pc, #0x274]
00054 e59f526c ldr r5, [pc, #0x26C]
00058 e59f6264 ldr r6, [pc, #0x264]
0005c e59f025c ldr r0, [pc, #0x25C]
00060 e59f71c4 ldr r7, [pc, #0x1C4]
00064 e59f81bc ldr r8, [pc, #0x1BC]
00068 e58b202c str r2, [r11, #0x2C]
0006c e1a0200b mov r2, r11
00070 e59f3244 ldr r3, [pc, #0x244]
00074 e59f923c ldr r9, [pc, #0x23C]
00078 e59fa234 ldr r10, [pc, #0x234]
0007c e282c030 add r12, r2, #0x30
00080 e88c4002 stmia r12, {r1, lr}
00084 e282c038 add r12, r2, #0x38
00088 e88c0030 stmia r12, {r4, r5}
0008c e5826050 str r6, [r2, #0x50]
00090 e282c054 add r12, r2, #0x54
00094 e88c0181 stmia r12, {r0, r7, r8}
; 302 :
; 303 :
; 304 : break;
00098 ea000052 b |$L1664|
0009c |$L1554|
; 224 : {
; 225 :
; 226 : case AK_2440_ID: //0x9e AKM 2440
; 227 : XllpACodecI2CInit(pDeviceContext);
0009c e1a00002 mov r0, r2
000a0 eb000000 bl XllpACodecI2CInit
; 228 : //g_pfnSetMasterVol=XllpAkSetMasterVol;
; 229 :
; 230 : //AKM2440-specific initialization
; 231 : (pDeviceContext->g_pfnSetMasterVol)= XllpAkSetMasterVol;
000a4 e59f3204 ldr r3, [pc, #0x204]
; 232 : (pDeviceContext->g_pfnGetInSampleRate)= XllpAkGetInSampleRate;
; 233 : (pDeviceContext->g_pfnGetOutSampleRate)= XllpAkGetOutSampleRate;
; 234 : (pDeviceContext->g_pfnSetInSampleRate)= XllpAkSetInSampleRate;
; 235 : (pDeviceContext->g_pfnSetOutSampleRate)= XllpAkSetOutSampleRate;
; 236 : (pDeviceContext->g_pfnEnableSspPath)= XllpAkEnableSspPath;
; 237 : (pDeviceContext->g_pfnDisableSspPath)= XllpAkDisableSspPath;
; 238 : (pDeviceContext->g_pfnCodecSpecificInit)= XllpAkCodecSpecificInit;
; 239 : (pDeviceContext->g_pfnCodecSpecificDeInit)= XllpAkCodecSpecificDeinit;
; 240 : (pDeviceContext->g_pfnACodecWrite)= XllpAKCodecWrite;
; 241 : (pDeviceContext->g_pfnACodecRead)= XllpAKCodecRead;
; 242 : (pDeviceContext->g_pfnEnterEquipmentState)= XllpAKEnterEuipmentState;
; 243 : (pDeviceContext->g_pfnQueryEquipmentState)= XllpAKQueryEquipmentState;
000a8 e59d2000 ldr r2, [sp]
000ac e59f01f8 ldr r0, [pc, #0x1F8]
000b0 e59fe1f0 ldr lr, [pc, #0x1F0]
000b4 e5823028 str r3, [r2, #0x28]
000b8 e59d3000 ldr r3, [sp]
000bc e59f11e0 ldr r1, [pc, #0x1E0]
000c0 e59f41d8 ldr r4, [pc, #0x1D8]
000c4 e59f51d0 ldr r5, [pc, #0x1D0]
000c8 e59f61c8 ldr r6, [pc, #0x1C8]
000cc e59f71c0 ldr r7, [pc, #0x1C0]
000d0 e59f81b8 ldr r8, [pc, #0x1B8]
000d4 e59f91b0 ldr r9, [pc, #0x1B0]
000d8 e59fa1a8 ldr r10, [pc, #0x1A8]
000dc e59fb1a0 ldr r11, [pc, #0x1A0]
000e0 e59f2198 ldr r2, [pc, #0x198]
000e4 e283c038 add r12, r3, #0x38
000e8 e88c4001 stmia r12, {r0, lr}
; 244 : XllpACodecI2SInit(pDeviceContext);
000ec e1a00003 mov r0, r3
000f0 e5832030 str r2, [r3, #0x30]
000f4 e5831034 str r1, [r3, #0x34]
000f8 e283c040 add r12, r3, #0x40
000fc e88c0c30 stmia r12, {r4, r5, r10, r11}
00100 e283c050 add r12, r3, #0x50
00104 e88c02c0 stmia r12, {r6, r7, r9}
00108 e583805c str r8, [r3, #0x5C]
0010c eb000000 bl XllpACodecI2SInit
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -