📄 xllp_wm8753.cod
字号:
00000 AREA |.text| { |XllpWm8753GetInSampleRate| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$XllpWm8753GetInSampleRate|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpWm8753GetInSampleRate| } ; comdat associative
|$T1391| DCD |$L1390|
DCD 0x40000400
; Function compile flags: /Ogsy
00000 AREA |.text| { |XllpWm8753GetInSampleRate| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |XllpWm8753GetInSampleRate| PROC
; 281 : {
00000 |$L1390|
00000 |$M1388|
; 282 : *RateInKhz=8000; //AKM SSP interface only supports 8 khz sample rate
00000 e3a03d7d mov r3, #0x7D, 26
00004 e1c130b0 strh r3, [r1]
; 283 : return (XLLP_ACODEC_SUCCESS);
00008 e3a00000 mov r0, #0
; 284 : }
0000c e12fff1e bx lr
00010 |$M1389|
ENDP ; |XllpWm8753GetInSampleRate|
EXPORT |XllpWm8753GetOutSampleRate|
00000 AREA |.text| { |XllpWm8753GetOutSampleRate| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$XllpWm8753GetOutSampleRate|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpWm8753GetOutSampleRate| } ; comdat associative
|$T1403| DCD |$L1402|
DCD 0x40002100
; Function compile flags: /Ogsy
00000 AREA |.text| { |XllpWm8753GetOutSampleRate| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |XllpWm8753GetOutSampleRate| PROC
; 288 : {
00000 |$L1402|
00000 |$M1400|
; 289 :
; 290 : switch((pDeviceContext->pPCMReg)->SADIV) {
00000 e5903008 ldr r3, [r0, #8]
00004 e5933060 ldr r3, [r3, #0x60]
00008 e353000c cmp r3, #0xC
0000c 0a000017 beq |$L1223|
00010 e353000d cmp r3, #0xD
00014 0a000012 beq |$L1222|
00018 e353001a cmp r3, #0x1A
0001c 0a00000d beq |$L1221|
00020 e3530024 cmp r3, #0x24
00024 0a000009 beq |$L1220|
00028 e3530034 cmp r3, #0x34
0002c 0a000004 beq |$L1219|
00030 e3530048 cmp r3, #0x48
; 308 : break;
; 309 :
; 310 : default:
; 311 : return(XLLP_ACODEC_SAMPLERATE_INVALID);
00034 13a00007 movne r0, #7
; 315 :
; 316 : }
00038 112fff1e bxne lr
; 291 : case 0x48:
; 292 : *RateInKhz=8000; //8k
0003c e3a03d7d mov r3, #0x7D, 26
; 293 : break;
00040 ea00000c b |$L1399|
00044 |$L1219|
; 294 : case 0x34:
; 295 : *RateInKhz=11025; //11k
00044 e3a03c2b mov r3, #0x2B, 24
00048 e3833011 orr r3, r3, #0x11
; 296 : break;
0004c ea000009 b |$L1399|
00050 |$L1220|
; 297 : case 0x24:
; 298 : *RateInKhz=16000; //16k
00050 e3a03dfa mov r3, #0xFA, 26
; 299 : break;
00054 ea000007 b |$L1399|
00058 |$L1221|
; 300 : case 0x1a:
; 301 : *RateInKhz=22050; //22.05KHZ
00058 e3a03c56 mov r3, #0x56, 24
0005c e3833022 orr r3, r3, #0x22
; 302 : break;
00060 ea000004 b |$L1399|
00064 |$L1222|
; 303 : case 0xd:
; 304 : *RateInKhz=44100; //44.100KHZ
00064 e3a03b2b mov r3, #0x2B, 22
00068 e3833044 orr r3, r3, #0x44
; 305 : break;
0006c ea000001 b |$L1399|
00070 |$L1223|
; 306 : case 0xc:
; 307 : *RateInKhz=48000; //48KHZ
00070 e3a03cbb mov r3, #0xBB, 24
00074 e3833080 orr r3, r3, #0x80
00078 |$L1399|
00078 e1c130b0 strh r3, [r1]
; 312 : break;
; 313 : }
; 314 : return (XLLP_ACODEC_SUCCESS);
0007c e3a00000 mov r0, #0
; 315 :
; 316 : }
00080 e12fff1e bx lr
00084 |$M1401|
ENDP ; |XllpWm8753GetOutSampleRate|
EXPORT |XllpWm8753SetInSampleRate|
00000 AREA |.text| { |XllpWm8753SetInSampleRate| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$XllpWm8753SetInSampleRate|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpWm8753SetInSampleRate| } ; comdat associative
|$T1412| DCD |$L1411|
DCD 0x40000200
; Function compile flags: /Ogsy
00000 AREA |.text| { |XllpWm8753SetInSampleRate| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |XllpWm8753SetInSampleRate| PROC
; 318 : {
00000 |$L1411|
00000 |$M1409|
; 319 : //note: we assume the AKM is in slave mode (i2s bitclk comes from apps cpu)
; 320 : //therefore the SSP path has a fixed sample rate of 8khz
; 321 :
; 322 : return (XLLP_ACODEC_CODEC_FEATURE_NOT_SUPPORTED);
00000 e3a0000c mov r0, #0xC
; 323 :
; 324 : }
00004 e12fff1e bx lr
00008 |$M1410|
ENDP ; |XllpWm8753SetInSampleRate|
EXPORT |XllpWm8753SetOutSampleRate|
00000 AREA |.text| { |XllpWm8753SetOutSampleRate| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$XllpWm8753SetOutSampleRate|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpWm8753SetOutSampleRate| } ; comdat associative
|$T1424| DCD |$L1423|
DCD 0x40002500
; Function compile flags: /Ogsy
00000 AREA |.text| { |XllpWm8753SetOutSampleRate| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |XllpWm8753SetOutSampleRate| PROC
; 328 : {
00000 |$L1423|
00000 |$M1421|
00000 e1a02001 mov r2, r1
; 329 : //note: we assume the AKM is in slave mode (i2s bitclk comes from apps cpu)
; 330 : //therefore we set the divisor to the bitclock
; 331 :
; 332 : switch(RateInKhz) {
00004 e3520d7d cmp r2, #0x7D, 26
00008 0a00001c beq |$L1239|
0000c e3a03c2b mov r3, #0x2B, 24
00010 e3833011 orr r3, r3, #0x11
00014 e1520003 cmp r2, r3
00018 0a000016 beq |$L1240|
0001c e3520dfa cmp r2, #0xFA, 26
00020 0a000012 beq |$L1241|
00024 e3a03c56 mov r3, #0x56, 24
00028 e3833022 orr r3, r3, #0x22
0002c e1520003 cmp r2, r3
00030 0a00000c beq |$L1242|
00034 e3a03b2b mov r3, #0x2B, 22
00038 e3833044 orr r3, r3, #0x44
0003c e1520003 cmp r2, r3
00040 0a000006 beq |$L1243|
00044 e3a03cbb mov r3, #0xBB, 24
00048 e3833080 orr r3, r3, #0x80
0004c e1520003 cmp r2, r3
; 351 :
; 352 : default:
; 353 : return(XLLP_ACODEC_SAMPLERATE_INVALID);
00050 13a00007 movne r0, #7
; 358 :
; 359 : }
00054 112fff1e bxne lr
; 348 : case 48000:
; 349 : (pDeviceContext->pPCMReg)->SADIV = 0xc; //appx 48khz
00058 e3a0200c mov r2, #0xC
; 350 : break;
0005c ea000008 b |$L1420|
00060 |$L1243|
; 345 : case 44100:
; 346 : (pDeviceContext->pPCMReg)->SADIV = 0xd; //appx 44.1khz
00060 e3a0200d mov r2, #0xD
; 347 : break;
00064 ea000006 b |$L1420|
00068 |$L1242|
; 342 : case 22050:
; 343 : (pDeviceContext->pPCMReg)->SADIV = 0x1a; //appx 22.05 khz
00068 e3a0201a mov r2, #0x1A
; 344 : break;
0006c ea000004 b |$L1420|
00070 |$L1241|
; 339 : case 16000:
; 340 : (pDeviceContext->pPCMReg)->SADIV = 0x24; //appx 16 khz
00070 e3a02024 mov r2, #0x24
; 341 : break;
00074 ea000002 b |$L1420|
00078 |$L1240|
; 335 : break;
; 336 : case 11025:
; 337 : (pDeviceContext->pPCMReg)->SADIV = 0x34; //appx 11.025 khz
00078 e3a02034 mov r2, #0x34
; 338 : break;
0007c ea000000 b |$L1420|
00080 |$L1239|
; 333 : case 8000:
; 334 : (pDeviceContext->pPCMReg)->SADIV = 0x48; //appx 8 khz //don't let the 48 confuse you, it's only 8k
00080 e3a02048 mov r2, #0x48
00084 |$L1420|
00084 e5903008 ldr r3, [r0, #8]
; 354 : break;
; 355 :
; 356 : }
; 357 : return (XLLP_ACODEC_SUCCESS);
00088 e3a00000 mov r0, #0
0008c e5832060 str r2, [r3, #0x60]
; 358 :
; 359 : }
00090 e12fff1e bx lr
00094 |$M1422|
ENDP ; |XllpWm8753SetOutSampleRate|
EXPORT |XllpWm8753CodecSpecificDeinit|
00000 AREA |.text| { |XllpWm8753CodecSpecificDeinit| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$XllpWm8753CodecSpecificDeinit|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpWm8753CodecSpecificDeinit| } ; comdat associative
|$T1434| DCD |$L1433|
DCD 0x40000701
; Function compile flags: /Ogsy
00000 AREA |.text| { |XllpWm8753CodecSpecificDeinit| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |XllpWm8753CodecSpecificDeinit| PROC
; 363 : {
00000 |$L1433|
00000 e52de004 str lr, [sp, #-4]!
00004 |$M1431|
; 364 : //Tristating 8753 PCM interface
; 365 : XllpWm8753CodecWrite(pDeviceContext, Wm8753_IFCONTROL,0xF0);
00004 e3a020f0 mov r2, #0xF0
00008 e3a01005 mov r1, #5
0000c eb000000 bl XllpWm8753CodecWrite
; 366 :
; 367 : return (XLLP_ACODEC_SUCCESS);
00010 e3a00000 mov r0, #0
; 368 : }
00014 e49de004 ldr lr, [sp], #4
00018 e12fff1e bx lr
0001c |$M1432|
ENDP ; |XllpWm8753CodecSpecificDeinit|
EXPORT |XllpWm8753EnterEuipmentState|
00000 AREA |.text| { |XllpWm8753EnterEuipmentState| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$XllpWm8753EnterEuipmentState|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpWm8753EnterEuipmentState| } ; comdat associative
|$T1443| DCD |$L1442|
DCD 0x40000200
; Function compile flags: /Ogsy
00000 AREA |.text| { |XllpWm8753EnterEuipmentState| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |XllpWm8753EnterEuipmentState| PROC
; 371 : {
00000 |$L1442|
00000 |$M1440|
; 372 : return (XLLP_ACODEC_SUCCESS);
00000 e3a00000 mov r0, #0
; 373 : }
00004 e12fff1e bx lr
00008 |$M1441|
ENDP ; |XllpWm8753EnterEuipmentState|
EXPORT |XllpWm8753QueryEquipmentState|
00000 AREA |.text| { |XllpWm8753QueryEquipmentState| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$XllpWm8753QueryEquipmentState|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpWm8753QueryEquipmentState| } ; comdat associative
|$T1452| DCD |$L1451|
DCD 0x40000200
; Function compile flags: /Ogsy
00000 AREA |.text| { |XllpWm8753QueryEquipmentState| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |XllpWm8753QueryEquipmentState| PROC
; 376 : {
00000 |$L1451|
00000 |$M1449|
; 377 : return (XLLP_ACODEC_SUCCESS);
00000 e3a00000 mov r0, #0
; 378 : }
00004 e12fff1e bx lr
00008 |$M1450|
ENDP ; |XllpWm8753QueryEquipmentState|
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -