Commit cc9d8d49 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Linus Torvalds

[PATCH] v4l: 635: add bttv card 137 conceptronic ctvfmi v2

- Add bttv card 137 - Conceptronic CTVFMi v2
Signed-off-by: default avatarRicardo Cerqueira <v4l\@cerqueira.org>
Signed-off-by: default avatarMichael Krufky <mkrufky@m1k.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 87f07831
...@@ -135,3 +135,4 @@ card=133 - Kodicom 4400R (slave) ...@@ -135,3 +135,4 @@ card=133 - Kodicom 4400R (slave)
card=134 - Adlink RTV24 card=134 - Adlink RTV24
card=135 - DViCO FusionHDTV 5 Lite card=135 - DViCO FusionHDTV 5 Lite
card=136 - Acorp Y878F card=136 - Acorp Y878F
card=137 - Conceptronic CTVFMi v2
...@@ -2418,6 +2418,21 @@ struct tvcard bttv_tvcards[] = { ...@@ -2418,6 +2418,21 @@ struct tvcard bttv_tvcards[] = {
.tuner_type = TUNER_YMEC_TVF66T5_B_DFF, .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
.tuner_addr = 0xc1 >>1, .tuner_addr = 0xc1 >>1,
.has_radio = 1, .has_radio = 1,
},{
/* ---- card 0x89 ---------------------------------- */
.name = "Conceptronic CTVFMi v2",
.video_inputs = 3,
.audio_inputs = 1,
.tuner = 0,
.svhs = 2,
.gpiomask = 0x001c0007,
.muxsel = { 2, 3, 1, 1 },
.audiomux = { 0, 1, 2, 2, 3 },
.needs_tvaudio = 0,
.pll = PLL_28,
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
.tuner_addr = ADDR_UNSET,
.has_remote = 1,
}}; }};
static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards); static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
......
...@@ -137,6 +137,7 @@ ...@@ -137,6 +137,7 @@
#define BTTV_ADLINK_RTV24 0x86 #define BTTV_ADLINK_RTV24 0x86
#define BTTV_DVICO_FUSIONHDTV_5_LITE 0x87 #define BTTV_DVICO_FUSIONHDTV_5_LITE 0x87
#define BTTV_ACORP_Y878F 0x88 #define BTTV_ACORP_Y878F 0x88
#define BTTV_CONCEPTRONIC_CTVFMI2 0x89
/* i2c address list */ /* i2c address list */
#define I2C_TSA5522 0xc2 #define I2C_TSA5522 0xc2
......
...@@ -156,6 +156,71 @@ static IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE] = { ...@@ -156,6 +156,71 @@ static IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE] = {
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
/* Ricardo Cerqueira <v4l@cerqueira.org> */
/* Weird matching, since the remote has "uncommon" keys */
static IR_KEYTAB_TYPE ir_codes_conceptronic[IR_KEYTAB_SIZE] = {
[ 30 ] = KEY_POWER, // power
[ 7 ] = KEY_SWITCHVIDEOMODE, // source
[ 28 ] = KEY_SEARCH, // scan
/* FIXME: duplicate keycodes?
*
* These four keys seem to share the same GPIO as CH+, CH-, <<< and >>>
* The GPIO values are
* 6397fb for both "Scan <" and "CH -",
* 639ffb for "Scan >" and "CH+",
* 6384fb for "Tune <" and "<<<",
* 638cfb for "Tune >" and ">>>", regardless of the mask.
*
* [ 23 ] = KEY_BACK, // fm scan <<
* [ 31 ] = KEY_FORWARD, // fm scan >>
*
* [ 4 ] = KEY_LEFT, // fm tuning <
* [ 12 ] = KEY_RIGHT, // fm tuning >
*
* For now, these four keys are disabled. Pressing them will generate
* the CH+/CH-/<<</>>> events
*/
[ 3 ] = KEY_TUNER, // TV/FM
[ 0 ] = KEY_RECORD,
[ 8 ] = KEY_STOP,
[ 17 ] = KEY_PLAY,
[ 26 ] = KEY_PLAYPAUSE, // freeze
[ 25 ] = KEY_ZOOM, // zoom
[ 15 ] = KEY_TEXT, // min
[ 1 ] = KEY_KP1,
[ 11 ] = KEY_KP2,
[ 27 ] = KEY_KP3,
[ 5 ] = KEY_KP4,
[ 9 ] = KEY_KP5,
[ 21 ] = KEY_KP6,
[ 6 ] = KEY_KP7,
[ 10 ] = KEY_KP8,
[ 18 ] = KEY_KP9,
[ 2 ] = KEY_KP0,
[ 16 ] = KEY_LAST, // +100
[ 19 ] = KEY_LIST, // recall
[ 31 ] = KEY_CHANNELUP, // chn down
[ 23 ] = KEY_CHANNELDOWN, // chn up
[ 22 ] = KEY_VOLUMEUP, // vol down
[ 20 ] = KEY_VOLUMEDOWN, // vol up
[ 4 ] = KEY_KPMINUS, // <<<
[ 14 ] = KEY_SETUP, // function
[ 12 ] = KEY_KPPLUS, // >>>
[ 13 ] = KEY_GOTO, // mts
[ 29 ] = KEY_REFRESH, // reset
[ 24 ] = KEY_MUTE // mute/unmute
};
struct IR { struct IR {
struct bttv_sub_device *sub; struct bttv_sub_device *sub;
struct input_dev *input; struct input_dev *input;
...@@ -329,6 +394,12 @@ static int ir_probe(struct device *dev) ...@@ -329,6 +394,12 @@ static int ir_probe(struct device *dev)
ir->mask_keyup = 0x008000; ir->mask_keyup = 0x008000;
ir->polling = 50; // ms ir->polling = 50; // ms
break; break;
case BTTV_CONCEPTRONIC_CTVFMI2:
ir_codes = ir_codes_conceptronic;
ir->mask_keycode = 0x001F00;
ir->mask_keyup = 0x006000;
ir->polling = 50; // ms
break;
} }
if (NULL == ir_codes) { if (NULL == ir_codes) {
kfree(ir); kfree(ir);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment