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