mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
* armbian-audio-config: Massively speed up script
This script calls amixer to set various mixer volumes, by simply trying
a bunch of mixer names for each sound card in the system. In practice,
this meant the amixer command was called 158 times for each sound card.
The overhead of all these forks and probably also amixer startup added
together to produce a noticable slowdown in startup.
For example on an Orange Pi PC, the script took about 6 seconds per
soundcard. This was on a system with a few extra USB soundcards (6 alsa
cards in total):
$ time bash ./armbian-audio-config.original
real 0m35.662s
user 0m20.145s
sys 0m15.145s
This commit modifies the script to spawn amixer only once per alsa card,
passing all the mixer set commands through stdin. This pretty much
completely kills the slowdown. On the same 6-card system:
$ time bash ./armbian-audio-config
real 0m0.406s
user 0m0.345s
sys 0m0.229s
* armbian-audio-config: Add quotes to fix lint errors
| folder | function |
|---|---|
| armbian | kernel deb packaging scripts |
| blobs | |
| bsp | |
| bsp-cli | common files which are copied in armbian-cli-* package |
| bsp-desktop | common files which are copied in armbian-desktop-* package |
| extras-buildpkgs |