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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 31, 2023 at 08:13:22PM +0800, Zelong Dong wrote:
> 在 2023/8/29 15:39, Sean Young 写道:
> > On Fri, Aug 25, 2023 at 07:53:08PM +0800, zelong dong wrote:
> > > From: Zelong Dong<zelong.dong@xxxxxxxxxxx>
> > > 
> > > 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'.

This requires changing the source code, it cannot be done at runtime.

> 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         }

There are other drivers too which can do hardware decoding and software
decoding. Ideally we should have a mechanism to switch between them at
runtime, but as-is rc-core does not provide for this.

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

I did not get it, unfortunately. Any help would be appreciated, thanks.

Other than that, the driver does look fine. Nothing to hold up merging for. 
I'll apply it when I can.

Thanks,

Sean



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux