Repository navigation
Drawing on the Bose SoundTouch display directly: OLED framebuffer, clock and volume overlay (Portable spike) #1168
JRpersonal
started this conversation in
Show and tell
Replies: 2 comments 6 replies
|
ST 20 results |
5 replies
|
ST Wave results (same as ST 20) |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I spent a night on the SoundTouch Portable's display and found a way to draw on it directly. Nothing of this is in STR yet. I'm writing it down so the findings are not lost, and because it reopens two ideas that looked impossible, the clock on the display while streaming (#1098) and a track title without the audio gap (#500).
Everything below was tested on one Portable (taigan, firmware 27.0.6) only. It works in RAM only, a reboot undoes all of it, and nothing on the speaker's storage was changed.
The display is a plain Linux framebuffer
/dev/fb0, kernel driverssdspi, an OLED on SPI (spi2.0)cat /dev/fb0returns exactly what the panel shows, the standby clock includedHow BoseApp draws, and how to keep it out
BoseApp maps
/dev/fb0and renders with DirectFB. One of its 74 threads, namedDirectFBFlipTas, copies the finished picture into the framebuffer about six times a second, even in standby. Writing your own picture therefore only flashes for a moment.Overwriting faster than BoseApp works but flickers now and then. The clean way is to hold exactly that one thread with
PTRACE_SEIZEfollowed byPTRACE_INTERRUPT. No signal is involved, so the other threads keep running and playback goes on. While the thread is held, nothing but your own code touches the display, and I counted zero foreign writes in 30 seconds. When the holding process ends, the kernel releases the thread and BoseApp draws again as if nothing happened.Two other routes are closed on this speaker. The kernel has no cgroups, so there is no freezer, and stopping BoseApp is not an option because Shepherd restarts the whole speaker when it dies (
recovery="reboot").Overlays on BoseApp's own screen
While the flip thread is held, BoseApp keeps rendering into a buffer on its heap. Searching
/proc/<pid>/memfor the current frame finds it (skip the/dev/fb0mapping itself, that is the panel). Reading that buffer ten times a second, drawing on top and writing the result to the framebuffer gives a flicker-free overlay on the live screen. I tested two:Open before this could become a feature
If you own one of those other models and are comfortable with SSH on your own speaker,
cat /sys/class/graphics/fb0/virtual_sizeandcat /sys/class/graphics/fb0/bits_per_pixelwould already tell me a lot.Keywords: Bose SoundTouch Portable display hack, SoundTouch OLED framebuffer, /dev/fb0, ssdspi, DirectFB, custom display, clock on display while playing, volume on display, show track title on SoundTouch display, SoundTouch 20 / 30 / 300 / Wave display, reverse engineering, SoundTouch Reborn
All reactions