mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: Zelong Dong <Zelong.Dong@amlogic.com>
Cc: Neil Armstrong <neil.armstrong@linaro.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Qianggui.Song@amlogic.com, Yonghui.Yu@amlogic.com,
	kelvin.zhang@amlogic.com
Subject: Re: [PATCH 1/3] media: rc: meson-ir: support rc driver type RC_DRIVER_SCANCODE
Date: Fri, 1 Sep 2023 09:02:12 +0100	[thread overview]
Message-ID: <ZPGahNKlq/31MXbh@gofer.mess.org> (raw)
In-Reply-To: <b6e9fc91-0c99-5635-235b-76bc6db55f75@amlogic.com>

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@amlogic.com>
> > > 
> > > 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

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2023-09-01  8:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25 11:53 [PATCH 0/3] This patchset adds IR controller driver support for zelong dong
2023-08-25 11:53 ` [PATCH 1/3] media: rc: meson-ir: support rc driver type RC_DRIVER_SCANCODE zelong dong
2023-08-25 12:19   ` Neil Armstrong
2023-09-06  7:11     ` Zelong Dong
2023-09-06  7:17       ` neil.armstrong
2023-08-29  7:39   ` Sean Young
2023-08-31 12:13     ` Zelong Dong
2023-09-01  8:02       ` Sean Young [this message]
2023-09-06 10:37         ` Zelong Dong
2023-09-06 12:57           ` Sean Young
2023-08-25 11:53 ` [PATCH 2/3] dt-bindings: media: Add compatible for Meson-S4 IR Controller zelong dong
2023-08-25 12:03   ` Krzysztof Kozlowski
2023-08-25 11:53 ` [PATCH 3/3] arm64: dts: meson: add IR controller for Meson-S4 SoC zelong dong
2023-08-25 12:16   ` Neil Armstrong
2023-09-11  9:46 ` (subset) [PATCH 0/3] This patchset adds IR controller driver support for Neil Armstrong
2023-09-11 10:30   ` Sean Young
2023-09-11 10:35     ` Neil Armstrong
2023-09-11 10:40     ` Krzysztof Kozlowski
  -- strict thread matches above, loose matches on Subject: below --
2023-03-02  6:33 [PATCH 0/3] media: rc: meson-s4: support RC_DRIVER_SCANCODE driver zelong dong
2023-03-02  6:34 ` [PATCH 1/3] media: rc: meson-ir: support rc driver type RC_DRIVER_SCANCODE zelong dong
2023-03-02  9:27   ` Neil Armstrong
2023-03-03 13:37   ` Dmitry Rokosov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZPGahNKlq/31MXbh@gofer.mess.org \
    --to=sean@mess.org \
    --cc=Qianggui.Song@amlogic.com \
    --cc=Yonghui.Yu@amlogic.com \
    --cc=Zelong.Dong@amlogic.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=kelvin.zhang@amlogic.com \
    --cc=khilman@baylibre.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mchehab@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®