linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* support for IR remote TerraTec Cinergy T USB XXS
@ 2010-12-29 14:49 Stefan Kriwanek
  2010-12-31 11:18 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Kriwanek @ 2010-12-29 14:49 UTC (permalink / raw)
  To: linux-media


[-- Attachment #1.1: Type: text/plain, Size: 1672 bytes --]

Dear linux-media developers,

I think I found a bug in the support of the  TerraTec Cinergy T USB XXS
remote control, or maybe just a new hardware revision appeared.

When I recently bought such a USB-stick I found the remote not working,
instead 'dib0700: Unknown remote controller key' lines appearing in
syslog on each keypress. The dvb_usb_dib0700 kernel module got
autoloaded by my Ubuntu 10.10. I am using current hg revision of v4l-dvb
and load the kernel module using the 'dvb_usb_dib0700_ir_proto=0'
option. Simply adding the keycodes to the driver file
(linux/drivers/media/dvb/dvb-usb/dib0700_devices.c,
patch appended) made things work.

However, by incident I found those very keycodes are already defined in
the linux/drivers/media/IR/keymaps/rc-nec-terratec-cinergy-xs.c file, so
maybe the issue is just about loading it?

'lsusb' lists my device as
Bus 001 Device 006: ID 0ccd:00ab TerraTec Electronic GmbH
despite I do not own the 'HD' version of the device, your wiki
http://linuxtv.org/wiki/index.php/TerraTec_Cinergy_T_USB_XXS
says that ID corresponds to. The output of 'lsusb -v' is appended to
this mail.

'cat /proc/bus/input/devices' lists the input device as
I: Bus=0003 Vendor=0ccd Product=00ab Version=0100
N: Name="IR-receiver inside an USB DVB receiver"
P: Phys=usb-0000:00:12.2-2/ir0
S: Sysfs=/devices/pci0000:00/0000:00:12.2/usb1/1-2/input/input13
U: Uniq=
H: Handlers=kbd event8
B: EV=3
B: KEY=14afc336 2b4285f00000000 0 480158000 219040000801 9e96c000000000
90024010004ffc

I hope you could add support for my stick; I'd be happy to provide
further information if necessary.

Best regards
Stefan


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: terratec_cinergy_t_usb_xxs.patch --]
[-- Type: text/x-patch; name="terratec_cinergy_t_usb_xxs.patch", Size: 1997 bytes --]

diff -r abd3aac6644e linux/drivers/media/dvb/dvb-usb/dib0700_devices.c
--- a/linux/drivers/media/dvb/dvb-usb/dib0700_devices.c	Fri Jul 02 00:38:54 2010 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/dib0700_devices.c	Wed Dec 29 13:17:41 2010 +0100
@@ -831,6 +831,57 @@
 	{ 0x4540, KEY_RECORD }, /* Font 'Size' for Teletext */
 	{ 0x4541, KEY_SCREEN }, /*  Full screen toggle, 'Hold' for Teletext */
 	{ 0x4542, KEY_SELECT }, /* Select video input, 'Select' for Teletext */
+
+	/* Key codes for the Terratec Cinergy T USB XXS remote, copied from rc-nec-terratec-cinergy-xs.c
+	   set dvb_usb_dib0700_ir_proto=0 */
+	{ 0x1401, KEY_POWER2 },
+	{ 0x1402, KEY_1 },
+	{ 0x1403, KEY_2 },
+	{ 0x1404, KEY_3 },
+	{ 0x1405, KEY_4 },
+	{ 0x1406, KEY_5 },
+	{ 0x1407, KEY_6 },
+	{ 0x1408, KEY_7 },
+	{ 0x1409, KEY_8 },
+	{ 0x140a, KEY_9 },
+	{ 0x140b, KEY_TUNER },  /* AV */
+	{ 0x140c, KEY_0 },
+	{ 0x140d, KEY_MODE }, /* A.B, alternatively match to KEY_AB? */
+	{ 0x140f, KEY_EPG }, /* EPG / GUIDE */
+	{ 0x1410, KEY_UP },
+	{ 0x1411, KEY_LEFT },
+	{ 0x1412, KEY_OK },
+	{ 0x1413, KEY_RIGHT },
+	{ 0x1414, KEY_DOWN },
+	{ 0x1416, KEY_INFO },
+	{ 0x1417, KEY_RED },
+	{ 0x1418, KEY_GREEN },
+	{ 0x1419, KEY_YELLOW },
+	{ 0x141a, KEY_BLUE },
+	{ 0x141b, KEY_CHANNELUP },
+	{ 0x141c, KEY_VOLUMEUP },
+	{ 0x141d, KEY_MUTE },
+	{ 0x141e, KEY_VOLUMEDOWN },
+	{ 0x141f, KEY_CHANNELDOWN },
+	{ 0x1440, KEY_PAUSE },
+	{ 0x1441, KEY_HOME },
+	{ 0x1442, KEY_MENU },
+	{ 0x1443, KEY_SUBTITLE },
+	{ 0x1444, KEY_TEXT },
+	{ 0x1445, KEY_DELETE },
+	{ 0x1446, KEY_TV },
+	{ 0x1447, KEY_DVD },
+	{ 0x1448, KEY_STOP },
+	{ 0x1449, KEY_VIDEO },
+	{ 0x144a, KEY_RADIO }, /* Music */
+	{ 0x144b, KEY_CAMERA }, /* Pic */
+	{ 0x144c, KEY_PLAY },
+	{ 0x144d, KEY_BACKSPACE },
+	{ 0x144e, KEY_REWIND },
+	{ 0x144f, KEY_FASTFORWARD },
+	{ 0x1454, KEY_LAST },
+	{ 0x1458, KEY_RECORD },
+	{ 0x145c, KEY_NEXT },
 };
 
 /* STK7700P: Hauppauge Nova-T Stick, AVerMedia Volar */


[-- Attachment #1.3: lsusb-v --]
[-- Type: text/plain, Size: 3147 bytes --]

Bus 001 Device 006: ID 0ccd:00ab TerraTec Electronic GmbH 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0ccd TerraTec Electronic GmbH
  idProduct          0x00ab 
  bcdDevice            1.00
  iManufacturer           1 TerraTec GmbH
  iProduct                2 Cinergy T XXS
  iSerial                 3 0000000001
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           46
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           4
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

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

* Re: support for IR remote TerraTec Cinergy T USB XXS
  2010-12-29 14:49 support for IR remote TerraTec Cinergy T USB XXS Stefan Kriwanek
@ 2010-12-31 11:18 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2010-12-31 11:18 UTC (permalink / raw)
  To: Stefan Kriwanek; +Cc: linux-media, Douglas Landgraf

Em 29-12-2010 12:49, Stefan Kriwanek escreveu:
> Dear linux-media developers,
> 
> I think I found a bug in the support of the  TerraTec Cinergy T USB XXS
> remote control, or maybe just a new hardware revision appeared.
> 
> When I recently bought such a USB-stick I found the remote not working,
> instead 'dib0700: Unknown remote controller key' lines appearing in
> syslog on each keypress. The dvb_usb_dib0700 kernel module got
> autoloaded by my Ubuntu 10.10. I am using current hg revision of v4l-dvb
> and load the kernel module using the 'dvb_usb_dib0700_ir_proto=0'
> option. Simply adding the keycodes to the driver file
> (linux/drivers/media/dvb/dvb-usb/dib0700_devices.c,
> patch appended) made things work.

Don't use a legacy, obsoleted, discontinued tree when writing patches. The
mercurial tree is obsolete, and it is there just to preserve the tree history.

Instead, you should use the git tree. The media_build tree[1] provides a
feature similar to the old hg tree.

[1] http://git.linuxtv.org/media_build.git

The IR code has changed _a_lot_ since the last update in -hg. Basically, the
entire support were rewritten, and now the protocol is (or should) be
auto-detected.

Douglas,

It would be a good idea to write a patch for the legacy mercurial tree warning
people about that.

> 
> However, by incident I found those very keycodes are already defined in
> the linux/drivers/media/IR/keymaps/rc-nec-terratec-cinergy-xs.c file, so
> maybe the issue is just about loading it?
> 
> 'lsusb' lists my device as
> Bus 001 Device 006: ID 0ccd:00ab TerraTec Electronic GmbH
> despite I do not own the 'HD' version of the device, your wiki
> http://linuxtv.org/wiki/index.php/TerraTec_Cinergy_T_USB_XXS
> says that ID corresponds to. The output of 'lsusb -v' is appended to
> this mail.
> 
> 'cat /proc/bus/input/devices' lists the input device as
> I: Bus=0003 Vendor=0ccd Product=00ab Version=0100
> N: Name="IR-receiver inside an USB DVB receiver"
> P: Phys=usb-0000:00:12.2-2/ir0
> S: Sysfs=/devices/pci0000:00/0000:00:12.2/usb1/1-2/input/input13
> U: Uniq=
> H: Handlers=kbd event8
> B: EV=3
> B: KEY=14afc336 2b4285f00000000 0 480158000 219040000801 9e96c000000000
> 90024010004ffc
> 
> I hope you could add support for my stick; I'd be happy to provide
> further information if necessary.
> 
> Best regards
> Stefan


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

end of thread, other threads:[~2010-12-31 11:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-29 14:49 support for IR remote TerraTec Cinergy T USB XXS Stefan Kriwanek
2010-12-31 11:18 ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).