-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: propose helper script interface for writing rules #70
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! I like the idea of passing control of properties to a helper script. It's much better option than adding special handling for properties.
@illiliti Will this not be merged into master/main? |
I like the idea, so it is highly likely I'll merge this. Just need to sort out issues with code. |
5ec5355
to
537ce84
Compare
Addressed all comments and added an example rules script to contrib with the |
One could access parent device via |
The problem with pipewire is it enumerates the following devices
however the following is intended. card0 is missing. this is due to scan_devices working on
|
Ah! Right. Forgot about this one. Well, we could switch our enumeration approach to appease pipewire. Let's keep it for later. |
43383b5
to
4f12d0a
Compare
41a653f
to
5e8772f
Compare
char *argv[] = { argv0, NULL }; | ||
|
||
if (posix_spawn(&pid, argv0, &actions, NULL, argv, envp)) { | ||
return -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
close out_pipe and destroy actions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int ret = posix_spawn(...);
posix_spawn_file_actions_destroy(&actions);
close(out_pipe[1]);
if (ret != 0) {
close(out_pipe[0]);
return -1;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are still leaking out_pipe
and actions
here. Consider adopting the above code to fix the leak.
@illiliti any plans to merge this or work on it? |
Hopefully yes |
Proposes the use of a helper script to allow setting udev properties as a replacement for udev rules. For example setting
ACP_IGNORE=1
on the visense pcm in apple silicon macs.