common UI for changing volume / switching audio output
#132 (closed) is about automatically switching between speakers and headphones. How about we make it possible to switch manually, too? That could be useful in case the automatic detection does not work for some devices, or if you simply want to switch to speaker without removing your headphones.
I propose that we catch the acpi events of the volume up and down buttons, make them change the volume, but additionally display a simple UI which does the following:
- display the current volume (both in percent and as "amount of waveforms")
- display the currently active output (speakers or headphone)
- has a "switch output" button to manually toggle between both
- (depends on #135 (closed): has a settings button that goes to postmarketOS audio settings)
Here's some concept art. The first two images are for landscape resolutions. The photo below is for portrait mode. This is a rough draft to illustrate what I mean - as with all other issues, feel free to discuss!
Note that most mobile UIs will likely bring their own volume controls, which we would need to override then (patching them out should be simple). I think this is better handled by postmarketOS, because each of these devices has a complicated alsa interface (the n900 has >200 settings in there for example), and we could nicely abstract the exact commands needed to switch the output in the device package (see #132 (closed)). I wonder what @bshah thinks about this specifically