Repository navigation
Conversation
PipeWire's ALSA udev plugin looks for the sound card objects and uses only those carrying the SOUND_INITIALIZED property, which udev sets once alsactl has restored the card. Add two patches: one synthesises the property for sound card devices, as libudev-zero already does with ID_INPUT for input devices; the other makes the enumerator scan /sys/class/<subsystem> for every subsystem the caller matched, without duplicates, since /sys/dev lists only class members with a device node and the card objects have none. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
openwrt-ai
reviewed
Nov 11, 2026
| + list_entry = udev_list_entry_get_next(&udev_enumerate->subsystem_match); | ||
| + | ||
| + while (list_entry) { | ||
| + snprintf(class_path, sizeof(class_path), "/sys/class/%s", udev_list_entry_get_name(list_entry)); |
Collaborator
There was a problem hiding this comment.
Subsystem matches are fnmatch() patterns (filter_subsystem() at udev_enumerate.c:105-111), so a glob match such as sound* builds a literal /sys/class/sound* path, scandir() fails silently, and node-less class members are still missed. Optional: scan /sys/class and fnmatch() each entry against the pattern instead. PipeWire's literal sound match is unaffected, so this does not block the merge.
Generated by Claude Code
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.
📦 Package Details
Maintainer: @dangowrt
Description:
PipeWire's ALSA udev plugin builds its device list from the sound card objects (
/sys/class/sound/cardN) and uses only those carrying theSOUND_INITIALIZEDproperty, which udev's 78-sound-card rule sets once alsactl has restored the card. With libudev-zero, PipeWire therefore offers only a dummy output. This adds two libudev-zero patches:udev_devicesynthesisesSOUND_INITIALIZEDfor sound card devices, the way libudev-zero already synthesisesID_INPUTfor input devices, andudev_enumeratealso scans/sys/class/<subsystem>for every subsystem the caller matched, without duplicates, since/sys/devlists only class members with a device node and the card objects have none. Upstream has open pull requests by others for the same two points, illiliti/libudev-zero#69 and illiliti/libudev-zero#71; these patches have not been submitted there.PipeWire itself is in #30683.
LLM use: the patches, the commit message and this description were written with an LLM coding agent working under my direction, which also ran the test below on my device.
🔬 Run Testing Details
wpctl statuslists the es8316 and both HDMI sound cards as sinks, and Kodi's audio device list shows them; without the patches PipeWire offered only its dummy output.✅ Formalities
messages.
If your PR contains a patch:
git am