All of lore.kernel.org
 help / color / mirror / Atom feed
* PCTV 290e nanostick and remote control support
@ 2011-08-13 19:36 Chris Rankin
  2011-08-13 22:31 ` Antti Palosaari
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Rankin @ 2011-08-13 19:36 UTC (permalink / raw)
  To: linux-media

Hi,

I've just acquired a PCTV 290e nanostick, and have successfully tuned it into a DVB-T2 MUX. Yay! :-).

However, before declaring total victory, I have noticed that no-one has yet wired up the device's IR support in the em28xx driver. The adapter ships with a tiny RC with only 26 buttons, which would allow me to use the 290e with VDR. Does anyone know what kind of IR hardware the 290e uses, please? I tried setting:

.has_ir_i2c = 1

in the [EM28174_BOARD_PCTV_290E] section of em28xx_cards.c, but saw nothing new in the dmesg log. (Yes, the ir_kdb_i2c modules did load successfully.) The /sys/bus/i2c/devices directory contains two nodes:

em28xx #0
CXD2820R tuner I2C adapter

Any (non-destructive) suggestions for other things to try to get IR working would be gratefully received.

Thanks,
Chris


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PCTV 290e nanostick and remote control support
  2011-08-13 19:36 PCTV 290e nanostick and remote control support Chris Rankin
@ 2011-08-13 22:31 ` Antti Palosaari
  2011-08-14  0:39   ` Chris Rankin
  2011-08-14  1:43   ` Chris Rankin
  0 siblings, 2 replies; 6+ messages in thread
From: Antti Palosaari @ 2011-08-13 22:31 UTC (permalink / raw)
  To: Chris Rankin; +Cc: linux-media

Hello

On 08/13/2011 10:36 PM, Chris Rankin wrote:
> I've just acquired a PCTV 290e nanostick, and have successfully tuned it into a DVB-T2 MUX. Yay! :-).
> 
> However, before declaring total victory, I have noticed that no-one has yet wired up the device's IR support in the em28xx driver. The adapter ships with a tiny RC with only 26 buttons, which would allow me to use the 290e with VDR. Does anyone know what kind of IR hardware the 290e uses, please? I tried setting:
> 
> .has_ir_i2c = 1
> 
> in the [EM28174_BOARD_PCTV_290E] section of em28xx_cards.c, but saw nothing new in the dmesg log. (Yes, the ir_kdb_i2c modules did load successfully.) The /sys/bus/i2c/devices directory contains two nodes:
> 
> em28xx #0
> CXD2820R tuner I2C adapter
> 
> Any (non-destructive) suggestions for other things to try to get IR working would be gratefully received.

Remote is already supported, but from the 3.1 or maybe 3.2 (I am not
sure if Mauro was hurry to sent it 3.1). Anyhow, if you need it please
install latest v4l-dvb drivers.

Thank you for the report.

regards,
Antti

-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PCTV 290e nanostick and remote control support
  2011-08-13 22:31 ` Antti Palosaari
@ 2011-08-14  0:39   ` Chris Rankin
  2011-08-14  1:43   ` Chris Rankin
  1 sibling, 0 replies; 6+ messages in thread
From: Chris Rankin @ 2011-08-14  0:39 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: linux-media

--- On Sat, 13/8/11, Antti Palosaari <crope@iki.fi> wrote:
> Remote is already supported, but from the 3.1 or maybe 3.2
> (I am not sure if Mauro was hurry to sent it 3.1).

Hi,

This appears to be the diff from 3.1 that adds RC support:

--- linux-3.0/drivers/media/video/em28xx/em28xx-cards.c.orig	2011-08-13 20:37:26.000000000 +0100
+++ linux-3.0/drivers/media/video/em28xx/em28xx-cards.c	2011-08-14 00:34:59.000000000 +0100
@@ -1773,13 +1773,13 @@
 	/* 2013:024f PCTV Systems nanoStick T2 290e.
 	 * Empia EM28174, Sony CXD2820R and NXP TDA18271HD/C2 */
 	[EM28174_BOARD_PCTV_290E] = {
+		.name          = "PCTV nanoStick T2 290e",
 		.i2c_speed      = EM2874_I2C_SECONDARY_BUS_SELECT |
 			EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_100_KHZ,
-		.xclk          = EM28XX_XCLK_FREQUENCY_12MHZ,
-		.name          = "PCTV Systems nanoStick T2 290e",
 		.tuner_type    = TUNER_ABSENT,
 		.tuner_gpio    = pctv_290e,
 		.has_dvb       = 1,
+		.ir_codes      = RC_MAP_PINNACLE_PCTV_HD,
 	},
 };
 const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards);
--- linux-3.0/drivers/media/video/em28xx/em28xx-input.c.orig	2011-08-14 00:30:57.000000000 +0100
+++ linux-3.0/drivers/media/video/em28xx/em28xx-input.c	2011-08-14 00:31:20.000000000 +0100
@@ -372,6 +372,7 @@
 		ir->get_key = default_polling_getkey;
 		break;
 	case CHIP_ID_EM2874:
+	case CHIP_ID_EM28174:
 		ir->get_key = em2874_polling_getkey;
 		em28xx_write_regs(dev, EM2874_R50_IR_CONFIG, &ir_config, 1);
 		break;

It certainly creates a new /dev/input/event? node, and allows me to program all but *one* button on the handset: the "OK" button. At this early stage, it would seem unlikely that this particular button is faulty. Could there be an error in the IR code configuration, please?

Or maybe someone else *does* have a PCTV 290e device where the OK button works?

Thanks,
Chris


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PCTV 290e nanostick and remote control support
  2011-08-13 22:31 ` Antti Palosaari
  2011-08-14  0:39   ` Chris Rankin
@ 2011-08-14  1:43   ` Chris Rankin
  2011-08-14  1:48     ` Devin Heitmueller
  1 sibling, 1 reply; 6+ messages in thread
From: Chris Rankin @ 2011-08-14  1:43 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: linux-media

Hi,

The rc-pinnacle-pctv-hd keymap is missing the definition of the OK key:

--- linux-3.0/drivers/media/rc/keymaps/rc-pinnacle-pctv-hd.c.orig	2011-08-14 02:42:01.000000000 +0100
+++ linux-3.0/drivers/media/rc/keymaps/rc-pinnacle-pctv-hd.c	2011-08-14 02:12:45.000000000 +0100
@@ -20,6 +20,7 @@
 	{ 0x0701, KEY_MENU }, /* Pinnacle logo */
 	{ 0x0739, KEY_POWER },
 	{ 0x0703, KEY_VOLUMEUP },
+	{ 0x0705, KEY_OK },
 	{ 0x0709, KEY_VOLUMEDOWN },
 	{ 0x0706, KEY_CHANNELUP },
 	{ 0x070c, KEY_CHANNELDOWN },

Cheers,
Chris


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PCTV 290e nanostick and remote control support
  2011-08-14  1:43   ` Chris Rankin
@ 2011-08-14  1:48     ` Devin Heitmueller
  2011-08-14 12:11       ` Antti Palosaari
  0 siblings, 1 reply; 6+ messages in thread
From: Devin Heitmueller @ 2011-08-14  1:48 UTC (permalink / raw)
  To: Chris Rankin; +Cc: Antti Palosaari, linux-media

On Sat, Aug 13, 2011 at 9:43 PM, Chris Rankin <rankincj@yahoo.com> wrote:
> Hi,
>
> The rc-pinnacle-pctv-hd keymap is missing the definition of the OK key:
>
> --- linux-3.0/drivers/media/rc/keymaps/rc-pinnacle-pctv-hd.c.orig       2011-08-14 02:42:01.000000000 +0100
> +++ linux-3.0/drivers/media/rc/keymaps/rc-pinnacle-pctv-hd.c    2011-08-14 02:12:45.000000000 +0100
> @@ -20,6 +20,7 @@
>        { 0x0701, KEY_MENU }, /* Pinnacle logo */
>        { 0x0739, KEY_POWER },
>        { 0x0703, KEY_VOLUMEUP },
> +       { 0x0705, KEY_OK },
>        { 0x0709, KEY_VOLUMEDOWN },
>        { 0x0706, KEY_CHANNELUP },
>        { 0x070c, KEY_CHANNELDOWN },
>
> Cheers,
> Chris

Wow, how the hell did I miss that?  I did numerous remotes for em28xx
based devices that use that RC profile, and never noticed that issue.

Will have to check the merge logs.  Maybe the key got lost when they
refactored the IR support.

Chris, you should add a signed-off-by tag and submit this as a patch
so it can be included upstream.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PCTV 290e nanostick and remote control support
  2011-08-14  1:48     ` Devin Heitmueller
@ 2011-08-14 12:11       ` Antti Palosaari
  0 siblings, 0 replies; 6+ messages in thread
From: Antti Palosaari @ 2011-08-14 12:11 UTC (permalink / raw)
  To: Devin Heitmueller; +Cc: Chris Rankin, linux-media

On 08/14/2011 04:48 AM, Devin Heitmueller wrote:
> On Sat, Aug 13, 2011 at 9:43 PM, Chris Rankin <rankincj@yahoo.com> wrote:
>> The rc-pinnacle-pctv-hd keymap is missing the definition of the OK key:
>>
>> --- linux-3.0/drivers/media/rc/keymaps/rc-pinnacle-pctv-hd.c.orig       2011-08-14 02:42:01.000000000 +0100
>> +++ linux-3.0/drivers/media/rc/keymaps/rc-pinnacle-pctv-hd.c    2011-08-14 02:12:45.000000000 +0100
>> @@ -20,6 +20,7 @@
>>        { 0x0701, KEY_MENU }, /* Pinnacle logo */
>>        { 0x0739, KEY_POWER },
>>        { 0x0703, KEY_VOLUMEUP },
>> +       { 0x0705, KEY_OK },
>>        { 0x0709, KEY_VOLUMEDOWN },
>>        { 0x0706, KEY_CHANNELUP },
>>        { 0x070c, KEY_CHANNELDOWN },
>>
>> Cheers,
>> Chris
> 
> Wow, how the hell did I miss that?  I did numerous remotes for em28xx
> based devices that use that RC profile, and never noticed that issue.
> 
> Will have to check the merge logs.  Maybe the key got lost when they
> refactored the IR support.

It seems to be very old bug, year 2007, not coming from merge errors! It
could be even possible there have not been such button originally. Very
weird situation none have found it earlier. For example I just pressed
few buttons to see number are coming to console => OK it works (didn't
looked all buttons sends events).

That's commit which adds those keytables:
commit 54d75ebaa02809f24a16624e32706af3bf97588e

regards
Antti

-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-14 12:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-13 19:36 PCTV 290e nanostick and remote control support Chris Rankin
2011-08-13 22:31 ` Antti Palosaari
2011-08-14  0:39   ` Chris Rankin
2011-08-14  1:43   ` Chris Rankin
2011-08-14  1:48     ` Devin Heitmueller
2011-08-14 12:11       ` Antti Palosaari

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.