Subversion Repositories Kolibri OS

Rev

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

Rev 3539 Rev 4496
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 17... Line 17...
17
USE_COM_IRQ     equ 0    ;make irq 3 and irq 4 available for PCI devices
17
USE_COM_IRQ     equ 0    ;make irq 3 and irq 4 available for PCI devices
18
IRQ_REMAP       equ 0
18
IRQ_REMAP       equ 0
19
IRQ_LINE        equ 0
19
IRQ_LINE        equ 0
Line 20... Line 20...
20
 
20
 
21
 
21
 
22
;irq 0,1,2,8,12,13 недоступны
22
;irq 0,1,2,8,12,13 unavailable
23
;                   FEDCBA9876543210
23
;                   FEDCBA9876543210
Line 24... Line 24...
24
VALID_IRQ       equ 1100111011111000b
24
VALID_IRQ       equ 1100111011111000b
Line 173... Line 173...
173
DEV_SET_BUFF          equ  4
173
DEV_SET_BUFF          equ  4
174
DEV_NOTIFY            equ  5
174
DEV_NOTIFY            equ  5
175
DEV_SET_MASTERVOL     equ  6
175
DEV_SET_MASTERVOL     equ  6
176
DEV_GET_MASTERVOL     equ  7
176
DEV_GET_MASTERVOL     equ  7
177
DEV_GET_INFO          equ  8
177
DEV_GET_INFO          equ  8
-
 
178
DEV_GET_POS           equ  9
Line 178... Line 179...
178
 
179
 
179
struc AC_CNTRL              ;AC controller base class
180
struc AC_CNTRL              ;AC controller base class
180
{ .bus                dd ?
181
{ .bus                dd ?
Line 292... Line 293...
292
                      dw ?     ;0x7A
293
                      dw ?     ;0x7A
293
  .reg_vendor_id_1    dw ?     ;0x7C
294
  .reg_vendor_id_1    dw ?     ;0x7C
294
  .reg_vendor_id_2    dw ?     ;0x7E
295
  .reg_vendor_id_2    dw ?     ;0x7E
Line 295... Line 296...
295
 
296
 
296
 
297
 
297
  .reset              dd ?    ;virual
298
  .reset              dd ?    ;virtual
Line 298... Line 299...
298
  .set_master_vol     dd ?
299
  .set_master_vol     dd ?
299
}
300
}
Line 492... Line 493...
492
        jne     @F
493
        jne     @F
493
        mov     ebx, [edi+output]
494
        mov     ebx, [edi+output]
494
        stdcall get_dev_info, ebx
495
        stdcall get_dev_info, ebx
495
        ret
496
        ret
496
@@:
497
@@:
-
 
498
        cmp     eax, DEV_GET_POS
-
 
499
        jne     @F
-
 
500
        push    ebx  edx
-
 
501
        mov     edx, VIADEV_PLAYBACK + VIA_REG_OFFSET_CURR_COUNT
-
 
502
        call    [ctrl.ctrl_read32]
-
 
503
        and     eax, 0x00FFFFFF
-
 
504
        mov     ebx, 4096
-
 
505
        sub     ebx, eax
-
 
506
        shr     ebx, 2
-
 
507
        mov     edx, [edi+output]
-
 
508
        mov     [edx], ebx
-
 
509
        pop     edx ebx
-
 
510
        ret
-
 
511
@@:
497
.fail:
512
.fail:
498
        or      eax, -1
513
        or      eax, -1
499
        ret
514
        ret
500
endp
515
endp
Line 812... Line 827...
812
        call    dword2str
827
        call    dword2str
813
        call    SysMsgBoardStr
828
        call    SysMsgBoardStr
814
        pop     eax
829
        pop     eax
Line 815... Line 830...
815
 
830
 
816
        test    eax, VIA_ACLINK_C00_READY
831
        test    eax, VIA_ACLINK_C00_READY
Line 817... Line 832...
817
        jz      .ready
832
        jnz     .ready
818
 
833
 
819
        call    reset_codec
834
        call    reset_codec