Intel 307017-001 TV Cables User Manual


 
122 Programmer’s Reference Manual
Intel® High Definition Audio BIOS Considerations
;
; Description:Detects whether the vendor and device ID of the current
codec
; is supported based on whether the value is found at the start
; of any of the codec verb tables.
;
; Input:EAX - Vendor and device ID of the current codec
; ECX - Current codec address
; DS - BDA_DSEG.
; ES - 0000h with 4GB limit.
; FS - POST_DSEG.
; GS - RUN_CSEG.
; STACK- Available.
;
; Output:CX - Size of codec verb table (in dwords) if a valid
; codec is present. Else cx = 0.
; SI - Adddress of the codec verb table (valid if CF=0)
;
; Modified:SI
;----------------------------------------------------------------------------
CheckforValidCodec PROC NEAR PUBLIC
push bx
push edx
push si
xor bx, bx
CheckNextCodecTable:
mov si, word ptr cs:[bx+offset CodecVerbTableList]
cmp dword ptr cs:[si], eax
je FoundValidCodec
; end of table?
add bx, 2 ; Next verb table entry
cmp bx, (offset CodecVerbTableListEnd - offset
CodecVerbTableList)
jb CheckNextCodecTable
CodecNotValid:
xor cx, cx