Subversion Repositories Kolibri OS

Rev

Rev 1697 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1697 Rev 2089
Line 361... Line 361...
361
	   popf
361
	   popf
362
	   mov esi, msgRemap
362
	   mov esi, msgRemap
363
	   call SysMsgBoardStr
363
	   call SysMsgBoardStr
364
  end if
364
  end if
Line 365... Line -...
365
 
-
 
366
	   mov eax, VALID_IRQ
365
 
367
	   mov ebx, [ctrl.int_line]
-
 
368
	   mov esi, msgInvIRQ
-
 
369
	   bt eax, ebx
-
 
370
	   jnc .fail_msg
-
 
371
	   mov eax, ATTCH_IRQ
-
 
372
	   mov esi, msgAttchIRQ
-
 
373
	   bt eax, ebx
-
 
374
	   jnc .fail_msg
-
 
375
 
366
	   mov ebx, [ctrl.int_line]
376
	   stdcall AttachIntHandler, ebx, ac97_irq, dword 0
367
	   stdcall AttachIntHandler, ebx, ac97_irq, dword 0
377
.reg:
368
.reg:
378
	   stdcall RegService, sz_sound_srv, service_proc
369
	   stdcall RegService, sz_sound_srv, service_proc
379
	   ret
370
	   ret
Line 494... Line 485...
494
     if DEBUG_IRQ
485
     if DEBUG_IRQ
495
	   mov esi, msgIRQ
486
	   mov esi, msgIRQ
496
	   call SysMsgBoardStr
487
	   call SysMsgBoardStr
497
     end if
488
     end if
Line -... Line 489...
-
 
489
 
-
 
490
           mov edx, CTRL_STAT
-
 
491
           call [ctrl.ctrl_read32]
-
 
492
 
-
 
493
           cmp eax, 0xffffffff
-
 
494
           je .exit
-
 
495
 
-
 
496
           test eax, 0x40
-
 
497
           jnz .do_intr
-
 
498
 
-
 
499
           test eax, eax
-
 
500
           jz .exit
-
 
501
 
-
 
502
           mov edx, CTRL_STAT
-
 
503
           call [ctrl.ctrl_write32]
-
 
504
.exit:
-
 
505
           xor eax, eax
-
 
506
           ret
-
 
507
 
-
 
508
.do_intr:
-
 
509
           push eax
498
 
510
 
499
	   mov edx, PCM_OUT_CR_REG
511
	   mov edx, PCM_OUT_CR_REG
500
	   mov al, 0x10;               0x10
512
	   mov al, 0x10;               0x10
Line 501... Line 513...
501
	   call [ctrl.ctrl_write8]
513
	   call [ctrl.ctrl_write8]
Line 527... Line 539...
527
	   add eax, 1
539
	   add eax, 1
528
	   and eax, 31
540
	   and eax, 31
529
	   mov ebx, dword [buff_list+eax*4]
541
	   mov ebx, dword [buff_list+eax*4]
Line 530... Line 542...
530
 
542
 
531
	   cmp [ctrl.user_callback], 0
543
           cmp [ctrl.user_callback], 0
Line 532... Line 544...
532
	   je @f
544
           je .done
533
 
545
 
-
 
546
           stdcall [ctrl.user_callback], ebx
-
 
547
.done:
-
 
548
           pop eax
-
 
549
           and eax, 0x40
-
 
550
           mov edx, CTRL_STAT
534
	   stdcall [ctrl.user_callback], ebx
551
           call [ctrl.ctrl_write32]
535
@@:
-
 
536
	   ret
552
           or eax, 1
537
 
553
           ret
538
.skip:
554
.skip:
539
	   mov edx, PCM_OUT_CR_REG
555
	   mov edx, PCM_OUT_CR_REG
540
	   mov ax, 0x11 	      ;0x1D
556
	   mov ax, 0x11 	      ;0x1D
541
	   call [ctrl.ctrl_write8]
557
	   call [ctrl.ctrl_write8]
Line 542... Line 558...
542
	   ret
558
           jmp .done
543
endp
559
endp
Line 790... Line 806...
790
 
806
 
791
	   stdcall PciRead8, [ctrl.bus], [ctrl.devfn], dword 0x41
807
	   stdcall PciRead8, [ctrl.bus], [ctrl.devfn], dword 0x41
792
	   and eax, 0xFF
808
	   and eax, 0xFF
Line -... Line 809...
-
 
809
	   mov [ctrl.cfg_reg], eax
-
 
810
 
793
	   mov [ctrl.cfg_reg], eax
811
           mov [ctrl.user_callback], 0
794
 
812
 
795
	   call [ctrl.ctrl_setup]
813
	   call [ctrl.ctrl_setup]
796
	   xor eax, eax
814
	   xor eax, eax
797
	   inc eax
815
	   inc eax