Subversion Repositories Kolibri OS

Rev

Rev 3083 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3083 Rev 5048
Line 596... Line 596...
596
PIN_HP			equ (AC_PINCTL_OUT_EN or AC_PINCTL_HP_EN)
596
PIN_HP			equ (AC_PINCTL_OUT_EN or AC_PINCTL_HP_EN)
597
PIN_HP_AMP		equ (AC_PINCTL_HP_EN)
597
PIN_HP_AMP		equ (AC_PINCTL_HP_EN)
Line 598... Line 598...
598
 
598
 
599
 
-
 
600
; get widget capabilities
599
 
601
;static inline u32 get_wcaps(struct hda_codec *codec, hda_nid_t nid)
600
; get widget capabilities
602
proc  get_wcaps stdcall, nid:dword
601
proc  get_wcaps stdcall, nid:dword
603
     push    ebx ecx edx
602
	push	ebx ecx edx
604
     xor     eax, eax
603
	xor	eax, eax
Line 621... Line 620...
621
     pop     edx ecx ebx
620
	pop	edx ecx ebx
622
     ret
621
	ret
623
endp
622
endp
Line 624... Line 623...
624
 
623
 
625
; get the widget type from widget capability bits
-
 
626
;#define get_wcaps_type(wcaps) (((wcaps) & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT)
624
; get the widget type from widget capability bits
627
proc  get_wcaps_type stdcall, wcaps:dword
625
proc  get_wcaps_type stdcall, wcaps:dword
628
     mov     eax, [wcaps]
626
	mov	eax, [wcaps]
629
     and     eax, AC_WCAP_TYPE
627
	and	eax, AC_WCAP_TYPE
630
     shr     eax, AC_WCAP_TYPE_SHIFT
628
	shr	eax, AC_WCAP_TYPE_SHIFT
631
     ret
629
	ret
Line 632... Line 630...
632
endp
630
endp
633
 
631
 
634
;static inline unsigned int get_wcaps_channels(u32 wcaps)
-
 
635
proc  get_wcaps_channels stdcall, wcaps:dword
-
 
636
;        chans = (wcaps & AC_WCAP_CHAN_CNT_EXT) >> 13;
632
;static inline unsigned int get_wcaps_channels(u32 wcaps)
637
;        chans = ((chans << 1) | 1) + 1;
633
proc  get_wcaps_channels stdcall, wcaps:dword
638
     mov     eax, [wcaps]
634
	mov	eax, [wcaps]
639
     and     eax, AC_WCAP_CHAN_CNT_EXT
635
	and	eax, AC_WCAP_CHAN_CNT_EXT
640
     shr     eax, 13
636
	shr	eax, 13
641
     shl     eax, 1
637
	shl	eax, 1
642
     or      eax, 1
638
	or	eax, 1
643
     inc     eax
639
	inc	eax
Line 644... Line -...
644
     ret
-
 
645
endp
640
	ret