README: revamp to reflect recent progress

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
This commit is contained in:
James Calligeros 2023-06-11 12:46:02 +10:00
parent b07584e1fd
commit 2e853a1851
No known key found for this signature in database
GPG key ID: D43632D151F77960

View file

@ -1,41 +1,30 @@
## Asahi Linux speaker safety daemon ## Asahi Linux speaker safety daemon
This is still very much a work in progress, is probably not "proper" Rust, ## IMPORTANT
and almost definitely makes competent developers extremely sad. This software is still pre-release and not fit for use or testing on user machines. Please
do not ask for help with installing or using this software, the Pipewire configuration,
or enabling speaker output on your machine. An announcement will be made when speaker
support is ready for use.
We currently rely on a local version of the `alsa` crate, pending the merge of ## Requirements
bindings to `snd_ctl_elem_value_{read,write}` and `snd_ctl_elem_set_id`. * We currently rely on a local version of the `alsa` crate, as a release has not yet been
pushed to crates.io with the required bindings.
* A patched eleven secret herbs and spices kernel
## What works ## Todo list
* Parsing config file - [x] Data structures representing a speaker element
* All borrows seem to work fine - [x] Parsing machine-specific values from a config file
* Volume getting/setting - [x] Logging
- [x] Mixer control data structures
## Needs improvement - [x] Manipulating mixer controls
* Probably everything - [x] Retrieving V/ISENSE values
- [x] Model of voice coil/magnet temperatures
## Need to implement - [x] Ramping volume according to safety model
* Daemonise and loop - [x] Tolerate multiple sample rates
* Threading (should probably make sure it works as intended first) - [ ] Sleep reliably while playback has stopped
* Getting V/ISENSE (pending changes to the codec drivers, we have mock implementations) - [ ] Daemonise correctly
* Actually fail safe (see below) - [ ] Kernel driver interlock
- [ ] Packaging/distro-agnosticism
## On failing safe
We need a way to guarantee safety on _any_ fail condition. The TAS codecs have a safe
mode which cuts all outputs down by 18 dB. This works out to being about half their
full output capabiltiy. It might be worth having the `macaudio` driver start them
explicitly in this mode, and only unlock full output capability with an IOCTL that
can be sent by `speakersafetyd` when it's sure it has started correctly. We would
then of course also need an IOCTL to do the opposite if we encounter a runtime error.
It was suggested by someone on IRC that this would be conducive to some sort of
keepalive IOCTL, where the driver would automatically put the codecs into safe mode
if it didn't hear from us for a while. This seems like it would suck to implement.
Like any SLA, it is likely that we will never be able to guarantee 100% safety for all
nonstandard setups. The reference PipeWire DSP graph plus this should be enough for 99% of
users, but I feel at some point those who insist on using Pulse or raw ALSA are just going
to have to put up with a best effort service and accept the (small) risk of this failing.
## Sundry ## Sundry
The `alsa` crate is Copyright (c) 2015-2021 David Henningsson, and other The `alsa` crate is Copyright (c) 2015-2021 David Henningsson, and other