mirror of
https://github.com/ivabus/speakersafetyd
synced 2024-11-22 16:25:06 +03:00
README: revamp to reflect recent progress
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
This commit is contained in:
parent
b07584e1fd
commit
2e853a1851
1 changed files with 23 additions and 34 deletions
57
README.md
57
README.md
|
@ -1,41 +1,30 @@
|
|||
## Asahi Linux speaker safety daemon
|
||||
|
||||
This is still very much a work in progress, is probably not "proper" Rust,
|
||||
and almost definitely makes competent developers extremely sad.
|
||||
## IMPORTANT
|
||||
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
|
||||
bindings to `snd_ctl_elem_value_{read,write}` and `snd_ctl_elem_set_id`.
|
||||
## Requirements
|
||||
* 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
|
||||
* Parsing config file
|
||||
* All borrows seem to work fine
|
||||
* Volume getting/setting
|
||||
|
||||
## Needs improvement
|
||||
* Probably everything
|
||||
|
||||
## Need to implement
|
||||
* Daemonise and loop
|
||||
* Threading (should probably make sure it works as intended first)
|
||||
* Getting V/ISENSE (pending changes to the codec drivers, we have mock implementations)
|
||||
* Actually fail safe (see below)
|
||||
|
||||
## 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.
|
||||
## Todo list
|
||||
- [x] Data structures representing a speaker element
|
||||
- [x] Parsing machine-specific values from a config file
|
||||
- [x] Logging
|
||||
- [x] Mixer control data structures
|
||||
- [x] Manipulating mixer controls
|
||||
- [x] Retrieving V/ISENSE values
|
||||
- [x] Model of voice coil/magnet temperatures
|
||||
- [x] Ramping volume according to safety model
|
||||
- [x] Tolerate multiple sample rates
|
||||
- [ ] Sleep reliably while playback has stopped
|
||||
- [ ] Daemonise correctly
|
||||
- [ ] Kernel driver interlock
|
||||
- [ ] Packaging/distro-agnosticism
|
||||
|
||||
## Sundry
|
||||
The `alsa` crate is Copyright (c) 2015-2021 David Henningsson, and other
|
||||
|
|
Loading…
Reference in a new issue