Rev 188 | 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 STOP |
277 | public service_proc |
||
168 | serge | 278 | |
279 | |||
188 | serge | 280 | extrn SysMsgBoardStr |
281 | extrn PciApi |
||
282 | extrn PciRead32 |
||
283 | extrn PciRead8 |
||
284 | extrn PciWrite8 |
||
285 | extrn AllocKernelSpace |
||
286 | extrn MapPage |
||
287 | extrn RegService |
||
288 | extrn KernelAlloc |
||
289 | extrn GetPgAddr |
||
290 | extrn GetCurrentTask |
||
291 | |||
168 | serge | 292 | |
188 | serge | 293 | |
294 | |||
168 | serge | 295 | if DEBUG |
296 | mov esi, msgInit |
||
297 | call SysMsgBoardStr |
||
188 | serge | 298 | end if |
168 | serge | 299 | |
300 | |||
301 | test eax, eax |
||
302 | jz .fail |
||
303 | |||
304 | |||
305 | mov esi,[ctrl.vendor_ids] |
||
306 | call SysMsgBoardStr |
||
188 | serge | 307 | mov esi, [ctrl.ctrl_ids] |
168 | serge | 308 | call SysMsgBoardStr |
188 | serge | 309 | |
168 | serge | 310 | |
311 | |||
312 | |||
313 | test eax, eax |
||
314 | jz .fail |
||
315 | |||
316 | |||
317 | mov esi, msgInitCodec |
||
318 | call SysMsgBoardStr |
||
188 | serge | 319 | end if |
168 | serge | 320 | |
321 | |||
322 | test eax, eax |
||
323 | jz .fail |
||
324 | |||
325 | |||
326 | mov esi, [codec.ac_vendor_ids] |
||
327 | call SysMsgBoardStr |
||
188 | serge | 328 | |
168 | serge | 329 | |
330 | call SysMsgBoardStr |
||
188 | serge | 331 | end if |
168 | serge | 332 | |
333 | |||
334 | call setup_codec |
||
335 | |||
336 | |||
337 | call SysMsgBoardStr |
||
188 | serge | 338 | |
168 | serge | 339 | |
340 | |||
341 | |||
342 | |||
343 | |||
344 | ; cmp eax, -1 |
||
345 | ; jz .fail |
||
346 | |||
347 | |||
348 | ; call remap_irq |
||
349 | ; end if |
||
350 | |||
351 | |||
352 | mov ebx, [ctrl.int_line] |
||
353 | mov esi, msgInvIRQ |
||
354 | bt eax, ebx |
||
355 | jnc .fail |
||
356 | mov eax, ATTCH_IRQ |
||
357 | mov esi, msgAttchIRQ |
||
358 | bt eax, ebx |
||
359 | jnc .fail |
||
360 | |||
361 | |||
188 | serge | 362 | stdcall RegService, sz_sound_srv, service_proc |
363 | ret |
||
168 | serge | 364 | .fail: |
365 | if DEBUG |
||
366 | mov esi, msgFail |
||
367 | call SysMsgBoardStr |
||
188 | serge | 368 | end if |
168 | serge | 369 | xor eax, eax |
370 | STOP: |
||
188 | serge | 371 | ret |
372 | |||
168 | serge | 373 | |
374 | io_code equ IOCTL.io_code |
||
375 | input equ IOCTL.input |
||
376 | inp_size equ IOCTL.inp_size |
||
377 | output equ IOCTL.output |
||
378 | out_size equ IOCTL.out_size |
||
379 | |||
380 | |||
381 | proc service_proc stdcall, ioctl:dword |
||
382 | |||
383 | |||
384 | mov eax, [edi+io_code] |
||
385 | cmp eax, DEV_PLAY |
||
386 | jne @F |
||
387 | if DEBUG |
||
388 | mov esi, msgPlay |
||
389 | call SysMsgBoardStr |
||
188 | serge | 390 | end if |
168 | serge | 391 | call play |
392 | ret |
||
393 | @@: |
||
394 | cmp eax, DEV_STOP |
||
395 | jne @F |
||
396 | if DEBUG |
||
397 | mov esi, msgStop |
||
398 | call SysMsgBoardStr |
||
188 | serge | 399 | end if |
168 | serge | 400 | call stop |
401 | ret |
||
402 | @@: |
||
403 | cmp eax, DEV_CALLBACK |
||
404 | jne @F |
||
405 | mov ebx, [edi+input] |
||
406 | stdcall set_callback, [ebx] |
||
407 | ret |
||
408 | @@: |
||
409 | cmp eax, DEV_SET_MASTERVOL |
||
410 | jne @F |
||
411 | mov ebx, [edi+input] |
||
412 | stdcall set_master_vol, [ebx] |
||
413 | ret |
||
414 | @@: |
||
415 | cmp eax, DEV_GET_MASTERVOL |
||
416 | jne @F |
||
417 | mov ebx, [edi+output] |
||
418 | test ebx, ebx |
||
419 | jz .fail |
||
420 | |||
421 | |||
422 | ret |
||
423 | @@: |
||
424 | cmp eax, DEV_GET_INFO |
||
425 | jne @F |
||
426 | mov ebx, [edi+output] |
||
427 | stdcall get_dev_info, ebx |
||
428 | ret |
||
429 | @@: |
||
430 | .fail: |
||
431 | xor eax, eax |
||
432 | ret |
||
433 | endp |
||
434 | |||
435 | |||
436 | restore io_code |
||
437 | restore input |
||
438 | restore inp_size |
||
439 | restore output |
||
440 | restore out_size |
||
441 | |||
442 | |||
443 | |||
444 | proc remap_irq ;for Intel chipsets ONLY !!! |
||
445 | mov eax, VALID_IRQ |
||
446 | bt eax, IRQ_LINE |
||
447 | jnc .exit |
||
448 | |||
449 | |||
450 | in ax,dx |
||
451 | bts ax, IRQ_LINE |
||
452 | out dx, aX |
||
453 | |||
454 | |||
188 | serge | 455 | mov [ctrl.int_line], IRQ_LINE |
168 | serge | 456 | |
457 | |||
458 | ret |
||
459 | endp |
||
460 | |||
461 | |||
462 | proc ac97_irq |
||
463 | |||
464 | |||
465 | ; mov esi, msgIRQ |
||
466 | ; call SysMsgBoardStr |
||
188 | serge | 467 | ; end if |
168 | serge | 468 | |
469 | |||
470 | mov al, 0x14 |
||
471 | call [ctrl.ctrl_write8] |
||
472 | |||
473 | |||
474 | mov edx, PCM_OUT_SR_REG |
||
475 | call [ctrl.ctrl_write16] |
||
476 | |||
477 | |||
478 | call [ctrl.ctrl_read8] |
||
479 | |||
480 | |||
481 | cmp eax, [civ_val] |
||
482 | je .skip |
||
483 | |||
484 | |||
485 | dec eax |
||
486 | and eax, 0x1F |
||
487 | mov [ctrl.lvi_reg], eax |
||
488 | |||
489 | |||
490 | call [ctrl.ctrl_write8] |
||
491 | |||
492 | |||
493 | mov ax, 0x1D |
||
494 | call [ctrl.ctrl_write8] |
||
495 | |||
496 | |||
497 | add eax, 2 |
||
498 | and eax, 31 |
||
499 | mov ebx, dword [buff_list+eax*4] |
||
500 | |||
501 | |||
502 | je @f |
||
503 | |||
504 | |||
505 | @@: |
||
506 | ret |
||
507 | |||
508 | |||
509 | mov edx, PCM_OUT_CR_REG |
||
510 | mov ax, 0x1D |
||
511 | call [ctrl.ctrl_write8] |
||
512 | ret |
||
513 | endp |
||
514 | |||
515 | |||
516 | proc create_primary_buff |
||
517 | |||
518 | |||
188 | serge | 519 | mov [ctrl.buffer], eax |
168 | serge | 520 | |
521 | |||
522 | mov ecx, 0x10000/4 |
||
523 | xor eax, eax |
||
524 | cld |
||
525 | rep stosd |
||
526 | |||
527 | |||
188 | serge | 528 | |
168 | serge | 529 | |
530 | mov ecx, 4 |
||
531 | mov edi, pcmout_bdl |
||
532 | @@: |
||
533 | mov [edi], eax |
||
534 | mov [edi+4], ebx |
||
535 | |||
536 | |||
537 | mov [edi+4+32], ebx |
||
538 | |||
539 | |||
540 | mov [edi+4+64], ebx |
||
541 | |||
542 | |||
543 | mov [edi+4+96], ebx |
||
544 | |||
545 | |||
546 | mov [edi+4+128], ebx |
||
547 | |||
548 | |||
549 | mov [edi+4+160], ebx |
||
550 | |||
551 | |||
552 | mov [edi+4+192], ebx |
||
553 | |||
554 | |||
555 | mov [edi+4+224], ebx |
||
556 | |||
557 | |||
558 | add edi, 8 |
||
559 | loop @B |
||
560 | |||
561 | |||
562 | mov eax, [ctrl.buffer] |
||
563 | mov ecx, 4 |
||
564 | @@: |
||
565 | mov [edi], eax |
||
566 | mov [edi+16], eax |
||
567 | mov [edi+32], eax |
||
568 | mov [edi+48], eax |
||
569 | mov [edi+64], eax |
||
570 | mov [edi+80], eax |
||
571 | mov [edi+96], eax |
||
572 | mov [edi+112], eax |
||
573 | |||
574 | |||
575 | add edi, 4 |
||
576 | loop @B |
||
577 | |||
578 | |||
579 | stdcall GetPgAddr, ecx |
||
188 | serge | 580 | and ecx, 0xFFF |
168 | serge | 581 | add eax, ecx |
582 | |||
583 | |||
584 | call [ctrl.ctrl_write32] |
||
585 | |||
586 | |||
587 | mov [ctrl.lvi_reg], eax |
||
588 | mov edx, PCM_OUT_LVI_REG |
||
589 | call [ctrl.ctrl_write8] |
||
590 | |||
591 | |||
592 | endp |
||
593 | |||
594 | |||
595 | proc detect_controller |
||
596 | locals |
||
597 | last_bus dd ? |
||
598 | bus dd ? |
||
599 | devfn dd ? |
||
600 | endl |
||
601 | |||
602 | |||
603 | mov [bus], eax |
||
604 | inc eax |
||
605 | call PciApi |
||
188 | serge | 606 | cmp eax, -1 |
168 | serge | 607 | je .err |
608 | |||
609 | |||
610 | |||
611 | |||
612 | and [devfn], 0 |
||
613 | .next_dev: |
||
614 | stdcall PciRead32, [bus], [devfn], dword 0 |
||
188 | serge | 615 | test eax, eax |
168 | serge | 616 | jz .next |
617 | cmp eax, -1 |
||
618 | je .next |
||
619 | |||
620 | |||
621 | @@: |
||
622 | mov ebx, [edi] |
||
623 | test ebx, ebx |
||
624 | jz .next |
||
625 | |||
626 | |||
627 | je .found |
||
628 | add edi, 12 |
||
629 | jmp @B |
||
630 | |||
631 | |||
632 | cmp [devfn], 256 |
||
633 | jb .next_dev |
||
634 | mov eax, [bus] |
||
635 | inc eax |
||
636 | mov [bus], eax |
||
637 | cmp eax, [last_bus] |
||
638 | jna .next_bus |
||
639 | xor eax, eax |
||
640 | ret |
||
641 | .found: |
||
642 | mov ebx, [bus] |
||
643 | mov [ctrl.bus], ebx |
||
644 | |||
645 | |||
646 | mov [ctrl.devfn], ecx |
||
647 | |||
648 | |||
649 | and edx, 0xFFFF |
||
650 | mov [ctrl.vendor], edx |
||
651 | shr eax, 16 |
||
652 | mov [ctrl.dev_id], eax |
||
653 | |||
654 | |||
655 | mov [ctrl.ctrl_ids], ebx |
||
656 | mov esi, [edi+8] |
||
657 | mov [ctrl.ctrl_setup], esi |
||
658 | |||
659 | |||
660 | jne @F |
||
661 | mov [ctrl.vendor_ids], msg_Intel |
||
662 | ret |
||
663 | @@: |
||
664 | cmp ebx, VID_NVIDIA |
||
665 | jne @F |
||
666 | mov [ctrl.vendor_ids], msg_NVidia |
||
667 | @@: |
||
668 | mov [ctrl.vendor_ids], 0 ;something wrong ? |
||
669 | ret |
||
670 | .err: |
||
671 | xor eax, eax |
||
672 | ret |
||
673 | endp |
||
674 | |||
675 | |||
676 | proc get_LPC_bus ;for Intel chipsets ONLY !!! |
||
677 | locals |
||
678 | last_bus dd ? |
||
679 | bus dd ? |
||
680 | endl |
||
681 | |||
682 | |||
683 | mov [bus], eax |
||
684 | inc eax |
||
685 | call [PciApi] |
||
686 | cmp eax, -1 |
||
687 | je .err |
||
688 | |||
689 | |||
690 | .next_bus: |
||
691 | stdcall PciRead32, [bus], dword 0xF8, dword 0 |
||
188 | serge | 692 | test eax, eax |
168 | serge | 693 | jz .next |
694 | cmp eax, -1 |
||
695 | je .next |
||
696 | |||
697 | |||
698 | je .found |
||
699 | .next: |
||
700 | mov eax, [bus] |
||
701 | inc eax |
||
702 | cmp eax, [last_bus] |
||
703 | mov [bus], eax |
||
704 | jna .next_bus |
||
705 | .err: |
||
706 | xor eax, eax |
||
707 | dec eax |
||
708 | ret |
||
709 | .found: |
||
710 | mov eax, [bus] |
||
711 | ret |
||
712 | endp |
||
713 | |||
714 | |||
715 | proc init_controller |
||
716 | |||
717 | |||
188 | serge | 718 | mov ebx, eax |
168 | serge | 719 | and eax, 0xFFFF |
720 | mov [ctrl.pci_cmd], eax |
||
721 | shr ebx, 16 |
||
722 | mov [ctrl.pci_stat], ebx |
||
723 | |||
724 | |||
188 | serge | 725 | and eax,0xFFFE |
168 | serge | 726 | mov [ctrl.codec_io_base], eax |
727 | |||
728 | |||
188 | serge | 729 | and eax, 0xFFC0 |
168 | serge | 730 | mov [ctrl.ctrl_io_base], eax |
731 | |||
732 | |||
188 | serge | 733 | mov [ctrl.codec_mem_base], eax |
168 | serge | 734 | |
735 | |||
188 | serge | 736 | mov [ctrl.ctrl_mem_base], eax |
168 | serge | 737 | |
738 | |||
188 | serge | 739 | and eax, 0xFF |
168 | serge | 740 | mov [ctrl.int_line], eax |
741 | |||
742 | |||
188 | serge | 743 | and eax, 0xFF |
168 | serge | 744 | mov [ctrl.cfg_reg], eax |
745 | |||
746 | |||
747 | xor eax, eax |
||
748 | inc eax |
||
749 | ret |
||
750 | endp |
||
751 | |||
752 | |||
753 | proc set_ICH |
||
754 | mov [ctrl.codec_read16], codec_io_r16 ;virtual |
||
755 | mov [ctrl.codec_write16], codec_io_w16 ;virtual |
||
756 | |||
757 | |||
758 | mov [ctrl.ctrl_read16], ctrl_io_r16 ;virtual |
||
759 | mov [ctrl.ctrl_read32], ctrl_io_r32 ;virtual |
||
760 | |||
761 | |||
762 | mov [ctrl.ctrl_write16], ctrl_io_w16 ;virtual |
||
763 | mov [ctrl.ctrl_write32], ctrl_io_w32 ;virtual |
||
764 | ret |
||
765 | endp |
||
766 | |||
767 | |||
768 | PG_NOCACHE equ 0x018 |
||
769 | |||
770 | |||
771 | proc set_ICH4 |
||
772 | stdcall AllocKernelSpace, dword 0x2000 |
||
188 | serge | 773 | mov edi, eax |
168 | serge | 774 | stdcall MapPage, edi,[ctrl.codec_mem_base],PG_SW+PG_NOCACHE |
188 | serge | 775 | mov [ctrl.codec_mem_base], edi |
168 | serge | 776 | add edi, 0x1000 |
777 | stdcall MapPage, edi, [ctrl.ctrl_mem_base],PG_SW+PG_NOCACHE |
||
188 | serge | 778 | mov [ctrl.ctrl_mem_base], edi |
168 | serge | 779 | |
780 | |||
781 | mov [ctrl.codec_write16], codec_mem_w16 ;virtual |
||
782 | |||
783 | |||
784 | mov [ctrl.ctrl_read16], ctrl_mem_r16 ;virtual |
||
785 | mov [ctrl.ctrl_read32], ctrl_mem_r32 ;virtual |
||
786 | |||
787 | |||
788 | mov [ctrl.ctrl_write16], ctrl_mem_w16 ;virtual |
||
789 | mov [ctrl.ctrl_write32], ctrl_mem_w32 ;virtual |
||
790 | ret |
||
791 | endp |
||
792 | |||
793 | |||
794 | proc reset_controller |
||
795 | |||
796 | |||
797 | mov edx, PCM_IN_CR_REG |
||
798 | call [ctrl.ctrl_write8] |
||
799 | |||
800 | |||
801 | call [ctrl.ctrl_write8] |
||
802 | |||
803 | |||
804 | call [ctrl.ctrl_write8] |
||
805 | |||
806 | |||
807 | mov edx, PCM_IN_CR_REG |
||
808 | call [ctrl.ctrl_write8] |
||
809 | |||
810 | |||
811 | call [ctrl.ctrl_write8] |
||
812 | |||
813 | |||
814 | call [ctrl.ctrl_write8] |
||
815 | |||
816 | |||
817 | endp |
||
818 | |||
819 | |||
820 | proc init_codec |
||
821 | locals |
||
822 | counter dd ? |
||
823 | endl |
||
824 | |||
825 | |||
826 | and eax, eax |
||
827 | jz .err |
||
828 | |||
829 | |||
830 | call [ctrl.codec_write16] |
||
831 | |||
832 | |||
833 | mov edx, CODEC_REG_POWERDOWN |
||
834 | call [ctrl.codec_write16] |
||
835 | |||
836 | |||
837 | .wait: |
||
838 | mov edx, CODEC_REG_POWERDOWN |
||
839 | call [ctrl.codec_read16] |
||
840 | and eax, 0x0F |
||
841 | cmp eax, 0x0F |
||
842 | jz .ready |
||
843 | |||
844 | |||
845 | call StallExec |
||
846 | sub [counter] , 1 |
||
847 | jnz .wait |
||
848 | .err: |
||
849 | xor eax, eax ; timeout error |
||
850 | ret |
||
851 | .ready: |
||
852 | call detect_codec |
||
853 | |||
854 | |||
855 | inc eax |
||
856 | ret |
||
857 | endp |
||
858 | |||
859 | |||
860 | proc reset_codec |
||
861 | mov edx, GLOB_CTRL |
||
862 | call [ctrl.ctrl_read32] |
||
863 | |||
864 | |||
865 | jz .cold |
||
866 | |||
867 | |||
868 | jnc .ok |
||
869 | .cold: |
||
870 | call cold_reset |
||
871 | jnc .ok |
||
872 | |||
873 | |||
874 | mov esi, msgCFail |
||
875 | call SysMsgBoardStr |
||
188 | serge | 876 | end if |
168 | serge | 877 | xor eax, eax ; timeout error |
878 | ret |
||
879 | .ok: |
||
880 | if DEBUG |
||
881 | mov esi, msgResetOk |
||
882 | call SysMsgBoardStr |
||
188 | serge | 883 | end if |
168 | serge | 884 | |
885 | |||
886 | inc eax |
||
887 | ret |
||
888 | endp |
||
889 | |||
890 | |||
891 | proc warm_reset |
||
892 | locals |
||
893 | counter dd ? |
||
894 | endl |
||
895 | |||
896 | |||
897 | mov edx, GLOB_CTRL |
||
898 | call [ctrl.ctrl_write32] |
||
899 | |||
900 | |||
901 | mov esi, msgWarm |
||
902 | call SysMsgBoardStr |
||
188 | serge | 903 | end if |
168 | serge | 904 | |
905 | |||
906 | .wait: |
||
907 | mov eax, 100000 ; wait 100 ms |
||
908 | call StallExec |
||
909 | |||
910 | |||
911 | call [ctrl.ctrl_read32] |
||
912 | test eax, 4 |
||
913 | jz .ok |
||
914 | sub [counter], 1 |
||
915 | jnz .wait |
||
916 | |||
917 | |||
918 | mov esi, msgWRFail |
||
919 | call SysMsgBoardStr |
||
188 | serge | 920 | end if |
168 | serge | 921 | |
922 | |||
923 | ret |
||
924 | .ok: |
||
925 | mov edx, CTRL_STAT |
||
926 | call [ctrl.ctrl_read32] |
||
927 | and eax, CTRL_ST_CREADY |
||
928 | jz .fail |
||
929 | clc |
||
930 | ret |
||
931 | .fail: |
||
932 | stc |
||
933 | ret |
||
934 | endp |
||
935 | |||
936 | |||
937 | proc cold_reset |
||
938 | locals |
||
939 | counter dd ? |
||
940 | endl |
||
941 | |||
942 | |||
943 | mov edx, GLOB_CTRL |
||
944 | call [ctrl.ctrl_write32] |
||
945 | |||
946 | |||
947 | mov esi, msgCold |
||
948 | call SysMsgBoardStr |
||
188 | serge | 949 | end if |
168 | serge | 950 | |
951 | |||
952 | call StallExec |
||
953 | |||
954 | |||
955 | mov edx, GLOB_CTRL |
||
956 | call [ctrl.ctrl_write32] |
||
957 | |||
958 | |||
959 | .wait: |
||
960 | mov eax, 100000 ; wait 100 ms |
||
961 | call StallExec |
||
962 | |||
963 | |||
964 | call [ctrl.ctrl_read32] |
||
965 | test eax, 4 |
||
966 | jz .ok |
||
967 | sub [counter], 1 |
||
968 | jnz .wait |
||
969 | |||
970 | |||
971 | mov esi, msgCRFail |
||
972 | call SysMsgBoardStr |
||
188 | serge | 973 | end if |
168 | serge | 974 | stc |
975 | ret |
||
976 | .ok: |
||
977 | mov edx, CTRL_STAT |
||
978 | call [ctrl.ctrl_read32] |
||
979 | and eax, CTRL_ST_CREADY |
||
980 | jz .fail |
||
981 | clc |
||
982 | ret |
||
983 | .fail: |
||
984 | stc |
||
985 | ret |
||
986 | endp |
||
987 | |||
988 | |||
989 | proc play |
||
990 | |||
991 | |||
992 | mov [ctrl.lvi_reg], eax |
||
993 | mov edx, PCM_OUT_LVI_REG |
||
994 | call [ctrl.ctrl_write8] |
||
995 | |||
996 | |||
997 | mov ax, 0x1D |
||
998 | call [ctrl.ctrl_write8] |
||
999 | ret |
||
1000 | endp |
||
1001 | |||
1002 | |||
1003 | proc stop |
||
1004 | mov edx, PCM_OUT_CR_REG |
||
1005 | mov ax, 0x14 |
||
1006 | call [ctrl.ctrl_write8] |
||
1007 | |||
1008 | |||
1009 | mov [ctrl.lvi_reg], eax |
||
1010 | mov edx, PCM_OUT_LVI_REG |
||
1011 | call [ctrl.ctrl_write8] |
||
1012 | |||
1013 | |||
1014 | endp |
||
1015 | |||
1016 | |||
1017 | proc get_dev_info stdcall, p_info:dword |
||
1018 | virtual at esi |
||
1019 | CTRL_INFO CTRL_INFO |
||
1020 | end virtual |
||
1021 | |||
1022 | |||
1023 | mov eax, [ctrl.int_line] |
||
1024 | mov ebx, [ctrl.codec_io_base] |
||
1025 | mov ecx, [ctrl.ctrl_io_base] |
||
1026 | mov edx, [ctrl.codec_mem_base] |
||
1027 | mov edi, [ctrl.ctrl_mem_base] |
||
1028 | |||
1029 | |||
1030 | mov [CTRL_INFO.codec_io_base], ebx |
||
1031 | mov [CTRL_INFO.ctrl_io_base], ecx |
||
1032 | mov [CTRL_INFO.codec_mem_base], edx |
||
1033 | mov [CTRL_INFO.ctrl_mem_base], edi |
||
1034 | |||
1035 | |||
1036 | mov [CTRL_INFO.codec_id], eax |
||
1037 | |||
1038 | |||
1039 | call [ctrl.ctrl_read32] |
||
1040 | mov [CTRL_INFO.glob_cntrl], eax |
||
1041 | |||
1042 | |||
1043 | call [ctrl.ctrl_read32] |
||
1044 | mov [CTRL_INFO.glob_sta], eax |
||
1045 | |||
1046 | |||
1047 | mov [CTRL_INFO.pci_cmd], ebx |
||
1048 | |||
1049 | |||
1050 | endp |
||
1051 | |||
1052 | |||
1053 | proc set_callback stdcall, handler:dword |
||
1054 | mov eax, [handler] |
||
1055 | mov [ctrl.user_callback], eax |
||
1056 | ret |
||
1057 | endp |
||
1058 | |||
1059 | |||
1060 | proc codec_read stdcall, ac_reg:dword ; reg = edx, reval = eax |
||
1061 | |||
1062 | |||
1063 | |||
1064 | |||
1065 | shr ebx, 1 |
||
1066 | bt [codec.shadow_flag], ebx |
||
1067 | jc .use_shadow |
||
1068 | |||
1069 | |||
1070 | mov ecx, eax |
||
1071 | |||
1072 | |||
1073 | call [ctrl.ctrl_read32] |
||
1074 | test eax, CTRL_ST_RCS |
||
1075 | jz .read_ok |
||
1076 | |||
1077 | |||
1078 | call [ctrl.ctrl_write32] |
||
1079 | xor eax,eax |
||
1080 | not eax ;timeout |
||
1081 | ret |
||
1082 | .read_ok: |
||
1083 | mov edx, [ac_reg] |
||
1084 | mov [codec.regs+edx], cx |
||
1085 | bts [codec.shadow_flag], ebx |
||
1086 | mov eax, ecx |
||
1087 | ret |
||
1088 | .use_shadow: |
||
1089 | movzx eax, word [codec.regs+edx] |
||
1090 | ret |
||
1091 | endp |
||
1092 | |||
1093 | |||
1094 | proc codec_write stdcall, ac_reg:dword |
||
1095 | push eax |
||
1096 | call check_semafore |
||
1097 | and eax, eax |
||
1098 | jz .err |
||
1099 | pop eax |
||
1100 | |||
1101 | |||
1102 | mov edx, esi |
||
1103 | call [ctrl.codec_write16] |
||
1104 | mov [codec.regs+esi], ax |
||
1105 | shr esi, 1 |
||
1106 | bts [codec.shadow_flag], esi |
||
1107 | ret |
||
1108 | .err: |
||
1109 | pop eax |
||
1110 | ret |
||
1111 | endp |
||
1112 | |||
1113 | |||
1114 | proc codec_check_ready |
||
1115 | |||
1116 | |||
1117 | call [ctrl.ctrl_read32] |
||
1118 | and eax, CTRL_ST_CREADY |
||
1119 | jz .not_ready |
||
1120 | |||
1121 | |||
1122 | inc eax |
||
1123 | ret |
||
1124 | |||
1125 | |||
1126 | .not_ready: |
||
1127 | xor eax, eax |
||
1128 | ret |
||
1129 | endp |
||
1130 | |||
1131 | |||
1132 | proc check_semafore |
||
1133 | local counter:DWORD |
||
1134 | |||
1135 | |||
1136 | .l1: |
||
1137 | mov edx, CTRL_CAS |
||
1138 | call [ctrl.ctrl_read8] |
||
1139 | and eax, CAS_FLAG |
||
1140 | jz .ok |
||
1141 | |||
1142 | |||
1143 | call StallExec |
||
1144 | sub [counter], 1 |
||
1145 | jnz .l1 |
||
1146 | xor eax, eax |
||
1147 | ret |
||
1148 | align 4 |
||
1149 | .ok: |
||
1150 | xor eax,eax |
||
1151 | inc eax |
||
1152 | ret |
||
1153 | endp |
||
1154 | |||
1155 | |||
1156 | proc StallExec |
||
1157 | push ecx |
||
1158 | push edx |
||
1159 | push ebx |
||
1160 | push eax |
||
1161 | |||
1162 | |||
1163 | mul ecx |
||
1164 | mov ebx, eax ;low |
||
1165 | mov ecx, edx ;high |
||
1166 | rdtsc |
||
1167 | add ebx, eax |
||
1168 | adc ecx,edx |
||
1169 | @@: |
||
1170 | rdtsc |
||
1171 | sub eax, ebx |
||
1172 | sbb edx, ecx |
||
1173 | jb @B |
||
1174 | |||
1175 | |||
1176 | pop ebx |
||
1177 | pop edx |
||
1178 | pop ecx |
||
1179 | ret |
||
1180 | endp |
||
1181 | |||
1182 | |||
1183 | ; CONTROLLER IO functions |
||
1184 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
1185 | |||
1186 | |||
1187 | proc codec_io_r16 |
||
1188 | add edx, [ctrl.codec_io_base] |
||
1189 | in ax, dx |
||
1190 | ret |
||
1191 | endp |
||
1192 | |||
1193 | |||
1194 | proc codec_io_w16 |
||
1195 | add edx, [ctrl.codec_io_base] |
||
1196 | out dx, ax |
||
1197 | ret |
||
1198 | endp |
||
1199 | |||
1200 | |||
1201 | proc ctrl_io_r8 |
||
1202 | add edx, [ctrl.ctrl_io_base] |
||
1203 | in al, dx |
||
1204 | ret |
||
1205 | endp |
||
1206 | |||
1207 | |||
1208 | proc ctrl_io_r16 |
||
1209 | add edx, [ctrl.ctrl_io_base] |
||
1210 | in ax, dx |
||
1211 | ret |
||
1212 | endp |
||
1213 | |||
1214 | |||
1215 | proc ctrl_io_r32 |
||
1216 | add edx, [ctrl.ctrl_io_base] |
||
1217 | in eax, dx |
||
1218 | ret |
||
1219 | endp |
||
1220 | |||
1221 | |||
1222 | proc ctrl_io_w8 |
||
1223 | add edx, [ctrl.ctrl_io_base] |
||
1224 | out dx, al |
||
1225 | ret |
||
1226 | endp |
||
1227 | |||
1228 | |||
1229 | proc ctrl_io_w16 |
||
1230 | add edx, [ctrl.ctrl_io_base] |
||
1231 | out dx, ax |
||
1232 | ret |
||
1233 | endp |
||
1234 | |||
1235 | |||
1236 | proc ctrl_io_w32 |
||
1237 | add edx, [ctrl.ctrl_io_base] |
||
1238 | out dx, eax |
||
1239 | ret |
||
1240 | endp |
||
1241 | |||
1242 | |||
1243 | ; MEMORY MAPPED IO (os depended) |
||
1244 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
1245 | |||
1246 | |||
1247 | proc codec_mem_r16 |
||
1248 | add edx, [ctrl.codec_mem_base] |
||
1249 | mov ax, word [edx] |
||
1250 | ret |
||
1251 | endp |
||
1252 | |||
1253 | |||
1254 | proc codec_mem_w16 |
||
1255 | add edx, [ctrl.codec_mem_base] |
||
1256 | mov word [edx], ax |
||
1257 | ret |
||
1258 | endp |
||
1259 | |||
1260 | |||
1261 | proc ctrl_mem_r8 |
||
1262 | add edx, [ctrl.ctrl_mem_base] |
||
1263 | mov al, [edx] |
||
1264 | ret |
||
1265 | endp |
||
1266 | |||
1267 | |||
1268 | proc ctrl_mem_r16 |
||
1269 | add edx, [ctrl.ctrl_mem_base] |
||
1270 | mov ax, [edx] |
||
1271 | ret |
||
1272 | endp |
||
1273 | |||
1274 | |||
1275 | proc ctrl_mem_r32 |
||
1276 | add edx, [ctrl.ctrl_mem_base] |
||
1277 | mov eax, [edx] |
||
1278 | ret |
||
1279 | endp |
||
1280 | |||
1281 | |||
1282 | proc ctrl_mem_w8 |
||
1283 | add edx, [ctrl.ctrl_mem_base] |
||
1284 | mov [edx], al |
||
1285 | |||
1286 | |||
1287 | endp |
||
1288 | |||
1289 | |||
1290 | proc ctrl_mem_w16 |
||
1291 | add edx, [ctrl.ctrl_mem_base] |
||
1292 | mov [edx], ax |
||
1293 | ret |
||
1294 | endp |
||
1295 | |||
1296 | |||
1297 | proc ctrl_mem_w32 |
||
1298 | add edx, [ctrl.ctrl_mem_base] |
||
1299 | mov [edx], eax |
||
1300 | ret |
||
1301 | endp |
||
1302 | |||
1303 | |||
1304 | |||
1305 | |||
1306 | |||
188 | serge | 1307 | devices dd (CTRL_ICH shl 16)+VID_INTEL,msg_ICH, set_ICH |
168 | serge | 1308 | dd (CTRL_ICH0 shl 16)+VID_INTEL,msg_ICH0,set_ICH |
1309 | dd (CTRL_ICH2 shl 16)+VID_INTEL,msg_ICH2,set_ICH |
||
1310 | dd (CTRL_ICH3 shl 16)+VID_INTEL,msg_ICH3,set_ICH |
||
1311 | dd (CTRL_ICH4 shl 16)+VID_INTEL,msg_ICH4,set_ICH4 |
||
1312 | dd (CTRL_ICH5 shl 16)+VID_INTEL,msg_ICH5,set_ICH4 |
||
1313 | dd (CTRL_ICH6 shl 16)+VID_INTEL,msg_ICH6,set_ICH4 |
||
1314 | dd (CTRL_ICH7 shl 16)+VID_INTEL,msg_ICH7,set_ICH4 |
||
1315 | |||
1316 | |||
1317 | dd (CTRL_NFORCE2 shl 16)+VID_NVIDIA,msg_NForce2,set_ICH |
||
1318 | dd (CTRL_NFORCE3 shl 16)+VID_NVIDIA,msg_NForce3,set_ICH |
||
1319 | dd (CTRL_MCP04 shl 16)+VID_NVIDIA,msg_MCP04,set_ICH |
||
198 | serge | 1320 | dd (CTRL_CK804 shl 16)+VID_NVIDIA,msg_CK804,set_ICH |
1321 | dd (CTRL_CK8 shl 16)+VID_NVIDIA,msg_CK8,set_ICH |
||
1322 | dd (CTRL_CK8S shl 16)+VID_NVIDIA,msg_CK8S,set_ICH |
||
1323 | dd (CTRL_MCP51 shl 16)+VID_NVIDIA,msg_MCP51,set_ICH |
||
1324 | |||
168 | serge | 1325 | |
1326 | |||
1327 | |||
1328 | msg_ICH0 db 'Intel ICH0', 13,10, 0 |
||
1329 | msg_ICH2 db 'Intel ICH2', 13,10, 0 |
||
1330 | msg_ICH3 db 'Intel ICH3', 13,10, 0 |
||
1331 | msg_ICH4 db 'Intel ICH4', 13,10, 0 |
||
1332 | msg_ICH5 db 'Intel ICH5', 13,10, 0 |
||
1333 | msg_ICH6 db 'Intel ICH6', 13,10, 0 |
||
1334 | msg_ICH7 db 'Intel ICH7', 13,10, 0 |
||
1335 | msg_Intel db 'Intel Corp. ', 0 |
||
1336 | |||
1337 | |||
198 | serge | 1338 | msg_NForce2 db 'NForce 2', 13,10, 0 |
1339 | msg_NForce3 db 'NForce 3', 13,10, 0 |
||
1340 | msg_MCP04 db 'NForce MCP04',13,10, 0 |
||
1341 | msg_CK804 db 'NForce CK804',13,10, 0 |
||
1342 | msg_CK8 db 'NForce CK8', 13,10, 0 |
||
1343 | msg_CK8S db 'NForce CK8S', 13,10, 0 |
||
1344 | msg_MCP51 db 'NForce MCP51',13,10, 0 |
||
1345 | |||
168 | serge | 1346 | |
198 | serge | 1347 | |
1348 | |||
168 | serge | 1349 | sz_sound_srv db 'SOUND',0 |
1350 | |||
1351 | |||
1352 | msgFail db 'device not found',13,10,0 |
||
1353 | msgAttchIRQ db 'IRQ line not supported', 13,10, 0 |
||
1354 | msgInvIRQ db 'IRQ line not assigned or invalid', 13,10, 0 |
||
1355 | msgPlay db 'start play', 13,10,0 |
||
1356 | msgStop db 'stop play', 13,10,0 |
||
1357 | msgNotify db 'call notify',13,10,0 |
||
1358 | msgIRQ db 'AC97 IRQ', 13,10,0 |
||
1359 | msgInitCtrl db 'init controller',13,10,0 |
||
1360 | msgInitCodec db 'init codec',13,10,0 |
||
1361 | msgPrimBuff db 'create primary buffer',13,10,0 |
||
1362 | msgReg db 'set service handler',13,10,0 |
||
1363 | msgOk db 'service installed',13,10,0 |
||
1364 | msgCold db 'cold reset',13,10,0 |
||
1365 | msgWarm db 'warm reset',13,10,0 |
||
1366 | msgWRFail db 'warm reset failed',13,10,0 |
||
1367 | msgCRFail db 'cold reset failed',13,10,0 |
||
1368 | msgCFail db 'codec not ready',13,10,0 |
||
1369 | msgResetOk db 'reset complete',13,10,0 |
||
1370 | |||
1371 | |||
188 | serge | 1372 | |
1373 | |||
1374 | buff_list rd 32 |
||
1375 | |||
1376 | |||
1377 | ctrl AC_CNTRL |
||
1378 | |||
1379 | |||
1380 | civ_val rd 1 |
||
1381 |