Designates a device that can be queried for the current configuration. Some
devices lack this ability so we rely on the caller to upload a known
configuration to the device before we can really proceed.
Set by default, devices without that capability should be the exception, not
the norm.
This patch just adds the capability, actual handling for this needs to be
added when we add the first device without this capability.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
We don't shut down once activated but that doesn't mean we need to run when
never requested.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Now that we clean up properly, the most common crash should be fixed. Restart
on abort by default so ideally all we need to do is restart piper or whatever
consumes the API.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This configure.ac is largely a copy from systemd so it included things that we
don't use locally.
- we don't use grep, awk or ln
- AC_SYS_LARGEFILE and AC_CANONICAL_HOST are unecessary
- pkg.m4 - if that's missing you don't have pkgconfig installed. stop trying
to build things then :)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
On the G9 the response to a 0x63 is a short report. The G9 does
not have individual resolutions for X and Y and thus only needs
to report a single value.
The set version of 0x63 should probably also be updated. However,
while my testing of such a change worked better than with long
reports there are still strange side effects of setting resolution,
like turning off all the LED's. LGS also seems to do a full profile
read/write instead of using 0x63 when changing the resolution.
Exporting just the filename requires the caller to know where that file sits.
That's useful for things like e.g. icons where callers may several sets to
chose from but here most callers will just use the default svg provided by
libratbag.
Export that, so that we don't have build-time dependencies in the callers just
for that single path.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
It's a lot easier to interact with ratbagd from a python script than it is
with C code. Plus this means we test the bindings whenever we use ratbagctl.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The G303 shares the same profile than the G402/G502. The only difference
is an extension at the end of the profile, but they are compatible.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Mostly inherited from our zalloc() implementation. But really,
if you have no memory left, should you be trying to talk to receivers?
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>