📄 xllp_ak2440.cod
字号:
; 179 : // EdbgOutputDebugString ( "step3 : pI2CReg->ISR %x \r\n",(pDeviceContext->pCtrlReg)->ISR);
; 180 : (pDeviceContext->pCtrlReg)->ISR |= XLLP_ISR_ITE;
00120 e594200c ldr r2, [r4, #0xC]
; 181 :
; 182 : //STEP4: Read operation
; 183 : (pDeviceContext->pCtrlReg)->ICR =(XLLP_ICR_STOP | XLLP_ICR_TB | XLLP_ICR_ACKNACK |XLLP_ICR_UIE |XLLP_ICR_SCLEA );
00124 e3a0106e mov r1, #0x6E
00128 e5923018 ldr r3, [r2, #0x18]
0012c e3833040 orr r3, r3, #0x40
00130 e5823018 str r3, [r2, #0x18]
00134 e594300c ldr r3, [r4, #0xC]
00138 e5831010 str r1, [r3, #0x10]
; 184 : while(!((pDeviceContext->pCtrlReg)->ISR & XLLP_ISR_IRF))
0013c e594100c ldr r1, [r4, #0xC]
00140 e5913018 ldr r3, [r1, #0x18]
00144 e3130080 tst r3, #0x80
00148 1a000008 bne |$L1175|
; 185 : {
; 186 : timer++;
0014c e3a02000 mov r2, #0
00150 |$L1174|
00150 e2823001 add r3, r2, #1
00154 e1a02803 mov r2, r3, lsl #16
00158 e1a02822 mov r2, r2, lsr #16
; 187 :
; 188 : if(timer == 65536)
0015c e3520801 cmp r2, #1, 16
00160 0a00000f beq |$L1315|
00164 e5913018 ldr r3, [r1, #0x18]
00168 e3130080 tst r3, #0x80
0016c 0afffff7 beq |$L1174|
00170 |$L1175|
; 192 : }
; 193 :
; 194 : }
; 195 : //EdbgOutputDebugString ( "step4 : pI2CReg->ISR %x \r\n",(pDeviceContext->pCtrlReg)->ISR);
; 196 : (pDeviceContext->pCtrlReg)->ISR |= XLLP_ISR_IRF; //clear the bit
00170 e594200c ldr r2, [r4, #0xC]
; 197 :
; 198 : temp = (pDeviceContext->pCtrlReg)->IDBR;
; 199 : //EdbgOutputDebugString ("step4 :temp =%x \r\n",temp);
; 200 : *regVaule = (XLLP_UINT8_T) temp;
; 201 : // (pDeviceContext->pCtrlReg)->ICR &= ~(XLLP_ICR_STOP |XLLP_ISR_ACKNACK); //Clear STOP and ACKNAK bits
; 202 : (pDeviceContext->pCtrlReg)->ICR = 0;
; 203 : return XLLP_ACODEC_SUCCESS;
00174 e3a00000 mov r0, #0
00178 e5923018 ldr r3, [r2, #0x18]
0017c e3833080 orr r3, r3, #0x80
00180 e5823018 str r3, [r2, #0x18]
00184 e594300c ldr r3, [r4, #0xC]
00188 e5933008 ldr r3, [r3, #8]
0018c e20330ff and r3, r3, #0xFF
00190 e1c630b0 strh r3, [r6]
00194 e594300c ldr r3, [r4, #0xC]
00198 e5838010 str r8, [r3, #0x10]
; 204 : }
0019c e8bd41f0 ldmia sp!, {r4 - r8, lr}
001a0 e12fff1e bx lr
001a4 |$L1315|
; 189 : {
; 190 : //EdbgOutputDebugString ( "XllpACodecWrite,STEP1 %x \r\n",pCtrlReg->ISR);
; 191 : return (XLLP_ACODEC_CONTROLLER_INTERFACE_TIMEOUT);
001a4 e3a00003 mov r0, #3
; 204 : }
001a8 e8bd41f0 ldmia sp!, {r4 - r8, lr}
001ac e12fff1e bx lr
001b0 |$M1325|
ENDP ; |XllpAKCodecRead|
EXPORT |XllpAkSetMasterVol|
00000 AREA |.text| { |XllpAkSetMasterVol| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$XllpAkSetMasterVol|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpAkSetMasterVol| } ; comdat associative
|$T1336| DCD |$L1335|
DCD 0x40000200
; Function compile flags: /Ogsy
00000 AREA |.text| { |XllpAkSetMasterVol| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |XllpAkSetMasterVol| PROC
; 207 : {
00000 |$L1335|
00000 |$M1333|
; 208 : //stub
; 209 : return (XLLP_ACODEC_SUCCESS);
00000 e3a00000 mov r0, #0
; 210 :
; 211 : }
00004 e12fff1e bx lr
00008 |$M1334|
ENDP ; |XllpAkSetMasterVol|
EXPORT |XllpAkGetInSampleRate|
00000 AREA |.text| { |XllpAkGetInSampleRate| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$XllpAkGetInSampleRate|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpAkGetInSampleRate| } ; comdat associative
|$T1346| DCD |$L1345|
DCD 0x40000400
; Function compile flags: /Ogsy
00000 AREA |.text| { |XllpAkGetInSampleRate| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |XllpAkGetInSampleRate| PROC
; 214 : {
00000 |$L1345|
00000 |$M1343|
; 215 : *RateInKhz=8000; //AKM SSP interface only supports 8 khz sample rate
00000 e3a03d7d mov r3, #0x7D, 26
00004 e1c130b0 strh r3, [r1]
; 216 : return (XLLP_ACODEC_SUCCESS);
00008 e3a00000 mov r0, #0
; 217 : }
0000c e12fff1e bx lr
00010 |$M1344|
ENDP ; |XllpAkGetInSampleRate|
EXPORT |XllpAkGetOutSampleRate|
00000 AREA |.text| { |XllpAkGetOutSampleRate| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$XllpAkGetOutSampleRate|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpAkGetOutSampleRate| } ; comdat associative
|$T1358| DCD |$L1357|
DCD 0x40002100
; Function compile flags: /Ogsy
00000 AREA |.text| { |XllpAkGetOutSampleRate| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |XllpAkGetOutSampleRate| PROC
; 220 : {
00000 |$L1357|
00000 |$M1355|
; 221 :
; 222 : switch((pDeviceContext->pPCMReg)->SADIV) {
00000 e5903008 ldr r3, [r0, #8]
00004 e5933060 ldr r3, [r3, #0x60]
00008 e353000c cmp r3, #0xC
0000c 0a000017 beq |$L1202|
00010 e353000d cmp r3, #0xD
00014 0a000012 beq |$L1201|
00018 e353001a cmp r3, #0x1A
0001c 0a00000d beq |$L1200|
00020 e3530024 cmp r3, #0x24
00024 0a000009 beq |$L1199|
00028 e3530034 cmp r3, #0x34
0002c 0a000004 beq |$L1198|
00030 e3530048 cmp r3, #0x48
; 240 : break;
; 241 :
; 242 : default:
; 243 : return(XLLP_ACODEC_SAMPLERATE_INVALID);
00034 13a00007 movne r0, #7
; 247 :
; 248 : }
00038 112fff1e bxne lr
; 223 : case 0x48:
; 224 : *RateInKhz=8000; //8k
0003c e3a03d7d mov r3, #0x7D, 26
; 225 : break;
00040 ea00000c b |$L1354|
00044 |$L1198|
; 226 : case 0x34:
; 227 : *RateInKhz=11025; //11k
00044 e3a03c2b mov r3, #0x2B, 24
00048 e3833011 orr r3, r3, #0x11
; 228 : break;
0004c ea000009 b |$L1354|
00050 |$L1199|
; 229 : case 0x24:
; 230 : *RateInKhz=16000; //16k
00050 e3a03dfa mov r3, #0xFA, 26
; 231 : break;
00054 ea000007 b |$L1354|
00058 |$L1200|
; 232 : case 0x1a:
; 233 : *RateInKhz=22050; //22.05KHZ
00058 e3a03c56 mov r3, #0x56, 24
0005c e3833022 orr r3, r3, #0x22
; 234 : break;
00060 ea000004 b |$L1354|
00064 |$L1201|
; 235 : case 0xd:
; 236 : *RateInKhz=44100; //44.100KHZ
00064 e3a03b2b mov r3, #0x2B, 22
00068 e3833044 orr r3, r3, #0x44
; 237 : break;
0006c ea000001 b |$L1354|
00070 |$L1202|
; 238 : case 0xc:
; 239 : *RateInKhz=48000; //48KHZ
00070 e3a03cbb mov r3, #0xBB, 24
00074 e3833080 orr r3, r3, #0x80
00078 |$L1354|
00078 e1c130b0 strh r3, [r1]
; 244 : break;
; 245 : }
; 246 : return (XLLP_ACODEC_SUCCESS);
0007c e3a00000 mov r0, #0
; 247 :
; 248 : }
00080 e12fff1e bx lr
00084 |$M1356|
ENDP ; |XllpAkGetOutSampleRate|
EXPORT |XllpAkSetInSampleRate|
00000 AREA |.text| { |XllpAkSetInSampleRate| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$XllpAkSetInSampleRate|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpAkSetInSampleRate| } ; comdat associative
|$T1367| DCD |$L1366|
DCD 0x40000200
; Function compile flags: /Ogsy
00000 AREA |.text| { |XllpAkSetInSampleRate| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |XllpAkSetInSampleRate| PROC
; 250 : {
00000 |$L1366|
00000 |$M1364|
; 251 : //note: we assume the AKM is in slave mode (i2s bitclk comes from apps cpu)
; 252 : //therefore the SSP path has a fixed sample rate of 8khz
; 253 :
; 254 : return (XLLP_ACODEC_CODEC_FEATURE_NOT_SUPPORTED);
00000 e3a0000c mov r0, #0xC
; 255 :
; 256 : }
00004 e12fff1e bx lr
00008 |$M1365|
ENDP ; |XllpAkSetInSampleRate|
EXPORT |XllpAkSetOutSampleRate|
00000 AREA |.text| { |XllpAkSetOutSampleRate| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$XllpAkSetOutSampleRate|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpAkSetOutSampleRate| } ; comdat associative
|$T1379| DCD |$L1378|
DCD 0x40002500
; Function compile flags: /Ogsy
00000 AREA |.text| { |XllpAkSetOutSampleRate| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |XllpAkSetOutSampleRate| PROC
; 258 : {
00000 |$L1378|
00000 |$M1376|
00000 e1a02001 mov r2, r1
; 259 : //note: we assume the AKM is in slave mode (i2s bitclk comes from apps cpu)
; 260 : //therefore we set the divisor to the bitclock
; 261 :
; 262 : switch(RateInKhz) {
00004 e3520d7d cmp r2, #0x7D, 26
00008 0a00001c beq |$L1218|
0000c e3a03c2b mov r3, #0x2B, 24
00010 e3833011 orr r3, r3, #0x11
00014 e1520003 cmp r2, r3
00018 0a000016 beq |$L1219|
0001c e3520dfa cmp r2, #0xFA, 26
00020 0a000012 beq |$L1220|
00024 e3a03c56 mov r3, #0x56, 24
00028 e3833022 orr r3, r3, #0x22
0002c e1520003 cmp r2, r3
00030 0a00000c beq |$L1221|
00034 e3a03b2b mov r3, #0x2B, 22
00038 e3833044 orr r3, r3, #0x44
0003c e1520003 cmp r2, r3
00040 0a000006 beq |$L1222|
00044 e3a03cbb mov r3, #0xBB, 24
00048 e3833080 orr r3, r3, #0x80
0004c e1520003 cmp r2, r3
; 281 :
; 282 : default:
; 283 : return(XLLP_ACODEC_SAMPLERATE_INVALID);
00050 13a00007 movne r0, #7
; 288 :
; 289 : }
00054 112fff1e bxne lr
; 278 : case 48000:
; 279 : (pDeviceContext->pPCMReg)->SADIV = 0xc; //appx 48khz
00058 e3a0200c mov r2, #0xC
; 280 : break;
0005c ea000008 b |$L1375|
00060 |$L1222|
; 275 : case 44100:
; 276 : (pDeviceContext->pPCMReg)->SADIV = 0xd; //appx 44.1khz
00060 e3a0200d mov r2, #0xD
; 277 : break;
00064 ea000006 b |$L1375|
00068 |$L1221|
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -