Intel 307017-001 TV Cables User Manual


 
Programmer’s Reference Manual 117
Intel® High Definition Audio BIOS Considerations
4.1.2.4 Codec Initialization Sample Code
This section shows an example of code implementation of the Intel® HD Audio codec
initialization sequence.
;----------------------------------------------------------------------------
;
; Procedure:InitializeIntel®HDAudioCodecs
;
; Description:Initialize Intel®HDAudioCodecs by sending
; codec verbs to codecs.
;
; Input:
; ES - 0000h with 4GB limit.
; STACK- Available.
; Intel® HD Audio controller's AZBAR is initialized and enabled.
; Codec verb tables are available and defined in the
; same code segment.
;
; Output:
; CF : 1 = Codec initialization failure
; CF : 0 = Codec initialization success
;
; Registers modified:All except segment registers.
;
; Notes:
; MKF_HDAudio_BASE_ADDRESS = the value of AZBAR register
; MKF_MAX_NUM_AZAL_CODECS = 3 (max of 3 codecs supported)
; HDAudio_MMIO_STATESTS = 0Eh
; HDAudio_MMIO_IC = 60h
; HDAudio_MMIO_IR = 64h
; HDAudio_MMIO_ICS_ICB = 68h
; VerbHeaderSize = 11d
;----------------------------------------------------------------------------
InitializeHDAudioCodecs PROC NEAR PUBLIC
; ebx will always hold the Intel® HD Audio base address
mov ebx, MKF_HDAudio_BASE_ADDRESS
; ecx is the current codec address (only 15 codecs are supported in the
; Intel® HD Audio spec so only the lower 4 bits are relevant)
mov ecx, MKF_MAX_NUM_AZAL_CODECS