Thread (18 messages) 18 messages, 4 authors, 2023-09-11

Re: [PATCH 1/3] media: rc: meson-ir: support rc driver type RC_DRIVER_SCANCODE

From: Zelong Dong <hidden>
Date: 2023-08-31 12:14:19
Also in: linux-amlogic, linux-devicetree, linux-media

在 2023/8/29 15:39, Sean Young 写道:
On Fri, Aug 25, 2023 at 07:53:08PM +0800, zelong dong wrote:
quoted
From: Zelong Dong<redacted>

Meson IR Controller supports hardware decoder in Meson-S4 and later
SoC. So far, protocol NEC could be decoded by hardware decoder.
On Meson-S4, only the hardware decoder for NEC can be used using this
driver. Does the Meson-S4 hardware support software decoding? If
software decoding could be used, then any protocol could be supported,
not just NEC.

Also, out of interest, is there are documentation available for this
hardware?

Thanks,

Sean
Yes, IR driver still supports SW decoding on Meson-S4. The decode mode 
could be changed by 'support_hw_decoder'.
If IR Controller works in SW decoding, driver will be registered by 
RC_DRIVER_IR_RAW and allows all protocol.
Otherwise, driver will be registered by RC_DRIVER_SCANCODE and only 
allows NEC.

489         if (ir->rc->driver_type == RC_DRIVER_IR_RAW) {
490                 ir->rc->allowed_protocols = RC_PROTO_BIT_ALL_IR_DECODER;
491                 ir->rc->rx_resolution = MESON_RAW_TRATE;
492                 ir->rc->min_timeout = 1;
493                 ir->rc->timeout = IR_DEFAULT_TIMEOUT;
494                 ir->rc->max_timeout = 10 * IR_DEFAULT_TIMEOUT;
495         } else if (ir->rc->driver_type == RC_DRIVER_SCANCODE) {
496                 ir->rc->allowed_protocols = RC_PROTO_BIT_NEC;
497                 ir->rc->change_protocol = meson_ir_hw_decoder_init;
498         }

Do you get Meson-S4 datasheet? Please refer to chapter 13.5 Infrared Remote.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help