How to parse Port Configuration for HDA Audio
How does HDA Audio codec declare the hardware settings required for NB or MB in audio I/O? These settings need to be determined through port configuration to determine which ports are required to do what.
When ODM/OED determines the NB or MB Spec, it will determine the requirements for Digital Microphone/Internal Speaker/Headphone port/External Microphone port, etc. HDA Codec defines that these configurations need to be announced to the system by BIOS according to the following Spec.
Suppose we use the NID 0x21 = 03211020 given by the Codec Vendor as an example to parse what this 32-bit string is doing.
Port Connectivity [1:0]: It mainly depends on whether your port is physically connected to a connector or connected to an invisible connector, etc. In our example 0 Indicates that there is a physical connector.
Location[5:0]: This refers to the position of the port you need to define now, NB or MB. In our example, 3 means it is on the left.
Default Device [3:0]: This refers to what type of device this NID 0x21 needs to be set to. In our example, it is 2, which means that this NID 0x21 is defined as a Headphone out port.
Connection Type [3:0]: This refers to the type of connector that is physically connected. According to our example, 1 indicates a 1/8'' physical Audio Jack.
Color [3:0]: This indicates the color of the connector that needs to be displayed on the GUI. In our example, 1 means that the Jack connector you display on the GUI will be black.
Misc [3:0]: This is used to indicate whether the microphone bias is supported, whether this port is used as input/output, and whether the Jack detection behavior of the Jack entity is supported. According to our example, 0 means that this Jack port only supports JD. Other biases or re-tasking are not defined.
Association [3:0]: This is used to indicate whether this port is set as a group or an independent device. In our example, 2 means that we currently set this port to Group 2
Sequence [3:0]: This is used to indicate the corresponding 2ch/4ch/5.1ch/7.1ch format. According to our example, 0 means that the model is displayed as a 2ch setting.
After the above brief explanation of the Pin configuration in the Codec verb-table, I believe this will help us understand how to define the Audio configuration on the PC.