Aller au contenu

[POST IT] ADSTech Instant TV pci, sa télécommande et linux.


momo

Messages recommandés

vu que je passes mon temps sous google et à fouiller dans mes archives mails à tenter de me rappeller quoi patcher et comment à chaque mise à jour de v4l, je mets ici mon hack immonde ( en anglais, pour google ):

files to modify for remote support :

##linux/drivers/media/IR/ir-keymaps.c

/* ADS Tech Instant TV PCI Remote */

static struct ir_scancode ir_codes_adstech_pci[] = {

/* too many repeating codes : incorrect gpio ?. */

{ 0x1f, KEY_MUTE },

{ 0x1d, KEY_SEARCH },

{ 0x17, KEY_EPG }, /* Guide */

{ 0x0f, KEY_UP },

{ 0x6, KEY_DOWN },

{ 0x16, KEY_LEFT },

{ 0x1e, KEY_RIGHT },

{ 0x0e, KEY_SELECT }, /* Enter */

{ 0x1a, KEY_INFO },

{ 0x12, KEY_EXIT },

{ 0x19, KEY_PREVIOUS },

{ 0x11, KEY_NEXT },

{ 0x18, KEY_REWIND },

{ 0x10, KEY_FORWARD },

{ 0x4, KEY_PLAYPAUSE },

{ 0x07, KEY_STOP },

{ 0x1b, KEY_RECORD },

{ 0x13, KEY_TUNER }, /* Live */

{ 0x0a, KEY_A },

{ 0x03, KEY_PROG1 }, /* 1 */

{ 0x01, KEY_PROG2 }, /* 2 */

{ 0x0, KEY_VIDEO },

{ 0x0b, KEY_CHANNELUP },

{ 0x08, KEY_CHANNELDOWN },

{ 0x15, KEY_VOLUMEUP },

{ 0x1c, KEY_VOLUMEDOWN },

};

struct ir_scancode_table ir_codes_adstech_pci_table = {

.scan = ir_codes_adstech_pci,

.size = ARRAY_SIZE(ir_codes_adstech_pci),

};

EXPORT_SYMBOL_GPL(ir_codes_adstech_pci_table);

( after adstech dvb-t keymap for example )

##linux/drivers/media/video/saa7134-cards.c

line 6927

case SAA7134_BOARD_ADS_INSTANT_TV:

( before dev->has_remote = SAA7134_REMOTE_GPIO;)

./saa7134-input.c

line 738

case SAA7134_BOARD_ADS_INSTANT_TV:

//ir_codes = AdsInstantTvPci_codes;

ir_codes = &ir_codes_adstech_pci_table;

// This remote seems to return 0x7f after each button is pushed.

// No button may be repeated ; no release message. Only 1 msg with

// raw data = button idx, followed by one message with raw data = 0x7f

mask_keycode = 0xffffff;

mask_keyup = 0xffffff;

mask_keydown = 0xffffff;

polling = 50; // ms

break;

( before

break;

}

if (NULL == ir_codes) { )

##linux/include/media/ir-common.h

extern struct ir_scancode_table ir_codes_adstech_pci_table;

( after the adstech dvb-t one )

voilà, comme ça, plus d'excuses.

( un jour, j'apprendrai à faire un patch. Le jour où tous les politiciens seront honnêtes, me connaissant B) )

Lien à poster
  • 1 mois après...

diff -crB v4l-dvb-o/linux/drivers/media/IR/ir-keymaps.c v4l-dvb/linux/drivers/media/IR/ir-keymaps.c

*** v4l-dvb-o/linux/drivers/media/IR/ir-keymaps.c 2010-03-13 10:34:50.000000000 +0100

--- v4l-dvb/linux/drivers/media/IR/ir-keymaps.c 2010-03-13 10:36:26.000000000 +0100

***************

*** 635,640 ****

--- 635,678 ----

};

EXPORT_SYMBOL_GPL(ir_codes_adstech_dvb_t_pci_table);

+ /* ADS Tech Instant TV PCI Remote */

+ static struct ir_scancode ir_codes_adstech_pci[] = {

+ /* too many repeating codes : incorrect gpio ?. */

+ { 0x1f, KEY_MUTE },

+ { 0x1d, KEY_SEARCH },

+ { 0x17, KEY_EPG }, /* Guide */

+ { 0x0f, KEY_UP },

+ { 0x6, KEY_DOWN },

+ { 0x16, KEY_LEFT },

+ { 0x1e, KEY_RIGHT },

+ { 0x0e, KEY_SELECT }, /* Enter */

+ { 0x1a, KEY_INFO },

+ { 0x12, KEY_EXIT },

+ { 0x19, KEY_PREVIOUS },

+ { 0x11, KEY_NEXT },

+ { 0x18, KEY_REWIND },

+ { 0x10, KEY_FORWARD },

+ { 0x4, KEY_PLAYPAUSE },

+ { 0x07, KEY_STOP },

+ { 0x1b, KEY_RECORD },

+ { 0x13, KEY_TUNER }, /* Live */

+ { 0x0a, KEY_A },

+ { 0x03, KEY_PROG1 }, /* 1 */

+ { 0x01, KEY_PROG2 }, /* 2 */

+ { 0x0, KEY_VIDEO },

+ { 0x0b, KEY_CHANNELUP },

+ { 0x08, KEY_CHANNELDOWN },

+ { 0x15, KEY_VOLUMEUP },

+ { 0x1c, KEY_VOLUMEDOWN },

+ };

+

+ struct ir_scancode_table ir_codes_adstech_pci_table = {

+ .scan = ir_codes_adstech_pci,

+ .size = ARRAY_SIZE(ir_codes_adstech_pci),

+ };

+ EXPORT_SYMBOL_GPL(ir_codes_adstech_pci_table);

+

+

/* ---------------------------------------------------------------------- */

/* MSI TV@nywhere MASTER remote */

diff -crB v4l-dvb-o/linux/drivers/media/video/saa7134/saa7134-cards.c v4l-dvb/linux/drivers/media/video/saa7134/saa7134-cards.c

*** v4l-dvb-o/linux/drivers/media/video/saa7134/saa7134-cards.c 2010-03-13 10:34:50.000000000 +0100

--- v4l-dvb/linux/drivers/media/video/saa7134/saa7134-cards.c 2010-03-13 10:38:00.000000000 +0100

***************

*** 6924,6929 ****

--- 6924,6930 ----

case SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS:

case SAA7134_BOARD_ROVERMEDIA_LINK_PRO_FM:

case SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S:

+ case SAA7134_BOARD_ADS_INSTANT_TV:

dev->has_remote = SAA7134_REMOTE_GPIO;

break;

case SAA7134_BOARD_FLYDVBS_LR300:

diff -crB v4l-dvb-o/linux/drivers/media/video/saa7134/saa7134-input.c v4l-dvb/linux/drivers/media/video/saa7134/saa7134-input.c

*** v4l-dvb-o/linux/drivers/media/video/saa7134/saa7134-input.c 2010-03-13 10:34:50.000000000 +0100

--- v4l-dvb/linux/drivers/media/video/saa7134/saa7134-input.c 2010-03-13 10:39:54.000000000 +0100

***************

*** 735,740 ****

--- 735,751 ----

mask_keyup = 0x020000;

polling = 50; /* ms */

break;

+ case SAA7134_BOARD_ADS_INSTANT_TV:

+ //ir_codes = AdsInstantTvPci_codes;

+ ir_codes = &ir_codes_adstech_pci_table;

+ // This remote seems to return 0x7f after each button is pushed.

+ // No button may be repeated ; no release message. Only 1 msg with

+ // raw data = button idx, followed by one message with raw data = 0x7f

+ mask_keycode = 0xffffff;

+ mask_keyup = 0xffffff;

+ mask_keydown = 0xffffff;

+ polling = 50; // ms

+ break;

break;

}

if (NULL == ir_codes) {

diff -crB v4l-dvb-o/linux/include/media/ir-common.h v4l-dvb/linux/include/media/ir-common.h

*** v4l-dvb-o/linux/include/media/ir-common.h 2010-03-13 10:34:50.000000000 +0100

--- v4l-dvb/linux/include/media/ir-common.h 2010-03-13 10:40:44.000000000 +0100

***************

*** 111,116 ****

--- 111,117 ----

extern struct ir_scancode_table ir_codes_dntv_live_dvb_t_table;

extern struct ir_scancode_table ir_codes_iodata_bctv7e_table;

extern struct ir_scancode_table ir_codes_adstech_dvb_t_pci_table;

+ extern struct ir_scancode_table ir_codes_adstech_pci_table;

extern struct ir_scancode_table ir_codes_msi_tvanywhere_table;

extern struct ir_scancode_table ir_codes_cinergy_1400_table;

extern struct ir_scancode_table ir_codes_avertv_303_table;

Lien à poster

:D

pour mon hack, c'est tout simple : il déclare l'existence d'un capteur IR par GPIO pour la carte en question, mais comme la gestion des GPIO est soit buggé soit incomplète en ce qui concerne cette carte ( il manque le bit en 0x40, et le problème n'interesse personne de qualifié ), je contourne le problème en déclarant juste un sous ensemble des touches de télécommande ( afin d'éviter les doublons dans les codes )

ce qui me permet de changer de chaine ( enfin de passer à la suivante/precedente ) sous kaffeine et de changer de volume.

Lien à poster

yep ADSTech, avec un bon vieux saa7134 à bord ...

la qualité de capture est pas géniale ( le bt7x8 s'en tire mieux à mes yeux ), mais je voulais ajouter une télécommande sur mon PC et en plus je m'étais gouré lors de l'achat.

( la version normale est une ADSTech instant tv pci et la tnt est ADSTech instant tv dvb-t PCI , et les boite sont pratiquement identiques )

edit: remarques je me demandes si je me suis pas gouré quelque part pour la réalisation de ce patch, j'ai l'impression que les noms de répertoires que j'ai utilisé sont restés ...

boh, on verra ça plus tard.

Lien à poster
  • 2 mois après...

Les fichiers binaires v4l-dvb//.hg/dirstate et v4l-dvb-new//.hg/dirstate sont différents.

diff -crB v4l-dvb//linux/drivers/media/IR/keymaps/Makefile v4l-dvb-new//linux/drivers/media/IR/keymaps/Makefile

*** v4l-dvb//linux/drivers/media/IR/keymaps/Makefile 2010-05-25 22:45:02.000000000 +0200

--- v4l-dvb-new//linux/drivers/media/IR/keymaps/Makefile 2010-05-25 13:38:01.000000000 +0200

***************

*** 1,4 ****

--- 1,5 ----

obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o

+ rc-adstech-pci.o

rc-apac-viewcomp.o

rc-asus-pc39.o

rc-ati-tv-wonder-hd-600.o

diff -crB v4l-dvb//linux/drivers/media/IR/keymaps/rc-adstech-pci.c v4l-dvb-new//linux/drivers/media/IR/keymaps/rc-adstech-pci.c

*** v4l-dvb//linux/drivers/media/IR/keymaps/rc-adstech-pci.c 2010-05-25 22:53:33.000000000 +0200

--- v4l-dvb-new//linux/drivers/media/IR/keymaps/rc-adstech-pci.c 2010-05-25 13:37:23.000000000 +0200

***************

*** 0 ****

--- 1,69 ----

+ /* adstech-pci.h - Keytable for adstech_dvb_t_pci Remote Controller

+ *

+ * keymap imported from ir-keymaps.c

+ *

+ * Copyright © 2010 by Mauro Carvalho Chehab

+ *

+ * This program is free software; you can redistribute it and/or modify

+ * it under the terms of the GNU General Public License as published by

+ * the Free Software Foundation; either version 2 of the License, or

+ * (at your option) any later version.

+ */

+

+ #include

+

+ /* ADS Tech Instant TV DVB-T PCI Remote */

+

+ static struct ir_scancode adstech_pci[] = {

+ { 0x1f, KEY_MUTE },

+ { 0x1d, KEY_SEARCH },

+ { 0x17, KEY_EPG }, /* Guide */

+ { 0x0f, KEY_UP },

+ { 0x6, KEY_DOWN },

+ { 0x16, KEY_LEFT },

+ { 0x1e, KEY_RIGHT },

+ { 0x0e, KEY_SELECT }, /* Enter */

+ { 0x1a, KEY_INFO },

+ { 0x12, KEY_EXIT },

+ { 0x19, KEY_PREVIOUS },

+ { 0x11, KEY_NEXT },

+ { 0x18, KEY_REWIND },

+ { 0x10, KEY_FORWARD },

+ { 0x4, KEY_PLAYPAUSE },

+ { 0x07, KEY_STOP },

+ { 0x1b, KEY_RECORD },

+ { 0x13, KEY_TUNER }, /* Live */

+ { 0x0a, KEY_A },

+ { 0x03, KEY_PROG1 }, /* 1 */

+ { 0x01, KEY_PROG2 }, /* 2 */

+ { 0x0, KEY_VIDEO },

+ { 0x0b, KEY_CHANNELUP },

+ { 0x08, KEY_CHANNELDOWN },

+ { 0x15, KEY_VOLUMEUP },

+ { 0x1c, KEY_VOLUMEDOWN },

+ };

+

+ static struct rc_keymap adstech_pci_map = {

+ .map = {

+ .scan = adstech_pci,

+ .size = ARRAY_SIZE(adstech_pci),

+ .ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */

+ .name = RC_MAP_ADSTECH_PCI,

+ }

+ };

+

+ static int __init init_rc_map_adstech_pci(void)

+ {

+ return ir_register_map(&adstech_pci_map);

+ }

+

+ static void __exit exit_rc_map_adstech_pci(void)

+ {

+ ir_unregister_map(&adstech_pci_map);

+ }

+

+ module_init(init_rc_map_adstech_pci)

+ module_exit(exit_rc_map_adstech_pci)

+

+ MODULE_LICENSE("GPL");

+ MODULE_AUTHOR("Mauro Carvalho Chehab ");

diff -crB v4l-dvb//linux/drivers/media/video/saa7134/saa7134-cards.c v4l-dvb-new//linux/drivers/media/video/saa7134/saa7134-cards.c

*** v4l-dvb//linux/drivers/media/video/saa7134/saa7134-cards.c 2010-05-25 22:45:05.000000000 +0200

--- v4l-dvb-new//linux/drivers/media/video/saa7134/saa7134-cards.c 2010-05-25 13:18:07.000000000 +0200

***************

*** 7011,7016 ****

--- 7011,7017 ----

case SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS:

case SAA7134_BOARD_ROVERMEDIA_LINK_PRO_FM:

case SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S:

+ case SAA7134_BOARD_ADS_INSTANT_TV:

dev->has_remote = SAA7134_REMOTE_GPIO;

break;

case SAA7134_BOARD_FLYDVBS_LR300:

diff -crB v4l-dvb//linux/drivers/media/video/saa7134/saa7134-input.c v4l-dvb-new//linux/drivers/media/video/saa7134/saa7134-input.c

*** v4l-dvb//linux/drivers/media/video/saa7134/saa7134-input.c 2010-05-25 22:45:05.000000000 +0200

--- v4l-dvb-new//linux/drivers/media/video/saa7134/saa7134-input.c 2010-05-25 13:44:24.000000000 +0200

***************

*** 871,876 ****

--- 871,887 ----

mask_keyup = 0x020000;

polling = 50; /* ms */

break;

+ case SAA7134_BOARD_ADS_INSTANT_TV:

+ ir_codes = RC_MAP_ADSTECH_PCI;

+ //ir_codes = &ir_codes_adstech_pci_table;

+ // This remote seems to return 0x7f after each button is pushed.

+ // No button may be repeated ; no release message. Only 1 msg with

+ // raw data = button idx, followed by one message with raw data = 0x7f

+ mask_keycode = 0xffffff;

+ mask_keyup = 0xffffff;

+ mask_keydown = 0xffffff;

+ polling = 50; // ms

+ break;

break;

}

if (NULL == ir_codes) {

diff -crB v4l-dvb//linux/include/media/rc-map.h v4l-dvb-new//linux/include/media/rc-map.h

*** v4l-dvb//linux/include/media/rc-map.h 2010-05-25 22:45:05.000000000 +0200

--- v4l-dvb-new//linux/include/media/rc-map.h 2010-05-25 14:08:56.000000000 +0200

***************

*** 49,54 ****

--- 49,55 ----

/* Names of the several keytables defined in-kernel */

#define RC_MAP_ADSTECH_DVB_T_PCI "rc-adstech-dvb-t-pci"

+ #define RC_MAP_ADSTECH_PCI "rc-adstech-pci"

#define RC_MAP_APAC_VIEWCOMP "rc-apac-viewcomp"

#define RC_MAP_ASUS_PC39 "rc-asus-pc39"

#define RC_MAP_ATI_TV_WONDER_HD_600 "rc-ati-tv-wonder-hd-600"

Seulement dans v4l-dvb-new//v4l: .config

Seulement dans v4l-dvb-new//v4l/firmware: av7110

Seulement dans v4l-dvb-new//v4l/firmware: cpia2

Seulement dans v4l-dvb-new//v4l/firmware: dabusb

Seulement dans v4l-dvb-new//v4l/firmware: ttusb-budget

Seulement dans v4l-dvb-new//v4l/firmware: vicam

Seulement dans v4l-dvb-new//v4l: Kconfig

Seulement dans v4l-dvb-new//v4l: .kconfig.dep

Seulement dans v4l-dvb-new//v4l: Kconfig.kern

Seulement dans v4l-dvb-new//v4l: Makefile.media

Seulement dans v4l-dvb-new//v4l: .myconfig

Seulement dans v4l-dvb-new//v4l: oss

Seulement dans v4l-dvb-new//v4l: .tmp_versions

Seulement dans v4l-dvb-new//v4l: .version

Comme ça, c'est mis à jour.

Lien à poster
×
×
  • Créer...