Fix ALSA hardware volume control being too sensitive#186
Merged
maximmaxim345 merged 2 commits intomainfrom Mar 17, 2026
Merged
Conversation
…e curve Two changes to reduce excessive volume sensitivity: 1. ALSA volume: Add -M (mapped volume) flag to all amixer calls. Without this flag, amixer maps percentages linearly to the raw hardware range, which on DACs with wide dB ranges (e.g. HiFiBerry, USB interfaces) causes 90% to map to a much lower perceived loudness than expected. With -M, percentages map to perceptual loudness. 2. Software volume: Change the power curve from (v/100)^1.5 to linear (v/100). The protocol's delta-based group volume mechanism already adjusts player volumes proportionally, so the power curve compounds the reduction and makes low player volumes inaudible too quickly. https://claude.ai/code/session_01V1qvDy6hSsJtytm5PVeygU
The (v/100)^1.5 power curve is perceptually correct — restore it. The volume sensitivity issue is in the ALSA raw-percentage mapping, not the software volume path. https://claude.ai/code/session_01V1qvDy6hSsJtytm5PVeygU
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the ALSA volume backend to use amixer’s mapped-volume mode so that 0–100% volume values align with ALSA’s dB-mapped scaling, and adjusts tests to match the updated command invocations.
Changes:
- Add
-Mtoamixerinvocations used for playback capability probing, setting volume, and reading volume. - Update ALSA volume controller tests to assert the new
amixer -M ...argument order.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
sendspin/alsa_volume.py |
Adds -M to amixer calls so volume set/get uses mapped percentage semantics. |
tests/test_alsa_volume.py |
Updates expected subprocess argument tuples to include -M for set/get flows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-M(mapped volume) flag to allamixercalls in the ALSA volume controller-M,amixermaps percentages linearly to the raw hardware register range, which on DACs with wide dB ranges (e.g. HiFiBerry, USB interfaces) causes a given percentage to sound much quieter than expected-M, percentages use perceptual (dB-aware) mapping so that90%actually sounds like 90% loudness