Re: [PATCH] ALSA: hda/ca0132: Fix AE-5 strip color corruption and add on-card LED control
From: Takashi Iwai
Date: Mon Nov 16 2026 - 09:18:07 EST
On Mon, 16 Nov 2026 15:02:44 +0100,
Devin Christensen wrote:
>
> This update resolves the external WS2812 RGB LED strip color scrambling
> glitch during rapid animation updates, and adds ALSA card control
> support for the 5 on-board APA102 RGB LEDs on Sound BlasterX AE-5 cards.
>
> 1. Fix external strip color corruption:
> In ae5_strip_send_frame(), formatting repeating frame cycles across the
> 32 KB DMA buffer combined with stopping the HDA stream after an arbitrary
> 15-20 ms delay caused transmissions to be cut off mid-frame / mid-byte.
> WS2812 shift registers latch on signal low (>50 us), so terminating
> mid-byte leaves partial bits in the registers, shifting color channel
> alignments (e.g. blue/white shifting to green/purple/red) on subsequent
> frames. Fix this by populating exactly one WS2812 frame followed by the
> reset gap and zero-filling the remainder of the 32 KB buffer. Reduce
> usleep_range to 8-10 ms, which guarantees the frame has completed and
> the stream terminates cleanly during trailing silence without truncating
> active LED data.
>
> 2. Add on-card APA102 RGB LED control:
> The AE-5 and AE-5 Plus feature 5 on-board APA102 (DotStar) RGB LEDs
> providing logo and shroud illumination. These are driven directly by
> CA0113 bridge GPIO pins 2 (data) and 3 (clock) mapped through PCIe BAR2
> at MMIO offset 0x320.
> Expose the on-board LEDs through a volatile card control element:
> "AE-5 On-Card LEDs" (RW, BYTES): 15-byte RGB payload representing
> the 5 on-board LEDs (3 bytes per LED).
> Writes bit-bang the 32-bit start frame, 5 APA102 LED frames (8-bit
> brightness and 24-bit BGR color), and 32-bit end frame over GPIO pins 2
> and 3, returning the pins to idle low. Mutex serialization and runtime
> PM are shared with the external strip control.
>
> Fixes: c3e35f355fad ("ALSA: hda/ca0132: Add Sound BlasterX AE-5 external RGB LED strip support")
> Signed-off-by: Devin Christensen <dchristensen8@xxxxxxxxx>
Could you try to split the changes? I can take a small "fix" for 7.4,
but an extension would rather go to 7.5.
thanks,
Takashi