amixer: handle simple mixer event errors#1
Draft
orange-dot wants to merge 1 commit intomasterfrom
Draft
Conversation
snd_mixer_handle_events() can return negative runtime errors while amixer sevents is monitoring simple mixer events. This was reproduced during early PipeWire startup, where the handler returned -ENOENT after snd_mixer_wait() reported a ready event. The raw control event monitor already reports analogous snd_hctl_handle_events() errors instead of aborting. Handle simple mixer event errors the same way so sevents reports the error and keeps listening instead of hitting an assertion failure. Fixes: alsa-project#327 Signed-off-by: Bojan Janjatović <bojan.janjatovic@gmail.com>
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
amixer seventsassertion aftersnd_mixer_handle_events()with normal error reporting<assert.h>includeValidation
git diff --checkamixer/amixer.c+alsamixer/volume_mapping.cagainst systemlibasoundusing temporary generated headers in/tmp/tmp/alsa-utils-327-build/amixer scontrolstimeout 3s stdbuf -oL -eL /tmp/alsa-utils-327-build/amixer sevents(expected timeout exit 124, no abort)timeout 3s stdbuf -oL -eL /tmp/alsa-utils-327-build/amixer events(expected timeout exit 124, unchanged raw event path)amixer seventsprintedERR: No such file or directory (-2)and did not abortFixes: alsa-project#327