From: Andy Walls <awalls@radix.net>
To: "Igor M. Liplianin" <liplianin@me.by>
Cc: Matthias Fechner <idefix@fechner.net>, linux-media@vger.kernel.org
Subject: Re: IR Receiver on an Tevii S470
Date: Sun, 06 Dec 2009 22:35:46 -0500 [thread overview]
Message-ID: <1260156946.1809.25.camel@localhost> (raw)
In-Reply-To: <200912070323.14440.liplianin@me.by>
On Mon, 2009-12-07 at 03:23 +0200, Igor M. Liplianin wrote:
> On 6 декабря 2009 23:40:54 Andy Walls wrote:
> > On Sun, 2009-11-22 at 03:03 +0200, Igor M. Liplianin wrote:
> > > On 21 ноября 2009 22:41:42 Andy Walls wrote:
> > > > > Matthias Fechner schrieb:
> > > > > > I bought some days ago a Tevii S470 DVB-S2 (PCI-E) card and got it
> > > > > > running with the driver from:
> > > > > > http://mercurial.intuxication.org/hg/s2-liplianin
> > > > > >
> > > > > > But I was not successfull in got the IR receiver working.
> > > > > > It seems that it is not supported yet by the driver.
> > > > > >
> > > > > > Is there maybe some code available to get the IR receiver with
> > > > > > evdev running?
> > > >
> > > > If the card is using the built in IR controller in the CX23885, then
> > > > you'll have to wait until I port my CX23888 IR controller changes to
> > > > work with the IR controller in the CX23885. That should be somewhat
> > > > straightforward, but will take time. Then we'll still need you to
> > > > experiment with a patch.
> > >
> > > It's cx23885 definitely.
> > > Remote uses NEC codes.
> > > In any case I can test.
> >
> > On Mon, 2009-11-23, Igor M. Liplianin wrote:
> > > Receiver connected to cx23885 IR_RX(pin 106). It is not difficult to
> > > track.
> >
> > Igor,
> Hi Andy,
>
> >
> > As I make patches for test, perhaps you can help answer some questions
> > which will save some experimentation:
> >
> >
> > 1. Does the remote for the TeVii S470 use the same codes as
> >
> > linux/drivers/media/common/ir-keymaps.c : ir_codes_tevii_nec[]
> That is correct table for cx88 based TeVii card with the same remote.
> I believe there is no difference for cx23885.
>
> >
> > or some other remote code table we have in the kernel?
> >
> >
> > 2. Does the remote for the TeVii S470, like other TeVii remotes, use a
> > standard NEC address of 0x00 (so that Addr'Addr is 0xff00) ? Or does it
> > use another address?
> Again like in cx88, the address is standard.
>
> >
> >
> > 3. When you traced board wiring from the IR receiver to the IR_RX pin on
> > the CX23885, did you notice any external components that might modify
> > the signal? For example, a capacitor that integrates carrier bursts
> > into baseband pulses.
> Yet again I believe there is no capacitors.
> Very same scheme like in cx88 variants for TeVii and others.
Igor and Matthias,
Please try the changes that I have for the TeVii S470 that are here:
http://linuxtv.org/hg/~awalls/cx23885-ir
You will want to modprobe the driver modules like this to get debugging
information:
# modprobe cx25840 ir_debug=2
# modprobe cx23885 ir_input_debug=1
With that debugging you will get output something like this in dmesg or
your logs when you press a button on the remote (this is RC-5 using a
CX23888 chip not NEC using a CX23885 chip):
cx23885[0]/888-ir: IRQ Status: tsr rsr rby
cx23885[0]/888-ir: IRQ Enables: rse rte roe
cx23885[0]/888-ir: IRQ Status: tsr rsr rby
cx23885[0]/888-ir: IRQ Enables: rse rte roe
cx23885[0]/888-ir: IRQ Status: tsr rsr rby
cx23885[0]/888-ir: IRQ Enables: rse rte roe
cx23885[0]/888-ir: IRQ Status: tsr rsr rby
cx23885[0]/888-ir: IRQ Enables: rse rte roe
cx23885[0]/888-ir: IRQ Status: tsr rsr rby
cx23885[0]/888-ir: IRQ Enables: rse rte roe
cx23885[0]/888-ir: IRQ Status: tsr rto
cx23885[0]/888-ir: IRQ Enables: rse rte roe
cx23885[0]/888-ir: rx read: 817000 ns mark
cx23885[0]/888-ir: rx read: 838926 ns space
cx23885[0]/888-ir: rx read: 1572259 ns mark
cx23885[0]/888-ir: rx read: 1705296 ns space
[...]
cx23885[0]/888-ir: rx read: 838037 ns space
cx23885[0]/888-ir: rx read: 746333 ns mark
cx23885[0]/888-ir: rx read: 1705741 ns space
cx23885[0]/888-ir: rx read: 1619370 ns mark
cx23885[0]/888-ir: rx read: end of rx
NEC would actually have this sort of timing:
8257296 ns mark
4206185 ns space
482926 ns mark
545296 ns space
481296 ns mark
1572259 ns space
481148 ns mark
546333 ns space
[...]
433593 ns mark
1618333 ns space
454481 ns mark
end of rx
8255519 ns mark
2130926 ns space
480556 ns mark
end of rx
The NEC decoder will also log the decoded 32 bits it receives and
separate out the address and the command bits.
If you do not see good or many NEC timing measurments in the logs, the
first thing to try is to change lines 533-534 of
linux/drivers/media/cx23885/cx23885-input.c:
params.modulation = true;
params.invert_level = false;
If you see no timing measurements or few timing measurements, change the
"modulation" to "false". If the chip is expecting carrier pulses and an
external circuit or capacitor is smoothing carrier bursts into baseband
pulses, then the hardware won't make measurements properly.
If you see inverted mark and space inverted when "modulation" is set to
"false", then set "invert_level" to "true".
Those are the two things I had to really guess at.
BTW, I'm not accessing the CX23885 AV Core registers across the I2C bus
in a very conservative way. If you notice some performance problem with
an occasionally missed pulse measurement, then I know there is room for
improvement by being smarter about I2C bus transactions.
Good Luck.
Regards,
Andy
next prev parent reply other threads:[~2009-12-07 3:36 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-18 20:31 IR Receiver on an Tevii S470 Matthias Fechner
2009-11-21 17:10 ` Matthias Fechner
2009-11-21 20:41 ` Andy Walls
2009-11-21 22:19 ` Jonas Kvinge
2009-11-22 1:03 ` Igor M. Liplianin
2009-11-22 2:48 ` Andy Walls
2009-11-22 18:08 ` Matthias Fechner
2009-11-22 20:11 ` Andy Walls
2009-11-22 20:25 ` Matthias Fechner
2009-11-22 20:32 ` Jean Delvare
2009-11-23 0:17 ` Andy Walls
2009-11-23 8:54 ` Jean Delvare
2009-11-25 0:25 ` Andy Walls
2009-11-26 16:43 ` Matthias Fechner
2009-11-29 14:22 ` Andy Walls
2009-11-22 20:26 ` Jean Delvare
2009-11-22 22:29 ` Igor M. Liplianin
2009-11-22 23:40 ` Andy Walls
2009-12-06 21:40 ` Andy Walls
2009-12-06 22:36 ` Matthias Fechner
2009-12-07 1:23 ` Igor M. Liplianin
2009-12-07 3:35 ` Andy Walls [this message]
2009-12-08 17:59 ` Igor M. Liplianin
2009-12-09 11:47 ` Andy Walls
2009-12-09 15:54 ` Igor M. Liplianin
2009-12-10 1:12 ` Andy Walls
2009-12-10 16:16 ` Igor M. Liplianin
2009-12-11 2:32 ` Andy Walls
-- strict thread matches above, loose matches on Subject: below --
2009-11-23 0:15 Igor M. Liplianin
2009-12-12 0:30 Igor M. Liplianin
2009-12-12 1:00 ` Andy Walls
2009-12-12 1:42 ` Igor M. Liplianin
2009-12-12 2:58 ` Andy Walls
2009-12-12 11:49 ` Igor M. Liplianin
2009-12-12 14:15 ` Andy Walls
2009-12-12 16:01 ` Igor M. Liplianin
2009-12-12 16:22 ` Igor M. Liplianin
2009-12-12 16:59 ` Andy Walls
2009-12-31 12:46 ` Guillem Solà Aranda
2009-12-31 15:23 ` Igor M. Liplianin
2010-01-06 21:21 ` Andreas Tschirpke
2010-01-07 0:44 ` Andy Walls
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=1260156946.1809.25.camel@localhost \
--to=awalls@radix.net \
--cc=idefix@fechner.net \
--cc=linux-media@vger.kernel.org \
--cc=liplianin@me.by \
/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