Re: set default protocol for TerraTec Cinergy XXS to "nec"

2012-08-01 Thread Toralf Förster
On 07/30/2012 06:13 PM, Mauro Carvalho Chehab wrote:
> Em 16-07-2012 17:22, Toralf Förster escreveu:
>> /me wonders whether "nec" should be set as the default for this key in 
>> kernel or not
> 
> It makes sense to patch it to use the nec protocol. If not all keys are 
> working, it also makes
> sense to fix the kernel table to handle all codes, or to point to a new table 
> where all
> Terratec keys are defined.

With this command :

$> ir-keytable --protocol=nec --sysdev=`ir-keytable 2>&1 | head -n 1 | cut -f5 
-d'/'` -w /etc/rc_keymaps/dib0700_nec 

I get it to working.


FWIW it is the USB_PID_TERRATEC_CINERGY_T_XXS_2 (ID 0ccd:00ab TerraTec 
Electronic GmbH) id.


-- 
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: set default protocol for TerraTec Cinergy XXS to "nec"

2012-07-31 Thread Toralf Förster
On 07/30/2012 06:13 PM, Mauro Carvalho Chehab wrote:
> Em 16-07-2012 17:22, Toralf Förster escreveu:
>> For a TerraTec Cinergy XXS USB stick (Bus 001 Device 008: ID 0ccd:00ab 
>> TerraTec Electronic GmbH )
>> I've to switch the protocol every time after plugin to get (at least few) 
>> keys working :
>>
>> $> sudo ir-keytable --protocol=nec --sysdev=`ir-keytable 2>&1 | head -n 1 | 
>> cut -f5 -d'/'`
>>
>> /me wonders whether "nec" should be set as the default for this key in 
>> kernel or not
> 
> It makes sense to patch it to use the nec protocol. If not all keys are 
> working, it also makes
> sense to fix the kernel table to handle all codes, or to point to a new table 
> where all
> Terratec keys are defined.
> 
> Could you please write such patch?
> 
> Thank you!
> Mauro

I tried it, but the attached (naive) approach doesn't work.
The kernel dmesg shows "kernel: Registered IR keymap rc-dib0700-nec"
but keys aren't recognized.


-- 
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c
index 510001d..46215cc 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -4276,8 +4276,7 @@ struct dvb_usb_device_properties dib0700_devices[] = {
 			},
 			{   "Terratec Cinergy T USB XXS (HD)/ T3",
 { &dib0700_usb_id_table[33],
-	&dib0700_usb_id_table[52],
-	&dib0700_usb_id_table[60], NULL},
+	&dib0700_usb_id_table[52], NULL},
 { NULL },
 			},
 			{   "TechniSat AirStar TeleStick 2",
@@ -4301,6 +4300,45 @@ struct dvb_usb_device_properties dib0700_devices[] = {
 			.change_protocol  = dib0700_change_protocol,
 		},
 	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
+
+		.num_adapters = 1,
+		.adapter = {
+			{
+			.num_frontends = 1,
+			.fe = {{
+.caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
+.pid_filter_count = 32,
+.pid_filter   = stk70x0p_pid_filter,
+.pid_filter_ctrl  = stk70x0p_pid_filter_ctrl,
+.frontend_attach  = stk7770p_frontend_attach,
+.tuner_attach = dib7770p_tuner_attach,
+
+DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
+			}},
+.size_of_priv =
+	sizeof(struct dib0700_adapter_state),
+			},
+		},
+
+		.num_device_descs = 1,
+		.devices = {
+			{   "Terratec Cinergy T USB XXS (HD)/ T3 _2",
+{ &dib0700_usb_id_table[60], NULL},
+{ NULL },
+			},
+		},
+
+		.rc.core = {
+			.rc_interval  = DEFAULT_RC_INTERVAL,
+			.rc_codes = RC_MAP_DIB0700_NEC_TABLE,
+			.module_name	  = "dib0700",
+			.rc_query = dib0700_rc_query_old_firmware,
+			.allowed_protos   = RC_TYPE_RC5 |
+	RC_TYPE_RC6 |
+	RC_TYPE_NEC,
+			.change_protocol  = dib0700_change_protocol,
+		},
+	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
 		.num_adapters = 1,
 		.adapter = {
 			{


Re: set default protocol for TerraTec Cinergy XXS to "nec"

2012-07-30 Thread Mauro Carvalho Chehab
Em 16-07-2012 17:22, Toralf Förster escreveu:
> For a TerraTec Cinergy XXS USB stick (Bus 001 Device 008: ID 0ccd:00ab 
> TerraTec Electronic GmbH )
> I've to switch the protocol every time after plugin to get (at least few) 
> keys working :
> 
> $> sudo ir-keytable --protocol=nec --sysdev=`ir-keytable 2>&1 | head -n 1 | 
> cut -f5 -d'/'`
> 
> /me wonders whether "nec" should be set as the default for this key in kernel 
> or not

It makes sense to patch it to use the nec protocol. If not all keys are 
working, it also makes
sense to fix the kernel table to handle all codes, or to point to a new table 
where all
Terratec keys are defined.

Could you please write such patch?

Thank you!
Mauro

> 
> 
>  From the syslog :
> 2012-07-16T22:12:53.357+02:00 n22 kernel: usb 1-1: new high-speed USB device 
> number 7 using ehci_hcd
> 2012-07-16T22:12:53.460+02:00 n22 kernel: ehci_hcd :00:1a.7: 
> dma_pool_free ehci_qh, f60cd4e0/f4e0 (bad dma)
> 2012-07-16T22:12:53.471+02:00 n22 kernel: usb 1-1: New USB device found, 
> idVendor=0ccd, idProduct=00ab
> 2012-07-16T22:12:53.471+02:00 n22 kernel: usb 1-1: New USB device strings: 
> Mfr=1, Product=2, SerialNumber=3
> 2012-07-16T22:12:53.471+02:00 n22 kernel: usb 1-1: Product: Cinergy T XXS
> 2012-07-16T22:12:53.471+02:00 n22 kernel: usb 1-1: Manufacturer: TerraTec GmbH
> 2012-07-16T22:12:53.471+02:00 n22 kernel: usb 1-1: SerialNumber: 01
> 2012-07-16T22:12:53.639+02:00 n22 kernel: dvb-usb: found a 'Terratec Cinergy 
> T USB XXS (HD)/ T3' in cold state, will try to load a firmware
> 2012-07-16T22:12:53.650+02:00 n22 kernel: dvb-usb: downloading firmware from 
> file 'dvb-usb-dib0700-1.20.fw'
> 2012-07-16T22:12:53.854+02:00 n22 kernel: dib0700: firmware started 
> successfully.
> 2012-07-16T22:12:54.355+02:00 n22 kernel: dvb-usb: found a 'Terratec Cinergy 
> T USB XXS (HD)/ T3' in warm state.
> 2012-07-16T22:12:54.355+02:00 n22 kernel: dvb-usb: will pass the complete 
> MPEG2 transport stream to the software demuxer.
> 2012-07-16T22:12:54.355+02:00 n22 kernel: DVB: registering new adapter 
> (Terratec Cinergy T USB XXS (HD)/ T3)
> 2012-07-16T22:12:54.560+02:00 n22 kernel: DVB: registering adapter 0 frontend 
> 0 (DiBcom 7000PC)...
> 2012-07-16T22:12:54.763+02:00 n22 kernel: DiB0070: successfully identified
> 2012-07-16T22:12:54.801+02:00 n22 kernel: Registered IR keymap rc-dib0700-rc5
> 2012-07-16T22:12:54.801+02:00 n22 kernel: input: IR-receiver inside an USB 
> DVB receiver as /devices/pci:00/:00:1a.7/usb1/1-1/rc/rc0/input15
> 2012-07-16T22:12:54.801+02:00 n22 kernel: rc0: IR-receiver inside an USB DVB 
> receiver as /devices/pci:00/:00:1a.7/usb1/1-1/rc/rc0
> 2012-07-16T22:12:54.801+02:00 n22 kernel: dvb-usb: schedule remote query 
> interval to 50 msecs.
> 2012-07-16T22:12:54.801+02:00 n22 kernel: dvb-usb: Terratec Cinergy T USB XXS 
> (HD)/ T3 successfully initialized and connected.
> 2012-07-16T22:12:54.801+02:00 n22 kernel: usbcore: registered new interface 
> driver dvb_usb_dib0700
> 2012-07-16T22:12:55.000+02:00 n22 sudo: tfoerste : TTY=pts/2 ; 
> PWD=/home/tfoerste/tmp ; USER=root ; COMMAND=/usr/bin/ir-keytable 
> --protocol=nec --sysdev=rc0
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html