forked from KolibriOS/kolibrios
sound: call real driver, when kernel stop the service
git-svn-id: svn://kolibrios.org@3765 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
ab74087413
commit
2660526423
@ -149,10 +149,27 @@ public START
|
||||
public service_proc
|
||||
public version
|
||||
|
||||
struct SRV
|
||||
srv_name rb 16 ;ASCIIZ string
|
||||
magic dd ? ;+0x10 ;'SRV '
|
||||
size dd ? ;+0x14 ;size of structure SRV
|
||||
fd dd ? ;+0x18 ;next SRV descriptor
|
||||
bk dd ? ;+0x1C ;prev SRV descriptor
|
||||
base dd ? ;+0x20 ;service base address
|
||||
entry dd ? ;+0x24 ;service START function
|
||||
srv_proc dd ? ;+0x28 ;user mode service handler
|
||||
srv_proc_ex dd ? ;+0x2C ;kernel mode service handler
|
||||
ends
|
||||
|
||||
|
||||
section '.flat' code readable align 16
|
||||
|
||||
proc START stdcall, state:dword
|
||||
|
||||
mov eax, [srv_entry]
|
||||
test eax, eax
|
||||
jnz .done
|
||||
|
||||
cmp [state], 1
|
||||
jne .stop
|
||||
|
||||
@ -164,6 +181,8 @@ proc START stdcall, state:dword
|
||||
call detect_controller
|
||||
ret
|
||||
.stop:
|
||||
jmp eax
|
||||
.done:
|
||||
xor eax, eax
|
||||
ret
|
||||
endp
|
||||
@ -237,7 +256,11 @@ proc detect_controller
|
||||
end if
|
||||
|
||||
stdcall GetService, dword[edi+4]
|
||||
test eax, eax
|
||||
jz .err
|
||||
|
||||
mov edx, [eax+SRV.entry]
|
||||
mov [srv_entry], edx
|
||||
ret
|
||||
|
||||
.err:
|
||||
@ -377,6 +400,8 @@ devices dd (CTRL_ICH shl 16)+VID_INTEL, intelac97
|
||||
|
||||
version dd (5 shl 16) or (API_VERSION and 0xFFFF)
|
||||
|
||||
srv_entry dd 0
|
||||
|
||||
intelac97 db 'INTELAC97', 0
|
||||
vt823x db 'VT823X', 0
|
||||
sis db 'SIS', 0
|
||||
|
Loading…
Reference in New Issue
Block a user