diff options
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-dvb.c | 8 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-cards.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-input.c | 56 |
3 files changed, 64 insertions, 1 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index 97e354d8a..a0402a7b4 100644 --- a/linux/drivers/media/video/cx88/cx88-dvb.c +++ b/linux/drivers/media/video/cx88/cx88-dvb.c @@ -101,7 +101,7 @@ static int dvb_thread(void *data) err = videobuf_waiton(buf,0,1); BUG_ON(0 != err); - /* no more feeds left or stop_feed asked us to quit */ + /* no more feeds left or stop_feed() asked us to quit */ if (0 == dev->nfeeds) break; if (kthread_should_stop()) @@ -132,6 +132,12 @@ static int dvb_thread(void *data) videobuf_read_stop(file, &dev->dvbq); put_filp(file); dprintk(1,"dvb thread stopped\n"); + + /* Hmm, linux becomes *very* unhappy without this ... */ + while (!kthread_should_stop()) { + set_current_state(TASK_UNINTERRUPTIBLE); + schedule(); + } return 0; } diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index 583aff490..697588483 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -1421,6 +1421,7 @@ int saa7134_board_init(struct saa7134_dev *dev) case SAA7134_BOARD_CINERGY600: case SAA7134_BOARD_ECS_TVP3XP: case SAA7134_BOARD_ECS_TVP3XP_4CB5: + case SAA7134_BOARD_MD2819: dev->has_remote = 1; break; case SAA7134_BOARD_AVACSSMARTTV: diff --git a/linux/drivers/media/video/saa7134/saa7134-input.c b/linux/drivers/media/video/saa7134/saa7134-input.c index cc9efb209..abf7915ea 100644 --- a/linux/drivers/media/video/saa7134/saa7134-input.c +++ b/linux/drivers/media/video/saa7134/saa7134-input.c @@ -209,6 +209,53 @@ static IR_KEYTAB_TYPE avacssmart_codes[IR_KEYTAB_SIZE] = { [ 15 ] = KEY_F22, // min [ 26 ] = KEY_F23, // freeze }; + +/* Alex Hermann <gaaf@gmx.net> */ +static IR_KEYTAB_TYPE md2819_codes[IR_KEYTAB_SIZE] = { + [ 40 ] = KEY_KP1, + [ 24 ] = KEY_KP2, + [ 56 ] = KEY_KP3, + [ 36 ] = KEY_KP4, + [ 20 ] = KEY_KP5, + [ 52 ] = KEY_KP6, + [ 44 ] = KEY_KP7, + [ 28 ] = KEY_KP8, + [ 60 ] = KEY_KP9, + [ 34 ] = KEY_KP0, + + [ 32 ] = KEY_TV, // TV/FM + [ 16 ] = KEY_CD, // CD + [ 48 ] = KEY_TEXT, // TELETEXT + [ 0 ] = KEY_POWER, // POWER + + [ 8 ] = KEY_VIDEO, // VIDEO + [ 4 ] = KEY_AUDIO, // AUDIO + [ 12 ] = KEY_ZOOM, // FULL SCREEN + + [ 18 ] = KEY_SUBTITLE, // DISPLAY - ??? + [ 50 ] = KEY_REWIND, // LOOP - ??? + [ 2 ] = KEY_PRINT, // PREVIEW - ??? + + [ 42 ] = KEY_SEARCH, // AUTOSCAN + [ 26 ] = KEY_SLEEP, // FREEZE - ??? + [ 58 ] = KEY_SHUFFLE, // SNAPSHOT - ??? + [ 10 ] = KEY_MUTE, // MUTE + + [ 38 ] = KEY_RECORD, // RECORD + [ 22 ] = KEY_PAUSE, // PAUSE + [ 54 ] = KEY_STOP, // STOP + [ 6 ] = KEY_PLAY, // PLAY + + [ 46 ] = KEY_RED, // <RED> + [ 33 ] = KEY_GREEN, // <GREEN> + [ 14 ] = KEY_YELLOW, // <YELLOW> + [ 1 ] = KEY_BLUE, // <BLUE> + + [ 30 ] = KEY_VOLUMEDOWN, // VOLUME- + [ 62 ] = KEY_VOLUMEUP, // VOLUME+ + [ 17 ] = KEY_CHANNELDOWN, // CHANNEL/PAGE- + [ 49 ] = KEY_CHANNELUP // CHANNEL/PAGE+ +}; /* ---------------------------------------------------------------------- */ static int build_key(struct saa7134_dev *dev) @@ -303,6 +350,15 @@ int saa7134_input_init1(struct saa7134_dev *dev) mask_keyup = 0x000020; polling = 50; // ms break; + case SAA7134_BOARD_MD2819: + ir_codes = md2819_codes; + mask_keycode = 0x0007C8; + mask_keydown = 0x000010; + polling = 50; // ms + /* Set GPIO pin2 to high to enable the IR controller */ + saa_setb(SAA7134_GPIO_GPMODE0, 0x4); + saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4); + break; } if (NULL == ir_codes) { printk("%s: Oops: IR config error [card=%d]\n", |