Specifications

©
2008 Advanced Micro Devices Inc.
Sample Programs
AMD SB600 BIOS Developer’s Guide (Public Version) Proprietary
Page 92
not al, BIT3 ; Clear bit 3 to disable HD Audio
out dx,al ; Output new data
; HD Audio port configuration through Extended registers.
; Extended registers are addressed as index/data through SMBUS(Dev 14h, func0) register 0F8h,
; and 0FCh
; Index 0 is Audio port configuration. 2 bit per port for total of 4 ports
mov Byte PTR es:[ebp+ATI_PCIE_BAR3+ATI_SMBUS_BUS_DEV_FUN shl 12 \
+ATI_AZALIA_ExtBlk_DATA], 01010101b ; Set pin routine to AC97
jmp ATI_SB_Cfg_Azalia_exit
; Audio codec present
; Register AL has codec present bit map in bits 3:0
; Register EBX points to memory mapped configuration registers
At_least_one_azalia:
mov dl, al
; After resume from S4 through ring, the AC97 lines give same status as HD Audio
; It is necessary to remove HD Audio status from those bits. The AC-97 ring resume status is in register
; DI[3:0]
mov ax,di ; Get GPIO status and AC97 S4 ring wakeup
mov ah,0fh ; To keep only bits 3:0
and al,ah ; Keep only bits 3:0
xor al,ah ; Invert the AC97 ring bits
and dl,al ; Remove GPIO and AC-97 bits from HD Audio bits
mov cl, 0
test_SDI:
test dl, BIT0 ; Test for specific codec present
jnz configure_Azalia_channel ; Jump, codec is present
; This specific codec is not present. Set pin config to AC97
; This pin is set through index 0 of extended registers.
; The extended registes are accessed as index/data at SMBus (dev 14h, func 0) registers 0F8h/0FCh
; There are two bits per codec. Register CL has the codec number.
mov ah, 01b ; 01 = Set codec as AC97
shl ah, cl ; Move in the position for this codec
shl ah, cl ; Two bits per codec
mov al, 11b ; Mask for this codec
shl al, cl ; Move it in the position for this codec
shl al, cl ; Two bits per codec
xor al, -1 ; Zero these two bits
and Byte PTR es:[ebp+ATI_PCIE_BAR3+ATI_SMBUS_BUS_DEV_FUN shl 12 \
+ATI_AZALIA_ExtBlk_DATA], al ; Clear channel pin config
or Byte PTR es:[ebp+ATI_PCIE_BAR3+ATI_SMBUS_BUS_DEV_FUN shl 12 \
+ATI_AZALIA_ExtBlk_DATA], ah ; Set channel pin config to AC97
jmp test_next_SDI