Re: [GIT PULL for v5.18-rc1] media updates

Sean Young
2022-05-25T08:49:43Z

[-- Attachment #1: Type: text/plain, Size: 379 bytes --]

On Wed, May 25, 2022 at 10:09:38AM +0200, Jiri Slaby wrote:
> Be it umaintained or not, it's still in distributions (the above is from
> opensuse build system) and it is broken now. Every single distributor now
> would have to go and fix this.

I am happy to help out with this issue, since lircd upstream does not accept
patches. I've attached a patch for your perusal.

Sean

[-- Attachment #2: lirc.patch --]
[-- Type: text/x-diff, Size: 1899 bytes --]

diff --git a/daemons/lircd.cpp b/daemons/lircd.cpp
index 4cceab7e..9f4ee0cc 100644
--- a/daemons/lircd.cpp
+++ b/daemons/lircd.cpp
@@ -488,9 +488,8 @@ static int setup_hardware(void)

if (curr_driver->fd != -1 && curr_driver->drvctl_func) {
if ((curr_driver->features & LIRC_CAN_SET_REC_CARRIER)
- || (curr_driver->features & LIRC_CAN_SET_REC_TIMEOUT)
- || (curr_driver->features & LIRC_CAN_SET_REC_FILTER)) {
- ret = setup_frequency() && setup_timeout();
+ || (curr_driver->features & LIRC_CAN_SET_REC_TIMEOUT)) {
+ ret = setup_frequency() && setup_timeout();
}
}
return ret;
@@ -2180,13 +2177,6 @@ void loop(void)
const char* button_name;
int reps;

- if (curr_driver->drvctl_func
- && (curr_driver->features & LIRC_CAN_NOTIFY_DECODE)
- ) {
- curr_driver->drvctl_func(DRVCTL_NOTIFY_DECODE,
- NULL);
- }
-
get_release_data(&remote_name, &button_name, &reps);

input_message(message, remote_name, button_name, reps);
diff --git a/tools/lirc-lsplugins.cpp b/tools/lirc-lsplugins.cpp
index ba67a3cb..6251ac65 100644
--- a/tools/lirc-lsplugins.cpp
+++ b/tools/lirc-lsplugins.cpp
@@ -57,8 +57,7 @@
"# c: LIRC_CAN_SET_SEND_CARRIER\n" \
"# d: LIRC_CAN_SET_SEND_DUTY_CYCLE\n" \
"# t: LIRC_CAN_SET_TRANSMITTER_MASK\n" \
- "# C: LIRC_CAN_MEASURE_CARRIER\n" \
- "# D: LIRC_CAN_NOTIFY_DECODE\n"
+ "# C: LIRC_CAN_MEASURE_CARRIER\n"

const struct option options[] = {
{ "plugindir", required_argument, NULL, 'U' },
@@ -303,8 +302,7 @@ static void format_features(struct driver* hw, line_t* line)
get(LIRC_CAN_SET_SEND_CARRIER, 'c', hw),
get(LIRC_CAN_SET_SEND_DUTY_CYCLE, 'd', hw),
get(LIRC_CAN_SET_TRANSMITTER_MASK, 't', hw),
- get(LIRC_CAN_MEASURE_CARRIER, 'C', hw),
- get(LIRC_CAN_NOTIFY_DECODE, 'D', hw)
+ get(LIRC_CAN_MEASURE_CARRIER, 'C', hw)
);
line->features = strdup(buff);
}