update
hid 协议更新
This commit is contained in:
@@ -20,7 +20,7 @@ search:
|
||||
## Protocol Overview :material-file-document-outline:
|
||||
|
||||
!!! abstract "Functional Scope and Purpose"
|
||||
This document provides detailed specifications for the communication protocol between XMOS EQ HID devices and PC-based GUI software. The protocol offers a complete feature set for EQ mode control, parameter configuration, and device information retrieval.
|
||||
This document provides detailed specifications for the communication protocol between XMOS EQ HID devices and PC-based GUI software. The protocol offers a complete feature set for EQ mode control, parameter configuration, device information retrieval, and firmware upgrade.
|
||||
|
||||
## 1. Protocol Foundation Specification :material-connection:
|
||||
|
||||
@@ -102,10 +102,15 @@ search:
|
||||
| 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 |
|
||||
| 0xA7 | SET_EQ_BAND_COUNT | Set EQ band count | PC → Device |
|
||||
| 0xA8 | GET_EQ_BAND_COUNT | Get EQ band count | PC ↔ Device |
|
||||
| 0xB0 | SET_EX3D_CMD | Set EX3D command | PC ↔ Device |
|
||||
| 0xB1 | GET_EX3D_CMD | Get EX3D command | PC ↔ Device |
|
||||
| 0xA7 | FIRMWARE_UPGRADE_START | Start firmware upgrade | PC → Device |
|
||||
| 0xA8 | FIRMWARE_UPGRADE_DATA | Transfer firmware data block | PC → Device |
|
||||
| 0xA9 | FIRMWARE_UPGRADE_END | Finish firmware upgrade | PC → Device |
|
||||
| 0xAA | FIRMWARE_UPGRADE_STATUS | Get upgrade status | PC ↔ Device |
|
||||
| 0xAB | FIRMWARE_UPGRADE_ABORT | Abort firmware upgrade | PC → Device |
|
||||
| 0xAC | FIRMWARE_UPGRADE_ERASE | Erase upgrade image | PC → Device |
|
||||
| 0xAE | DEVICE_REBOOT | Reboot device | PC → Device |
|
||||
| 0xB3 | SET_EQ_BAND_COUNT | Set EQ band count | PC → Device |
|
||||
| 0xB4 | GET_EQ_BAND_COUNT | Get EQ band count | PC ↔ Device |
|
||||
| 0x80 | SET_UPSAMPLE | Set sampling rate upsampling | PC → Device |
|
||||
| 0x81 | GET_UPSAMPLE | Get sampling rate upsampling status | PC ↔ Device |
|
||||
|
||||
@@ -358,6 +363,16 @@ search:
|
||||
- Volume level range: 0-60 (total 61 levels)
|
||||
- 0: Minimum volume (approx -127.5dB)
|
||||
- 60: Maximum volume (0dB)
|
||||
- Approximate attenuation change of 2dB per step
|
||||
|
||||
**Device Processing**:
|
||||
|
||||
- Parameter is automatically saved to Flash through the existing timed save mechanism
|
||||
- If the value is out of range (`>60`), firmware rejects the setting and returns false
|
||||
|
||||
**Return Value**:
|
||||
|
||||
No direct return value. To confirm whether the volume was set successfully, use GET_VOLUME (0x94).
|
||||
|
||||
#### 2.2.11 Get Volume Level (0x94)
|
||||
|
||||
@@ -485,6 +500,18 @@ search:
|
||||
| 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) |
|
||||
|
||||
**LED Status Enumeration**:
|
||||
|
||||
- 0: `LED_STATUS_OFF` (Off)
|
||||
- 1: `LED_STATUS_SOLID` (Solid)
|
||||
- 2: `LED_STATUS_SLOW_BLINK` (Slow Blink)
|
||||
- 3: `LED_STATUS_FAST_BLINK` (Fast Blink)
|
||||
- 4: `LED_STATUS_BREATHE` (Breathing)
|
||||
|
||||
!!! note
|
||||
- RGB values are converted from the current LED color definition (active low)
|
||||
- LED status is determined from the current display mode (solid/blinking)
|
||||
|
||||
#### 2.2.16 Get LED Total Count (0x99)
|
||||
|
||||
**Function**: Read total number of LEDs supported by device
|
||||
@@ -572,7 +599,7 @@ search:
|
||||
| 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) |
|
||||
| 4-11 | 8 | 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)
|
||||
@@ -620,12 +647,13 @@ search:
|
||||
| 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) |
|
||||
| 3 | 1 | enable | EQ enable switch status (0=OFF, 1=ON) |
|
||||
| 4 | 1 | saved_mode | Saved mode value (0-9, 0xFF means not saved) |
|
||||
| 5-63 | 59 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
#### 2.2.22 Get Sampling Format (0x9F)
|
||||
|
||||
**Function**: Read current audio sampling rate and format
|
||||
**Function**: Read current sample rate, DSD mode, and DAC sampling resolution
|
||||
|
||||
**Request Format (64 bytes)**:
|
||||
|
||||
@@ -643,13 +671,19 @@ search:
|
||||
| 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) |
|
||||
| 3-6 | 4 | sample_rate | Sampling rate (uint32, little endian, unit: Hz) |
|
||||
| 7 | 1 | dsd_mode | DSD mode (0=PCM, 1=DOP, 2=Native DSD) |
|
||||
| 8-62 | 55 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
**Automatic Report Mechanism**:
|
||||
|
||||
- The device monitors sample rate and DSD mode changes internally
|
||||
- When those values change, the device automatically builds a `0x9F` response packet and reports it through the HID status report
|
||||
- The host can receive these automatic status changes through HID `GET_REPORT`
|
||||
|
||||
#### 2.2.23 Set Gain Mode (0xA0)
|
||||
|
||||
**Function**: Set gain adjustment mode (input gain/output gain)
|
||||
**Function**: Set gain mode (low impedance/high impedance)
|
||||
|
||||
**Request Format (64 bytes)**:
|
||||
|
||||
@@ -658,9 +692,18 @@ search:
|
||||
| 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) |
|
||||
| 3 | 1 | gain_mode | Gain mode (0=Low impedance, 1=High impedance) |
|
||||
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
**Parameter Description**:
|
||||
|
||||
- 0: Low impedance mode (suitable for high-sensitivity headphones)
|
||||
- 1: High impedance mode (suitable for high-impedance headphones)
|
||||
|
||||
**Return Value**:
|
||||
|
||||
No direct return value. To confirm whether the gain mode was set successfully, use GET_GAIN_MODE (0xA1).
|
||||
|
||||
#### 2.2.24 Get Gain Mode (0xA1)
|
||||
|
||||
**Function**: Read current gain adjustment mode
|
||||
@@ -681,7 +724,7 @@ search:
|
||||
| 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) |
|
||||
| 3 | 1 | gain_mode | Current gain mode (0=Low impedance, 1=High impedance) |
|
||||
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
#### 2.2.25 Set Filter Mode (0xA2)
|
||||
@@ -709,6 +752,10 @@ search:
|
||||
- 6: Minimum phase slow roll-off filter
|
||||
- 7: Minimum Phase Fast Roll-Off Low Dispersion
|
||||
|
||||
**Return Value**:
|
||||
|
||||
No direct return value. To confirm whether the filter mode was set successfully, use GET_FILTER_MODE (0xA3).
|
||||
|
||||
#### 2.2.26 Get Filter Mode (0xA3)
|
||||
|
||||
**Function**: Read current DAC filter mode
|
||||
@@ -734,7 +781,7 @@ search:
|
||||
|
||||
#### 2.2.27 Set Game Mode (0xA4)
|
||||
|
||||
**Function**: Set game mode
|
||||
**Function**: Set game sound effect mode
|
||||
|
||||
**Request Format (64 bytes)**:
|
||||
|
||||
@@ -746,6 +793,16 @@ search:
|
||||
| 3 | 1 | game_mode | Game mode (0=No effect, 1=FPS, 2=Virtual 7.1) |
|
||||
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
**Game Mode Definitions**:
|
||||
|
||||
- 0: No effect (standard stereo)
|
||||
- 1: FPS mode (enhanced positional awareness)
|
||||
- 2: Virtual 7.1 (surround sound effect)
|
||||
|
||||
**Return Value**:
|
||||
|
||||
No direct return value. To confirm whether the game mode was set successfully, use GET_GAME_MODE (0xA5).
|
||||
|
||||
#### 2.2.28 Get Game Mode (0xA5)
|
||||
|
||||
**Function**: Read current game mode
|
||||
@@ -789,17 +846,185 @@ search:
|
||||
| 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) |
|
||||
| 3 | 1 | major | Major version (BCD format) |
|
||||
| 4 | 1 | minor | Minor version (BCD format) |
|
||||
| 5 | 1 | patch | Patch version (BCD format) |
|
||||
| 6-63 | 58 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
**Version Format Description**:
|
||||
|
||||
- Version uses BCD (Binary Coded Decimal) format
|
||||
- 3 bytes represent: major version, minor version, patch version
|
||||
- Example: `0x01 0x00 0x0C` represents version `1.0.12`
|
||||
|
||||
#### 2.2.30 Set EQ Band Count (0xA7)
|
||||
#### 2.2.30 Start Firmware Upgrade (0xA7)
|
||||
|
||||
**Function**: Start the firmware upgrade process, send firmware size, and get upgrade parameters
|
||||
|
||||
**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: 0xA7 |
|
||||
| 3-6 | 4 | fw_size | Firmware size (bytes, uint32, little endian) |
|
||||
| 7-63 | 57 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
**Response Format (64 bytes, unsolicited report)**:
|
||||
|
||||
| Offset | Length | Field Name | Description |
|
||||
|:----:|:----:|:------:|:----:|
|
||||
| 0 | 1 | sync_header | Sync header: 0x77 |
|
||||
| 1 | 1 | cmd_header | Command header: 0xA7 |
|
||||
| 2 | 1 | status | Status code (0x00=success, 0x01=failure, 0x03=invalid size) |
|
||||
| 3-6 | 4 | aligned_size | Actual page-aligned size (uint32, little endian) |
|
||||
| 7-8 | 2 | total_blocks | Total block count (uint16, little endian) |
|
||||
| 9-63 | 55 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
#### 2.2.31 Transfer Firmware Data Block (0xA8)
|
||||
|
||||
**Function**: Transfer one firmware data block. Each block is fixed at 57 bytes.
|
||||
|
||||
**Request Format (64 bytes)**:
|
||||
|
||||
| Offset | Length | Field Name | Description |
|
||||
|:----:|:----:|:------:|:----:|
|
||||
| 0 | 1 | sync_header | Sync header: 0x77 |
|
||||
| 1 | 1 | cmd_header | Command header: 0xA8 |
|
||||
| 2-3 | 2 | block_num | Block index (starts from 0, uint16, little endian) |
|
||||
| 4 | 1 | data_len | Data length (fixed at 57) |
|
||||
| 5-61 | 57 | data | Firmware data (57 bytes) |
|
||||
| 62 | 1 | checksum | Checksum (sum of bytes 0-61 mod 256) |
|
||||
|
||||
**Response Format (64 bytes, unsolicited report)**:
|
||||
|
||||
| Offset | Length | Field Name | Description |
|
||||
|:----:|:----:|:------:|:----:|
|
||||
| 0 | 1 | sync_header | Sync header: 0x77 |
|
||||
| 1 | 1 | cmd_header | Command header: 0xA8 |
|
||||
| 2 | 1 | status | Status code (0x00=success, 0x04=invalid block number, 0x05=checksum error) |
|
||||
| 3-4 | 2 | ack_block | Acknowledged block index (uint16, little endian) |
|
||||
| 5-63 | 59 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
#### 2.2.32 Finish Firmware Upgrade (0xA9)
|
||||
|
||||
**Function**: Complete firmware transfer and verify image integrity
|
||||
|
||||
**Request Format (64 bytes)**:
|
||||
|
||||
| Offset | Length | Field Name | Description |
|
||||
|:----:|:----:|:------:|:----:|
|
||||
| 0 | 1 | sync_header | Sync header: 0x77 |
|
||||
| 1 | 1 | cmd_header | Command header: 0xA9 |
|
||||
| 2-5 | 4 | fw_size | Total firmware size for verification (uint32, little endian) |
|
||||
| 6-63 | 58 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
**Response Format (64 bytes, unsolicited report)**:
|
||||
|
||||
| Offset | Length | Field Name | Description |
|
||||
|:----:|:----:|:------:|:----:|
|
||||
| 0 | 1 | sync_header | Sync header: 0x77 |
|
||||
| 1 | 1 | cmd_header | Command header: 0xA9 |
|
||||
| 2 | 1 | status | Status code (0x00=success, 0x01=failure) |
|
||||
| 3-63 | 61 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
#### 2.2.33 Get Upgrade Status (0xAA)
|
||||
|
||||
**Function**: Query upgrade state, progress, and received block count
|
||||
|
||||
**Request Format (64 bytes)**:
|
||||
|
||||
| Offset | Length | Field Name | Description |
|
||||
|:----:|:----:|:------:|:----:|
|
||||
| 0 | 1 | sync_header | Sync header: 0x77 |
|
||||
| 1 | 1 | cmd_header | Command header: 0xAA |
|
||||
| 2-63 | 62 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
**Response Format (64 bytes, unsolicited report)**:
|
||||
|
||||
| Offset | Length | Field Name | Description |
|
||||
|:----:|:----:|:------:|:----:|
|
||||
| 0 | 1 | sync_header | Sync header: 0x77 |
|
||||
| 1 | 1 | cmd_header | Command header: 0xAA |
|
||||
| 2 | 1 | status | Upgrade state (0=idle, 1=preparing, 2=transferring, 3=finalizing, 4=completed, 5=error, 6=aborted) |
|
||||
| 3-4 | 2 | received_blocks | Received block count (uint16, little endian) |
|
||||
| 5-6 | 2 | total_blocks | Total block count (uint16, little endian) |
|
||||
| 7-8 | 2 | written_pages | Written page count (uint16, little endian) |
|
||||
| 9-10 | 2 | total_pages | Total page count (uint16, little endian) |
|
||||
| 11-14 | 4 | received_bytes | Received byte count (uint32, little endian) |
|
||||
| 15-18 | 4 | total_bytes | Total byte count (uint32, little endian) |
|
||||
| 19 | 1 | error_code | Error code |
|
||||
| 20-63 | 44 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
**Upgrade State Enumeration**:
|
||||
|
||||
- 0: `IDLE`
|
||||
- 1: `PREPARING`
|
||||
- 2: `TRANSFERRING`
|
||||
- 3: `FINALIZING`
|
||||
- 4: `COMPLETED`
|
||||
- 5: `ERROR`
|
||||
- 6: `ABORTED`
|
||||
|
||||
#### 2.2.34 Abort Firmware Upgrade (0xAB)
|
||||
|
||||
**Function**: Abort the current upgrade process and optionally erase transferred data
|
||||
|
||||
**Request Format (64 bytes)**:
|
||||
|
||||
| Offset | Length | Field Name | Description |
|
||||
|:----:|:----:|:------:|:----:|
|
||||
| 0 | 1 | sync_header | Sync header: 0x77 |
|
||||
| 1 | 1 | cmd_header | Command header: 0xAB |
|
||||
| 2 | 1 | erase_flag | Cleanup flag (0x00=keep data, 0x01=erase data) |
|
||||
| 3-63 | 61 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
**Response Format (64 bytes, unsolicited report)**:
|
||||
|
||||
| Offset | Length | Field Name | Description |
|
||||
|:----:|:----:|:------:|:----:|
|
||||
| 0 | 1 | sync_header | Sync header: 0x77 |
|
||||
| 1 | 1 | cmd_header | Command header: 0xAB |
|
||||
| 2 | 1 | status | Status code (0x00=success) |
|
||||
| 3-63 | 61 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
#### 2.2.35 Erase Upgrade Image (0xAC)
|
||||
|
||||
**Function**: Erase the existing upgrade image stored in Flash
|
||||
|
||||
**Request Format (64 bytes)**:
|
||||
|
||||
| Offset | Length | Field Name | Description |
|
||||
|:----:|:----:|:------:|:----:|
|
||||
| 0 | 1 | sync_header | Sync header: 0x77 |
|
||||
| 1 | 1 | cmd_header | Command header: 0xAC |
|
||||
| 2-63 | 62 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
**Response Format (64 bytes, unsolicited report)**:
|
||||
|
||||
| Offset | Length | Field Name | Description |
|
||||
|:----:|:----:|:------:|:----:|
|
||||
| 0 | 1 | sync_header | Sync header: 0x77 |
|
||||
| 1 | 1 | cmd_header | Command header: 0xAC |
|
||||
| 2 | 1 | status | Status code (0x00=success) |
|
||||
| 3-63 | 61 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
#### 2.2.36 Device Reboot (0xAE)
|
||||
|
||||
**Function**: Reboot the device immediately
|
||||
|
||||
**Request Format (64 bytes)**:
|
||||
|
||||
| Offset | Length | Field Name | Description |
|
||||
|:----:|:----:|:------:|:----:|
|
||||
| 0 | 1 | sync_header | Sync header: 0x77 |
|
||||
| 1 | 1 | cmd_header | Command header: 0xAE |
|
||||
| 2-63 | 62 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
**Response**: No response. The device reboots immediately.
|
||||
|
||||
#### 2.2.37 Set EQ Band Count (0xB3)
|
||||
|
||||
**Function**: Set EQ band count. Supports dynamic switching among 8/16/24/32 bands to control how many DSP cores participate in processing.
|
||||
|
||||
@@ -809,14 +1034,22 @@ search:
|
||||
|:----:|:----:|:------:|:----:|
|
||||
| 0 | 1 | report_id | Fixed value: 0x01 |
|
||||
| 1 | 1 | sync_header | Sync header: 0x77 |
|
||||
| 2 | 1 | cmd_header | Command header: 0xA7 |
|
||||
| 3 | 1 | band_count | EQ band count (8=Core0 only, 16=Core0+Core1, 24=Core0+Core1+Core2, 32=all 4 cores) |
|
||||
| 2 | 1 | cmd_header | Command header: 0xB3 |
|
||||
| 3 | 1 | band_count | EQ band count (8/16/24/32) |
|
||||
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
**EQ Band Count Definitions**:
|
||||
|
||||
- 8: Only Core0 participates in processing
|
||||
- 16: Core0 + Core1 participate in processing
|
||||
- 24: Core0 + Core1 + Core2 participate in processing
|
||||
- 32: All 4 cores participate in processing
|
||||
|
||||
**Device Processing**:
|
||||
|
||||
- Only accepts 8, 16, 24, 32; other values are rejected
|
||||
- Saved to Flash (independent file `eq_band_cnt`) and restored on power-up
|
||||
- After setting, parameters are synchronized to `tile1`; cores not participating in processing on `tile1` pass audio through in bypass mode
|
||||
|
||||
**Response Format (64 bytes)**:
|
||||
|
||||
@@ -824,12 +1057,12 @@ search:
|
||||
|:----:|:----:|:------:|:----:|
|
||||
| 0 | 1 | report_id | Fixed value: 0x01 |
|
||||
| 1 | 1 | sync_header | Sync header: 0x77 |
|
||||
| 2 | 1 | cmd_header | Command header: 0xA7 (echo) |
|
||||
| 2 | 1 | cmd_header | Command header: 0xB3 (echo) |
|
||||
| 3 | 1 | status | Status code (0x00=success, 0x01=failure) |
|
||||
| 4 | 1 | band_count | Current EQ band count (8/16/24/32) |
|
||||
| 5-63 | 59 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
#### 2.2.31 Get EQ Band Count (0xA8)
|
||||
#### 2.2.38 Get EQ Band Count (0xB4)
|
||||
|
||||
**Function**: Read current EQ band count
|
||||
|
||||
@@ -839,7 +1072,7 @@ search:
|
||||
|:----:|:----:|:------:|:----:|
|
||||
| 0 | 1 | report_id | Fixed value: 0x01 |
|
||||
| 1 | 1 | sync_header | Sync header: 0x77 |
|
||||
| 2 | 1 | cmd_header | Command header: 0xA8 |
|
||||
| 2 | 1 | cmd_header | Command header: 0xB4 |
|
||||
| 3-63 | 61 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
**Response Format (64 bytes)**:
|
||||
@@ -848,146 +1081,11 @@ search:
|
||||
|:----:|:----:|:------:|:----:|
|
||||
| 0 | 1 | report_id | Fixed value: 0x01 |
|
||||
| 1 | 1 | sync_header | Sync header: 0x77 |
|
||||
| 2 | 1 | cmd_header | Command header: 0xA8 (echo) |
|
||||
| 2 | 1 | cmd_header | Command header: 0xB4 (echo) |
|
||||
| 3 | 1 | band_count | Current EQ band count (8/16/24/32) |
|
||||
| 4-63 | 60 | reserved | Reserved fields (fill with 0) |
|
||||
|
||||
#### 2.2.32 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.33 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.34 Set Sampling Rate Upsampling (0x80)
|
||||
#### 2.2.39 Set Sampling Rate Upsampling (0x80)
|
||||
|
||||
**Function**: Set device sampling rate upsampling switch
|
||||
|
||||
@@ -1009,7 +1107,7 @@ search:
|
||||
|
||||
No direct return value. To confirm upsampling status, use GET_UPSAMPLE (0x81).
|
||||
|
||||
#### 2.2.35 Get Sampling Rate Upsampling (0x81)
|
||||
#### 2.2.40 Get Sampling Rate Upsampling (0x81)
|
||||
|
||||
**Function**: Read device current sampling rate upsampling status
|
||||
|
||||
@@ -1054,6 +1152,13 @@ No direct return value. To confirm upsampling status, use GET_UPSAMPLE (0x81).
|
||||
3. Device prepares response data
|
||||
4. GUI reads response
|
||||
|
||||
#### 3.1.4 Firmware Upgrade Flow
|
||||
1. GUI sends FIRMWARE_UPGRADE_START command (0xA7) with firmware size
|
||||
2. Device returns the page-aligned size and total block count
|
||||
3. GUI loops on FIRMWARE_UPGRADE_DATA command (0xA8) to transfer firmware blocks
|
||||
4. After transfer completes, GUI sends FIRMWARE_UPGRADE_END command (0xA9)
|
||||
5. Device verifies image integrity and returns status
|
||||
|
||||
### 3.2 Timing Requirements and Constraints
|
||||
|
||||
!!! warning "Timing Requirements"
|
||||
@@ -1087,7 +1192,7 @@ No direct return value. To confirm upsampling status, use GET_UPSAMPLE (0x81).
|
||||
| 0 | JAZZ | Jazz music optimization | Preset Mode |
|
||||
| 1 | POP | Pop music optimization | Preset Mode |
|
||||
| 2 | ROCK | Rock music optimization | Preset Mode |
|
||||
| 3 | ClASIC | Classical music optimization | Preset Mode |
|
||||
| 3 | CLASSIC | Classical music optimization | Preset Mode |
|
||||
| 4 | R&B | Rhythm & blues optimization | Preset Mode |
|
||||
| 5 | 3A Game | AAA game audio optimization | Preset Mode |
|
||||
| 6 | FPS | FPS game audio optimization | Preset Mode |
|
||||
|
||||
2379
zh/docs/dev_doc/protocols/XMOS_EQ_HID_Protocol.md → zh/docs/dev_doc/protocols/XMOS_EQ_HID_Protoco.md
Normal file → Executable file
2379
zh/docs/dev_doc/protocols/XMOS_EQ_HID_Protocol.md → zh/docs/dev_doc/protocols/XMOS_EQ_HID_Protoco.md
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user