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.
Backports http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=
d24b69fc6b0a
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
if (dev->driver_type == RC_DRIVER_SCANCODE ||
fattr->type == RC_FILTER_WAKEUP)
allowed = dev->allowed_protocols[fattr->type];
- else if (dev->raw)
- allowed = ir_raw_get_allowed_protocols();
- else {
+ else if (dev->raw) {
+ allowed = dev->allowed_protocols[fattr->type];
+ if (!allowed)
+ allowed = ir_raw_get_allowed_protocols();
+ } else {
mutex_unlock(&dev->lock);
return -ENODEV;
}