Specifications

©
2008 Advanced Micro Devices Inc.
Sample Programs
AMD SB600 BIOS Developer’s Guide (Public Version) Proprietary
Page 94
call ATI_SB_Cfg_Azalia_Delay ; About 30 uSec delay
mov eax, Dword PTR ES:[ebx+64h] ; Immediate command input
cmp eax, 010ec0880h ; Is it Realtec codec?
jne ATI_SB_Cfg_Azalia_Pin_CMD_exit ; This routine works only with Realtec codec
mov si, offset Azalia_Codec_Table_Start
mov di, offset Azalia_Codec_Table_end ; Table end does not include front panel
; OEM may have a CMOS setup selection for Front panel audio (0=Auto, 1=Disable)
mov ax CMOS_Front_Panel ; OEM specific
call ReadCMOSOption ; OEM specific
cmp ax,1 ; Front panel disable
je loop_Immediat_Command_Output_Interface ; Jump for front panel disable
; Front panel option is Auto. GPIO9 detects the front panel audio in the SB600, and GPIO8 detects the
front panel audio in SB460.
;Check whether SB460?Call DetectSB460
Jz SB460_Chip ;jmp if SB460
;Control comes here if SB600
; Set GPIO9 as input through SMBus (Dev 14h, func 0) register A9h, bit 5
; Read GPIO9 through SMBus (Dev 14h, func 9) register AAh, bit 5
or Byte PTR es:[ebp+ATI_PCIE_BAR3+ATI_SMBUS_BUS_DEV_FUN shl 12 + 0A9h], BIT5
; Set GPIO9 Input
test Byte PTR es:[ebp+ATI_PCIE_BAR3+ATI_SMBUS_BUS_DEV_FUN shl 12 + 0AAh], BIT5
; GPIO9 0:connected 1:not
jmp DetectFrontPanelAudio
SB460_Chip:
;Control comes here if SB460
; Set GPIO8 as input through SMBus (Dev 14h, func 0) register A9h, bit 4
; Read GPIO8 through SMBus (Dev 14h, func 9) register AAh, bit 4
or Byte PTR es:[ebp+ATI_PCIE_BAR3+ATI_SMBUS_BUS_DEV_FUN shl 12 + 0A9h], BIT4
; Set GPIO8 Input
test Byte PTR es:[ebp+ATI_PCIE_BAR3+ATI_SMBUS_BUS_DEV_FUN shl 12 + 0AAh], BIT4
; GPIO8 0:connected 1:not
DetectFrontPanelAudio:
jnz loop_Immediat_Command_Output_Interface ; Jump, Front Panel audio is not present
; Front panel audio is present. Extend the end pointer to include front panel commands
mov di, offset Azalia_Codec_Table_FP_Enable_end
; Write the codec commands
loop_Immediat_Command_Output_Interface:
cmp si, di ; End of table?
je ATI_SB_Cfg_Azalia_Pin_CMD_exit ; Jump at the end of the command
test_again:
test Byte PTR ES:[ebx+68h], BIT0 ; Immediate command status register