[systemd-devel] Filter/Parse NETLINK_KOBJECT_UEVENT Messages
Mantas Mikulėnas
grawity at gmail.com
Mon Sep 13 12:02:13 UTC 2021
(Added list back again)
On Mon, Sep 13, 2021 at 1:55 PM Ryan McClue <re.mcclue at protonmail.com>
wrote:
> Thank you for the response Mantas.
> If I change the nl_groups to 2, it prints libudev a handle of times and I
> then get a segfault.
> In regards to this picking up all devices: if I add/remove my Bose
> speakers connected with a stereo jack cable, this does not appear in the
> messages. Can this be detected?
>
>
Speakers aren't seen as a standalone device (the audio jack is really just
an audio jack, not a device bus). You should be able detect when speakers
are connected, but you'll do this through audio mixer events from ALSA (I'm
not sure how PulseAudio does it, but something /dev/snd/control*), or
alternatively through evdev (there's a /dev/input/event* node which
produces SW_HEADPHONE_INSERT) – but not through device uevents.
--
Mantas Mikulėnas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20210913/31c7632a/attachment.htm>
More information about the systemd-devel
mailing list