📄 ac97.txt
字号:
000268 e28f0084 ADR r0,|L1.756|
00026c ebfffffe BL _printf
;;;1227 break;
000270 ea000006 B |L1.656|
;;;1228
;;;1229 case 4:
;;;1230 Uart_Printf("AC97 Controller State: LP\n");
|L1.628|
000274 e28f0098 ADR r0,|L1.788|
000278 ebfffffe BL _printf
;;;1231 break;
00027c ea000003 B |L1.656|
;;;1232
;;;1233 case 5:
;;;1234 Uart_Printf("AC97 Controller State: Warm\n");
|L1.640|
000280 e28f00a8 ADR r0,|L1.816|
000284 ebfffffe BL _printf
;;;1235 break;
000288 ea000000 B |L1.656|
;;;1236
;;;1237 default:
;;;1238 break;
|L1.652|
00028c e1a00000 NOP
;;;1239 }
;;;1240 }
|L1.656|
000290 e8bd8010 LDMFD sp!,{r4,pc}
|L1.660|
000294 37394341 DCB "AC97"
000298 6e6f4320 DCB " Con"
00029c 6c6f7274 DCB "trol"
0002a0 2072656c DCB "ler "
0002a4 74617453 DCB "Stat"
0002a8 49203a65 DCB "e: I"
0002ac 0a656c64 DCB "dle\n"
0002b0 00000000 DCB "\0\0\0\0"
|L1.692|
0002b4 37394341 DCB "AC97"
0002b8 6e6f4320 DCB " Con"
0002bc 6c6f7274 DCB "trol"
0002c0 2072656c DCB "ler "
0002c4 74617453 DCB "Stat"
0002c8 49203a65 DCB "e: I"
0002cc 0a74696e DCB "nit\n"
0002d0 00000000 DCB "\0\0\0\0"
|L1.724|
0002d4 37394341 DCB "AC97"
0002d8 6e6f4320 DCB " Con"
0002dc 6c6f7274 DCB "trol"
0002e0 2072656c DCB "ler "
0002e4 74617453 DCB "Stat"
0002e8 52203a65 DCB "e: R"
0002ec 79646165 DCB "eady"
0002f0 0000000a DCB "\n\0\0\0"
|L1.756|
0002f4 37394341 DCB "AC97"
0002f8 6e6f4320 DCB " Con"
0002fc 6c6f7274 DCB "trol"
000300 2072656c DCB "ler "
000304 74617453 DCB "Stat"
000308 41203a65 DCB "e: A"
00030c 76697463 DCB "ctiv"
000310 00000a65 DCB "e\n\0\0"
|L1.788|
000314 37394341 DCB "AC97"
000318 6e6f4320 DCB " Con"
00031c 6c6f7274 DCB "trol"
000320 2072656c DCB "ler "
000324 74617453 DCB "Stat"
000328 4c203a65 DCB "e: L"
00032c 00000a50 DCB "P\n\0\0"
|L1.816|
000330 37394341 DCB "AC97"
000334 6e6f4320 DCB " Con"
000338 6c6f7274 DCB "trol"
00033c 2072656c DCB "ler "
000340 74617453 DCB "Stat"
000344 57203a65 DCB "e: W"
000348 0a6d7261 DCB "arm\n"
00034c 00000000 DCB "\0\0\0\0"
ENDP
AC97_CodecExit_PCMOut PROC
;;;1095 void AC97_CodecExit_PCMOut(void)
;;;1096 {
000350 e92d4010 STMFD sp!,{r4,lr}
;;;1097 //DACs off
;;;1098 Uart_Printf("\n\n=>DACs off PR1\n");
000354 e28f00b0 ADR r0,|L1.1036|
000358 ebfffffe BL _printf
;;;1099 AC97_Codec_Cmd(0,0x26,(1<<8)|(1<<9));
00035c e3a02fc0 MOV r2,#0x300
000360 e3a01026 MOV r1,#0x26
000364 e3a00000 MOV r0,#0
000368 ebfffffe BL AC97_Codec_Cmd
;;;1100 AC97_Controller_State();
00036c ebfffffe BL AC97_Controller_State
;;;1101 Uart_Printf("AC97 Codec Powerdown Ctrl/Stat 0x26 Reg.: 0x%x\n", AC97_Codec_Cmd(1,0x26,0x0000));
000370 e3a02000 MOV r2,#0
000374 e3a01026 MOV r1,#0x26
000378 e3a00001 MOV r0,#1
00037c ebfffffe BL AC97_Codec_Cmd
000380 e1a04000 MOV r4,r0
000384 e1a01000 MOV r1,r0
000388 e28f0090 ADR r0,|L1.1056|
00038c ebfffffe BL _printf
;;;1102
;;;1103 //Analog off
;;;1104 Uart_Printf("\n=>Analog off PR2\n");
000390 e28f00b8 ADR r0,|L1.1104|
000394 ebfffffe BL _printf
;;;1105 AC97_Codec_Cmd(0,0x26,(1<<8)|(1<<9)|(1<<10));
000398 e3a02e70 MOV r2,#0x700
00039c e3a01026 MOV r1,#0x26
0003a0 e3a00000 MOV r0,#0
0003a4 ebfffffe BL AC97_Codec_Cmd
;;;1106 AC97_Controller_State();
0003a8 ebfffffe BL AC97_Controller_State
;;;1107 Uart_Printf("AC97 Codec Powerdown Ctrl/Stat 0x26 Reg.: 0x%x\n", AC97_Codec_Cmd(1,0x26,0x0000));
0003ac e3a02000 MOV r2,#0
0003b0 e3a01026 MOV r1,#0x26
0003b4 e3a00001 MOV r0,#1
0003b8 ebfffffe BL AC97_Codec_Cmd
0003bc e1a04000 MOV r4,r0
0003c0 e1a01000 MOV r1,r0
0003c4 e28f0054 ADR r0,|L1.1056|
0003c8 ebfffffe BL _printf
;;;1108
;;;1109 //Digital I/F off
;;;1110 Uart_Printf("\n=>Digital I/F off PR4\n");
0003cc e28f0090 ADR r0,|L1.1124|
0003d0 ebfffffe BL _printf
;;;1111 AC97_Codec_Cmd(0,0x26,(1<<8)|(1<<9)|(1<<10)|(1<<12));
0003d4 e3a02d5c MOV r2,#0x1700
0003d8 e3a01026 MOV r1,#0x26
0003dc e3a00000 MOV r0,#0
0003e0 ebfffffe BL AC97_Codec_Cmd
;;;1112 AC97_Controller_State();
0003e4 ebfffffe BL AC97_Controller_State
;;;1113 Uart_Printf("AC97 Codec Powerdown Ctrl/Stat 0x26 Reg.: 0x%x\n", AC97_Codec_Cmd(1,0x26,0x0000));
0003e8 e3a02000 MOV r2,#0
0003ec e3a01026 MOV r1,#0x26
0003f0 e3a00001 MOV r0,#1
0003f4 ebfffffe BL AC97_Codec_Cmd
0003f8 e1a04000 MOV r4,r0
0003fc e1a01000 MOV r1,r0
000400 e28f0018 ADR r0,|L1.1056|
000404 ebfffffe BL _printf
;;;1114
;;;1115 }
000408 e8bd8010 LDMFD sp!,{r4,pc}
|L1.1036|
00040c 3e3d0a0a DCB "\n\n=>"
000410 73434144 DCB "DACs"
000414 66666f20 DCB " off"
000418 31525020 DCB " PR1"
00041c 0000000a DCB "\n\0\0\0"
|L1.1056|
000420 37394341 DCB "AC97"
000424 646f4320 DCB " Cod"
000428 50206365 DCB "ec P"
00042c 7265776f DCB "ower"
000430 6e776f64 DCB "down"
000434 72744320 DCB " Ctr"
000438 74532f6c DCB "l/St"
00043c 30207461 DCB "at 0"
000440 20363278 DCB "x26 "
000444 2e676552 DCB "Reg."
000448 7830203a DCB ": 0x"
00044c 000a7825 DCB "%x\n\0"
|L1.1104|
000450 413e3d0a DCB "\n=>A"
000454 6f6c616e DCB "nalo"
000458 666f2067 DCB "g of"
00045c 52502066 DCB "f PR"
000460 00000a32 DCB "2\n\0\0"
|L1.1124|
000464 443e3d0a DCB "\n=>D"
000468 74696769 DCB "igit"
00046c 49206c61 DCB "al I"
000470 6f20462f DCB "/F o"
000474 50206666 DCB "ff P"
000478 000a3452 DCB "R4\n\0"
ENDP
PCM_Out_Volume PROC
;;;750 void PCM_Out_Volume(U8 Up_Down_Volume)
;;;751 {
00047c e92d4010 STMFD sp!,{r4,lr}
000480 e1a04000 MOV r4,r0
;;;752 if( ( Up_Down_Volume == 'u') | (Up_Down_Volume == 'U') )
000484 e3540075 CMP r4,#0x75
000488 1a000001 BNE |L1.1172|
00048c e3a00001 MOV r0,#1
000490 ea000000 B |L1.1176|
|L1.1172|
000494 e3a00000 MOV r0,#0
|L1.1176|
000498 e3540055 CMP r4,#0x55
00049c 1a000001 BNE |L1.1192|
0004a0 e3a01001 MOV r1,#1
0004a4 ea000000 B |L1.1196|
|L1.1192|
0004a8 e3a01000 MOV r1,#0
|L1.1196|
0004ac e1900001 ORRS r0,r0,r1
0004b0 0a000017 BEQ |L1.1300|
;;;753 {
;;;754 if (Output_Volume == 0x0000)
0004b4 e59f00f0 LDR r0,|L1.1452|
0004b8 e5900000 LDR r0,[r0,#0] ; Output_Volume
0004bc e3500000 CMP r0,#0
0004c0 1a000002 BNE |L1.1232|
;;;755 {
;;;756 Uart_Printf("\nLimit Volume Range!");
0004c4 e28f00e4 ADR r0,|L1.1456|
0004c8 ebfffffe BL _printf
0004cc ea000010 B |L1.1300|
;;;757 }
;;;758 else
;;;759 {
;;;760 Output_Volume -= 0x0101;
|L1.1232|
0004d0 e59f00d4 LDR r0,|L1.1452|
0004d4 e5900000 LDR r0,[r0,#0] ; Output_Volume
0004d8 e3e01f40 MVN r1,#0x100
0004dc e0800001 ADD r0,r0,r1
0004e0 e59f10c4 LDR r1,|L1.1452|
0004e4 e5810000 STR r0,[r1,#0] ; Output_Volume
;;;761 AC97_Codec_Cmd(0,0x04, Output_Volume); // PCM out Volume Up
0004e8 e59f00bc LDR r0,|L1.1452|
0004ec e5900000 LDR r0,[r0,#0] ; Output_Volume
0004f0 e1a02800 MOV r2,r0,LSL #16
0004f4 e1a02822 MOV r2,r2,LSR #16
0004f8 e3a01004 MOV r1,#4
0004fc e3a00000 MOV r0,#0
000500 ebfffffe BL AC97_Codec_Cmd
;;;762 Uart_Printf("\nHeadphone Volume Level (In AC97 Codec 04h Reg.): 0x%x", Output_Volume);
000504 e59f00a0 LDR r0,|L1.1452|
000508 e5901000 LDR r1,[r0,#0] ; Output_Volume
00050c e28f00b4 ADR r0,|L1.1480|
000510 ebfffffe BL _printf
;;;763 }
;;;764 }
;;;765
;;;766 if ( ( Up_Down_Volume == 'd') | (Up_Down_Volume == 'D') )
|L1.1300|
000514 e3540064 CMP r4,#0x64
000518 1a000001 BNE |L1.1316|
00051c e3a00001 MOV r0,#1
000520 ea000000 B |L1.1320|
|L1.1316|
000524 e3a00000 MOV r0,#0
|L1.1320|
000528 e3540044 CMP r4,#0x44
00052c 1a000001 BNE |L1.1336|
000530 e3a01001 MOV r1,#1
000534 ea000000 B |L1.1340|
|L1.1336|
000538 e3a01000 MOV r1,#0
|L1.1340|
00053c e1900001 ORRS r0,r0,r1
000540 0a000018 BEQ |L1.1448|
;;;767 {
;;;768 if (Output_Volume == 0x1F1F)
000544 e59f0060 LDR r0,|L1.1452|
000548 e5900000 LDR r0,[r0,#0] ; Output_Volume
00054c e240cd7c SUB r12,r0,#0x1f00
000550 e25cc01f SUBS r12,r12,#0x1f
000554 1a000002 BNE |L1.1380|
;;;769 {
;;;770 Uart_Printf("\nLimit Volume Range!");
000558 e28f0050 ADR r0,|L1.1456|
00055c ebfffffe BL _printf
000560 ea000010 B |L1.1448|
;;;771 }
;;;772 else
;;;773 {
;;;774 Output_Volume += 0x0101;
|L1.1380|
000564 e59f0040 LDR r0,|L1.1452|
000568 e5900000 LDR r0,[r0,#0] ; Output_Volume
00056c e2800f40 ADD r0,r0,#0x100
000570 e2800001 ADD r0,r0,#1
000574 e59f1030 LDR r1,|L1.1452|
000578 e5810000 STR r0,[r1,#0] ; Output_Volume
;;;775 AC97_Codec_Cmd(0,0x04, Output_Volume); // PCM out Volume Down
00057c e59f0028 LDR r0,|L1.1452|
000580 e5900000 LDR r0,[r0,#0] ; Output_Volume
000584 e1a02800 MOV r2,r0,LSL #16
000588 e1a02822 MOV r2,r2,LSR #16
00058c e3a01004 MOV r1,#4
000590 e3a00000 MOV r0,#0
000594 ebfffffe BL AC97_Codec_Cmd
;;;776 Uart_Printf("\nHeadphone Volume Level (In AC97 Codec 04h Reg.): 0x%x", Output_Volume);
000598 e59f000c LDR r0,|L1.1452|
00059c e5901000 LDR r1,[r0,#0] ; Output_Volume
0005a0 e28f0020 ADR r0,|L1.1480|
0005a4 ebfffffe BL _printf
;;;777 }
;;;778 }
;;;779 }
|L1.1448|
0005a8 e8bd8010 LDMFD sp!,{r4,pc}
|L1.1452|
0005ac 00000010 DCD ||.bss$2|| + 16
|L1.1456|
0005b0 6d694c0a DCB "\nLim"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -