Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Armbian build PR] - armbian-audio-config: Massively speed up script

Featured Replies

Description

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

How Has This Been Tested?

Copied the script onto an existing system and running it manually. Changed some mixer controls with alsamixer, ran the script an confirmed they were changed back to 100%.

Have not tested a full image build, but I cannot see how this would not work.

Checklist:

  • [X] My code follows the style guidelines of this project
  • [X] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas - N/A
  • [ ] I have made corresponding changes to the documentation - N/A
  • [X] My changes generate no new warnings
  • [ ] Any dependent changes have been merged and published in downstream modules - N/A

View the full article

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.