Rev 214 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
168 | serge | 1 | |
2 | |||
3 | |||
4 | |||
5 | |||
6 | |||
7 | |||
8 | |||
9 | |||
10 | |||
11 | ; FEDCBA9876543210 |
||
12 | VALID_IRQ equ 1100111011111000b |
||
13 | ATTCH_IRQ equ 0000111010101000b |
||
14 | |||
15 | |||
16 | |||
17 | |||
18 | |||
19 | |||
20 | BIT1 EQU 0x00000002 |
||
21 | BIT2 EQU 0x00000004 |
||
22 | BIT3 EQU 0x00000008 |
||
23 | BIT4 EQU 0x00000010 |
||
24 | BIT5 EQU 0x00000020 |
||
25 | BIT6 EQU 0x00000040 |
||
26 | BIT7 EQU 0x00000080 |
||
27 | BIT8 EQU 0x00000100 |
||
28 | BIT9 EQU 0x00000200 |
||
29 | BIT10 EQU 0x00000400 |
||
30 | BIT11 EQU 0x00000800 |
||
31 | BIT12 EQU 0x00001000 |
||
32 | BIT13 EQU 0x00002000 |
||
33 | BIT14 EQU 0x00004000 |
||
34 | BIT15 EQU 0x00008000 |
||
35 | BIT16 EQU 0x00010000 |
||
36 | BIT17 EQU 0x00020000 |
||
37 | BIT18 EQU 0x00040000 |
||
38 | BIT19 EQU 0x00080000 |
||
39 | BIT20 EQU 0x00100000 |
||
40 | BIT21 EQU 0x00200000 |
||
41 | BIT22 EQU 0x00400000 |
||
42 | BIT23 EQU 0x00800000 |
||
43 | BIT24 EQU 0x00100000 |
||
44 | BIT25 EQU 0x02000000 |
||
45 | BIT26 EQU 0x04000000 |
||
46 | BIT27 EQU 0x08000000 |
||
47 | BIT28 EQU 0x10000000 |
||
48 | BIT29 EQU 0x20000000 |
||
49 | BIT30 EQU 0x40000000 |
||
50 | BIT31 EQU 0x80000000 |
||
51 | |||
52 | |||
53 | VID_NVIDIA equ 0x10DE |
||
54 | |||
55 | |||
56 | CTRL_ICH0 equ 0x2425 |
||
57 | CTRL_ICH2 equ 0x2435 |
||
58 | CTRL_ICH3 equ 0x2445 |
||
59 | CTRL_ICH4 equ 0x24C5 |
||
60 | CTRL_ICH5 equ 0x24D5 |
||
61 | CTRL_ICH6 equ 0x266E |
||
62 | CTRL_ICH7 equ 0x27DE |
||
63 | |||
64 | |||
65 | CTRL_NFORCE2 equ 0x006A |
||
66 | CTRL_NFORCE3 equ 0x00DA |
||
67 | CTRL_MCP04 equ 0x003A |
||
198 | serge | 68 | CTRL_CK804 equ 0x0059 |
69 | CTRL_CK8 equ 0x008A |
||
70 | CTRL_CK8S equ 0x00EA |
||
71 | CTRL_MCP51 equ 0x026B |
||
72 | |||
168 | serge | 73 | |
74 | |||
75 | PCM_OUT_CR_REG equ 0x1b ; PCM out Control Register |
||
76 | PCM_OUT_LVI_REG equ 0x15 ; PCM last valid index |
||
77 | PCM_OUT_SR_REG equ 0x16 ; PCM out Status register |
||
78 | PCM_OUT_PIV_REG equ 0x1a |
||
79 | PCM_OUT_CIV_REG equ 0x14 ; PCM out current index |
||
80 | |||
81 | |||
82 | MC_IN_CR_REG equ 0x2b ; MIC in Control Register |
||
83 | RR equ BIT1 ; reset registers. Nukes all regs |
||
84 | |||
85 | |||
86 | CODEC_AUX_VOL equ 0x04 ; |
||
87 | CODEC_PCM_OUT_REG equ 18h ; PCM output volume |
||
88 | CODEC_EXT_AUDIO_REG equ 28h ; extended audio |
||
89 | CODEC_EXT_AUDIO_CTRL_REG equ 2ah ; extended audio control |
||
90 | CODEC_PCM_FRONT_DACRATE_REG equ 2ch ; PCM out sample rate |
||
91 | CODEC_PCM_SURND_DACRATE_REG equ 2eh ; surround sound sample rate |
||
92 | CODEC_PCM_LFE_DACRATE_REG equ 30h ; LFE sample rate |
||
93 | |||
94 | |||
95 | CTRL_STAT equ 0x30 ; Global Status |
||
96 | CTRL_CAS equ 0x34 ; Codec Access Semiphore |
||
97 | |||
98 | |||
99 | |||
100 | |||
101 | |||
102 | |||
103 | |||
104 | |||
105 | CTRL_CNT_AC_OFF equ 0x00000008 ; ACLINK Off |
||
106 | CTRL_CNT_WARM equ 0x00000004 ; AC97 Warm Reset |
||
107 | CTRL_CNT_COLD equ 0x00000002 ; AC97 Cold Reset |
||
108 | CTRL_CNT_GIE equ 0x00000001 ; GPI Interrupt Enable |
||
109 | |||
110 | |||
111 | CODEC_REG_ST equ 0x26 |
||
112 | |||
113 | |||
114 | DEV_STOP equ 2 |
||
115 | DEV_CALLBACK equ 3 |
||
116 | DEV_SET_BUFF equ 4 |
||
117 | DEV_NOTIFY equ 5 |
||
118 | DEV_SET_MASTERVOL equ 6 |
||
119 | DEV_GET_MASTERVOL equ 7 |
||
120 | DEV_GET_INFO equ 8 |
||
121 | |||
122 | |||
123 | { .bus dd ? |
||
188 | serge | 124 | .devfn dd ? |
125 | |||
168 | serge | 126 | |
188 | serge | 127 | .dev_id dd ? |
128 | .pci_cmd dd ? |
||
129 | .pci_stat dd ? |
||
130 | |||
168 | serge | 131 | |
188 | serge | 132 | .codec_mem_base dd ? |
133 | |||
168 | serge | 134 | |
188 | serge | 135 | .ctrl_mem_base dd ? |
136 | .cfg_reg dd ? |
||
137 | .int_line dd ? |
||
138 | |||
168 | serge | 139 | |
188 | serge | 140 | .ctrl_ids dd ? ;hub id string |
141 | |||
168 | serge | 142 | |
188 | serge | 143 | |
168 | serge | 144 | |
188 | serge | 145 | .notify_task dd ? |
146 | |||
168 | serge | 147 | |
188 | serge | 148 | .ctrl_setup dd ? |
149 | .user_callback dd ? |
||
150 | .codec_read16 dd ? |
||
151 | .codec_write16 dd ? |
||
152 | |||
168 | serge | 153 | |
188 | serge | 154 | .ctrl_read16 dd ? |
155 | .ctrl_read32 dd ? |
||
156 | |||
168 | serge | 157 | |
188 | serge | 158 | .ctrl_write16 dd ? |
159 | .ctrl_write32 dd ? |
||
160 | } |
||
168 | serge | 161 | |
162 | |||
163 | { |
||
164 | .chip_id dd ? |
||
188 | serge | 165 | .flags dd ? |
166 | .status dd ? |
||
167 | |||
168 | serge | 168 | |
188 | serge | 169 | .chip_ids dd ? ;chip model string |
170 | |||
168 | serge | 171 | |
188 | serge | 172 | dd ? |
173 | |||
168 | serge | 174 | |
188 | serge | 175 | .reg_master_vol dw ? ;0x02 |
176 | .reg_aux_out_vol dw ? ;0x04 |
||
177 | .reg_mone_vol dw ? ;0x06 |
||
178 | .reg_master_tone dw ? ;0x08 |
||
179 | .reg_beep_vol dw ? ;0x0A |
||
180 | .reg_phone_vol dw ? ;0x0C |
||
181 | .reg_mic_vol dw ? ;0x0E |
||
182 | .reg_line_in_vol dw ? ;0x10 |
||
183 | .reg_cd_vol dw ? ;0x12 |
||
184 | .reg_video_vol dw ? ;0x14 |
||
185 | .reg_aux_in_vol dw ? ;0x16 |
||
186 | .reg_pcm_out_vol dw ? ;0x18 |
||
187 | .reg_rec_select dw ? ;0x1A |
||
188 | .reg_rec_gain dw ? ;0x1C |
||
189 | .reg_rec_gain_mic dw ? ;0x1E |
||
190 | .reg_gen dw ? ;0x20 |
||
191 | .reg_3d_ctrl dw ? ;0X22 |
||
192 | .reg_page dw ? ;0X24 |
||
193 | .reg_powerdown dw ? ;0x26 |
||
194 | .reg_ext_audio dw ? ;0x28 |
||
195 | .reg_ext_st dw ? ;0x2a |
||
196 | .reg_pcm_front_rate dw ? ;0x2c |
||
197 | .reg_pcm_surr_rate dw ? ;0x2e |
||
198 | .reg_lfe_rate dw ? ;0x30 |
||
199 | .reg_pcm_in_rate dw ? ;0x32 |
||
200 | dw ? ;0x34 |
||
201 | .reg_cent_lfe_vol dw ? ;0x36 |
||
202 | .reg_surr_vol dw ? ;0x38 |
||
203 | .reg_spdif_ctrl dw ? ;0x3A |
||
204 | dw ? ;0x3C |
||
205 | dw ? ;0x3E |
||
206 | dw ? ;0x40 |
||
207 | dw ? ;0x42 |
||
208 | dw ? ;0x44 |
||
209 | dw ? ;0x46 |
||
210 | dw ? ;0x48 |
||
211 | dw ? ;0x4A |
||
212 | dw ? ;0x4C |
||
213 | dw ? ;0x4E |
||
214 | dw ? ;0x50 |
||
215 | dw ? ;0x52 |
||
216 | dw ? ;0x54 |
||
217 | dw ? ;0x56 |
||
218 | dw ? ;0x58 |
||
219 | dw ? ;0x5A |
||
220 | dw ? ;0x5C |
||
221 | dw ? ;0x5E |
||
222 | .reg_page_0 dw ? ;0x60 |
||
223 | .reg_page_1 dw ? ;0x62 |
||
224 | .reg_page_2 dw ? ;0x64 |
||
225 | .reg_page_3 dw ? ;0x66 |
||
226 | .reg_page_4 dw ? ;0x68 |
||
227 | .reg_page_5 dw ? ;0x6A |
||
228 | .reg_page_6 dw ? ;0x6C |
||
229 | .reg_page_7 dw ? ;0x6E |
||
230 | dw ? ;0x70 |
||
231 | dw ? ;0x72 |
||
232 | dw ? ;0x74 |
||
233 | dw ? ;0x76 |
||
234 | dw ? ;0x78 |
||
235 | dw ? ;0x7A |
||
236 | .reg_vendor_id_1 dw ? ;0x7C |
||
237 | .reg_vendor_id_2 dw ? ;0x7E |
||
238 | |||
168 | serge | 239 | |
240 | |||
188 | serge | 241 | .set_master_vol dd ? |
242 | } |
||
168 | serge | 243 | |
244 | |||
245 | { .pci_cmd dd ? |
||
246 | .irq dd ? |
||
247 | .glob_cntrl dd ? |
||
248 | .glob_sta dd ? |
||
249 | .codec_io_base dd ? |
||
250 | .ctrl_io_base dd ? |
||
251 | .codec_mem_base dd ? |
||
252 | .ctrl_mem_base dd ? |
||
253 | .codec_id dd ? |
||
254 | } |
||
255 | |||
256 | |||
257 | { .handle dd ? |
||
258 | .io_code dd ? |
||
259 | .input dd ? |
||
260 | .inp_size dd ? |
||
261 | .output dd ? |
||
262 | .out_size dd ? |
||
263 | } |
||
264 | |||
265 | |||
266 | IOCTL IOCTL |
||
267 | end virtual |
||
268 | |||
269 | |||
270 | |||
271 | |||
272 | new_app_base equ 0x60400000; 0x01000000 |
||
273 | PROC_BASE equ OS_BASE+0x0080000 |
||
274 | |||
275 | |||
188 | serge | 276 | public service_proc |
168 | serge | 277 | |
278 | |||
188 | serge | 279 | extrn SysMsgBoardStr |
280 | extrn PciApi |
||
281 | extrn PciRead32 |
||
282 | extrn PciRead8 |
||
283 | extrn PciWrite8 |
||
284 | extrn AllocKernelSpace |
||
285 | extrn MapPage |
||
286 | extrn RegService |
||
287 | extrn KernelAlloc |
||
288 | extrn GetPgAddr |
||
289 | extrn GetCurrentTask |
||
290 | |||
168 | serge | 291 | |
188 | serge | 292 | |
293 | |||
214 | serge | 294 | |
295 | |||
296 | cmp eax, 1 |
||
297 | jne .stop |
||
224 | serge | 298 | .entry: |
214 | serge | 299 | |
300 | |||
168 | serge | 301 | mov esi, msgInit |
302 | call SysMsgBoardStr |
||
188 | serge | 303 | end if |
168 | serge | 304 | |
305 | |||
306 | test eax, eax |
||
307 | jz .fail |
||
308 | |||
309 | |||
310 | mov esi,[ctrl.vendor_ids] |
||
311 | call SysMsgBoardStr |
||
188 | serge | 312 | mov esi, [ctrl.ctrl_ids] |
168 | serge | 313 | call SysMsgBoardStr |
188 | serge | 314 | |
168 | serge | 315 | |
316 | |||
317 | |||
318 | test eax, eax |
||
319 | jz .fail |
||
320 | |||
321 | |||
322 | mov esi, msgInitCodec |
||
323 | call SysMsgBoardStr |
||
188 | serge | 324 | end if |
168 | serge | 325 | |
326 | |||
327 | test eax, eax |
||
328 | jz .fail |
||
329 | |||
330 | |||
331 | mov esi, [codec.ac_vendor_ids] |
||
332 | call SysMsgBoardStr |
||
188 | serge | 333 | |
168 | serge | 334 | |
335 | call SysMsgBoardStr |
||
188 | serge | 336 | end if |
168 | serge | 337 | |
338 | |||
339 | call setup_codec |
||
340 | |||
341 | |||
342 | call SysMsgBoardStr |
||
188 | serge | 343 | |
168 | serge | 344 | |
345 | |||
346 | |||
347 | |||
348 | |||
349 | ; cmp eax, -1 |
||
350 | ; jz .fail |
||
351 | |||
352 | |||
353 | ; call remap_irq |
||
354 | ; end if |
||
355 | |||
356 | |||
357 | mov ebx, [ctrl.int_line] |
||
358 | mov esi, msgInvIRQ |
||
359 | bt eax, ebx |
||
360 | jnc .fail |
||
361 | mov eax, ATTCH_IRQ |
||
362 | mov esi, msgAttchIRQ |
||
363 | bt eax, ebx |
||
364 | jnc .fail |
||
365 | |||
366 | |||
188 | serge | 367 | stdcall RegService, sz_sound_srv, service_proc |
368 | ret |
||
168 | serge | 369 | .fail: |
370 | if DEBUG |
||
371 | mov esi, msgFail |
||
372 | call SysMsgBoardStr |
||
188 | serge | 373 | end if |
168 | serge | 374 | xor eax, eax |
375 | ret |
||
188 | serge | 376 | .stop: |
214 | serge | 377 | call stop |
378 | ret |
||
379 | endp |
||
380 | |||
168 | serge | 381 | |
382 | io_code equ IOCTL.io_code |
||
383 | input equ IOCTL.input |
||
384 | inp_size equ IOCTL.inp_size |
||
385 | output equ IOCTL.output |
||
386 | out_size equ IOCTL.out_size |
||
387 | |||
388 | |||
389 | proc service_proc stdcall, ioctl:dword |
||
390 | |||
391 | |||
392 | mov eax, [edi+io_code] |
||
393 | cmp eax, DEV_PLAY |
||
394 | jne @F |
||
395 | if DEBUG |
||
396 | mov esi, msgPlay |
||
397 | call SysMsgBoardStr |
||
188 | serge | 398 | end if |
168 | serge | 399 | call play |
400 | ret |
||
401 | @@: |
||
402 | cmp eax, DEV_STOP |
||
403 | jne @F |
||
404 | if DEBUG |
||
405 | mov esi, msgStop |
||
406 | call SysMsgBoardStr |
||
188 | serge | 407 | end if |
168 | serge | 408 | call stop |
409 | ret |
||
410 | @@: |
||
411 | cmp eax, DEV_CALLBACK |
||
412 | jne @F |
||
413 | mov ebx, [edi+input] |
||
414 | stdcall set_callback, [ebx] |
||
415 | ret |
||
416 | @@: |
||
417 | cmp eax, DEV_SET_MASTERVOL |
||
418 | jne @F |
||
419 | mov ebx, [edi+input] |
||
420 | stdcall set_master_vol, [ebx] |
||
421 | ret |
||
422 | @@: |
||
423 | cmp eax, DEV_GET_MASTERVOL |
||
424 | jne @F |
||
425 | mov ebx, [edi+output] |
||
426 | test ebx, ebx |
||
427 | jz .fail |
||
428 | |||
429 | |||
430 | ret |
||
431 | @@: |
||
432 | cmp eax, DEV_GET_INFO |
||
433 | jne @F |
||
434 | mov ebx, [edi+output] |
||
435 | stdcall get_dev_info, ebx |
||
436 | ret |
||
437 | @@: |
||
438 | .fail: |
||
439 | xor eax, eax |
||
440 | ret |
||
441 | endp |
||
442 | |||
443 | |||
444 | restore io_code |
||
445 | restore input |
||
446 | restore inp_size |
||
447 | restore output |
||
448 | restore out_size |
||
449 | |||
450 | |||
451 | |||
452 | proc remap_irq ;for Intel chipsets ONLY !!! |
||
453 | mov eax, VALID_IRQ |
||
454 | bt eax, IRQ_LINE |
||
455 | jnc .exit |
||
456 | |||
457 | |||
458 | in ax,dx |
||
459 | bts ax, IRQ_LINE |
||
460 | out dx, aX |
||
461 | |||
462 | |||
188 | serge | 463 | mov [ctrl.int_line], IRQ_LINE |
168 | serge | 464 | |
465 | |||
466 | ret |
||
467 | endp |
||
468 | |||
469 | |||
470 | proc ac97_irq |
||
471 | |||
472 | |||
473 | ; mov esi, msgIRQ |
||
474 | ; call SysMsgBoardStr |
||
188 | serge | 475 | ; end if |
168 | serge | 476 | |
477 | |||
478 | mov al, 0x14 |
||
479 | call [ctrl.ctrl_write8] |
||
480 | |||
481 | |||
482 | mov edx, PCM_OUT_SR_REG |
||
483 | call [ctrl.ctrl_write16] |
||
484 | |||
485 | |||
486 | call [ctrl.ctrl_read8] |
||
487 | |||
488 | |||
489 | cmp eax, [civ_val] |
||
490 | je .skip |
||
491 | |||
492 | |||
493 | dec eax |
||
494 | and eax, 0x1F |
||
495 | mov [ctrl.lvi_reg], eax |
||
496 | |||
497 | |||
498 | call [ctrl.ctrl_write8] |
||
499 | |||
500 | |||
501 | mov ax, 0x1D |
||
502 | call [ctrl.ctrl_write8] |
||
503 | |||
504 | |||
505 | add eax, 2 |
||
506 | and eax, 31 |
||
507 | mov ebx, dword [buff_list+eax*4] |
||
508 | |||
509 | |||
510 | je @f |
||
511 | |||
512 | |||
513 | @@: |
||
514 | ret |
||
515 | |||
516 | |||
517 | mov edx, PCM_OUT_CR_REG |
||
518 | mov ax, 0x1D |
||
519 | call [ctrl.ctrl_write8] |
||
520 | ret |
||
521 | endp |
||
522 | |||
523 | |||
524 | proc create_primary_buff |
||
525 | |||
526 | |||
188 | serge | 527 | mov [ctrl.buffer], eax |
168 | serge | 528 | |
529 | |||
530 | mov ecx, 0x10000/4 |
||
531 | xor eax, eax |
||
532 | cld |
||
533 | rep stosd |
||
534 | |||
535 | |||
188 | serge | 536 | |
168 | serge | 537 | |
538 | mov ecx, 4 |
||
539 | mov edi, pcmout_bdl |
||
540 | @@: |
||
541 | mov [edi], eax |
||
542 | mov [edi+4], ebx |
||
543 | |||
544 | |||
545 | mov [edi+4+32], ebx |
||
546 | |||
547 | |||
548 | mov [edi+4+64], ebx |
||
549 | |||
550 | |||
551 | mov [edi+4+96], ebx |
||
552 | |||
553 | |||
554 | mov [edi+4+128], ebx |
||
555 | |||
556 | |||
557 | mov [edi+4+160], ebx |
||
558 | |||
559 | |||
560 | mov [edi+4+192], ebx |
||
561 | |||
562 | |||
563 | mov [edi+4+224], ebx |
||
564 | |||
565 | |||
566 | add edi, 8 |
||
567 | loop @B |
||
568 | |||
569 | |||
570 | mov eax, [ctrl.buffer] |
||
571 | mov ecx, 4 |
||
572 | @@: |
||
573 | mov [edi], eax |
||
574 | mov [edi+16], eax |
||
575 | mov [edi+32], eax |
||
576 | mov [edi+48], eax |
||
577 | mov [edi+64], eax |
||
578 | mov [edi+80], eax |
||
579 | mov [edi+96], eax |
||
580 | mov [edi+112], eax |
||
581 | |||
582 | |||
583 | add edi, 4 |
||
584 | loop @B |
||
585 | |||
586 | |||
587 | stdcall GetPgAddr, ecx |
||
188 | serge | 588 | and ecx, 0xFFF |
168 | serge | 589 | add eax, ecx |
590 | |||
591 | |||
592 | call [ctrl.ctrl_write32] |
||
593 | |||
594 | |||
595 | mov [ctrl.lvi_reg], eax |
||
596 | mov edx, PCM_OUT_LVI_REG |
||
597 | call [ctrl.ctrl_write8] |
||
598 | |||
599 | |||
600 | endp |
||
601 | |||
602 | |||
603 | proc detect_controller |
||
604 | locals |
||
605 | last_bus dd ? |
||
606 | bus dd ? |
||
607 | devfn dd ? |
||
608 | endl |
||
609 | |||
610 | |||
611 | mov [bus], eax |
||
612 | inc eax |
||
613 | call PciApi |
||
188 | serge | 614 | cmp eax, -1 |
168 | serge | 615 | je .err |
616 | |||
617 | |||
618 | |||
619 | |||
620 | and [devfn], 0 |
||
621 | .next_dev: |
||
622 | stdcall PciRead32, [bus], [devfn], dword 0 |
||
188 | serge | 623 | test eax, eax |
168 | serge | 624 | jz .next |
625 | cmp eax, -1 |
||
626 | je .next |
||
627 | |||
628 | |||
629 | @@: |
||
630 | mov ebx, [edi] |
||
631 | test ebx, ebx |
||
632 | jz .next |
||
633 | |||
634 | |||
635 | je .found |
||
636 | add edi, 12 |
||
637 | jmp @B |
||
638 | |||
639 | |||
640 | cmp [devfn], 256 |
||
641 | jb .next_dev |
||
642 | mov eax, [bus] |
||
643 | inc eax |
||
644 | mov [bus], eax |
||
645 | cmp eax, [last_bus] |
||
646 | jna .next_bus |
||
647 | xor eax, eax |
||
648 | ret |
||
649 | .found: |
||
650 | mov ebx, [bus] |
||
651 | mov [ctrl.bus], ebx |
||
652 | |||
653 | |||
654 | mov [ctrl.devfn], ecx |
||
655 | |||
656 | |||
657 | and edx, 0xFFFF |
||
658 | mov [ctrl.vendor], edx |
||
659 | shr eax, 16 |
||
660 | mov [ctrl.dev_id], eax |
||
661 | |||
662 | |||
663 | mov [ctrl.ctrl_ids], ebx |
||
664 | mov esi, [edi+8] |
||
665 | mov [ctrl.ctrl_setup], esi |
||
666 | |||
667 | |||
668 | jne @F |
||
669 | mov [ctrl.vendor_ids], msg_Intel |
||
670 | ret |
||
671 | @@: |
||
672 | cmp ebx, VID_NVIDIA |
||
673 | jne @F |
||
674 | mov [ctrl.vendor_ids], msg_NVidia |
||
675 | @@: |
||
676 | mov [ctrl.vendor_ids], 0 ;something wrong ? |
||
677 | ret |
||
678 | .err: |
||
679 | xor eax, eax |
||
680 | ret |
||
681 | endp |
||
682 | |||
683 | |||
684 | proc get_LPC_bus ;for Intel chipsets ONLY !!! |
||
685 | locals |
||
686 | last_bus dd ? |
||
687 | bus dd ? |
||
688 | endl |
||
689 | |||
690 | |||
691 | mov [bus], eax |
||
692 | inc eax |
||
693 | call [PciApi] |
||
694 | cmp eax, -1 |
||
695 | je .err |
||
696 | |||
697 | |||
698 | .next_bus: |
||
699 | stdcall PciRead32, [bus], dword 0xF8, dword 0 |
||
188 | serge | 700 | test eax, eax |
168 | serge | 701 | jz .next |
702 | cmp eax, -1 |
||
703 | je .next |
||
704 | |||
705 | |||
706 | je .found |
||
707 | .next: |
||
708 | mov eax, [bus] |
||
709 | inc eax |
||
710 | cmp eax, [last_bus] |
||
711 | mov [bus], eax |
||
712 | jna .next_bus |
||
713 | .err: |
||
714 | xor eax, eax |
||
715 | dec eax |
||
716 | ret |
||
717 | .found: |
||
718 | mov eax, [bus] |
||
719 | ret |
||
720 | endp |
||
721 | |||
722 | |||
723 | proc init_controller |
||
724 | |||
725 | |||
188 | serge | 726 | mov ebx, eax |
168 | serge | 727 | and eax, 0xFFFF |
728 | mov [ctrl.pci_cmd], eax |
||
729 | shr ebx, 16 |
||
730 | mov [ctrl.pci_stat], ebx |
||
731 | |||
732 | |||
188 | serge | 733 | and eax,0xFFFE |
168 | serge | 734 | mov [ctrl.codec_io_base], eax |
735 | |||
736 | |||
188 | serge | 737 | and eax, 0xFFC0 |
168 | serge | 738 | mov [ctrl.ctrl_io_base], eax |
739 | |||
740 | |||
188 | serge | 741 | mov [ctrl.codec_mem_base], eax |
168 | serge | 742 | |
743 | |||
188 | serge | 744 | mov [ctrl.ctrl_mem_base], eax |
168 | serge | 745 | |
746 | |||
188 | serge | 747 | and eax, 0xFF |
168 | serge | 748 | mov [ctrl.int_line], eax |
749 | |||
750 | |||
188 | serge | 751 | and eax, 0xFF |
168 | serge | 752 | mov [ctrl.cfg_reg], eax |
753 | |||
754 | |||
755 | xor eax, eax |
||
756 | inc eax |
||
757 | ret |
||
758 | endp |
||
759 | |||
760 | |||
761 | proc set_ICH |
||
762 | mov [ctrl.codec_read16], codec_io_r16 ;virtual |
||
763 | mov [ctrl.codec_write16], codec_io_w16 ;virtual |
||
764 | |||
765 | |||
766 | mov [ctrl.ctrl_read16], ctrl_io_r16 ;virtual |
||
767 | mov [ctrl.ctrl_read32], ctrl_io_r32 ;virtual |
||
768 | |||
769 | |||
770 | mov [ctrl.ctrl_write16], ctrl_io_w16 ;virtual |
||
771 | mov [ctrl.ctrl_write32], ctrl_io_w32 ;virtual |
||
772 | ret |
||
773 | endp |
||
774 | |||
775 | |||
776 | PG_NOCACHE equ 0x018 |
||
777 | |||
778 | |||
779 | proc set_ICH4 |
||
780 | stdcall AllocKernelSpace, dword 0x2000 |
||
188 | serge | 781 | mov edi, eax |
168 | serge | 782 | stdcall MapPage, edi,[ctrl.codec_mem_base],PG_SW+PG_NOCACHE |
188 | serge | 783 | mov [ctrl.codec_mem_base], edi |
168 | serge | 784 | add edi, 0x1000 |
785 | stdcall MapPage, edi, [ctrl.ctrl_mem_base],PG_SW+PG_NOCACHE |
||
188 | serge | 786 | mov [ctrl.ctrl_mem_base], edi |
168 | serge | 787 | |
788 | |||
789 | mov [ctrl.codec_write16], codec_mem_w16 ;virtual |
||
790 | |||
791 | |||
792 | mov [ctrl.ctrl_read16], ctrl_mem_r16 ;virtual |
||
793 | mov [ctrl.ctrl_read32], ctrl_mem_r32 ;virtual |
||
794 | |||
795 | |||
796 | mov [ctrl.ctrl_write16], ctrl_mem_w16 ;virtual |
||
797 | mov [ctrl.ctrl_write32], ctrl_mem_w32 ;virtual |
||
798 | ret |
||
799 | endp |
||
800 | |||
801 | |||
802 | proc reset_controller |
||
803 | |||
804 | |||
805 | mov edx, PCM_IN_CR_REG |
||
806 | call [ctrl.ctrl_write8] |
||
807 | |||
808 | |||
809 | call [ctrl.ctrl_write8] |
||
810 | |||
811 | |||
812 | call [ctrl.ctrl_write8] |
||
813 | |||
814 | |||
815 | mov edx, PCM_IN_CR_REG |
||
816 | call [ctrl.ctrl_write8] |
||
817 | |||
818 | |||
819 | call [ctrl.ctrl_write8] |
||
820 | |||
821 | |||
822 | call [ctrl.ctrl_write8] |
||
823 | |||
824 | |||
825 | endp |
||
826 | |||
827 | |||
828 | proc init_codec |
||
829 | locals |
||
830 | counter dd ? |
||
831 | endl |
||
832 | |||
833 | |||
834 | and eax, eax |
||
835 | jz .err |
||
836 | |||
837 | |||
838 | call [ctrl.codec_write16] |
||
839 | |||
840 | |||
841 | mov edx, CODEC_REG_POWERDOWN |
||
842 | call [ctrl.codec_write16] |
||
843 | |||
844 | |||
845 | .wait: |
||
846 | mov edx, CODEC_REG_POWERDOWN |
||
847 | call [ctrl.codec_read16] |
||
848 | and eax, 0x0F |
||
849 | cmp eax, 0x0F |
||
850 | jz .ready |
||
851 | |||
852 | |||
853 | call StallExec |
||
854 | sub [counter] , 1 |
||
855 | jnz .wait |
||
856 | .err: |
||
857 | xor eax, eax ; timeout error |
||
858 | ret |
||
859 | .ready: |
||
860 | call detect_codec |
||
861 | |||
862 | |||
863 | inc eax |
||
864 | ret |
||
865 | endp |
||
866 | |||
867 | |||
868 | proc reset_codec |
||
869 | mov edx, GLOB_CTRL |
||
870 | call [ctrl.ctrl_read32] |
||
871 | |||
872 | |||
873 | jz .cold |
||
874 | |||
875 | |||
876 | jnc .ok |
||
877 | .cold: |
||
878 | call cold_reset |
||
879 | jnc .ok |
||
880 | |||
881 | |||
882 | mov esi, msgCFail |
||
883 | call SysMsgBoardStr |
||
188 | serge | 884 | end if |
168 | serge | 885 | xor eax, eax ; timeout error |
886 | ret |
||
887 | .ok: |
||
888 | if DEBUG |
||
889 | mov esi, msgResetOk |
||
890 | call SysMsgBoardStr |
||
188 | serge | 891 | end if |
168 | serge | 892 | |
893 | |||
894 | inc eax |
||
895 | ret |
||
896 | endp |
||
897 | |||
898 | |||
899 | proc warm_reset |
||
900 | locals |
||
901 | counter dd ? |
||
902 | endl |
||
903 | |||
904 | |||
905 | mov edx, GLOB_CTRL |
||
906 | call [ctrl.ctrl_write32] |
||
907 | |||
908 | |||
909 | mov esi, msgWarm |
||
910 | call SysMsgBoardStr |
||
188 | serge | 911 | end if |
168 | serge | 912 | |
913 | |||
914 | .wait: |
||
915 | mov eax, 100000 ; wait 100 ms |
||
916 | call StallExec |
||
917 | |||
918 | |||
919 | call [ctrl.ctrl_read32] |
||
920 | test eax, 4 |
||
921 | jz .ok |
||
922 | sub [counter], 1 |
||
923 | jnz .wait |
||
924 | |||
925 | |||
926 | mov esi, msgWRFail |
||
927 | call SysMsgBoardStr |
||
188 | serge | 928 | end if |
168 | serge | 929 | |
930 | |||
931 | ret |
||
932 | .ok: |
||
933 | mov edx, CTRL_STAT |
||
934 | call [ctrl.ctrl_read32] |
||
935 | and eax, CTRL_ST_CREADY |
||
936 | jz .fail |
||
937 | clc |
||
938 | ret |
||
939 | .fail: |
||
940 | stc |
||
941 | ret |
||
942 | endp |
||
943 | |||
944 | |||
945 | proc cold_reset |
||
946 | locals |
||
947 | counter dd ? |
||
948 | endl |
||
949 | |||
950 | |||
951 | mov edx, GLOB_CTRL |
||
952 | call [ctrl.ctrl_write32] |
||
953 | |||
954 | |||
955 | mov esi, msgCold |
||
956 | call SysMsgBoardStr |
||
188 | serge | 957 | end if |
168 | serge | 958 | |
959 | |||
960 | call StallExec |
||
961 | |||
962 | |||
963 | mov edx, GLOB_CTRL |
||
964 | call [ctrl.ctrl_write32] |
||
965 | |||
966 | |||
967 | .wait: |
||
968 | mov eax, 100000 ; wait 100 ms |
||
969 | call StallExec |
||
970 | |||
971 | |||
972 | call [ctrl.ctrl_read32] |
||
973 | test eax, 4 |
||
974 | jz .ok |
||
975 | sub [counter], 1 |
||
976 | jnz .wait |
||
977 | |||
978 | |||
979 | mov esi, msgCRFail |
||
980 | call SysMsgBoardStr |
||
188 | serge | 981 | end if |
168 | serge | 982 | stc |
983 | ret |
||
984 | .ok: |
||
985 | mov edx, CTRL_STAT |
||
986 | call [ctrl.ctrl_read32] |
||
987 | and eax, CTRL_ST_CREADY |
||
988 | jz .fail |
||
989 | clc |
||
990 | ret |
||
991 | .fail: |
||
992 | stc |
||
993 | ret |
||
994 | endp |
||
995 | |||
996 | |||
997 | proc play |
||
998 | |||
999 | |||
1000 | mov [ctrl.lvi_reg], eax |
||
1001 | mov edx, PCM_OUT_LVI_REG |
||
1002 | call [ctrl.ctrl_write8] |
||
1003 | |||
1004 | |||
1005 | mov ax, 0x1D |
||
1006 | call [ctrl.ctrl_write8] |
||
1007 | ret |
||
1008 | endp |
||
1009 | |||
1010 | |||
1011 | proc stop |
||
1012 | mov edx, PCM_OUT_CR_REG |
||
1013 | mov ax, 0x14 |
||
1014 | call [ctrl.ctrl_write8] |
||
1015 | |||
1016 | |||
1017 | mov [ctrl.lvi_reg], eax |
||
1018 | mov edx, PCM_OUT_LVI_REG |
||
1019 | call [ctrl.ctrl_write8] |
||
1020 | |||
1021 | |||
224 | serge | 1022 | mov edx, PCM_OUT_SR_REG |
1023 | call [ctrl.ctrl_write16] |
||
1024 | ret |
||
168 | serge | 1025 | endp |
1026 | |||
1027 | |||
1028 | proc get_dev_info stdcall, p_info:dword |
||
1029 | virtual at esi |
||
1030 | CTRL_INFO CTRL_INFO |
||
1031 | end virtual |
||
1032 | |||
1033 | |||
1034 | mov eax, [ctrl.int_line] |
||
1035 | mov ebx, [ctrl.codec_io_base] |
||
1036 | mov ecx, [ctrl.ctrl_io_base] |
||
1037 | mov edx, [ctrl.codec_mem_base] |
||
1038 | mov edi, [ctrl.ctrl_mem_base] |
||
1039 | |||
1040 | |||
1041 | mov [CTRL_INFO.codec_io_base], ebx |
||
1042 | mov [CTRL_INFO.ctrl_io_base], ecx |
||
1043 | mov [CTRL_INFO.codec_mem_base], edx |
||
1044 | mov [CTRL_INFO.ctrl_mem_base], edi |
||
1045 | |||
1046 | |||
1047 | mov [CTRL_INFO.codec_id], eax |
||
1048 | |||
1049 | |||
1050 | call [ctrl.ctrl_read32] |
||
1051 | mov [CTRL_INFO.glob_cntrl], eax |
||
1052 | |||
1053 | |||
1054 | call [ctrl.ctrl_read32] |
||
1055 | mov [CTRL_INFO.glob_sta], eax |
||
1056 | |||
1057 | |||
1058 | mov [CTRL_INFO.pci_cmd], ebx |
||
1059 | |||
1060 | |||
1061 | endp |
||
1062 | |||
1063 | |||
1064 | proc set_callback stdcall, handler:dword |
||
1065 | mov eax, [handler] |
||
1066 | mov [ctrl.user_callback], eax |
||
1067 | ret |
||
1068 | endp |
||
1069 | |||
1070 | |||
1071 | proc codec_read stdcall, ac_reg:dword ; reg = edx, reval = eax |
||
1072 | |||
1073 | |||
1074 | |||
1075 | |||
1076 | shr ebx, 1 |
||
1077 | bt [codec.shadow_flag], ebx |
||
1078 | jc .use_shadow |
||
1079 | |||
1080 | |||
1081 | mov ecx, eax |
||
1082 | |||
1083 | |||
1084 | call [ctrl.ctrl_read32] |
||
1085 | test eax, CTRL_ST_RCS |
||
1086 | jz .read_ok |
||
1087 | |||
1088 | |||
1089 | call [ctrl.ctrl_write32] |
||
1090 | xor eax,eax |
||
1091 | not eax ;timeout |
||
1092 | ret |
||
1093 | .read_ok: |
||
1094 | mov edx, [ac_reg] |
||
1095 | mov [codec.regs+edx], cx |
||
1096 | bts [codec.shadow_flag], ebx |
||
1097 | mov eax, ecx |
||
1098 | ret |
||
1099 | .use_shadow: |
||
1100 | movzx eax, word [codec.regs+edx] |
||
1101 | ret |
||
1102 | endp |
||
1103 | |||
1104 | |||
1105 | proc codec_write stdcall, ac_reg:dword |
||
1106 | push eax |
||
1107 | call check_semafore |
||
1108 | and eax, eax |
||
1109 | jz .err |
||
1110 | pop eax |
||
1111 | |||
1112 | |||
1113 | mov edx, esi |
||
1114 | call [ctrl.codec_write16] |
||
1115 | mov [codec.regs+esi], ax |
||
1116 | shr esi, 1 |
||
1117 | bts [codec.shadow_flag], esi |
||
1118 | ret |
||
1119 | .err: |
||
1120 | pop eax |
||
1121 | ret |
||
1122 | endp |
||
1123 | |||
1124 | |||
1125 | proc codec_check_ready |
||
1126 | |||
1127 | |||
1128 | call [ctrl.ctrl_read32] |
||
1129 | and eax, CTRL_ST_CREADY |
||
1130 | jz .not_ready |
||
1131 | |||
1132 | |||
1133 | inc eax |
||
1134 | ret |
||
1135 | |||
1136 | |||
1137 | .not_ready: |
||
1138 | xor eax, eax |
||
1139 | ret |
||
1140 | endp |
||
1141 | |||
1142 | |||
1143 | proc check_semafore |
||
1144 | local counter:DWORD |
||
1145 | |||
1146 | |||
1147 | .l1: |
||
1148 | mov edx, CTRL_CAS |
||
1149 | call [ctrl.ctrl_read8] |
||
1150 | and eax, CAS_FLAG |
||
1151 | jz .ok |
||
1152 | |||
1153 | |||
1154 | call StallExec |
||
1155 | sub [counter], 1 |
||
1156 | jnz .l1 |
||
1157 | xor eax, eax |
||
1158 | ret |
||
1159 | align 4 |
||
1160 | .ok: |
||
1161 | xor eax,eax |
||
1162 | inc eax |
||
1163 | ret |
||
1164 | endp |
||
1165 | |||
1166 | |||
1167 | proc StallExec |
||
1168 | push ecx |
||
1169 | push edx |
||
1170 | push ebx |
||
1171 | push eax |
||
1172 | |||
1173 | |||
1174 | mul ecx |
||
1175 | mov ebx, eax ;low |
||
1176 | mov ecx, edx ;high |
||
1177 | rdtsc |
||
1178 | add ebx, eax |
||
1179 | adc ecx,edx |
||
1180 | @@: |
||
1181 | rdtsc |
||
1182 | sub eax, ebx |
||
1183 | sbb edx, ecx |
||
1184 | jb @B |
||
1185 | |||
1186 | |||
1187 | pop ebx |
||
1188 | pop edx |
||
1189 | pop ecx |
||
1190 | ret |
||
1191 | endp |
||
1192 | |||
1193 | |||
1194 | ; CONTROLLER IO functions |
||
1195 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
1196 | |||
1197 | |||
1198 | proc codec_io_r16 |
||
1199 | add edx, [ctrl.codec_io_base] |
||
1200 | in ax, dx |
||
1201 | ret |
||
1202 | endp |
||
1203 | |||
1204 | |||
1205 | proc codec_io_w16 |
||
1206 | add edx, [ctrl.codec_io_base] |
||
1207 | out dx, ax |
||
1208 | ret |
||
1209 | endp |
||
1210 | |||
1211 | |||
1212 | proc ctrl_io_r8 |
||
1213 | add edx, [ctrl.ctrl_io_base] |
||
1214 | in al, dx |
||
1215 | ret |
||
1216 | endp |
||
1217 | |||
1218 | |||
1219 | proc ctrl_io_r16 |
||
1220 | add edx, [ctrl.ctrl_io_base] |
||
1221 | in ax, dx |
||
1222 | ret |
||
1223 | endp |
||
1224 | |||
1225 | |||
1226 | proc ctrl_io_r32 |
||
1227 | add edx, [ctrl.ctrl_io_base] |
||
1228 | in eax, dx |
||
1229 | ret |
||
1230 | endp |
||
1231 | |||
1232 | |||
1233 | proc ctrl_io_w8 |
||
1234 | add edx, [ctrl.ctrl_io_base] |
||
1235 | out dx, al |
||
1236 | ret |
||
1237 | endp |
||
1238 | |||
1239 | |||
1240 | proc ctrl_io_w16 |
||
1241 | add edx, [ctrl.ctrl_io_base] |
||
1242 | out dx, ax |
||
1243 | ret |
||
1244 | endp |
||
1245 | |||
1246 | |||
1247 | proc ctrl_io_w32 |
||
1248 | add edx, [ctrl.ctrl_io_base] |
||
1249 | out dx, eax |
||
1250 | ret |
||
1251 | endp |
||
1252 | |||
1253 | |||
1254 | ; MEMORY MAPPED IO (os depended) |
||
1255 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
1256 | |||
1257 | |||
1258 | proc codec_mem_r16 |
||
1259 | add edx, [ctrl.codec_mem_base] |
||
1260 | mov ax, word [edx] |
||
1261 | ret |
||
1262 | endp |
||
1263 | |||
1264 | |||
1265 | proc codec_mem_w16 |
||
1266 | add edx, [ctrl.codec_mem_base] |
||
1267 | mov word [edx], ax |
||
1268 | ret |
||
1269 | endp |
||
1270 | |||
1271 | |||
1272 | proc ctrl_mem_r8 |
||
1273 | add edx, [ctrl.ctrl_mem_base] |
||
1274 | mov al, [edx] |
||
1275 | ret |
||
1276 | endp |
||
1277 | |||
1278 | |||
1279 | proc ctrl_mem_r16 |
||
1280 | add edx, [ctrl.ctrl_mem_base] |
||
1281 | mov ax, [edx] |
||
1282 | ret |
||
1283 | endp |
||
1284 | |||
1285 | |||
1286 | proc ctrl_mem_r32 |
||
1287 | add edx, [ctrl.ctrl_mem_base] |
||
1288 | mov eax, [edx] |
||
1289 | ret |
||
1290 | endp |
||
1291 | |||
1292 | |||
1293 | proc ctrl_mem_w8 |
||
1294 | add edx, [ctrl.ctrl_mem_base] |
||
1295 | mov [edx], al |
||
1296 | |||
1297 | |||
1298 | endp |
||
1299 | |||
1300 | |||
1301 | proc ctrl_mem_w16 |
||
1302 | add edx, [ctrl.ctrl_mem_base] |
||
1303 | mov [edx], ax |
||
1304 | ret |
||
1305 | endp |
||
1306 | |||
1307 | |||
1308 | proc ctrl_mem_w32 |
||
1309 | add edx, [ctrl.ctrl_mem_base] |
||
1310 | mov [edx], eax |
||
1311 | ret |
||
1312 | endp |
||
1313 | |||
1314 | |||
1315 | |||
1316 | |||
1317 | |||
188 | serge | 1318 | devices dd (CTRL_ICH shl 16)+VID_INTEL,msg_ICH, set_ICH |
168 | serge | 1319 | dd (CTRL_ICH0 shl 16)+VID_INTEL,msg_ICH0,set_ICH |
1320 | dd (CTRL_ICH2 shl 16)+VID_INTEL,msg_ICH2,set_ICH |
||
1321 | dd (CTRL_ICH3 shl 16)+VID_INTEL,msg_ICH3,set_ICH |
||
1322 | dd (CTRL_ICH4 shl 16)+VID_INTEL,msg_ICH4,set_ICH4 |
||
1323 | dd (CTRL_ICH5 shl 16)+VID_INTEL,msg_ICH5,set_ICH4 |
||
1324 | dd (CTRL_ICH6 shl 16)+VID_INTEL,msg_ICH6,set_ICH4 |
||
1325 | dd (CTRL_ICH7 shl 16)+VID_INTEL,msg_ICH7,set_ICH4 |
||
1326 | |||
1327 | |||
1328 | dd (CTRL_NFORCE2 shl 16)+VID_NVIDIA,msg_NForce2,set_ICH |
||
1329 | dd (CTRL_NFORCE3 shl 16)+VID_NVIDIA,msg_NForce3,set_ICH |
||
1330 | dd (CTRL_MCP04 shl 16)+VID_NVIDIA,msg_MCP04,set_ICH |
||
198 | serge | 1331 | dd (CTRL_CK804 shl 16)+VID_NVIDIA,msg_CK804,set_ICH |
1332 | dd (CTRL_CK8 shl 16)+VID_NVIDIA,msg_CK8,set_ICH |
||
1333 | dd (CTRL_CK8S shl 16)+VID_NVIDIA,msg_CK8S,set_ICH |
||
1334 | dd (CTRL_MCP51 shl 16)+VID_NVIDIA,msg_MCP51,set_ICH |
||
1335 | |||
168 | serge | 1336 | |
1337 | |||
1338 | |||
1339 | msg_ICH0 db 'Intel ICH0', 13,10, 0 |
||
1340 | msg_ICH2 db 'Intel ICH2', 13,10, 0 |
||
1341 | msg_ICH3 db 'Intel ICH3', 13,10, 0 |
||
1342 | msg_ICH4 db 'Intel ICH4', 13,10, 0 |
||
1343 | msg_ICH5 db 'Intel ICH5', 13,10, 0 |
||
1344 | msg_ICH6 db 'Intel ICH6', 13,10, 0 |
||
1345 | msg_ICH7 db 'Intel ICH7', 13,10, 0 |
||
1346 | msg_Intel db 'Intel Corp. ', 0 |
||
1347 | |||
1348 | |||
198 | serge | 1349 | msg_NForce2 db 'NForce 2', 13,10, 0 |
1350 | msg_NForce3 db 'NForce 3', 13,10, 0 |
||
1351 | msg_MCP04 db 'NForce MCP04',13,10, 0 |
||
1352 | msg_CK804 db 'NForce CK804',13,10, 0 |
||
1353 | msg_CK8 db 'NForce CK8', 13,10, 0 |
||
1354 | msg_CK8S db 'NForce CK8S', 13,10, 0 |
||
1355 | msg_MCP51 db 'NForce MCP51',13,10, 0 |
||
1356 | |||
168 | serge | 1357 | |
198 | serge | 1358 | |
1359 | |||
168 | serge | 1360 | sz_sound_srv db 'SOUND',0 |
1361 | |||
1362 | |||
1363 | msgFail db 'device not found',13,10,0 |
||
1364 | msgAttchIRQ db 'IRQ line not supported', 13,10, 0 |
||
1365 | msgInvIRQ db 'IRQ line not assigned or invalid', 13,10, 0 |
||
1366 | msgPlay db 'start play', 13,10,0 |
||
1367 | msgStop db 'stop play', 13,10,0 |
||
1368 | msgNotify db 'call notify',13,10,0 |
||
1369 | msgIRQ db 'AC97 IRQ', 13,10,0 |
||
1370 | msgInitCtrl db 'init controller',13,10,0 |
||
1371 | msgInitCodec db 'init codec',13,10,0 |
||
1372 | msgPrimBuff db 'create primary buffer',13,10,0 |
||
1373 | msgReg db 'set service handler',13,10,0 |
||
1374 | msgOk db 'service installed',13,10,0 |
||
1375 | msgCold db 'cold reset',13,10,0 |
||
1376 | msgWarm db 'warm reset',13,10,0 |
||
1377 | msgWRFail db 'warm reset failed',13,10,0 |
||
1378 | msgCRFail db 'cold reset failed',13,10,0 |
||
1379 | msgCFail db 'codec not ready',13,10,0 |
||
1380 | msgResetOk db 'reset complete',13,10,0 |
||
1381 | |||
1382 | |||
188 | serge | 1383 | |
1384 | |||
1385 | buff_list rd 32 |
||
1386 | |||
1387 | |||
1388 | ctrl AC_CNTRL |
||
1389 | |||
1390 | |||
1391 | civ_val rd 1 |
||
1392 |