Create and add a HDA verb table module to a congatec BIOS (AN20)

From conga-wiki
Affected Products All congatec x86 CPU modules

Preface

By definition, the HDA codec is on the carrier board and application specific. Therefore, the congatec embedded BIOS of CPU modules does not contain verb table initialization for HDA codecs. However, OEMs may add these verb tables by themselves. This application note provides information and examples how to create and add HDA verb table modules into the BIOS of CPU modules.

Terminology

Term Description
HDA High Definition Audio – The specification can be downloaded from www.intel.com
POST Power-on Self-Test - a diagnostic testing sequence run by a computer’s BIOS as the computer’s power is initially turned on. The POST will determine if the computer’s RAM, disk drives, peripheral devices and other hardware components are properly working.
CGUTIL congatec System Utility – universal tool for BIOS updates and BIOS modifications.
CGOS congatec Operating System API – software driver for the congatec Embedded Features

Introduction

HDA verbs are used to configure codec-specific functions not provided by the codec-specific OS driver. Follow this application note to create and add a verb table into the congatec embedded BIOS. The congatec embedded BIOS will write the verbs from the verb table into the HDA codec during early BIOS POST.


Note:

Contact your HDA codec vendor for information about the codec-specific verbs for your desired functions and the required circuitry modifications. This information is outside the scope of this application note and congatec support in general. congatec does not create nor test codec specific verbs, verb tables, and sample circuits.

Requirements

The following driver and applications are required:

  • CGOS driver (version ≥ 1.02.014)
  • CGUTIL
  • Hex editor of your choice

You can download the CGOS driver and CGUTIL from the congatec website www.congatec.com

Creating an HDA Verb Table

Layout of an OEM HDA Verb Table Module

Bytes 0-7: $OEMHDA$ (1st table start tag in 'readable' format)
DWORD codec vendor and device ID

(high word: vendor, low word: device; FFFFFFFF means ignore ID)

DWORD length of verb table in DWORDs

including 4 DWORDs for start tag, ID and size

DWORD data 0 (Verb0)
DWORD data 1 (Verb1)
DWORD :
DWORD :
DWORD data n (Verb n)
Bytes 0-7 $OEMHDA$ (2nd table start tag in 'readable' format)
DWORD codec vendor and device ID (FFFFFFFF means ignore ID)
DWORD length of verb table in DWORDs

including 4 DWORDs for start tag, ID and size

DWORD data 0 (Verb 0)
DWORD data 1 (Verb 1)
DWORD :
DWORD :
DWORD data n (Verb n)

Structure of Single Data (Verb)

There are two verb types consisting of the following parts:

CodecID (CID NodeID (NID) VerbID (VID) Payload
Bits 31:28 27:20 19:16 15:0
Bits 31:28 27:20 19:8 7:0

Following, an example with both types for Realtek ALC888 codec:

Create and add a HDA verb table module to a congatec BIOS (Ergänzung).png

For information about the availability of verbs for your chosen HDA codec, refer to the manufacturer's datasheet or contact the manufacturer's technical support.

Example in Hexadecimal Spelling

To prepare the examples from above, switch the byte order in every DWORD right after the start tag. This means, the number of DWORDS (9) must be noted as 09 00 00 00 hex

The first verb 00 17 0A 00 hex must be converted to 00 0A 17 00 hex and so on.

Use a hex editor of your choice to generate a binary file as shown below and save this with your desired file name (for example: OEM1VerbTable.bin).

Create and add a HDA verb table module to a congatec BIOS (001).png

Adding an HDA Verb Table to a BIOS ROM File

The following steps describe how to create an OEM HDA verb table module and add it to a BIOS ROM file using the congatec System Utility on a Windows 7 host system.

Create and add a HDA verb table module to a congatec BIOS (002).png


  1. Start the congatec System Utility.
  2. Select "BIOS File".
  3. Click on "Select Input BIOS File"
Create and add a HDA verb table module to a congatec BIOS (003).png
  1. Open the original BIOS binary file.
Create and add a HDA verb table module to a congatec BIOS (004).png
  1. Click on "Select original / Create new BIOS file."
  1. Enter a file name (in this example: OEMBIOS1.BIN)

Note:

Changes are only applied to this file. The original BIOS binary file will remain unchanged.

Create and add a HDA verb table module to a congatec BIOS (005).png
  1. Click on "BIOS Module Modification" at the CGUTIL main menu.
  2. Click on "Create Module" at the BIOS Module Modification menu.
Create and add a HDA verb table module to a congatec BIOS (006).png
  1. Open the binary verb table file created in section [Create and add a HDA verb table module to a congatec BIOS (AN020)
  2. Example in Hexadecimal Spelling#
Create and add a HDA verb table module to a congatec BIOS (007).png
  1. Select "OEM HDA Verb Table" from the "Module Type" drop down list.

Note:

To distinguish between multiple verb tables/revisions, it is possible to add a “Module ID" and “Module Revision" for each “OEM HDA Verb Table" module.

  1. Click on "Create Module".
Create and add a HDA verb table module to a congatec BIOS (008).png
  1. Enter a module file name (in this example: OEM1VerbTable.mod).
  2. Click on "Save" to create the OEM HAD verb table BIOS module.
Create and add a HDA verb table module to a congatec BIOS (009).png
  1. Click on "Add Module".
Create and add a HDA verb table module to a congatec BIOS (010).png
  1. Open the module created in step 13 (in this example: OEM1VerbTable.mod).
Create and add a HDA verb table module to a congatec BIOS (011).png

Note:

The designated OEM HDA Verb Table module must be visible in the list of “Current BIOS Modules".

  1. Assign your OEM BIOS a unique name by entering the OEM name into the "OEM BIOS Version" field (in this example: OEMBIOS1)
  2. Click on “Apply” to save the changes to the OEM BIOS binary file.
“Changes successfully applied” will be displayed in red letters in the text box above the “Apply” button.
  1. Click on "Close" at the "BIOS Module Modification" window.
  2. Click on "Close" at the main window of the congatec System Utility.

For more information about the BIOS update process, refer to the BIOS_Update_(AN01) application note.