Skip to contentSkip to conversation

kernel 2.6.24: Add support for Items ITV-301 Stereo TV Tuner

PATCH New André AUZI 1 participant 1 message May 1, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel 2.6.24: Add support for Items ITV-301 Stereo TV Tuner

Changes include:
- addition of the keymap for the remote control: ir_codes_items_h338
- addition of the board: SAA7134_BOARD_ITEMS_ITV301
- minor adaptation to the debug logs for easier GPIO bit change
identification

linux/Documentation/video4linux/CARDLIST.saa7134 Thu May 01 23:07:52 2008 +0200 renamed from linux/Documentation/video4linux/CARDLIST.saa7134 Wed Apr 30 23:18:40 2008 -0300 +0 -0
diff -r 5e73425c1968 -r f091994a981b linux/Documentation/video4linux/CARDLIST.saa7134
@@ -141,3 +141,4 @@ 140 -> Avermedia DVB-S Pro A700         140 -> Avermedia DVB-S Pro A700                 [1461:a7a1]

141 -> Avermedia DVB-S Hybrid+FM A700 [1461:a7a2]
142 -> Beholder BeholdTV H6 [5ace:6290]
+143 -> Items ITV-301 PCI Stero TV Tuner

linux/drivers/media/common/ir-keymaps.c Thu May 01 23:07:52 2008 +0200 renamed from linux/drivers/media/common/ir-keymaps.c Wed Apr 30 23:18:40 2008 -0300 +0 -0
diff -r 5e73425c1968 -r f091994a981b linux/drivers/media/common/ir-keymaps.c
@@ -2251,3 +2251,98 @@ IR_KEYTAB_TYPE ir_codes_powercolor_real_
    [0x25] = KEY_POWER,        /* power */

}; EXPORT_SYMBOL_GPL(ir_codes_powercolor_real_angel); +
+/* Andre Auzi <[email protected]>
+ inspired by Michael Tokarev <[email protected]> ir_codes_manli
+

+   Keytable is used by Items ITV-301 PCI TV Tuner (remote
+   control identification code, on the back of the device,
+   is H-338).
+
+   The "ascii-art picture" below (in comments, first row
+   is the keycode in hex, and subsequent row(s) shows
+   the button labels) helps to describe which keycodes are
+   assigned to the buttons.
+ */
+IR_KEYTAB_TYPE ir_codes_items_h338[IR_KEYTAB_SIZE] = {
+
+    /*  0x1c        0x12  *
+     * RADIO        POWER *
+     *              */
+    [0x1c] = KEY_RADIO,    /*XXX*/
+    [0x12] = KEY_POWER,
+
+    /*  0x01    0x02    0x03  *
+     *   1       2       3    *
+     *                        *
+     *  0x04    0x05    0x06  *
+     *   4       5       6    *
+     *                        *
+     *  0x07    0x08    0x09  *
+     *   7       8       9    *
+     *                        */
+    [0x01] = KEY_1,
+    [0x02] = KEY_2,
+    [0x03] = KEY_3,
+    [0x04] = KEY_4,
+    [0x05] = KEY_5,
+    [0x06] = KEY_6,
+    [0x07] = KEY_7,
+    [0x08] = KEY_8,
+    [0x09] = KEY_9,
+
+    /*  0x0a    0x00    0x17  *
+     * RECALL    0      PLUS  *
+     *                        */
+    [0x0a] = KEY_LAST,    /*XXX Recall Last for Recall */
+    [0x00] = KEY_0,
+    [0x17] = KEY_DIGITS,    /*XXX for Plus */
+
+    /*  0x14            0x10  *
+     *  OSD             MODE  */
+    [0x14] = KEY_MENU,
+    [0x10] = KEY_MODE,
+
+    /*          0x0b          *
+     *           Ch+          *
+     *                        *
+     *  0x18    0x16    0x0c  *
+     *  Vol-     Ok     Vol+  *
+     *                        *
+     *         0x015          *
+     *           Ch-          *
+     *                        */
+    [0x0b] = KEY_CHANNELUP,
+    [0x18] = KEY_VOLUMEDOWN,
+    [0x16] = KEY_OK,
+    [0x0c] = KEY_VOLUMEUP,
+    [0x15] = KEY_CHANNELDOWN,
+
+    /*  0x11            0x0d  *
+     *  OSD             MODE  *
+     *                        */
+    [0x11] = KEY_TV,    /*XXX*/
+    [0x0d] = KEY_AUDIO,    /*XXX there's no KEY_STEREO */
+
+    /*  0x0f    0x1b    0x1a  *
+     *  PREVIOUS        NEXT  *
+     *        TIMESHIFT       *
+     *                        *
+     *  0x0e    0x1f    0x1e  *
+     *  STOP    PLAY    PAUSE *
+     *                        */
+    [0x0f] = KEY_PREVIOUS,
+    [0x1b] = KEY_COFFEE,   /*XXX there's no KEY_TIMESHIFTING */
+    [0x1a] = KEY_NEXT,
+    [0x0e] = KEY_STOP,
+    [0x1f] = KEY_PLAY,
+    [0x1e] = KEY_PAUSE,

+
+ /* 0x1d 0x13 0x19 *
+ * RECORD MUTE SNAPSHOT*
+ * */

+    [0x1d] = KEY_RECORD,
+    [0x13] = KEY_MUTE,
+    [0x19] = KEY_SYSRQ,    /*XXX there's no KEY_SNAPSHOT */

+};
+EXPORT_SYMBOL_GPL(ir_codes_items_h338);

linux/drivers/media/video/saa7134/saa7134-cards.c Thu May 01 23:07:52 2008 +0200 renamed from linux/drivers/media/video/saa7134/saa7134-cards.c Wed Apr 30 23:18:40 2008 -0300 +60 -0

64 lines not on this page · raw message

};

@@ -5617,6 +5677,7 @@ int saa7134_board_init1(struct saa7134_d

    case SAA7134_BOARD_BEHOLD_505FM:
    case SAA7134_BOARD_BEHOLD_507_9FM:
    case SAA7134_BOARD_GENIUS_TVGO_A11MCE:
+    case SAA7134_BOARD_ITEMS_ITV301:
        dev->has_remote = SAA7134_REMOTE_GPIO;
        break;
    case SAA7134_BOARD_FLYDVBS_LR300:
linux/drivers/media/video/saa7134/saa7134-input.c Thu May 01 23:07:52 2008 +0200 renamed from linux/drivers/media/video/saa7134/saa7134-input.c Wed Apr 30 23:18:40 2008 -0300 +38 -3

58 lines not on this page · raw message

linux/drivers/media/video/saa7134/saa7134.h Thu May 01 23:07:52 2008 +0200 renamed from linux/drivers/media/video/saa7134/saa7134.h Wed Apr 30 23:18:40 2008 -0300 +0 -0
diff -r 5e73425c1968 -r f091994a981b linux/drivers/media/video/saa7134/saa7134.h
@@ -271,6 +271,7 @@ struct saa7134_format {

#define SAA7134_BOARD_AVERMEDIA_A700_PRO 140
#define SAA7134_BOARD_AVERMEDIA_A700_HYBRID 141
#define SAA7134_BOARD_BEHOLD_H6 142
+#define SAA7134_BOARD_ITEMS_ITV301 143

#define SAA7134_MAXBOARDS 8

linux/include/media/ir-common.h Thu May 01 23:07:52 2008 +0200 renamed from linux/include/media/ir-common.h Wed Apr 30 23:18:40 2008 -0300 +0 -0
diff -r 5e73425c1968 -r f091994a981b linux/include/media/ir-common.h
@@ -26,8 +26,8 @@

#include <linux/input.h>
#include <linux/workqueue.h>

-#define IR_TYPE_RC5 1
-#define IR_TYPE_PD 2 /* Pulse distance encoded IR */
+#define IR_TYPE_RC5 1
+#define IR_TYPE_PD 2 /* Pulse distance encoded IR */
#define IR_TYPE_OTHER 99

#define IR_KEYTAB_TYPE u32
@@ -43,31 +43,32 @@

struct ir_input_state {
    /* configuration */
-    int                ir_type;
-    IR_KEYTAB_TYPE     ir_codes[IR_KEYTAB_SIZE];
+    int           ir_type;
+    IR_KEYTAB_TYPE       ir_codes[IR_KEYTAB_SIZE];
    /* key info */
-    u32                ir_raw;      /* raw data */
-    u32                ir_key;      /* ir key code */
-    u32                keycode;     /* linux key code */
-    int                keypressed;  /* current state */
+    u32           ir_raw;    /* raw data */
+    u32           ir_key;    /* ir key code */
+    u32           keycode;    /* linux key code */
+    int           keypressed;    /* current state */

};

/* this was saa7134_ir and bttv_ir, moved here for
* rc5 decoding. */
struct card_ir {

-    struct input_dev        *dev;
-    struct ir_input_state   ir;
-    char                    name[32];
-    char                    phys[32];
+    struct input_dev    *dev;
+    struct ir_input_state    ir;
+    char            name[32];
+    char            phys[32];
    /* Usual gpio signalling */
-    u32                     mask_keycode;
-    u32                     mask_keydown;
-    u32                     mask_keyup;
-    u32                     polling;
-    u32                     last_gpio;
+    u32            mask_keycode;
+    u32            mask_keydown;
+    u32            mask_keyup;
+    u32            polling;
+    u32            last_gpio;
+    int            last_count;
    int            shift_by;
    int            start; // What should RC5_START() be
    int            addr; // What RC5_ADDR() should be.

@@ -146,6 +147,7 @@ extern IR_KEYTAB_TYPE ir_codes_pinnacle_ extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_items_h338[IR_KEYTAB_SIZE];

#endif

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list