Use Case 5: Support Multiple Channels Audio - 3.2 English

HDMI 1.4/2.0 Transmitter Subsystem Product Guide (PG235)

Document ID
PG235
Release Date
2023-10-18
Version
3.2 English

Define: N = Number of Audio Channel

  1. Change the Audio Infoframe by setting the channel count in the API
    void XV_HdmiTxSs_SendAuxInfoframe(XV_HdmiTxSs *InstancePtr,
                                      void *AuxPtr);
    /* 2 Channel count. Audio coding type refer to stream */ 
    InstancePtr->HdmiTxPtr->Aux.Data.Byte[1] = N - 1;
  2. Set HDMI TX SS audio channels using this API:
    void XV_HdmiTxSs_SetAudioChannels(XV_HdmiTxSs *InstancePtr,
                                      u8 AudioChannels); 

    Example:

    XV_HdmiTxSs_SetAudioChannels(&HdmiTxSs, N); 
  3. To demo using example design application software, update the following section of codes in xhdmi_example.c:
    /* Enable 2-channel audio */
    XhdmiAudGen_SetEnabChannels(&AudioGen, 2);
    XhdmiAudGen_SetPattern(&AudioGen, 1, XAUD_PAT_PING);
    XhdmiAudGen_SetPattern(&AudioGen, 2, XAUD_PAT_PING);

    Example: To support eight channel audio:

    /* Enable 8-channel audio */
    XhdmiAudGen_SetEnabChannels(&AudioGen, 8);
    XhdmiAudGen_SetPattern(&AudioGen, 1, XAUD_PAT_PING);
    XhdmiAudGen_SetPattern(&AudioGen, 2, XAUD_PAT_PING);
    XhdmiAudGen_SetPattern(&AudioGen, 3, XAUD_PAT_PING);
    XhdmiAudGen_SetPattern(&AudioGen, 4, XAUD_PAT_PING);
    XhdmiAudGen_SetPattern(&AudioGen, 5, XAUD_PAT_PING);
    XhdmiAudGen_SetPattern(&AudioGen, 6, XAUD_PAT_PING);
    XhdmiAudGen_SetPattern(&AudioGen, 7, XAUD_PAT_PING);
    XhdmiAudGen_SetPattern(&AudioGen, 8, XAUD_PAT_PING);
    Note: If you enable eight channel audio in your design, only six out of eight channels are used to carry valid audio data. For the unused channels, you must pack the audio data with zeros by muting them.
      XhdmiAudGen_SetPattern(&AudioGen, 7, XAUD_PAT_MUTE);
      XhdmiAudGen_SetPattern(&AudioGen, 8, XAUD_PAT_MUTE);

    To update the audio channel allocation.

    Information can be found in Table 41 in CTA-861-H, under Audio InfoFrame Data Byte 4.

    In the API,

    void XV_HdmiTxSs_SendAuxInfoframe(XV_HdmiTxSs *InstancePtr, void *AuxPtr);

    You must set the data byte value before calculating the CRC.

    Example

    /* Channel Allocation */ 
    InstancePtr->HdmiTxPtr->Aux.Data.Byte[4] = 0x13; 

    You can choose to construct your own infoframe in the application software, and use API XV_HdmiTxSs_SendGenericAuxInfoframe to send out.