I am using the following library https://github.com/jgarff/rpi_ws281x to control WS281x LEDs (e.g. Pimoroni's original Unicorn HAT). You can use PWM (the default), PCM or SPI.
This worked nicely under Jessie.
Under Stretch only PWM and SPI work. Programming the PCM via DMA does not seem to work any more under Stretch. Strange hangs occur, SD card sometimes goes Read-Only.
Something is interfering with the PCM channel. Any pointers? Anything to do with the use of ALSA instead of pulse audio?
Pointers and hints appreciated.
Ton van Overbeek
PS I am the original author of the PCM and SPI support of this library.
Turned out to be a missing aligned(4) attribute for the pcm structure. This caused the gcc compiler in Stretch (6.0.3) to generate byte by byte access to the pcm registers instead of 32 bit access.
The older gcc in Jessie just produced 32 bit access code in spite of the missing attribute.