Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2088 → Rev 2089

/kernel/trunk/drivers/sound.asm
363,16 → 363,7
call SysMsgBoardStr
end if
 
mov eax, VALID_IRQ
mov ebx, [ctrl.int_line]
mov esi, msgInvIRQ
bt eax, ebx
jnc .fail_msg
mov eax, ATTCH_IRQ
mov esi, msgAttchIRQ
bt eax, ebx
jnc .fail_msg
 
stdcall AttachIntHandler, ebx, ac97_irq, dword 0
.reg:
stdcall RegService, sz_sound_srv, service_proc
496,6 → 487,27
call SysMsgBoardStr
end if
 
mov edx, CTRL_STAT
call [ctrl.ctrl_read32]
 
cmp eax, 0xffffffff
je .exit
 
test eax, 0x40
jnz .do_intr
 
test eax, eax
jz .exit
 
mov edx, CTRL_STAT
call [ctrl.ctrl_write32]
.exit:
xor eax, eax
ret
 
.do_intr:
push eax
 
mov edx, PCM_OUT_CR_REG
mov al, 0x10; 0x10
call [ctrl.ctrl_write8]
529,17 → 541,21
mov ebx, dword [buff_list+eax*4]
 
cmp [ctrl.user_callback], 0
je @f
je .done
 
stdcall [ctrl.user_callback], ebx
@@:
.done:
pop eax
and eax, 0x40
mov edx, CTRL_STAT
call [ctrl.ctrl_write32]
or eax, 1
ret
 
.skip:
mov edx, PCM_OUT_CR_REG
mov ax, 0x11 ;0x1D
call [ctrl.ctrl_write8]
ret
jmp .done
endp
 
align 4
792,6 → 808,8
and eax, 0xFF
mov [ctrl.cfg_reg], eax
 
mov [ctrl.user_callback], 0
 
call [ctrl.ctrl_setup]
xor eax, eax
inc eax