Skip to content

Enable GX8002 VAD audio path for EVT1#2511

Closed
wangli65535 wants to merge 5 commits intodev-nexfirmware-evt1from
feat/vad_test
Closed

Enable GX8002 VAD audio path for EVT1#2511
wangli65535 wants to merge 5 commits intodev-nexfirmware-evt1from
feat/vad_test

Conversation

@wangli65535
Copy link
Copy Markdown
Collaborator

Summary

  • Enable the GX8002 VAD-based audio path for EVT1
  • Disable the PDM microphone path in this configuration
  • Start the I2S/LC3 audio path when VAD is active
  • Stop the I2S audio path after VAD timeout
  • Add BLE/I2S diagnostics for audio path debugging
  • Update QSPI NOR and LVGL VDB settings used by the EVT1 test firmware
  • Enhance welcome screen and protobuf handling for this test path

Testing

  • Verified BLE connection and protobuf command handling on device
  • Verified VAD-triggered I2S start/stop behavior from device logs
  • Verified LC3 path only runs when the VAD/I2S path is active
  • Verified display behavior on device during local testing
  • Build not run per local workflow

Notes

This PR is intended for EVT1 GX8002 VAD path testing.

…tics

mos_i2s_slave.c — 3 bug fixes:
- Fix pingpong buffer logic: replace inverted-index selection with
  (current+1)%2 to correctly alternate RX DMA buffers and eliminate
  aliasing noise caused by re-queuing the still-active buffer
- Fix I2S SLAVE clock config: switch to PCLK32M / MCK_DISABLED /
  RATIO_32X (clock supplied by GX8002 master; MCK output must be off)
- Fix channel count: GX8002_PDM_CHANNELS 2→1 (LC3 encodes mono;
  previous value caused the encoder to receive 2x too many samples)
- Add LOG_ERR/LOG_WRN for LC3 encode failures and frame-size mismatches

main.c — BLE connection diagnostics:
- Add on_le_param_updated: logs connection interval (interval × 1.25 ms),
  latency, and supervision timeout on every parameter update event
- Add on_le_phy_updated: logs PHY mode (1M / 2M / Long Range)
- Add on_le_data_len_updated: logs TX/RX data length and air time
- Register all three callbacks in BT_CONN_CB_DEFINE

app.overlay:
- Add pinctrl-0 / pinctrl-names to the disabled pdm0 node to satisfy
  Zephyr DTS validation requirements

docs/voice_latency_customer.md (new):
- Customer-facing end-to-end voice latency analysis document
- Covers device-side breakdown (50 ms steady-state / 132 ms first-trigger),
  BLE scheduling, and phone-side playback buffer
- Includes optimization proposals (frames 5→1, BLE interval, app buffer)
  with quantified latency reduction estimates
- Added functions to manage the welcome screen state, including `display_is_welcome_screen_active` and `display_reset_protobuf_text_state`.
- Improved welcome screen initialization and state restoration logic.
- Updated `display_show_welcome_screen` to handle command enqueue failures.
- Introduced new functions to ensure the readiness of the protobuf scene and to clear current display text.
- Enhanced the handling of protobuf text updates to respect the welcome screen state.
- Added logging for better traceability of protobuf message processing.
- Integrated I2S initialization for the GX8002 driver.
- Updated protobuf handler to ignore empty DisplayText while the welcome screen is active.
- Disable CONFIG_NORDIC_QSPI_NOR_XIP to prevent execution in place.
- Increase CONFIG_LV_Z_VDB_SIZE from 40 to 42 for improved rendering performance.
@wangli65535 wangli65535 requested a review from a team as a code owner April 11, 2026 09:26
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 11, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3a298cc0-084f-44c9-9556-2481c97acb7c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/vad_test

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

📋 PR Review Helper

📱 Mobile App Build

Waiting for build...

🕶️ ASG Client Build

Waiting for build...


🔀 Test Locally

gh pr checkout 2511

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants