Specifications
©
2008 Advanced Micro Devices Inc.
Sample Programs
AMD SB600 BIOS Developer’s Guide (Public Version) Proprietary
Page 93
configure_Azalia_channel:
call ATI_SB_Cfg_Azalia_Pin_CMD ; Configure this pin
test_next_SDI:
shr dl, 1 ; Get next codec present
inc cl ; Update the codec Channel number
cmp cl, 4 ; Completed all channels
je re_do_clear_reset ; Yes, jump. Reset the controller and exit
jmp test_SDI ; Do the next codec
; Reset the controller and wait till it enters reset state.
re_do_clear_reset:
and Byte PTR ES:[ebx+08h], NOT (BIT0) ; Controller transition to reset state
test Byte PTR ES:[ebx+08h], (BIT0) ; Test the reset status. 0 = Controller in reset state
jnz re_do_clear_reset ; If 1, wait to enter reset state
ATI_SB_Cfg_Azalia_exit:
popad
ret
ATI_SB_Cfg_Azalia ENDP
;*******************************************************************************
; ATI_SB_Cfg_Azalia_Pin_CMD *
; *
; Configure each codec pin *
; *
; Input: cl, = channel number *
; ebx = Memory mapped configuration register address *
; *
;********************************************************************************
ATI_SB_Cfg_Azalia_Pin_CMD PROC NEAR
pushad
; OEM may have CMOS setup option for Pin Configuration (0= Disable, 1=Enable)
mov ax CMOS_Pin_Config ; OEM specific
call ReadCMOSOption ; OEM specific
cmp ax,1
jne ATI_SB_Cfg_Azalia_Pin_CMD_exit ; Jump if Pin Configuration is disabled
; Set codec channel number in bits 31:28
; Write command for ID read
shl ecx, 28
mov eax, 0F0000h ; Read IDs command
or eax, ecx
mov Dword PTR ES:[ebx+60h], eax ; Immediate command output register










