Skip to content

XU316 USB HiFi Decoder Zero-Development Product Configuration Protocol

Protocol Overview

Function Positioning and Scope

This document provides a detailed description of the configuration protocol for communication between the XU316 USB HiFi Decoder zero-development product and MCU via UART. This protocol offers a complete feature set for audio device configuration, status monitoring, and media control.

I. Protocol Foundation Specifications

1.1 Underlying Communication Protocol

Based on UART (Universal Asynchronous Receiver/Transmitter) Protocol

Parameter Value
Baud Rate 115200 bps
Data Bits 8
Parity None
Stop Bits 1
Flow Control None

1.2 Frame Format and Data Transmission

Universal Frame Format

All commands and responses follow the following frame format:

Field Bytes Description
Frame Header 2 Fixed as 0x55aa
Version 1 Protocol version number
Command Word 1 Indicates frame function
Data Length 1 Length N of subsequent data, excluding the final checksum byte
Data N Specific data content
Checksum 1 Sum of bytes starting from frame header, result modulo 256

Data Transmission Notes

All data larger than 1 byte is transmitted using big-endian mode. Sample data in the protocol is represented in hexadecimal.

1.3 Communication Mechanism

1.3.1 Acknowledgment Mechanism

Acknowledgment and Timeout Handling

  • All commands require acknowledgment from the other party
  • Default command timeout is 300ms, communication failure is assumed after timeout
  • Special commands may have different timeout periods, which will be specified in the respective command descriptions

1.3.2 Retry and Fault Tolerance Mechanism

flowchart TD
    A[Send Command] --> B{Wait for Response}
    B -->|Timeout| C[Retransmit Command]
    C --> D{Retry Count < 4?}
    D -->|Yes| B
    D -->|No| E[Use Default Configuration]
    B -->|Response Received| F[Process Response]

II. Device Startup and Initialization

2.1 Startup Interaction Flow

sequenceDiagram
    participant XU316
    participant MCU
    participant Flash

    rect
        Note over XU316,Flash: System Loader Firmware


        rect 
            Note over XU316,MCU: Power-up Startup Phase
            XU316->>MCU: Send startup command (0x00)
            Note over XU316: 
            alt Timeout without response (max 4 attempts, if no response after 4 attempts, directly enter USB->I2S mode)
                XU316->>MCU: Retransmit startup command (0x00)
            end
            MCU-->>XU316: Return startup options
            Note over XU316: Parse startup options
        end

        rect 
            Note over XU316,Flash: Basic Information Update Phase
            alt Startup option doesn't include 0x01 (don't update basic product information)
                XU316->>Flash: Read basic product information
                Flash-->>XU316: Return basic product information
            else Startup option includes 0x01 (update basic product information) or incomplete data read from Flash
                XU316->>MCU: Send read basic product information command (0x01)
                MCU-->>XU316: Return new basic product information
                XU316->>Flash: Save configuration
            end
        end

        rect 
            Note over XU316,Flash: Power-up Configuration Retrieval Phase
            alt Startup option doesn't include 0x02 (don't update power-up configuration)
                XU316->>Flash: Read power-up configuration
                Flash-->>XU316: Return power-up configuration data
            else Startup option includes 0x02 (update power-up configuration) or incomplete data read from Flash
                XU316->>MCU: Send get power-up configuration command (0x02)
                MCU-->>XU316: Return new power-up configuration
                XU316->>Flash: Save new power-up configuration
            end            
        end

        rect 
            Note over XU316: Loading Application Mode Phase
            XU316->>MCU: Send get current mode command (0x03)
            MCU-->>XU316: Return current mode
            Note over XU316: Load corresponding mode based on current mode
         end

    end

    rect 
        Note over XU316,MCU: APP Running Phase
        XU316->>MCU: Get current user configuration command (0x04)
        MCU-->>XU316: Return current user configuration
        Note over XU316: Initialize APP and apply current user configuration
        XU316->>MCU: Send startup completion command (0x05)
        MCU-->>XU316: Return completion command response
        par Parallel Processing
            loop Status Reporting
                XU316->>MCU: Status change or 15S periodic transmission
            end
            loop Business Processing
                MCU->>XU316: Send business instructions
                XU316-->>MCU: Respond to business instructions
            end
        end
    end

2.2 Detailed Startup Flow Description

  1. XU316 startup sends startup command (command word 0x00) to MCU, containing:
    • UAC1.0 VID/PID
    • UAC2.0 VID/PID
    • Basic information CRC
    • Power-up configuration information CRC
  2. MCU receives startup command, checks if information needs updating, and sends corresponding response
  3. XU316 waits for MCU response
  4. If timeout without response, XU316 retransmits startup command up to 4 times
  5. If still no response, directly load default USB configuration and enumerate USB
  6. If normal response received, XU316 parses startup options

Execution Condition: Startup option includes 0x01 (update basic product information)

Steps:

  1. XU316 sends 0x01 command to request reading basic product information
  2. MCU returns new basic product information to XU316
  3. XU316 updates and saves configuration to internal storage

Execution Condition: Startup option includes 0x02 (update power-up configuration) or incomplete data read from Flash

Steps:

  1. XU316 sends 0x02 command to request power-up configuration
  2. MCU returns new power-up configuration to XU316
  3. XU316 updates and saves configuration to internal storage

Steps:

  1. XU316 sends 0x03 command to get current input/output mode
  2. MCU returns current mode information to XU316
  3. XU316 loads corresponding input/output mode based on returned mode

Steps:

  1. XU316 sends 0x04 command to get current user configuration
  2. MCU returns current user configuration to XU316
  3. XU316 initializes application and applies related configuration
  4. XU316 sends 0x05 command to indicate startup completion
  5. MCU returns acknowledgment response

III. Protocol Command Set

3.1 Command Classification Overview

Command Word Command Description Direction
0x00 Start Startup XU316→MCU
0x01 Read Product Information XU316→MCU
0x02 Read Power-up Configuration Information XU316→MCU
0x03 Get Current Input/Output Mode XU316→MCU
0x04 Get Current User Configuration XU316→MCU
0x05 Startup Completion Command XU316→MCU
Command Word Command Description Direction
0x20 Report Application Status XU316→MCU
0x21 Media Control MCU→XU316
0x22 Report Playback Audio Stream Format and Type XU316→MCU
0x23 Set Input/Output Mode MCU→XU316
0x24 Send Playback Volume MCU→XU316
0x25 Send Recording Volume MCU→XU316
0x26 Switch MCLK MCU→XU316
Command Word Command Description Direction
0xEE HID-initiated command transmitted to MCU via XU316 XU316→MCU
Command Word Command Description Direction
0xF0 DAC Configuration Selection Command MCU→XU316

Command Usage Instructions

  1. All commands must follow basic frame format specifications
  2. Each command requires acknowledgment from the other party before being considered successfully executed
  3. Business control commands (0x20 and above) can only be used after device startup is completed

3.2 Basic Function Commands Detailed Explanation

3.2.1 Start Startup (0x00)

XU316 Sends

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x00
Command Word:   1 byte - 0x00
Data Length: 1 byte - 17
Data:    17 bytes
          B0:     Restart reason (0x00 power-up restart, 0x01 mode switch restart, 0xFF other reasons)
          B1-2:   USB Vendor ID (UAC1.0)
          B3-4:   USB Product ID (UAC1.0)
          B5-6:   USB Vendor ID (UAC2.0)
          B7-8:   USB Product ID (UAC2.0)
          B9-12:  Basic information 32bit CRC
          B13-16: Power-up configuration information 32bit CRC
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

MCU Returns

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x03
Command Word:   1 byte - 0x00
Data Length: 1 byte - 0x1
Data:    1 byte
          B0: Startup options
              0x00 Use all default information
              0x01 Need to update basic product information
              0x02 Need to update power-up configuration information
              0x04 Need to update other configuration information
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

  1. This command is sent first after XU316 power-up or restart to inform MCU that the device has started
  2. XU316 sends the currently stored product information CRC and configuration information CRC to MCU
  3. MCU determines whether to update configuration information in XU316 by comparing CRC
  4. MCU informs XU316 of subsequent operations to be performed through the startup options field in the response
flowchart TB
    A[XU316 Startup] -->B[Send 0x00 Command]
    B -->C{MCU Response}
    C -->|Timeout| D[Retransmit Command]
    D -->E{Retry Count < 4?}
    E -->|Yes| C
    E -->|No| F[Use Default Configuration]
    C -->|Normal Response| G[Parse Startup Options]
    G -->|0x01| H[Update Basic Product Information]
    G -->|0x02| I[Update Power-up Configuration Information]
    G -->|0x04| J[Update Other Configuration Information]
    G -->|0x00| K[Continue Startup Process]
  • If MCU has no response, XU316 will continue startup using stored default configuration
  • The restart reason field can be used by MCU to identify the specific reason for XU316 restart for different processing
  • When multiple pieces of information need to be updated, MCU can combine multiple options through bit operations

3.2.2 Read Product Information (0x01)

XU316 Sends

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x00
Command Word:   1 byte - 0x01
Data Length: 1 byte - 0x00
Data:    0 bytes
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

MCU Returns

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x03
Command Word:   1 byte - 0x01
Data Length: 1 byte - 0x3C (60 bytes)
Data:    60 bytes - Product basic information, see data field description for details
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

  • This command is used by XU316 to obtain basic product information, such as VID/PID, product name, etc.
  • Execution condition: Startup option includes 0x01 flag or product information CRC mismatch
  • After receiving this information, XU316 will update the internally stored basic product information

Product basic information data structure (60 bytes):

VID1 (UAC1.0):        2 bytes
PID1 (UAC1.0):        2 bytes
VID2 (UAC2.0):        2 bytes
PID2 (UAC2.0):        2 bytes
ManufactureName:     16 bytes (string)
ProductName:         16 bytes (string)
SerialNumber:        16 bytes (string)
CRC:                  4 bytes (32-bit CRC check)

3.2.3 Read Power-up Configuration Information (0x02)

XU316 Sends

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x00
Command Word:   1 byte - 0x02
Data Length: 1 byte - 0x00
Data:    0 bytes - No data
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

MCU Returns

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x03
Command Word:   1 byte - 0x02
Data Length: 1 byte - 0x0E (i.e., 14 bytes)
Data:    14 bytes - Power-up configuration information, see 4.1-Power-up Configuration Parameters
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

  • This command is used by XU316 to obtain initial power-up configuration information
  • Execution condition: Startup option includes 0x02 flag or power-up configuration CRC mismatch
  • XU316 will set default input/output mode, volume and other parameters according to this configuration information

Power-up configuration information data structure (14 bytes):

Default Input/Output Mode:          5 bytes
Mute Time:              2 bytes (0-65535ms)
Microphone Default Volume:        1 byte
DAC Left Channel Default Volume:     1 byte
DAC Right Channel Default Volume:     1 byte
CRC:                   4 bytes (32-bit CRC check)

3.2.4 Get Current Input/Output Mode (0x03)

XU316 Sends

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x00
Command Word:   1 byte - 0x03
Data Length: 1 byte - 0x00
Data:    0 bytes
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

MCU Returns

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x03
Command Word:   1 byte - 0x03
Data Length: 1 byte - 0x05 (i.e., 5 bytes)
Data:    5 bytes - Input/Output mode, see data field section
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

  • This command is used by XU316 to query the current input/output mode that needs to be enabled during startup
  • XU316 will load the corresponding application firmware based on the returned mode
  • This command is used for mode matching and confirmation during device startup process

3.2.5 Get Current User Configuration (0x04)

XU316 Sends

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x00
Command Word:   1 byte - 0x04
Data Length: 1 byte - 0x00
Data:    0 bytes
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

MCU Returns

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x03
Command Word:   1 byte - 0x04
Data Length: 1 byte - 0xE (i.e., 14 bytes)
Data:    14 bytes - User configuration parameters, see 4.1-User Configuration Parameters
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

  • This command is used by XU316 to obtain current user-selected configurations such as volume, mode, etc.
  • Executed after application firmware is loaded and before application startup
  • The application will initialize corresponding parameters based on the returned information

3.2.6 Startup Completion Command (0x05)

XU316 Sends

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x00
Command Word:   1 byte - 0x05
Data Length: 1 byte - N
Data:    N bytes
          B0: Startup status (0 startup successful, 1 mode mismatch, other values startup failed)
          B1-BN: Application runtime parameters, see 4.1-Runtime Parameters
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

MCU Returns

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x03
Command Word:   1 byte - 0x05
Data Length: 1 byte - 0x00
Data:    0 bytes
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

  • This command indicates that the XU316 startup process is completed and normal operation can begin
  • Contains startup status information to inform MCU whether startup was successful or encountered problems
  • All subsequent business commands can only be used after this command is successfully sent

3.3 Business Control Commands Detailed Explanation

Prerequisites

The following commands can only be used after XU316 startup is completed (after sending 0x05 command and receiving response)

3.3.1 Report Application Status (0x20)

XU316 Sends

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x00
Command Word:   1 byte - 0x20
Data Length: 1 byte - N
Data:    N bytes - Application runtime parameters, see 4.1-Runtime Parameters
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

MCU Returns

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x03
Command Word:   1 byte - 0x20
Data Length: 1 byte - 0x00
Data:    0 bytes
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

  • This command is used by XU316 to report current application status to MCU
  • Usually sent when status changes, such as volume changes, mode switching, etc.
  • MCU can update UI display or adjust related functions based on this information

3.3.2 Media Control (0x21)

MCU Sends

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x03
Command Word:   1 byte - 0x21
Data Length: 1 byte - 0x01 (i.e., 1 byte)
Data:    1 byte - Media control command
          0x00 Volume+ / Vol Up
          0x01 Volume- / Vol Down
          0x02 Play/Pause / PLAY/PAUSE
          0x03 Next Track / NEXT
          0x04 Previous Track / PREV
          0x05 Fast Forward / FORWARD
          0x06 Rewind / REWIND
          0x07 Mute / MUTE
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

XU316 Returns

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x00
Command Word:   1 byte - 0x21
Data Length: 1 byte - 0x00
Data:    0 bytes
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

  • This command is used by MCU to send media control instructions to XU316
  • After receiving the instruction, XU316 will convert it to corresponding HID commands and send to the computer
  • Suitable for implementing remote control or physical button control of media playback
Control Code Function USB HID Usage
0x00 Volume+ Increase system volume
0x01 Volume- Decrease system volume
0x02 Play/Pause Control media playback status
0x03 Next Track Switch to next song
0x04 Previous Track Switch to previous song
0x05 Fast Forward Fast forward in current track
0x06 Rewind Rewind in current track
0x07 Mute Toggle system mute status

3.3.3 Report Playback Audio Stream Format and Type (0x22)

XU316 Sends

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x00
Command Word:   1 byte - 0x22
Data Length: 1 byte - 0x02 (i.e., 2 bytes)
Data:    2 bytes - Audio stream format and type, see audio stream format and type fields
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

MCU Returns

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x03
Command Word:   1 byte - 0x22
Data Length: 1 byte - 0x00
Data:    0 bytes
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

  • This command is used by XU316 to report the current audio stream format and type to MCU
  • Usually sent when playback starts or format changes
  • MCU can update display based on this information, such as showing PCM/DSD/MQA/DOP status

3.3.4 Set Input/Output Mode (0x23)

MCU Sends

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x03
Command Word:   1 byte - 0x23
Data Length: 1 byte - 0x05 (i.e., 5 bytes)
Data:    5 bytes - Input/Output mode, see input/output mode fields
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

XU316 Returns

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x00
Command Word:   1 byte - 0x23
Data Length: 1 byte - 0x00
Data:    0 bytes
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

  • This command is used by MCU to request XU316 to switch to a specific input/output mode
  • Usually triggered by user operation, such as pressing mode selection button
  • XU316 may need to restart to load firmware for the new mode

3.3.5 Send Playback Volume (0x24)

MCU Sends

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x03
Command Word:   1 byte - 0x24
Data Length: 1 byte - 0x02 (i.e., 2 bytes)
Data:    2 bytes
          Byte 1: Left channel (0xFF Mute, 0-0dB, -127: -127dB)
          Byte 2: Right channel (0xFF Mute, 0-0dB, -127: -127dB)
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

XU316 Returns

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x00
Command Word:   1 byte - 0x24
Data Length: 1 byte - 0x00
Data:    0 bytes
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

  • This command is used by MCU to set the current playback volume to XU316

3.3.6 Send Recording Volume (0x25)

MCU Sends

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x03
Command Word:   1 byte - 0x25
Data Length: 1 byte - 0x01 (i.e., 1 byte)
Data:    1 byte - 0xFF Mute, 0-0dB -127: -127dB
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

XU316 Returns

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x00
Command Word:   1 byte - 0x25
Data Length: 1 byte - 0x00
Data:    0 bytes
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

  • This command is used by MCU to set the current microphone recording volume to XU316

3.3.7 Switch MCLK (0x26)

MCU Sends

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x03
Command Word:   1 byte - 0x26
Data Length: 1 byte - 1
Data:    1 byte - 0: Internal MCLK, 1: External MCLK
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

XU316 Returns

Frame Header:    2 bytes - 0x55aa
Version:    1 byte - 0x00
Command Word:   1 byte - 0x26
Data Length: 1 byte - 0
Data:    0 bytes
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

  • This command is used by XU316 to control switching of the master clock source
  • Can switch between using internal clock or external clock
  • Important for certain audio application scenarios requiring precise synchronization

3.3.8 Set unmute (0x27)

Sent by MCU

Frame Header:  2 bytes - 0x55aa
Version:       1 byte - 0x03
Command Word:  1 byte - 0x27
Data Length:   1 byte - 2
Data:          2 bytes - 
Checksum:      1 byte - Sum the bytes starting from the frame header, and take the remainder of the result divided by 256

Returned by XU316

Frame Header:  2 bytes - 0x55aa
Version:       1 byte - 0x00
Command Word:  1 byte - 0x27
Data Length:   1 byte - 0
Data:          0 bytes
Checksum:      1 byte - Sum the bytes starting from the frame header, and take the remainder of the result divided by 256

  • The unmute time delay of the DAC during mode switching, with the unit being milliseconds.

3.3.9 Time Delay for Sending Audio Format (0x28)

Sent by MCU

Frame Header:  2 bytes - 0x55aa
Version:       1 byte - 0x03
Command Word:  1 byte - 0x28
Data Length:   1 byte - 2
Data:          2 bytes - 
Checksum:      1 byte - Sum the bytes starting from the frame header, and take the remainder of the result divided by 256

Returned by XU316

Frame Header:  2 bytes - 0x55aa
Version:       1 byte - 0x00
Command Word:  1 byte - 0x28
Data Length:   1 byte - 0
Data:          0 bytes
Checksum:      1 byte - Sum the bytes starting from the frame header, and take the remainder of the result divided by 256

  • The time delay for sending the audio format.

3.3.10 Command to Get Firmware Version (0xF1)

Sent by MCU

Frame Header:  2 bytes - 0x55aa
Version:       1 byte - 0x03
Command Word:  1 byte - 0xF1
Data Length:   1 byte - 2
Data:          2 bytes - 
Checksum:      1 byte - Sum the bytes starting from the frame header, and take the remainder of the result divided by 256

Returned by XU316

Frame Header:  2 bytes - 0x55aa
Version:       1 byte - 0x00
Command Word:  1 byte - 0xF1
Data Length:   1 byte - 0
Data:          0 bytes
Checksum:      1 byte - Sum the bytes starting from the frame header, and take the remainder of the result divided by 256

  • To get the firmware version.

3.4 DAC Configuration Selection (0xF0)

Sent by MCU

Frame Header:  2 bytes - 0x55aa
Version:       1 byte - 0x03
Command Word:  1 byte - 0xF0
Data Length:   1 byte - 4
Data:        4 bytes
             Byte 0: 0: Enable I2C configuration DAC  1: Disable I2C configuration DAC
             Byte 1 - 3: reserved
Checksum:   1 byte - Sum of bytes starting from frame header, result modulo 256

XU316 Returns

Frame Header:    2 bytes - 0x55aa
Version:         1 byte - 0x00
Command Word:    1 byte - 0xF0
Data Length:     1 byte - 0
Data:            0 bytes
Checksum:        1 byte - Sum of bytes starting from frame header, result modulo 256

  • Test command used by MCU to set DAC configuration selection to XU316. Let XU316 configure DAC through DAC I2C or let MCU configure DAC itself
  • This command is product-specific and not all products support it. Please refer to product specification for specific support details.

3.5 HID and MCU Data Transparent Transmission Commands via XU316

3.5.1 HID Transparent Transmission Data to MCU via XU316 (0xEE)

XU316 Sends

Frame Header:    2 bytes - 0x55aa
Version:        1 byte - 0x00
Command Word:   1 byte - 0xEE
Data Length:    1 byte - 0x39 (57 bytes), due to HID protocol limitations, data length must be 57 bytes
Data:           57 bytes - Due to HID protocol limitations, must be 57 bytes transparent transmission data
Checksum:       1 byte - Sum of bytes starting from frame header, result modulo 256

MCU Returns (can return multiple frames)

Frame Header:    2 bytes - 0x55aa
Version:         1 byte - 0x03
Command Word:    1 byte - 0xEE
Data Length:     1 byte - 0x39 (57 bytes), due to HID protocol limitations, data length must be 57 bytes
Data:            57 bytes - Due to HID protocol limitations, must be 57 bytes transparent transmission data
Checksum:        1 byte - Sum of bytes starting from frame header, result modulo 256

  • This command is used for transparent data transmission initiated by HID to MCU via XU316
  • Generally, the transparent transmission data is MCU's OTA data or MCU data reply to HID

IV. Data Structure Definitions

4.1 Product Configuration Data Structures

Field Bytes Description
VID1 2 USB Vendor ID (UAC1.0)
PID1 2 USB Product ID (UAC1.0)
VID2 2 USB Vendor ID (UAC2.0)
PID2 2 USB Product ID (UAC2.0)
ManufactureName 16 USB Manufacture Name (string, max 16 bytes)
ProductName 16 USB Product Name (string, max 16 bytes)
SerialNumber 16 Product Serial Number (string, max 16 bytes)
CRC 4 32-bit CRC check value calculated for all fields

CRC Usage Instructions

MCU can determine whether to update basic product information based on the CRC value returned by XU316. When CRC does not match, complete basic product information should be sent.

Field Bytes Description
Default Input/Output Mode 5 See input/output mode field description
Mute Time 2 0-65535 (ms)
Microphone Default Volume 1 See microphone volume field description
DAC Left Channel Default Volume 1 See DAC volume field description
DAC Right Channel Default Volume 1 See DAC volume field description
CRC 4 32-bit CRC check value calculated for all fields
Field Bytes Description
Input/Output Mode 5 See input/output mode field description
Mute Time 2 0-65535 (ms)
Microphone Volume 1 See microphone volume field description
DAC Left Channel Volume 1 See DAC volume field description
DAC Right Channel Volume 1 See DAC volume field description
CRC 4 32-bit CRC check value calculated for all fields
Field Bytes Description
Input/Output Mode 5 See input/output mode field description
Mute Time 2 0-65535 (ms)
Microphone Volume 1 See microphone volume field description
DAC Left Channel Volume 1 See DAC volume field description
DAC Right Channel Volume 1 See DAC volume field description
CRC 4 32-bit CRC check value calculated for all fields

4.2 Input/Output Mode Data Format

Byte Function Description
BYTE 0-BYTE4 Specific value definitions refer to product specification

4.3 Control Parameter Data Format

Value Description
0x00 Power-up restart
0x01 Mode switch restart
0xFF Other reason restart
Value Description
0x00 Default mode, use power-up configuration information parameters at startup
0x01 Power-off memory mode, use user configuration parameters obtained from MCU at startup

Microphone Volume

Value Description
0xFF Mute
0x00-0xFE Volume value, specific mapping defined by application

DAC Volume

Value Description
0x00 Mute
0x01-0xFF Volume value, specific mapping defined by application
Value Format Parameter
0x00 AUDIO_PCM_44100 44.1kHz PCM
0x01 AUDIO_PCM_48000 48kHz PCM
0x02 AUDIO_PCM_88200 88.2kHz PCM
0x03 AUDIO_PCM_96000 96kHz PCM
0x04 AUDIO_PCM_176400 176.4kHz PCM
0x05 AUDIO_PCM_192000 192kHz PCM
0x06 AUDIO_PCM_352800 352.8kHz PCM
0x07 AUDIO_PCM_384000 384kHz PCM
0x08 AUDIO_PCM_705600 705.6kHz PCM
0x09 AUDIO_PCM_768000 768kHz PCM
0x0A AUDIO_PCM_1441200 1.4112MHz PCM
0x0B AUDIO_PCM_1536000 1.536MHz PCM
0x0C AUDIO_PCM_32000 32kHz PCM
0x0D AUDIO_PCM_64000 64kHz PCM
0x0E AUDIO_PCM_128000 128kHz PCM
0x0F AUDIO_PCM_256000 256kHz PCM
0x10 AUDIO_PCM_512000 512kHz PCM
0x11 AUDIO_DSD_64 DSD64
0x12 AUDIO_DSD_128 DSD128
0x13 AUDIO_DSD_256 DSD256
0x14 AUDIO_DSD_512 DSD512
0x15 AUDIO_DSD_1024 DSD1024
0x16 AUDIO_MQA_44100 44.1kHz MQA
0x17 AUDIO_MQA_88200 88.2kHz MQA
0x18 AUDIO_MQA_176400 176.4kHz MQA
0x19 AUDIO_MQA_352800 352.8kHz MQA
0x1A AUDIO_MQA_705600 705.6kHz MQA
0x1B AUDIO_MQA_1411200 1.4112MHz MQA
0x1C AUDIO_MQA_2822400 2.8224MHz MQA
0x1D AUDIO_MQA_5644800 5.6448MHz MQA
0x1E AUDIO_MQA_48000 48kHz MQA
0x1F AUDIO_MQA_96000 96kHz MQA
0x20 AUDIO_MQA_192000 192kHz MQA
0x21 AUDIO_MQA_384000 384kHz MQA
0x22 AUDIO_MQA_768000 768kHz MQA
0x23 AUDIO_MQA_1536000 1.536MHz MQA
0x24 AUDIO_MQA_3072000 3.072MHz MQA
0x25 AUDIO_MQA_6144000 6.144MHz MQA
0xFF AUDIO_NO_USED Not used
Value Type Description
0x00 PCM Standard PCM audio
0x01 DoP Reserved
0x02 MQA MQA encoded audio
0x03 MQB MQB encoded audio
0x04 MQA_Studio MQA Studio encoding
0x05 DSD Native DSD encoded audio