Add Linux support and external LED strip control for Creative SoundBlaster AE-5 / AE-5 Plus

Resolves #2378

Summary of Changes

This MR implements full Linux support for the Creative Sound BlasterX AE-5 and AE-5 Plus (PCI vendor ID 0x1102, device ID 0x0012), including both on-card lighting and the external addressable RGB header.

Hardware Protocol & Transport Details

The AE-5 features a dual-zone lighting architecture requiring two distinct transport methods:

  1. Zone 0: Internal On-Card LEDs (5x APA102 DotStar)

    • The on-card LEDs are driven by SPI bit-banging via a GPIO register located at offset 0x320 of the card's PCIe Base Address Register 2 (BAR2).
    • The Linux controller maps BAR2 directly via /dev/mem (preferred) or the sysfs resource2 file.
  2. Zone 1: Addressable RGB Header (External WS2812B Strip)

    • The external strip is driven autonomously by the CA0113 PCIe-to-HDA bridge chip.
    • The CA0113 sniffs designated HDA link DMA streams (tagged via BAR2 0x104) and serializes the 24-bit GRB audio stream payload into precision 800 kHz single-wire NRZ pulses output on the 3-pin ARGB header.
    • On Linux, this is exposed by the snd-hda-codec-ca0132 kernel driver sysfs interface (ae5_strip_leds and ae5_strip_num_leds).
    • The controller uses an asynchronous background worker thread to dispatch external strip writes, preventing the ~16 ms WS2812 frame transmission from stalling OpenRGB's shared device-update loop.

Key Controller Improvements

  • Cross-Platform Support: Common logic is shared in RGBController_CreativeSoundBlasterAE5_Windows_Linux.cpp/h across Windows and Linux.
  • Dynamic Resizing: Zone 1 (Addressable Header) supports dynamic resizing from 1 to 100 LEDs, automatically synchronizing the new count to ae5_strip_num_leds.
  • Bug Fix: Fixed an issue in DeviceConfigureZone where configuring Zone 0 would overwrite the external strip LED count with the internal count (5).
  • Fast-Path Latency Optimization: DeviceUpdateZoneLEDs(0) and DeviceUpdateSingleLED fast-path internal Zone 0 updates (<0.2 ms) without waiting on external strip serialization.
  • Stack Buffer Optimization: UpdateLEDRange utilizes a fixed stack buffer for typical LED counts (<= 128 LEDs) to avoid per-frame heap allocations during 60 FPS animation playback.
  • Direct Mode Only: Conforms to OpenRGB standards by providing hardware Direct mode, leaving software animation generation to the OpenRGB Effects Plugin.

Testing & Hardware Verification

  • Verified on physical Creative Sound BlasterX AE-5 hardware on Linux.
  • Validated external strip WS2812B waveform timing and protocol compliance using a Saleae logic analyzer at 24 MS/s.
  • Verified independent zone control, dynamic resizing (10 leds -> 7 leds -> 10 leds), and continuous 60 FPS streaming via OpenRGB Effects Plugin and SDK.
Edited by Devin Christensen

Merge request reports

Loading
Loading