I helped a friend to compile alsavoctrl on home assistant OS a month ago. Here’s my notes, which might help you.
- Log in to the home assistant shell
- Check out the source code (or copy the files to a folder)
- Edit loguru.cpp: change LOGURU_STACKTRACES in line 97 to 0
apk add cmake make musl-dev build-base linux-headers curl-dev
cmake --clean-first -DCMAKE_EXE_LINKER_FLAGS="-static -Os" .
make
This should produce the binary that can be used in home assistant OS.