drivers update
git-svn-id: svn://kolibrios.org@462 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
dd4bac7d4f
commit
8101a2af97
@ -6,8 +6,8 @@ $Revision: 431 $
|
||||
;; ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
DRV_COMPAT equ 4 ;minimal required drivers version
|
||||
DRV_CURRENT equ 4 ;current drivers model version
|
||||
DRV_COMPAT equ 5 ;minimal required drivers version
|
||||
DRV_CURRENT equ 5 ;current drivers model version
|
||||
|
||||
DRV_VERSION equ (DRV_COMPAT shl 16) or DRV_CURRENT
|
||||
|
||||
|
@ -10,6 +10,8 @@ format MS COFF
|
||||
include 'proc32.inc'
|
||||
include 'imports.inc'
|
||||
|
||||
API_VERSION equ 0x01000100
|
||||
|
||||
DEBUG equ 1
|
||||
|
||||
VID_ATI equ 0x1002
|
||||
@ -19,7 +21,7 @@ LOAD_FROM_MEM equ 1
|
||||
LOAD_INDIRECT equ 2
|
||||
LOAD_SYSTEM equ 3
|
||||
|
||||
VIDEO_FREE equ 2
|
||||
SRV_GETVERSION equ 0
|
||||
|
||||
struc BITMAPINFOHEADER {
|
||||
.biSize dd ? ; DWORD
|
||||
@ -229,13 +231,16 @@ out_size equ IOCTL.out_size
|
||||
align 4
|
||||
proc service_proc stdcall, ioctl:dword
|
||||
|
||||
mov edi, [ioctl]
|
||||
mov ebx, [edi+io_code]
|
||||
cmp ebx, VIDEO_FREE
|
||||
mov ebx, [ioctl]
|
||||
cmp [ebx+io_code], SRV_GETVERSION
|
||||
jne .fail
|
||||
|
||||
mov eax, [edi+input]
|
||||
call video_free
|
||||
mov eax, [ebx+output]
|
||||
cmp [ebx+out_size], 4
|
||||
jne .fail
|
||||
mov [eax], dword API_VERSION
|
||||
xor eax, eax
|
||||
ret
|
||||
.fail:
|
||||
or eax, -1
|
||||
ret
|
||||
@ -986,7 +991,7 @@ devices dd (R8500 shl 16)+VID_ATI
|
||||
dd (R9800XT shl 16)+VID_ATI
|
||||
dd 0 ;terminator
|
||||
|
||||
version dd 0x00040004
|
||||
version dd (5 shl 16) or (API_VERSION and 0xFFFF)
|
||||
|
||||
sz_ati_srv db 'HWCURSOR',0
|
||||
|
||||
|
@ -10,6 +10,10 @@
|
||||
|
||||
format MS COFF
|
||||
|
||||
API_VERSION equ 0x01000100
|
||||
SOUND_VERSION equ API_VERSION
|
||||
|
||||
|
||||
include 'proc32.inc'
|
||||
include 'main.inc'
|
||||
include 'imports.inc'
|
||||
@ -160,6 +164,8 @@ proc service_proc stdcall, ioctl:dword
|
||||
cmp eax, SRV_GETVERSION
|
||||
jne @F
|
||||
mov eax, [edi+output]
|
||||
cmp [edi+out_size], 4
|
||||
jne .fail
|
||||
mov eax, [eax]
|
||||
mov [eax], dword SOUND_VERSION
|
||||
xor eax, eax
|
||||
@ -1245,7 +1251,7 @@ vol_min dd 0x0000D8F0,0x0000D8F0
|
||||
pan_max dd 0x00002710,0x00002710
|
||||
|
||||
;stream_map dd 0xFFFF ; 16
|
||||
version dd (4 shl 16) or (SOUND_VERSION and 0xFFFF)
|
||||
version dd (5 shl 16) or (SOUND_VERSION and 0xFFFF)
|
||||
|
||||
szInfinity db 'INFINITY',0
|
||||
szSound db 'SOUND',0
|
||||
@ -1277,3 +1283,8 @@ mix_2_core rd 1
|
||||
mix_3_core rd 1
|
||||
mix_4_core rd 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -8,11 +8,9 @@
|
||||
; (C) copyright Serge 2006-2007
|
||||
; email: infinity_sound@mail.ru
|
||||
|
||||
SOUND_VERSION equ 0x01000100
|
||||
|
||||
PLAY_SYNC equ 0x80000000
|
||||
|
||||
|
||||
PCM_ALL equ 0
|
||||
|
||||
PCM_OUT equ 0x08000000
|
||||
|
@ -9,6 +9,8 @@
|
||||
|
||||
format MS COFF
|
||||
|
||||
API_VERSION equ 0 ;debug
|
||||
|
||||
include 'proc32.inc'
|
||||
include 'imports.inc'
|
||||
|
||||
@ -39,6 +41,8 @@ DRV_ENTRY equ 1
|
||||
DRV_EXIT equ -1
|
||||
STRIDE equ 4 ;size of row in devices table
|
||||
|
||||
SRV_GETVERSION equ 0
|
||||
|
||||
section '.flat' code readable align 16
|
||||
|
||||
proc START stdcall, state:dword
|
||||
@ -70,11 +74,21 @@ out_size equ IOCTL.out_size
|
||||
align 4
|
||||
proc service_proc stdcall, ioctl:dword
|
||||
|
||||
; mov edi, [ioctl]
|
||||
; mov eax, [edi+io_code]
|
||||
mov ebx, [ioctl]
|
||||
mov eax, [ebx+io_code]
|
||||
cmp eax, SRV_GETVERSION
|
||||
jne @F
|
||||
|
||||
mov eax, [ebx+output]
|
||||
cmp [ebx+out_size], 4
|
||||
jne .fail
|
||||
mov [eax], dword API_VERSION
|
||||
xor eax, eax
|
||||
ret
|
||||
@@:
|
||||
.fail:
|
||||
or eax, -1
|
||||
ret
|
||||
endp
|
||||
|
||||
restore handle
|
||||
@ -116,10 +130,11 @@ proc detect
|
||||
|
||||
cmp eax, ebx
|
||||
je .found
|
||||
|
||||
add edi, STRIDE
|
||||
jmp @B
|
||||
|
||||
.next: inc [devfn]
|
||||
.next:
|
||||
inc [devfn]
|
||||
cmp [devfn], 256
|
||||
jb .next_dev
|
||||
mov eax, [bus]
|
||||
@ -138,9 +153,8 @@ proc detect
|
||||
ret
|
||||
endp
|
||||
|
||||
|
||||
;DEVICE_ID equ ; pci device id
|
||||
;VENDOR_ID equ ; device vendor id
|
||||
DEVICE_ID equ 1234; pci device id
|
||||
VENDOR_ID equ 5678; device vendor id
|
||||
|
||||
|
||||
;all initialized data place here
|
||||
@ -149,7 +163,7 @@ align 4
|
||||
devices dd (DEVICE_ID shl 16)+VENDOR_ID
|
||||
dd 0 ;terminator
|
||||
|
||||
version dd 0x00030003
|
||||
version dd (5 shl 16) or (API_VERSION and 0xFFFF)
|
||||
|
||||
my_service db 'MY_SERVICE',0 ;max 16 chars include zero
|
||||
|
||||
|
@ -10,6 +10,8 @@ format MS COFF
|
||||
include 'proc32.inc'
|
||||
include 'imports.inc'
|
||||
|
||||
API_VERSION equ 0x01000100
|
||||
|
||||
DEBUG equ 1
|
||||
|
||||
CPU_FREQ equ 2000d ;cpu freq in MHz
|
||||
@ -90,6 +92,7 @@ CTRL_CNT_GIE equ 0x00000001 ; GPI Interrupt Enable
|
||||
CODEC_REG_POWERDOWN equ 0x26
|
||||
CODEC_REG_ST equ 0x26
|
||||
|
||||
SRV_GETVERSION equ 0
|
||||
DEV_PLAY equ 1
|
||||
DEV_STOP equ 2
|
||||
DEV_CALLBACK equ 3
|
||||
@ -339,6 +342,18 @@ proc service_proc stdcall, ioctl:dword
|
||||
|
||||
mov edi, [ioctl]
|
||||
mov eax, [edi+io_code]
|
||||
|
||||
cmp eax, SRV_GETVERSION
|
||||
jne @F
|
||||
|
||||
mov eax, [edi+output]
|
||||
cmp [edi+out_size], 4
|
||||
jne .fail
|
||||
|
||||
mov [eax], dword API_VERSION
|
||||
xor eax, eax
|
||||
ret
|
||||
@@:
|
||||
cmp eax, DEV_PLAY
|
||||
jne @F
|
||||
if DEBUG
|
||||
@ -1135,7 +1150,7 @@ align 4
|
||||
devices dd (CTRL_SIS shl 16)+VID_SIS,msg_AC, set_SIS
|
||||
dd 0
|
||||
|
||||
version dd 0x00040004
|
||||
version dd (5 shl 16) or (API_VERSION and 0xFFFF)
|
||||
|
||||
msg_AC db '7012 AC97 controller',13,10, 0
|
||||
msg_SIS db 'Silicon Integrated Systems',13,10, 0
|
||||
|
@ -11,6 +11,8 @@ format MS COFF
|
||||
include 'proc32.inc'
|
||||
include 'imports.inc'
|
||||
|
||||
API_VERSION equ 0x01000100
|
||||
|
||||
DEBUG equ 1
|
||||
|
||||
REMAP_IRQ equ 0
|
||||
@ -57,6 +59,9 @@ BIT29 EQU 0x20000000
|
||||
BIT30 EQU 0x40000000
|
||||
BIT31 EQU 0x80000000
|
||||
|
||||
PCM_4 equ BIT20
|
||||
PCM_6 equ BIT21
|
||||
|
||||
VID_INTEL equ 0x8086
|
||||
VID_NVIDIA equ 0x10DE
|
||||
|
||||
@ -92,12 +97,12 @@ RR equ BIT1 ; reset registers. Nukes all regs
|
||||
|
||||
CODEC_MASTER_VOL_REG equ 0x02
|
||||
CODEC_AUX_VOL equ 0x04 ;
|
||||
CODEC_PCM_OUT_REG equ 18h ; PCM output volume
|
||||
CODEC_EXT_AUDIO_REG equ 28h ; extended audio
|
||||
CODEC_EXT_AUDIO_CTRL_REG equ 2ah ; extended audio control
|
||||
CODEC_PCM_FRONT_DACRATE_REG equ 2ch ; PCM out sample rate
|
||||
CODEC_PCM_SURND_DACRATE_REG equ 2eh ; surround sound sample rate
|
||||
CODEC_PCM_LFE_DACRATE_REG equ 30h ; LFE sample rate
|
||||
CODEC_PCM_OUT_REG equ 0x18 ; PCM output volume
|
||||
CODEC_EXT_AUDIO_REG equ 0x28 ; extended audio
|
||||
CODEC_EXT_AUDIO_CTRL_REG equ 0x2a ; extended audio control
|
||||
CODEC_PCM_FRONT_DACRATE_REG equ 0x2c ; PCM out sample rate
|
||||
CODEC_PCM_SURND_DACRATE_REG equ 0x2e ; surround sound sample rate
|
||||
CODEC_PCM_LFE_DACRATE_REG equ 0x30 ; LFE sample rate
|
||||
|
||||
GLOB_CTRL equ 0x2C ; Global Control
|
||||
CTRL_STAT equ 0x30 ; Global Status
|
||||
@ -118,6 +123,7 @@ CTRL_CNT_GIE equ 0x00000001 ; GPI Interrupt Enable
|
||||
CODEC_REG_POWERDOWN equ 0x26
|
||||
CODEC_REG_ST equ 0x26
|
||||
|
||||
SRV_GETVERSION equ 0
|
||||
DEV_PLAY equ 1
|
||||
DEV_STOP equ 2
|
||||
DEV_CALLBACK equ 3
|
||||
@ -385,6 +391,18 @@ proc service_proc stdcall, ioctl:dword
|
||||
|
||||
mov edi, [ioctl]
|
||||
mov eax, [edi+io_code]
|
||||
|
||||
cmp eax, SRV_GETVERSION
|
||||
jne @F
|
||||
|
||||
mov eax, [edi+output]
|
||||
cmp [edi+out_size], 4
|
||||
jne .fail
|
||||
|
||||
mov [eax], dword API_VERSION
|
||||
xor eax, eax
|
||||
ret
|
||||
@@:
|
||||
cmp eax, DEV_PLAY
|
||||
jne @F
|
||||
if DEBUG
|
||||
@ -871,6 +889,12 @@ proc init_codec
|
||||
xor eax, eax ; timeout error
|
||||
ret
|
||||
.ready:
|
||||
mov eax, 2 ;force set 16-bit 2-channel PCM
|
||||
mov edx, GLOB_CTRL
|
||||
call [ctrl.ctrl_write32]
|
||||
mov eax, 5000 ; wait 5 ms
|
||||
call StallExec
|
||||
|
||||
call detect_codec
|
||||
|
||||
xor eax, eax
|
||||
@ -1356,7 +1380,8 @@ devices dd (CTRL_ICH shl 16)+VID_INTEL,msg_ICH, set_ICH
|
||||
|
||||
dd 0 ;terminator
|
||||
|
||||
version dd 0x00040004
|
||||
|
||||
version dd (5 shl 16) or (API_VERSION and 0xFFFF)
|
||||
|
||||
msg_ICH db 'Intel ICH', 13,10, 0
|
||||
msg_ICH0 db 'Intel ICH0', 13,10, 0
|
||||
|
@ -10,6 +10,9 @@ format MS COFF
|
||||
include 'proc32.inc'
|
||||
include 'imports.inc'
|
||||
|
||||
API_VERSION equ 0
|
||||
UART_VERSION equ API_VERSION
|
||||
|
||||
PG_SW equ 0x003
|
||||
page_tabs equ 0xFDC00000 ;hack
|
||||
|
||||
@ -190,8 +193,6 @@ end virtual
|
||||
|
||||
CONNECTION_SIZE equ 7*4
|
||||
|
||||
UART_VERSION equ 0x12345678 ;debug
|
||||
|
||||
public START
|
||||
public service_proc
|
||||
public version
|
||||
@ -317,6 +318,8 @@ proc service_proc stdcall, ioctl:dword
|
||||
jne @F
|
||||
|
||||
mov eax, [ebx+output]
|
||||
cmp [ebx+out_size], 4
|
||||
jne .fail
|
||||
mov [eax], dword UART_VERSION
|
||||
xor eax, eax
|
||||
ret
|
||||
@ -324,6 +327,9 @@ proc service_proc stdcall, ioctl:dword
|
||||
cmp eax, PORT_OPEN
|
||||
jne @F
|
||||
|
||||
cmp [ebx+out_size], 4
|
||||
jne .fail
|
||||
|
||||
mov ebx, [ebx+input]
|
||||
mov eax, [ebx]
|
||||
call uart_open
|
||||
@ -955,7 +961,7 @@ isr_action dd isr_modem
|
||||
dd isr_recieve
|
||||
dd isr_line
|
||||
|
||||
version dd 0x00040000
|
||||
version dd (5 shl 16) or (UART_VERSION and 0xFFFF)
|
||||
|
||||
sz_uart_srv db 'UART',0
|
||||
|
||||
|
@ -10,7 +10,6 @@ LOAD_FROM_FILE equ 0
|
||||
LOAD_FROM_MEM equ 1
|
||||
LOAD_INDIRECT equ 2
|
||||
LOAD_SYSTEM equ 3
|
||||
VIDEO_FREE equ 2
|
||||
|
||||
struc BITMAPINFOHEADER {
|
||||
.biSize dd ? ; DWORD
|
||||
|
Loading…
Reference in New Issue
Block a user