Weekly Progress Report: Implement Missing Greybus Protocols in Zephyr

:sparkles: Milestone Checkpoint :sparkles: : Camera Merged & Audio Foundation Complete

Before diving into the next set of technical weekly updates, I wanted to provide a quick high-level status check on the project’s milestones.

Camera Protocol tested on native_sim: 100% Merged The Greybus Camera Protocol implementation is officially merged upstream! The final polish involved migrating the subsystem to use the newly introduced video_driver_flush API, ensuring our implementation perfectly aligns with Zephyr’s latest video subsystem standards.

Audio Protocol: Core Architecture Ready With the camera wrapped, the core foundation for the Greybus Audio protocol is now built. The implementation currently supports:

  • SET_PCM (Codec configuration)
  • SET_CONTROL (Mapping Greybus properties like Volume/Mute to Zephyr APIs)
  • GET_TOPOLOGY_SIZE & GET_TOPOLOGY (Dynamic ALSA hardware map generation and strict Little-Endian memory packing)
  • ACTIVATE_TX & ACTIVATE_RX (Stream activation mapped to the internal state machine)

Dynamic ALSA Topology Handshake: Initially, I considered using a static lookup table to mock control IDs (like Volume and Mute) simply to test the SET_CONTROL parsing logic in native_sim. However, after consulting with my mentors, I pivoted to implementing the full GET_TOPOLOGY_SIZE and GET_TOPOLOGY operations. Because the Greybus specification strictly mirrors Linux ALSA, the Linux kernel expects audio hardware to dynamically report its own capabilities. By building this complete handshake, the Zephyr device dynamically constructs and transmits a compliant hardware map (DAIs, Controls, and Widgets), guaranteeing that the Linux host can automatically generate the correct soundcard and UI without relying on hardcoded assumptions.

Validation Status Implementation + Validation: All implemented audio operations are fully covered by native_sim ztest suites. The tests strictly enforce the audio state machine (e.g., rejecting ACTIVATE commands if SET_PCM hasn’t configured the device), and all tests are currently passing with 100% success.

1 Like