Repository navigation
Report audio nodes to libsystemd - #68
Merged
Merged
Conversation
dmdevfs now also probes every node with DMDRVI_IOCTL_AUDIO_GET_INFO (dmdrvi 2.6) and reports it to libsystemd as "audio" when the driver answers - e.g. the WM8994 codec node (dmwm8994), so a rule like [class=audio] start=player@%name can start services for it without the driver reporting anything itself. report= accepts "audio" too, and the class name is public as DMDEVFS_CLASS_AUDIO. Tests: the test driver answers the audio ioctl with audio=true; a new step checks that an audio node starts aud@<name> only under its own class, that report= limits it and that unmounting stops it. Requires dmdrvi 2.6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nr1HhezRY951yBxxTm1b65
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
dmdevfs now also probes every node with
DMDRVI_IOCTL_AUDIO_GET_INFO(dmdrvi 2.6). When the driver answers, the node is reported to libsystemd under theaudioclass, the same waydisplayandinputnodes are.This lets any driver that implements the standard audio ioctls get its services started by device rules without reporting anything itself. Example: the WM8994 codec node from dmwm8994,
/dev/wm8994:Changes
src/dmdevfs.c:DMDEVFS_REPORT_AUDIObit, probed inprobe_node_classes()report_node_added(), removed inreport_node_removed()report=and included inallinclude/dmdevfs.h: publicDMDEVFS_CLASS_AUDIO("audio").README.md: the reporting table andreport=values.CMakeLists.txt: requires dmdrvi >= 2.6, the first release with theDMDRVI_IOCTL_AUDIO_*commands (the test modules too).Nodes that don't answer the ioctl are not reported as audio, e.g. the
dmsaistream node.Tests
DMDRVI_IOCTL_AUDIO_GET_INFOwhen configured withaudio=true.mock6(audio) andmock7(audio,report=block), a[class=audio]rule and anaud@unit.dmdevfs_reports_audio_nodes:aud@<name>only under its own classreport=blocksuppresses itctest: 9/9 passed locally, includingtest_dmdevfs9/9 steps.Related: choco-technologies/dmwm8994#3, choco-technologies/dmsai#7, choco-technologies/dmod-boot#122
🤖 Generated with Claude Code
https://claude.ai/code/session_01Nr1HhezRY951yBxxTm1b65
Generated by Claude Code