The patch number 7980 was added via Mauro Carvalho Chehab <[EMAIL PROTECTED]> to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward compatible with older kernels. Compatibility modifications will be removed before inclusion into the mainstream Kernel If anyone has any objections, please let us know by sending a message to: [EMAIL PROTECTED] ------ From: Mauro Carvalho Chehab <[EMAIL PROTECTED]> backout changeset e30f9c367fabf6227e17c5191c62f886d55eb2d7 Unfortunately, this patch were mixed with an experimental patch I'm working with. Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]> --- linux/Documentation/video4linux/CARDLIST.bttv | 1 linux/Documentation/video4linux/CARDLIST.tuner | 1 linux/drivers/media/common/ir-keymaps.c | 57 +------------- linux/drivers/media/common/tuners/tuner-simple.c | 2 linux/drivers/media/common/tuners/tuner-types.c | 22 ----- linux/drivers/media/dvb/cinergyT2/cinergyT2.c | 46 +++++------ linux/drivers/media/video/bt8xx/bttv-cards.c | 27 ------ linux/drivers/media/video/bt8xx/bttv-driver.c | 5 - linux/drivers/media/video/bt8xx/bttv-input.c | 59 --------------- linux/drivers/media/video/bt8xx/bttv.h | 2 linux/include/media/ir-common.h | 1 linux/include/media/tuner.h | 1 12 files changed, 31 insertions(+), 193 deletions(-) diff -r e30f9c367fab -r 5c4b6f89876a linux/Documentation/video4linux/CARDLIST.bttv --- a/linux/Documentation/video4linux/CARDLIST.bttv Wed May 21 00:30:31 2008 +0000 +++ b/linux/Documentation/video4linux/CARDLIST.bttv Tue Jun 03 14:50:32 2008 -0300 @@ -150,4 +150,3 @@ 149 -> Typhoon TV-Tuner PCI (50684) 149 -> Typhoon TV-Tuner PCI (50684) 150 -> Geovision GV-600 [008a:763c] 151 -> Kozumi KTV-01C -152 -> Encore ENL TV-FM-2 [1000:1801] diff -r e30f9c367fab -r 5c4b6f89876a linux/Documentation/video4linux/CARDLIST.tuner --- a/linux/Documentation/video4linux/CARDLIST.tuner Wed May 21 00:30:31 2008 +0000 +++ b/linux/Documentation/video4linux/CARDLIST.tuner Tue Jun 03 14:50:32 2008 -0300 @@ -74,4 +74,3 @@ tuner=73 - Samsung TCPG 6121P30A tuner=73 - Samsung TCPG 6121P30A tuner=75 - Philips TEA5761 FM Radio tuner=76 - Xceive 5000 tuner -tuner=77 - TCL tuner MF02GIP-5N-E diff -r e30f9c367fab -r 5c4b6f89876a linux/drivers/media/common/ir-keymaps.c --- a/linux/drivers/media/common/ir-keymaps.c Wed May 21 00:30:31 2008 +0000 +++ b/linux/drivers/media/common/ir-keymaps.c Tue Jun 03 14:50:32 2008 -0300 @@ -1842,60 +1842,11 @@ IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_ [ 0x41 ] = KEY_GREEN, /* AP2 */ [ 0x47 ] = KEY_YELLOW, /* AP3 */ [ 0x57 ] = KEY_BLUE, /* AP4 */ -}; + + +}; + EXPORT_SYMBOL_GPL(ir_codes_encore_enltv); - -/* Encore ENLTV2-FM - silver plastic - "Wand Media" written at the botton - Mauro Carvalho Chehab <[EMAIL PROTECTED]> */ -IR_KEYTAB_TYPE ir_codes_encore_enltv2[IR_KEYTAB_SIZE] = { - [0x4c] = KEY_POWER2, - [0x4a] = KEY_TUNER, - [0x40] = KEY_1, - [0x60] = KEY_2, - [0x50] = KEY_3, - [0x70] = KEY_4, - [0x48] = KEY_5, - [0x68] = KEY_6, - [0x58] = KEY_7, - [0x78] = KEY_8, - [0x44] = KEY_9, - [0x54] = KEY_0, - - [0x64] = KEY_LAST, /* +100 */ - [0x4e] = KEY_AGAIN, /* Recall */ - - [0x6c] = KEY_SWITCHVIDEOMODE, /* Video Source */ - [0x5e] = KEY_MENU, - [0x56] = KEY_SCREEN, - [0x7a] = KEY_SETUP, - - [0x46] = KEY_MUTE, - [0x5c] = KEY_MODE, /* Stereo */ - [0x74] = KEY_INFO, - [0x7c] = KEY_CLEAR, - - [0x55] = KEY_UP, - [0x49] = KEY_DOWN, - [0x7e] = KEY_LEFT, - [0x59] = KEY_RIGHT, - [0x6a] = KEY_ENTER, - - [0x42] = KEY_VOLUMEUP, - [0x62] = KEY_VOLUMEDOWN, - [0x52] = KEY_CHANNELUP, - [0x72] = KEY_CHANNELDOWN, - - [0x41] = KEY_RECORD, - [0x51] = KEY_SHUFFLE, /* Snapshot */ - [0x75] = KEY_TIME, /* Timeshift */ - [0x71] = KEY_TV2, /* PIP */ - - [0x45] = KEY_REWIND, - [0x6f] = KEY_PAUSE, - [0x7d] = KEY_FORWARD, - [0x79] = KEY_STOP, -}; -EXPORT_SYMBOL_GPL(ir_codes_encore_enltv2); /* for the Technotrend 1500 bundled remotes (grey and black): */ IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE] = { diff -r e30f9c367fab -r 5c4b6f89876a linux/drivers/media/common/tuners/tuner-simple.c --- a/linux/drivers/media/common/tuners/tuner-simple.c Wed May 21 00:30:31 2008 +0000 +++ b/linux/drivers/media/common/tuners/tuner-simple.c Tue Jun 03 14:50:32 2008 -0300 @@ -150,7 +150,6 @@ static inline int tuner_stereo(const int case TUNER_PHILIPS_FM1236_MK3: case TUNER_PHILIPS_FM1256_IH3: case TUNER_LG_NTSC_TAPE: - case TUNER_TCL_MF02GIP_5N: return ((status & TUNER_SIGNAL) == TUNER_STEREO_MK3); default: return status & TUNER_STEREO; @@ -522,7 +521,6 @@ static int simple_radio_bandswitch(struc case TUNER_PHILIPS_FMD1216ME_MK3: case TUNER_LG_NTSC_TAPE: case TUNER_PHILIPS_FM1256_IH3: - case TUNER_TCL_MF02GIP_5N: buffer[3] = 0x19; break; case TUNER_TNF_5335MF: diff -r e30f9c367fab -r 5c4b6f89876a linux/drivers/media/common/tuners/tuner-types.c --- a/linux/drivers/media/common/tuners/tuner-types.c Wed May 21 00:30:31 2008 +0000 +++ b/linux/drivers/media/common/tuners/tuner-types.c Tue Jun 03 14:50:32 2008 -0300 @@ -1217,23 +1217,6 @@ static struct tuner_params tuner_samsung }, }; -/* ------------ TUNER_TCL_MF02GIP-5N-E - TCL MF02GIP-5N ------------ */ - -static struct tuner_range tuner_tcl_mf02gip_5n_ntsc_ranges[] = { - { 16 * 172.00 /*MHz*/, 0x8e, 0x01, }, - { 16 * 448.00 /*MHz*/, 0x8e, 0x02, }, - { 16 * 999.99 , 0x8e, 0x04, }, -}; - -static struct tuner_params tuner_tcl_mf02gip_5n_params[] = { - { - .type = TUNER_PARAM_TYPE_NTSC, - .ranges = tuner_tcl_mf02gip_5n_ntsc_ranges, - .count = ARRAY_SIZE(tuner_tcl_mf02gip_5n_ntsc_ranges), - .cb_first_if_lower_freq = 1, - }, -}; - /* --------------------------------------------------------------------- */ struct tunertype tuners[] = { @@ -1659,11 +1642,6 @@ struct tunertype tuners[] = { .name = "Xceive 5000 tuner", /* see xc5000.c for details */ }, - [TUNER_TCL_MF02GIP_5N] = { /* TCL tuner MF02GIP-5N-E */ - .name = "TCL tuner MF02GIP-5N-E", - .params = tuner_tcl_mf02gip_5n_params, - .count = ARRAY_SIZE(tuner_tcl_mf02gip_5n_params), - }, }; EXPORT_SYMBOL(tuners); diff -r e30f9c367fab -r 5c4b6f89876a linux/drivers/media/dvb/cinergyT2/cinergyT2.c --- a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c Wed May 21 00:30:31 2008 +0000 +++ b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c Tue Jun 03 14:50:32 2008 -0300 @@ -95,22 +95,22 @@ enum cinergyt2_ep1_cmd { struct dvbt_set_parameters_msg { uint8_t cmd; - __le32 freq; + uint32_t freq; uint8_t bandwidth; - __le16 tps; + uint16_t tps; uint8_t flags; } __attribute__((packed)); struct dvbt_get_status_msg { - __le32 freq; + uint32_t freq; uint8_t bandwidth; - __le16 tps; + uint16_t tps; uint8_t flags; - __le16 gain; + uint16_t gain; uint8_t snr; - __le32 viterbi_error_rate; - __le32 rs_error_rate; - __le32 uncorrected_block_count; + uint32_t viterbi_error_rate; + uint32_t rs_error_rate; + uint32_t uncorrected_block_count; uint8_t lock_bits; uint8_t prev_lock_bits; } __attribute__((packed)); @@ -158,7 +158,6 @@ struct cinergyt2 { wait_queue_head_t poll_wq; int pending_fe_events; int disconnect_pending; - unsigned int uncorrected_block_count; atomic_t inuse; void *streambuf; @@ -174,7 +173,7 @@ struct cinergyt2 { struct delayed_work rc_query_work; #endif int rc_input_event; - __le32 rc_last_code; + u32 rc_last_code; unsigned long last_event_jiffies; #endif }; @@ -187,7 +186,7 @@ enum { struct cinergyt2_rc_event { char type; - __le32 value; + uint32_t value; } __attribute__((packed)); static const uint32_t rc_keys[] = { @@ -654,11 +653,8 @@ static int cinergyt2_ioctl (struct inode { uint32_t unc_count; - if (mutex_lock_interruptible(&cinergyt2->sem)) - return -ERESTARTSYS; - unc_count = cinergyt2->uncorrected_block_count; - cinergyt2->uncorrected_block_count = 0; - mutex_unlock(&cinergyt2->sem); + unc_count = stat->uncorrected_block_count; + stat->uncorrected_block_count = 0; /* UNC are already converted to host byte order... */ return put_user(unc_count,(__u32 __user *) arg); @@ -815,7 +811,7 @@ static void cinergyt2_query_rc (struct w input_sync(cinergyt2->rc_input_dev); cinergyt2->rc_input_event = KEY_MAX; } - cinergyt2->rc_last_code = cpu_to_le32(~0); + cinergyt2->rc_last_code = ~0; } goto out; } @@ -826,7 +822,7 @@ static void cinergyt2_query_rc (struct w n, le32_to_cpu(rc_events[n].value), rc_events[n].type); if (rc_events[n].type == CINERGYT2_RC_EVENT_TYPE_NEC && - rc_events[n].value == cpu_to_le32(~0)) { + rc_events[n].value == ~0) { /* keyrepeat bit -> just repeat last rc_input_event */ } else { cinergyt2->rc_input_event = KEY_MAX; @@ -841,7 +837,7 @@ static void cinergyt2_query_rc (struct w if (cinergyt2->rc_input_event != KEY_MAX) { if (rc_events[n].value == cinergyt2->rc_last_code && - cinergyt2->rc_last_code != cpu_to_le32(~0)) { + cinergyt2->rc_last_code != ~0) { /* emit a key-up so the double event is recognized */ dprintk(1, "rc_input_event=%d UP\n", cinergyt2->rc_input_event); input_report_key(cinergyt2->rc_input_dev, @@ -875,7 +871,7 @@ static int cinergyt2_register_rc(struct usb_make_path(cinergyt2->udev, cinergyt2->phys, sizeof(cinergyt2->phys)); strlcat(cinergyt2->phys, "/input0", sizeof(cinergyt2->phys)); cinergyt2->rc_input_event = KEY_MAX; - cinergyt2->rc_last_code = cpu_to_le32(~0); + cinergyt2->rc_last_code = ~0; #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) INIT_WORK(&cinergyt2->rc_query_work, cinergyt2_query_rc, cinergyt2); #else @@ -890,8 +886,8 @@ static int cinergyt2_register_rc(struct input_dev->keycodesize = 0; input_dev->keycodemax = 0; input_dev->id.bustype = BUS_USB; - input_dev->id.vendor = le16_to_cpu(cinergyt2->udev->descriptor.idVendor); - input_dev->id.product = le16_to_cpu(cinergyt2->udev->descriptor.idProduct); + input_dev->id.vendor = cinergyt2->udev->descriptor.idVendor; + input_dev->id.product = cinergyt2->udev->descriptor.idProduct; input_dev->id.version = 1; #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) input_dev->dev.parent = &cinergyt2->udev->dev; @@ -955,16 +951,18 @@ static void cinergyt2_query (struct work char cmd [] = { CINERGYT2_EP1_GET_TUNER_STATUS }; struct dvbt_get_status_msg *s = &cinergyt2->status; uint8_t lock_bits; + uint32_t unc; if (cinergyt2->disconnect_pending || mutex_lock_interruptible(&cinergyt2->sem)) return; + unc = s->uncorrected_block_count; lock_bits = s->lock_bits; cinergyt2_command(cinergyt2, cmd, sizeof(cmd), (char *) s, sizeof(*s)); - cinergyt2->uncorrected_block_count += - le32_to_cpu(s->uncorrected_block_count); + unc += le32_to_cpu(s->uncorrected_block_count); + s->uncorrected_block_count = unc; if (lock_bits != s->lock_bits) { wake_up_interruptible(&cinergyt2->poll_wq); diff -r e30f9c367fab -r 5c4b6f89876a linux/drivers/media/video/bt8xx/bttv-cards.c --- a/linux/drivers/media/video/bt8xx/bttv-cards.c Wed May 21 00:30:31 2008 +0000 +++ b/linux/drivers/media/video/bt8xx/bttv-cards.c Tue Jun 03 14:50:32 2008 -0300 @@ -327,7 +327,7 @@ static struct CARD { { 0x00261822, BTTV_BOARD_TWINHAN_DST, "DNTV Live! Mini "}, { 0xd200dbc0, BTTV_BOARD_DVICO_FUSIONHDTV_2, "DViCO FusionHDTV 2" }, { 0x763c008a, BTTV_BOARD_GEOVISION_GV600, "GeoVision GV-600" }, - { 0x18011000, BTTV_BOARD_ENLTV_FM_2, "Encore ENL TV-FM-2" }, + { 0, -1, NULL } }; @@ -3087,31 +3087,6 @@ struct tvcard bttv_tvcards[] = { .has_radio = 1, .has_remote = 1, }, - [BTTV_BOARD_ENLTV_FM_2] = { - /* Encore TV Tuner Pro ENL TV-FM-2 - Mauro Carvalho Chehab <[EMAIL PROTECTED] */ - .name = "Encore ENL TV-FM-2", - .video_inputs = 3, - .audio_inputs = 1, - .tuner = 0, - .svhs = 2, - /* bit 6 -> IR disabled - bit 18/17 = 00 -> mute - 01 -> enable external audio input - 10 -> internal audio input (mono?) - 11 -> internal audio input - */ - .gpiomask = 0x060040, - .muxsel = { 2, 3, 3 }, - .gpiomux = { 0x60000, 0x60000, 0x20000, 0x20000 }, - .gpiomute = 0, - .tuner_type = TUNER_TCL_MF02GIP_5N, - .tuner_addr = ADDR_UNSET, - .radio_addr = ADDR_UNSET, - .pll = PLL_28, - .has_radio = 1, - .has_remote = 1, - } }; static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards); diff -r e30f9c367fab -r 5c4b6f89876a linux/drivers/media/video/bt8xx/bttv-driver.c --- a/linux/drivers/media/video/bt8xx/bttv-driver.c Wed May 21 00:30:31 2008 +0000 +++ b/linux/drivers/media/video/bt8xx/bttv-driver.c Tue Jun 03 14:50:32 2008 -0300 @@ -3311,7 +3311,6 @@ static int bttv_open(struct inode *inode sizeof(struct bttv_buffer), fh); set_tvnorm(btv,btv->tvnorm); - set_input(btv, btv->input, btv->tvnorm); btv->users++; @@ -3372,10 +3371,6 @@ static int bttv_release(struct inode *in btv->users--; bttv_field_count(btv); - - if (!btv->users) - audio_mute(btv, 1); - return 0; } diff -r e30f9c367fab -r 5c4b6f89876a linux/drivers/media/video/bt8xx/bttv-input.c --- a/linux/drivers/media/video/bt8xx/bttv-input.c Wed May 21 00:30:31 2008 +0000 +++ b/linux/drivers/media/video/bt8xx/bttv-input.c Tue Jun 03 14:50:32 2008 -0300 @@ -28,8 +28,8 @@ #include "bttvp.h" -static int ir_debug; -module_param(ir_debug, int, 0644); +static int debug; +module_param(debug, int, 0644); /* debug level (0,1,2) */ static int repeat_delay = 500; module_param(repeat_delay, int, 0644); static int repeat_period = 33; @@ -39,9 +39,6 @@ module_param(ir_rc5_remote_gap, int, 064 module_param(ir_rc5_remote_gap, int, 0644); static int ir_rc5_key_timeout = 200; module_param(ir_rc5_key_timeout, int, 0644); - -#undef dprintk -#define dprintk if (ir_debug >= 1) printk #define DEVNAME "bttv-input" @@ -82,45 +79,6 @@ static void ir_handle_key(struct bttv *b } -static void ir_enltv_handle_key(struct bttv *btv) -{ - struct card_ir *ir = btv->remote; - u32 gpio, data, keyup; - - /* read gpio value */ - gpio = bttv_gpio_read(&btv->c); - - /* extract data */ - data = ir_extract_bits(gpio, ir->mask_keycode); - - /* Check if it is keyup */ - keyup = (gpio & ir->mask_keyup) ? 1 << 31 : 0; - - if ((ir->last_gpio & 0x7f) != data) { - dprintk(KERN_INFO DEVNAME ": gpio=0x%x code=%d | %s\n", - gpio, data, - (gpio & ir->mask_keyup) ? " up" : "up/down"); - - ir_input_keydown(ir->dev, &ir->ir, data, data); - if (keyup) - ir_input_nokey(ir->dev, &ir->ir); - } else { - if ((ir->last_gpio & 1 << 31) == keyup) - return; - - dprintk(KERN_INFO DEVNAME ":(cnt) gpio=0x%x code=%d | %s\n", - gpio, data, - (gpio & ir->mask_keyup) ? " up" : "down"); - - if (keyup) - ir_input_nokey(ir->dev, &ir->ir); - else - ir_input_keydown(ir->dev, &ir->ir, data, data); - } - - ir->last_gpio = data | keyup; -} - void bttv_input_irq(struct bttv *btv) { struct card_ir *ir = btv->remote; @@ -134,10 +92,7 @@ static void bttv_input_timer(unsigned lo struct bttv *btv = (struct bttv*)data; struct card_ir *ir = btv->remote; - if (btv->c.type == BTTV_BOARD_ENLTV_FM_2) - ir_enltv_handle_key(btv); - else - ir_handle_key(btv); + ir_handle_key(btv); mod_timer(&ir->timer, jiffies + msecs_to_jiffies(ir->polling)); } @@ -329,14 +284,6 @@ int bttv_input_init(struct bttv *btv) ir->mask_keyup = 0x006000; ir->polling = 50; /* ms */ break; - case BTTV_BOARD_ENLTV_FM_2: - ir_codes = ir_codes_encore_enltv2; - ir->mask_keycode = 0x00fd00; - ir->mask_keyup = 0x000080; - ir->polling = 1; /* ms */ - ir->last_gpio = ir_extract_bits(bttv_gpio_read(&btv->c), - ir->mask_keycode); - break; } if (NULL == ir_codes) { dprintk(KERN_INFO "Ooops: IR config error [card=%d]\n", btv->c.type); diff -r e30f9c367fab -r 5c4b6f89876a linux/drivers/media/video/bt8xx/bttv.h --- a/linux/drivers/media/video/bt8xx/bttv.h Wed May 21 00:30:31 2008 +0000 +++ b/linux/drivers/media/video/bt8xx/bttv.h Tue Jun 03 14:50:32 2008 -0300 @@ -177,7 +177,7 @@ #define BTTV_BOARD_TYPHOON_TVTUNERPCI 0x95 #define BTTV_BOARD_GEOVISION_GV600 0x96 #define BTTV_BOARD_KOZUMI_KTV_01C 0x97 -#define BTTV_BOARD_ENLTV_FM_2 0x98 + /* more card-specific defines */ #define PT2254_L_CHANNEL 0x10 diff -r e30f9c367fab -r 5c4b6f89876a linux/include/media/ir-common.h --- a/linux/include/media/ir-common.h Wed May 21 00:30:31 2008 +0000 +++ b/linux/include/media/ir-common.h Tue Jun 03 14:50:32 2008 -0300 @@ -139,7 +139,6 @@ extern IR_KEYTAB_TYPE ir_codes_budget_ci extern IR_KEYTAB_TYPE ir_codes_budget_ci_old[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_asus_pc39[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE]; -extern IR_KEYTAB_TYPE ir_codes_encore_enltv2[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE]; diff -r e30f9c367fab -r 5c4b6f89876a linux/include/media/tuner.h --- a/linux/include/media/tuner.h Wed May 21 00:30:31 2008 +0000 +++ b/linux/include/media/tuner.h Tue Jun 03 14:50:32 2008 -0300 @@ -122,7 +122,6 @@ #define TUNER_TDA9887 74 /* This tuner should be used only internally */ #define TUNER_TEA5761 75 /* Only FM Radio Tuner */ #define TUNER_XC5000 76 /* Xceive Silicon Tuner */ -#define TUNER_TCL_MF02GIP_5N 77 /* TCL MF02GIP_5N */ /* tv card specific */ #define TDA9887_PRESENT (1<<0) --- Patch is available at: http://linuxtv.org/hg/v4l-dvb/rev/5c4b6f89876a78c5f4140092e8130c9ae81bbb50 _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits