This commit is contained in:
PhatenIoT-yan
2026-03-09 16:50:37 +08:00
parent 14544eccd3
commit e469ee0144
55 changed files with 4539 additions and 417 deletions

View File

@@ -71,6 +71,32 @@ search:
| 0x8E | GET_EQ_PARAMS | Read single filter parameters | PC ↔ Device |
| 0x8F | GET_DEVICE_INFO | Get basic device information (PID/VID/SN) | PC ↔ Device |
| 0x90 | RESET_EQ_PARAMS | Reset EQ parameters (restore presets) | PC ↔ Device |
| 0x91 | GET_EQ_MODE_COUNT | Get EQ mode count information | PC ↔ Device |
| 0x92 | SET_AND_SAVE_EQ_MODE | Set and save EQ mode | PC ↔ Device |
| 0x93 | SET_VOLUME | Set device volume level | PC → Device |
| 0x94 | GET_VOLUME | Get device volume level | PC ↔ Device |
| 0x95 | GET_LED_INFO | Get LED information (index and name) | PC ↔ Device |
| 0x96 | SET_LED_SWITCH | Set LED switch | PC ↔ Device |
| 0x97 | GET_LED_SWITCH | Get LED switch status | PC ↔ Device |
| 0x98 | GET_LED_STATUS | Get LED status (RGB/display status) | PC ↔ Device |
| 0x99 | GET_LED_COUNT | Get LED total count | PC ↔ Device |
| 0x9A | GET_UAC_MODE_INFO | Get UAC mode information (count and names) | PC ↔ Device |
| 0x9B | SET_UAC_MODE | Set UAC mode | PC → Device |
| 0x9C | GET_CURRENT_UAC_MODE | Get current UAC mode | PC ↔ Device |
| 0x9D | SET_EQ_ENABLE | Set EQ enable switch | PC ↔ Device |
| 0x9E | GET_EQ_ENABLE | Get EQ enable switch | PC ↔ Device |
| 0x9F | GET_SAMPLE_FORMAT | Get sample rate and format | PC ↔ Device |
| 0xA0 | SET_GAIN_MODE | Set gain mode | PC → Device |
| 0xA1 | GET_GAIN_MODE | Get gain mode | PC ↔ Device |
| 0xA2 | SET_FILTER_MODE | Set filter mode | PC → Device |
| 0xA3 | GET_FILTER_MODE | Get filter mode | PC ↔ Device |
| 0xA4 | SET_GAME_MODE | Set game mode | PC ↔ Device |
| 0xA5 | GET_GAME_MODE | Get game mode | PC ↔ Device |
| 0xA6 | GET_FIRMWARE_VERSION | Get firmware version | PC ↔ Device |
| 0xB0 | SET_EX3D_CMD | Set EX3D command | PC ↔ Device |
| 0xB1 | GET_EX3D_CMD | Get EX3D command | PC ↔ Device |
| 0x80 | SET_UPSAMPLE | Set sampling rate upsampling | PC ↔ Device |
| 0x81 | GET_UPSAMPLE | Get sampling rate upsampling status | PC ↔ Device |
### 2.2 Detailed Command Formats
@@ -85,7 +111,7 @@ search:
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x8A |
| 3 | 1 | mode | Mode value (0-5: presets, 6-8: user, 9: Bypass) |
| 3 | 1 | mode | Mode value (0-6: presets, 7-9: user, 9: Bypass) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
#### 2.2.2 Get Current EQ Mode Information (0x8B)
@@ -248,7 +274,693 @@ search:
| 3 | 1 | status | Status code (0x00=success, 0x01=failure) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
#### 2.2.8 Get EQ Mode Count (0x91)
**Function**: Get total EQ modes and preset mode count (excluding disabled modes)
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x91 |
| 3-63 | 61 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x91 (echo) |
| 3 | 1 | total | Total modes (e.g., 0-9 means 10 modes) |
| 4 | 1 | preset_total | Preset mode count (e.g., 0-6 means 7 presets) |
| 5-63 | 59 | reserved | Reserved fields (fill with 0) |
#### 2.2.9 Set and Save EQ Mode (0x92)
**Function**: Set current EQ mode and save to Flash, automatically restored on power up
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x92 |
| 3 | 1 | mode | Mode value (e.g., 0-9; 0-6 presets, 7-9 user) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x92 (echo) |
| 3 | 1 | status | Status code (0x00=success, 0x01=failure) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
#### 2.2.10 Set Volume Level (0x93)
**Function**: Set device output volume level
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x93 |
| 3 | 1 | volume | Volume level (0-60) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
**Parameter Description**:
- Volume level range: 0-60 (total 61 levels)
- 0: Minimum volume (approx -127.5dB)
- 60: Maximum volume (0dB)
#### 2.2.11 Get Volume Level (0x94)
**Function**: Read current device volume level
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x94 |
| 3-63 | 61 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x94 (echo) |
| 3 | 1 | volume | Current volume level (0-60) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
#### 2.2.12 Get LED Information (0x95)
**Function**: Read LED index and LED name
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x95 |
| 3 | 1 | led_index | LED index (0-7) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x95 (echo) |
| 3 | 1 | led_index | LED index (0-7) |
| 4-19 | 16 | led_name | LED name (UTF-8 string) |
| 20-63 | 44 | reserved | Reserved fields (fill with 0) |
#### 2.2.13 Set LED Switch (0x96)
**Function**: Set LED switch status
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x96 |
| 3 | 1 | led_index | LED index (0-7) |
| 4 | 1 | onoff | LED switch (0=OFF, 1=ON) |
| 5-63 | 59 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x96 (echo) |
| 3 | 1 | status | Status code (0x00=success, 0x01=failure) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
#### 2.2.14 Get LED Switch Status (0x97)
**Function**: Read LED switch status
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x97 |
| 3 | 1 | led_index | LED index (0-7) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x97 (echo) |
| 3 | 1 | led_index | LED index (0-7) |
| 4 | 1 | onoff | LED switch (0=OFF, 1=ON) |
| 5-63 | 59 | reserved | Reserved fields (fill with 0) |
#### 2.2.15 Get LED Status (0x98)
**Function**: Read LED RGB color and display status
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x98 |
| 3 | 1 | led_index | LED index (0-7) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x98 (echo) |
| 3 | 1 | led_index | LED index (0-7) |
| 4 | 1 | r | R color value (0-255) |
| 5 | 1 | g | G color value (0-255) |
| 6 | 1 | b | B color value (0-255) |
| 7 | 1 | led_status | LED status (0=Off, 1=Solid, 2=Slow Flash, 3=Fast Flash, 4=Breathing) |
| 8-63 | 56 | reserved | Reserved fields (fill with 0) |
#### 2.2.16 Get LED Total Count (0x99)
**Function**: Read total number of LEDs supported by device
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x99 |
| 3-63 | 61 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x99 (echo) |
| 3 | 1 | led_total | Total LEDs |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
#### 2.2.17 Get UAC Mode Information (0x9A)
**Function**: Read UAC mode count and name list
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x9A |
| 3-63 | 61 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x9A (echo) |
| 3 | 1 | count | Total UAC modes (e.g., 2) |
| 4-11 | 8 | name0 | Mode 0 name (UTF-8, max 8 bytes) |
| 12-19 | 8 | name1 | Mode 1 name (UTF-8, max 8 bytes) |
| 20-63 | 44 | reserved | Reserved fields (fill with 0) |
#### 2.2.18 Set UAC Mode (0x9B)
**Function**: Set UAC mode (UAC1.0/UAC2.0)
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x9B |
| 3 | 1 | uac_mode | UAC mode value (0=UAC2.0, 1=UAC1.0) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
**Device Processing**:
- Note: Device will not send response after reboot
#### 2.2.19 Get Current UAC Mode (0x9C)
**Function**: Read current UAC mode and name
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x9C |
| 3-63 | 61 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x9C (echo) |
| 3 | 1 | uac_mode | Current UAC mode value (0=UAC2.0, 1=UAC1.0) |
| 4-11 | 8 | uac_name | Current UAC mode name (UTF-8, max 8 bytes) |
| 12-63 | 52 | reserved | Reserved fields (fill with 0) |
#### 2.2.20 Set EQ Enable Switch (0x9D)
**Function**: Set EQ enable switch (Enable/Disable)
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x9D |
| 3 | 1 | enable | EQ Enable (0=OFF, 1=ON) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x9D (echo) |
| 3 | 1 | status | Status code (0x00=success, 0x01=failure) |
| 4 | 1 | enable | Current EQ enable status (0=OFF, 1=ON) |
| 5-63 | 59 | reserved | Reserved fields (fill with 0) |
#### 2.2.21 Get EQ Enable Status (0x9E)
**Function**: Read current EQ enable status
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x9E |
| 3-63 | 61 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x9E (echo) |
| 3 | 1 | enable | Current EQ enable status (0=OFF, 1=ON) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
#### 2.2.22 Get Sampling Format (0x9F)
**Function**: Read current audio sampling rate and format
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x9F |
| 3-63 | 61 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x9F (echo) |
| 3-6 | 4 | samp_rate | Sampling rate (uint32, little endian, e.g., 48000) |
| 7-10 | 4 | samp_format | Sample format (uint32, little endian) |
| 11-63 | 53 | reserved | Reserved fields (fill with 0) |
#### 2.2.23 Set Gain Mode (0xA0)
**Function**: Set gain adjustment mode (input gain/output gain)
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0xA0 |
| 3 | 1 | gain_mode | Gain mode (0=Input Gain, 1=Output Gain) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
#### 2.2.24 Get Gain Mode (0xA1)
**Function**: Read current gain adjustment mode
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0xA1 |
| 3-63 | 61 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0xA1 (echo) |
| 3 | 1 | gain_mode | Current gain mode (0=Input Gain, 1=Output Gain) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
#### 2.2.25 Set Filter Mode (0xA2)
**Function**: Set DAC filter mode
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0xA2 |
| 3 | 1 | filter_mode | Filter mode value (0-7) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
**Filter Mode Definitions**:
- 0: Minimum Phase filter (default)
- 1: Linear Phase Apodizing Fast Roll-off filter
- 2: Linear phase fast roll-off filter
- 3: Linear Phase Fast Roll-off low-ripple filter
- 4: Linear phase slow roll-off filter
- 5: Minimum phase fast roll-off filter
- 6: Minimum phase slow roll-off filter
- 7: Minimum Phase Fast Roll-Off Low Dispersion
#### 2.2.26 Get Filter Mode (0xA3)
**Function**: Read current DAC filter mode
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0xA3 |
| 3-63 | 61 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0xA3 (echo) |
| 3 | 1 | filter_mode | Current filter mode (0-7) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
#### 2.2.27 Set Game Mode (0xA4)
**Function**: Set game mode
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0xA4 |
| 3 | 1 | game_mode | Game mode (0=No effect, 1=FPS, 2=Virtual 7.1) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
#### 2.2.28 Get Game Mode (0xA5)
**Function**: Read current game mode
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0xA5 |
| 3-63 | 61 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0xA5 (echo) |
| 3 | 1 | game_mode | Current game mode (0=No effect, 1=FPS, 2=Virtual 7.1) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
#### 2.2.29 Get Firmware Version (0xA6)
**Function**: Read device firmware version (BCD format)
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0xA6 |
| 3-63 | 61 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0xA6 (echo) |
| 3 | 1 | major_bcd | Major version (BCD, e.g. 0x01 means 1) |
| 4 | 1 | minor_bcd | Minor version (BCD, e.g. 0x00 means 0) |
| 5 | 1 | patch_bcd | Patch version (BCD, e.g. 0x0C means 12) |
| 6-63 | 58 | reserved | Reserved fields (fill with 0) |
**Version Format Description**:
- Version uses BCD (Binary Coded Decimal) format
- Example: `0x01 0x00 0x0C` represents version `1.0.12`
#### 2.2.30 Set EX3D Command (0xB0)
**Function**: Send EX3D set command, encapsulating all EX3D SET commands
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0xB0 |
| 3-6 | 4 | ex3d_cmd | EX3D command code (includes SET flag, refer to ex3d_protocol.md) |
| 7-10 | 4 | param1 | Parameter 1 (depends on EX3D command) |
| 11-14 | 4 | param2 | Parameter 2 (depends on EX3D command) |
| 15-18 | 4 | param3 | Parameter 3 (depends on EX3D command) |
| 19-63 | 45 | reserved | Reserved or extended parameters |
**EX3D Command Code Description**:
- Base command range: 0x80-0x94
- SET command format: `Base Command & ~0x0100` (clear 9th bit)
- Supported SET commands:
- 0x81: CMD_OPEN (Open EX3D)
- 0x82: CMD_ONOFF (Set EX3D Switch)
- 0x83: CMD_ANGLE (Set Angle)
- 0x84: CMD_SOUND_FIELD (Set Sound Field)
- 0x85: CMD_MUTE (Set Mute)
- 0x86: CMD_ON_GAIN (Set On Gain)
- 0x87: CMD_LMT_THRESHOLD (Set Limiter Threshold)
- 0x88: CMD_UPMIX (Set Upmix)
- 0x89: CMD_LFE (Set LFE Gain)
- 0x8A: CMD_OFF_GAIN (Set Off Gain)
- 0x8E: CMD_LMT_ATTACKK_TIME (Set Limiter Attack Time)
- 0x8F: CMD_LMT_RELEASE_TIME (Set Limiter Release Time)
- 0x90: CMD_TEST_CANCEL (Cancel Test)
- 0x91: CMD_TEST_STEP (Test Step)
- 0x92: CMD_TEST_ROTATE (Test Rotate)
- 0x93: CMD_EXPAND_GAIN (Set Expand Gain)
- 0x94: CMD_REDUCE_GAIN (Set Reduce Gain)
**Device Processing**:
- Parses EX3D command code, extracts base command and parameters
- Calls corresponding EX3D handler (hid_receive_task_in_c)
- Executes setting operation based on command type
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0xB0 (echo) |
| 3 | 1 | status | Status code (0x00=success, 0x01=failure) |
| 4-7 | 4 | ex3d_cmd | EX3D command code (echo) |
| 8-11 | 4 | result | Return value (some commands return 0xFFFFFFFF for parameter error) |
| 12-63 | 52 | reserved | Reserved fields |
**Usage Instructions**:
- This command unifies all EX3D setting commands
- Parameter format consistent with original EX3D protocol
- For detailed EX3D command descriptions, refer to ex3d_protocol.md
#### 2.2.31 Get EX3D Command (0xB1)
**Function**: Read EX3D parameters, encapsulating all EX3D GET commands
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0xB1 |
| 3-6 | 4 | ex3d_cmd | EX3D command code (includes GET flag, refer to ex3d_protocol.md) |
| 7-10 | 4 | param1 | Parameter 1 (depends on EX3D command, e.g., channel, index) |
| 11-63 | 53 | reserved | Reserved or extended parameters |
**EX3D Command Code Description**:
- Base command range: 0x80-0x94
- GET command format: `Base Command | 0x0100` (set 9th bit)
- Supported GET commands:
- 0x180: CMD_CH_NUM (Get Channel Count)
- 0x182: CMD_ONOFF (Get EX3D Switch)
- 0x183: CMD_ANGLE (Get Angle)
- 0x184: CMD_SOUND_FIELD (Get Sound Field)
- 0x185: CMD_MUTE (Get Mute)
- 0x186: CMD_ON_GAIN (Get On Gain)
- 0x187: CMD_LMT_THRESHOLD (Get Limiter Threshold)
- 0x188: CMD_UPMIX (Get Upmix)
- 0x189: CMD_LFE (Get LFE Gain)
- 0x18A: CMD_OFF_GAIN (Get Off Gain)
- 0x18B: CMD_SOUND_FIELD_NUM (Get Sound Field Count)
- 0x18C: CMD_SOUND_FIELD_NAME (Get Sound Field Name)
- 0x18D: CMD_LEVEL (Get Level)
- 0x18E: CMD_LMT_ATTACKK_TIME (Get Limiter Attack Time)
- 0x18F: CMD_LMT_RELEASE_TIME (Get Limiter Release Time)
- 0x193: CMD_EXPAND_GAIN (Get Expand Gain)
- 0x194: CMD_REDUCE_GAIN (Get Reduce Gain)
**Device Processing**:
- Parses EX3D command code, extracts base command and parameters
- Calls corresponding EX3D handler (hid_receive_task_in_c)
- Returns current parameter value
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0xB1 (echo) |
| 3-6 | 4 | ex3d_cmd | EX3D command code (echo) |
| 7-10 | 4 | result1 | Result 1 (depends on command) |
| 11-14 | 4 | result2 | Result 2 (some commands need multiple results, e.g. angle, multi-channel data) |
| 15-18 | 4 | result3 | Result 3 (extended result, e.g. multi-channel data) |
| 19-63 | 45 | reserved | Other results or padding (max 14 uint32 values, total < 63 bytes) |
**Return Value Description**:
- Return value count and format depend on specific EX3D command
- Single value command: returns 1 uint32
- Multi-value command (e.g. angle): returns multiple uint32
- String command (e.g. sound field name): first returns length (uint32), then string data
- For detailed return formats, refer to ex3d_protocol.md
**Usage Instructions**:
- This command unifies all EX3D reading commands
- Parameter format consistent with original EX3D protocol
- For detailed EX3D command descriptions, refer to ex3d_protocol.md
#### 2.2.32 Set Sampling Rate Upsampling (0x80)
**Function**: Set device sampling rate upsampling switch
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x80 |
| 3 | 1 | upsample | Upsample status (0=Disable, 1=Enable) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
**Parameter Description**:
- Upsample status: 0=Disable upsampling, 1=Enable upsampling
**Return Value**:
No direct return value. To confirm upsampling status, use GET_UPSAMPLE (0x81).
#### 2.2.33 Get Sampling Rate Upsampling (0x81)
**Function**: Read device current sampling rate upsampling status
**Request Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x81 |
| 3-63 | 61 | reserved | Reserved fields (fill with 0) |
**Response Format (64 bytes)**:
| Offset | Length | Field Name | Description |
|:----:|:----:|:------:|:----:|
| 0 | 1 | report_id | Fixed value: 0x01 |
| 1 | 1 | sync_header | Sync header: 0x77 |
| 2 | 1 | cmd_header | Command header: 0x81 (echo) |
| 3 | 1 | upsample | Current upsample status (0=Disabled, 1=Enabled) |
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
## 3. Data Flow and Timing :material-timeline-clock:
@@ -283,7 +995,7 @@ search:
**Hardware Limitations**
- **Filter Count**: Fixed at 8 filters (MAX_EQ_BANDS = 8)
- **Mode Count**: 0-5 are preset modes, 6-8 are user modes, 9 is Bypass mode
- **Mode Count**: 0-6 are preset modes, 7-9 are user modes, 9 is Bypass mode (Note: Mode 9 is typically Bypass, check specific device config)
- **Sample Rate Support**: 44.1kHz, 48kHz, 88.2kHz, 96kHz, 176.4kHz, 192kHz (device capability, independent of protocol fields)
**Parameter Ranges**
@@ -308,10 +1020,11 @@ search:
| 3 | Jazz | Optimized for jazz music | Preset Mode |
| 4 | Vocal | Vocal enhancement | Preset Mode |
| 5 | Bass Boost | Bass enhancement | Preset Mode |
| 6 | User 1 | User-defined mode 1 | User Mode |
| 7 | User 2 | User-defined mode 2 | User Mode |
| 8 | User 3 | User-defined mode 3 | User Mode |
| 9 | Bypass | EQ function bypass | Special Mode |
| 6 | 3D Game | Optimized for gaming spatial audio | Preset Mode |
| 7 | User 1 | User-defined mode 1 | User Mode |
| 8 | User 2 | User-defined mode 2 | User Mode |
| 9 | User 3 | User-defined mode 3 | User Mode |
| 10 | Bypass | EQ function bypass | Special Mode |
!!! info "Mode Characteristics"
- **Preset Modes**: Factory presets, non-modifiable, optimized for specific music genres

File diff suppressed because it is too large Load Diff

View File

@@ -612,7 +612,7 @@ sequenceDiagram
#### 3.3.5 Send Playback Volume (0x24)
=== "Command Format"
**MCU Sends**
**XU316 Returns**
```
Frame Header: 2 bytes - 0x55aa
Version: 1 byte - 0x03
@@ -624,7 +624,7 @@ sequenceDiagram
Checksum: 1 byte - Sum of all bytes from frame header, modulo 256
```
**XU316 Returns**
**MCU Sends**
```
Frame Header: 2 bytes - 0x55aa
Version: 1 byte - 0x00
@@ -924,46 +924,30 @@ sequenceDiagram
| 0x01-0xFF | Volume value, specific mapping defined by application |
=== "Audio Stream Format"
| Value | Format | Parameters |
| Value | Format | Sample Rate |
|-------|-------------------|-----------------|
| 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 |
| 0x00 | AUDIO_44100 | 44.1kHz |
| 0x01 | AUDIO_48000 | 48kHz |
| 0x02 | AUDIO_88200 | 88.2kHz |
| 0x03 | AUDIO_96000 | 96kHz |
| 0x04 | AUDIO_176400 | 176.4kHz |
| 0x05 | AUDIO_192000 | 192kHz |
| 0x06 | AUDIO_352800 | 352.8kHz |
| 0x07 | AUDIO_384000 | 384kHz |
| 0x08 | AUDIO_705600 | 705.6kHz |
| 0x09 | AUDIO_768000 | 768kHz |
| 0x0A | AUDIO_1441200 | 1.4112MHz |
| 0x0B | AUDIO_1536000 | 1.536MHz |
| 0x0C | AUDIO_32000 | 32kHz |
| 0x0D | AUDIO_64000 | 64kHz |
| 0x0E | AUDIO_128000 | 128kHz |
| 0x0F | AUDIO_256000 | 256kHz |
| 0x10 | AUDIO_512000 | 512kHz |
| 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 |
=== "Audio Type"