Commit d24b69fc authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] rc-main: allow raw protocol drivers to restrict the allowed protos

On some hardware (au0828/au8522), the hardware is broken with
regards to the initial pulse detection. So, the driver needs to
produce a fake start pulse. That limits the acceptable protocols,
as it is not possible to produce a fake pulse that would cover
all supported protocols.

So, allow the driver to explicitly set the allowed protocols.

If the driver doesn't specify, keep the old behavior.
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent cfd0c77d
...@@ -859,10 +859,9 @@ static ssize_t show_protocols(struct device *device, ...@@ -859,10 +859,9 @@ static ssize_t show_protocols(struct device *device,
if (fattr->type == RC_FILTER_NORMAL) { if (fattr->type == RC_FILTER_NORMAL) {
enabled = dev->enabled_protocols; enabled = dev->enabled_protocols;
if (dev->raw)
allowed = ir_raw_get_allowed_protocols();
else
allowed = dev->allowed_protocols; allowed = dev->allowed_protocols;
if (dev->raw && !allowed)
allowed = ir_raw_get_allowed_protocols();
} else { } else {
enabled = dev->enabled_wakeup_protocols; enabled = dev->enabled_wakeup_protocols;
allowed = dev->allowed_wakeup_protocols; allowed = dev->allowed_wakeup_protocols;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment