From: James Hogan <james.hogan@imgtec.com>
To: "Antti Seppälä" <a.seppala@gmail.com>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>,
<linux-media@vger.kernel.org>
Subject: Re: [RFC 0/4] rc: ir-raw: Add encode, implement NEC encode
Date: Mon, 10 Feb 2014 09:58:05 +0000 [thread overview]
Message-ID: <52F8A2AD.8040403@imgtec.com> (raw)
In-Reply-To: <CAKv9HNYxY0isLt+uZvDZJJ=PX0SF93RsFeS6PsRMMk5gqtu8kQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2348 bytes --]
Hi Antti,
On 08/02/14 11:30, Antti Seppälä wrote:
>> The first patch adds an encode callback to the existing raw ir handler
>> struct and a helper function to encode a scancode for a given protocol.
>>
>
> The mechanism used here to encode works fine as long as there is only
> one protocol selected. If there are several which all support encoding
> then there's no easy way to tell which one will be used to do the
> actual encoding.
True, I suppose it needs a wakeup_protocol sysfs file for that really (I
can't imagine a need or method to wake on multiple protocols, a
demodulating hardware decoder like img-ir can only have one set of
timings at a time, and a raw hardware decoder like nuvoton would seem
unlikely to have multiple wake match buffers - and if it did the sysfs
interface would probably need extending to take multiple
single-protocol/filter sets anyway).
This should probably be done prior to the new sysfs interface reaching
mainline, so that userland can always be expected to write the protocol
prior to the wakeup filter (rather than userland expecting the wake
protocol to follow the current protocol).
>> Finally for debug purposes patch 4 modifies img-ir-raw to loop back the
>> encoded data when a filter is altered. Should be pretty easy to apply
>> similarly to any raw ir driver to try it out.
>>
>
> I believe we have rc-loopback driver for exactly this purpose. Could
> you use it instead? Also adding the scancode filter to it would
> demonstrate its usage.
True I could have done, I used img-ir simply out of convenience and
familiarity :). Would it make sense to generate an input event when
setting the filter though, or perhaps since the whole point of the
loopback driver is presumably debug it doesn't matter?
To actually add filtering support to loopback would require either:
* raw-decoder/rc-core level scancode filtering for raw ir drivers
* OR loopback driver to encode like nuvoton and fuzzy match the IR signals.
> One other thing I noticed while reviewing your patches was that
> currently the dev->s_filter callback return value is ignored by
> store_filter. It would be useful to return an error to userspace if
> scancode storage was not possible for whatever reason.
Thanks, well spotted, I'll do a fix for that soon.
Cheers
James
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-02-10 9:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-06 19:59 [RFC 0/4] rc: ir-raw: Add encode, implement NEC encode James Hogan
2014-02-06 19:59 ` [RFC 1/4] rc: ir-raw: add scancode encoder callback James Hogan
2014-02-06 19:59 ` [RFC 2/4] rc: ir-raw: add modulation helpers James Hogan
2014-02-06 19:59 ` [RFC 3/4] rc: ir-nec-decoder: add encode capability James Hogan
2014-02-06 19:59 ` [RFC 4/4] DEBUG: rc: img-ir: raw: Add loopback on s_filter James Hogan
2014-02-08 11:30 ` [RFC 0/4] rc: ir-raw: Add encode, implement NEC encode Antti Seppälä
2014-02-08 12:07 ` [RFC PATCH 0/3] rc: add RC5-SZ encoder and utilize encoders in nuvoton-cir Antti Seppälä
2014-02-08 12:07 ` [RFC PATCH 1/3] rc-core: Add Manchester encoder (phase encoder) support to rc-core Antti Seppälä
2014-02-10 10:25 ` James Hogan
2014-02-10 19:56 ` Antti Seppälä
2014-02-08 12:07 ` [RFC PATCH 2/3] ir-rc5-sz: Add ir encoding support Antti Seppälä
2014-02-10 10:30 ` James Hogan
2014-02-10 20:09 ` Antti Seppälä
2014-02-10 20:50 ` James Hogan
2014-02-11 18:14 ` Antti Seppälä
2014-02-11 23:39 ` James Hogan
2014-02-16 17:04 ` Antti Seppälä
2014-02-27 22:43 ` James Hogan
2014-02-16 16:45 ` [RFCv2 PATCH 0/3] rc: add RC5-SZ encoder and utilize encoders in nuvoton-cir Antti Seppälä
2014-02-16 16:45 ` [RFCv2 PATCH 1/3] rc-core: Add Manchester encoder (phase encoder) support to rc-core Antti Seppälä
2014-02-16 16:45 ` [RFCv2 PATCH 2/3] ir-rc5-sz: Add ir encoding support Antti Seppälä
2014-02-16 16:45 ` [RFCv2 PATCH 3/3] nuvoton-cir: Add support for writing wakeup samples via sysfs filter callback Antti Seppälä
2014-02-08 12:07 ` [RFC " Antti Seppälä
2014-02-10 9:58 ` James Hogan [this message]
2014-02-10 19:45 ` [RFC 0/4] rc: ir-raw: Add encode, implement NEC encode Antti Seppälä
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=52F8A2AD.8040403@imgtec.com \
--to=james.hogan@imgtec.com \
--cc=a.seppala@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
/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