diff options
Diffstat (limited to 'linux/drivers/media/dvb/ttusb-dec')
-rw-r--r-- | linux/drivers/media/dvb/ttusb-dec/Kconfig | 4 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c | 45 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttusb-dec/ttusbdecfe.c | 4 |
3 files changed, 26 insertions, 27 deletions
diff --git a/linux/drivers/media/dvb/ttusb-dec/Kconfig b/linux/drivers/media/dvb/ttusb-dec/Kconfig index 00e07707e..c334526af 100644 --- a/linux/drivers/media/dvb/ttusb-dec/Kconfig +++ b/linux/drivers/media/dvb/ttusb-dec/Kconfig @@ -10,11 +10,11 @@ config DVB_TTUSB_DEC Even if these devices have a MPEG decoder built in, they transmit only compressed MPEG data over the USB bus, so you need - an external software decoder to watch TV on your computer. + an external software decoder to watch TV on your computer. This driver needs external firmware. Please use the commands "<kerneldir>/Documentation/dvb/get_dvb_firmware dec2000t", - "<kerneldir>/Documentation/dvb/get_dvb_firmware dec2540t", + "<kerneldir>/Documentation/dvb/get_dvb_firmware dec2540t", "<kerneldir>/Documentation/dvb/get_dvb_firmware dec3000s", download/extract them, and then copy them to /usr/lib/hotplug/firmware. diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c index b3286691b..8d7d7c30b 100644 --- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c +++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c @@ -152,7 +152,7 @@ struct ttusb_dec { struct dvb_demux_filter *video_filter; struct list_head filter_info_list; spinlock_t filter_info_list_lock; - + struct input_dev rc_input_dev; int active; /* Loaded successfully */ @@ -171,9 +171,9 @@ struct filter_info { }; const uint16_t rc_keys[] = { - KEY_POWER, - KEY_MUTE, - KEY_1, + KEY_POWER, + KEY_MUTE, + KEY_1, KEY_2, KEY_3, KEY_4, @@ -207,7 +207,7 @@ static void ttusb_dec_handle_irq( struct urb *urb, struct pt_regs *regs) struct ttusb_dec * dec = urb->context; char *buffer = dec->irq_buffer; int retval; - + switch(urb->status) { case 0: /*success*/ break; @@ -221,17 +221,17 @@ static void ttusb_dec_handle_irq( struct urb *urb, struct pt_regs *regs) return; default: dprintk("%s:nonzero status received: %d\n", - __FUNCTION__,urb->status); + __FUNCTION__,urb->status); goto exit; } - if( (buffer[0] == 0x1) && (buffer[2] == 0x15) ) { + if( (buffer[0] == 0x1) && (buffer[2] == 0x15) ) { /* IR - Event */ /* this is an fact a bit too simple implementation; * the box also reports a keyrepeat signal - * (with buffer[3] == 0x40) in an intervall of ~100ms. + * (with buffer[3] == 0x40) in an intervall of ~100ms. * But to handle this correctly we had to imlemenent some - * kind of timer which signals a 'key up' event if no + * kind of timer which signals a 'key up' event if no * keyrepeat signal is recieved for lets say 200ms. * this should/could be added later ... * for now lets report each signal as a key down and up*/ @@ -1186,19 +1186,19 @@ static void ttusb_init_rc( struct ttusb_dec *dec) { u8 b[] = { 0x00, 0x01 }; int i; - + init_input_dev(&dec->rc_input_dev); - - dec->rc_input_dev.name = "ttusb_dec remote control"; + + dec->rc_input_dev.name = "ttusb_dec remote control"; dec->rc_input_dev.evbit[0] = BIT(EV_KEY); dec->rc_input_dev.keycodesize = sizeof(unsigned char); dec->rc_input_dev.keycodemax = KEY_MAX; - + for (i = 0; i < sizeof(rc_keys)/sizeof(rc_keys[0]); i++) set_bit(rc_keys[i], dec->rc_input_dev.keybit); - + input_register_device(&dec->rc_input_dev); - + if(usb_submit_urb(dec->irq_urb,GFP_KERNEL)) { printk("%s: usb_submit_urb failed\n",__FUNCTION__); } @@ -1233,14 +1233,14 @@ static int ttusb_dec_init_usb(struct ttusb_dec *dec) dec->irq_urb = usb_alloc_urb(0, GFP_KERNEL); if(!dec->irq_urb) { return -ENOMEM; - } - dec->irq_buffer = usb_buffer_alloc(dec->udev,IRQ_PACKET_SIZE, + } + dec->irq_buffer = usb_buffer_alloc(dec->udev,IRQ_PACKET_SIZE, SLAB_ATOMIC, &dec->irq_dma_handle); if(!dec->irq_buffer) { return -ENOMEM; } usb_fill_int_urb(dec->irq_urb, dec->udev,dec->irq_pipe, - dec->irq_buffer, IRQ_PACKET_SIZE, + dec->irq_buffer, IRQ_PACKET_SIZE, ttusb_dec_handle_irq, dec, 1); dec->irq_urb->transfer_dma = dec->irq_dma_handle; dec->irq_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; @@ -1516,11 +1516,11 @@ static void ttusb_dec_exit_usb(struct ttusb_dec *dec) * As the irq is submitted after the interface is changed, * this is the best method i figured out. * Any other possibilities?*/ - if(dec->interface == TTUSB_DEC_INTERFACE_IN) + if(dec->interface == TTUSB_DEC_INTERFACE_IN) usb_kill_urb(dec->irq_urb); - + usb_free_urb(dec->irq_urb); - + usb_buffer_free(dec->udev,IRQ_PACKET_SIZE, dec->irq_buffer, dec->irq_dma_handle); } @@ -1605,7 +1605,7 @@ static int ttusb_dec_probe(struct usb_interface *intf, dec->udev = udev; - if (ttusb_dec_init_usb(dec)) + if (ttusb_dec_init_usb(dec)) return 0; if (ttusb_dec_init_stb(dec)) { ttusb_dec_exit_usb(dec); @@ -1733,4 +1733,3 @@ MODULE_AUTHOR("Alex Woods <linux-dvb@giblets.org>"); MODULE_DESCRIPTION(DRIVER_NAME); MODULE_LICENSE("GPL"); MODULE_DEVICE_TABLE(usb, ttusb_dec_table); - diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusbdecfe.c b/linux/drivers/media/dvb/ttusb-dec/ttusbdecfe.c index fbadb67db..ff0e5212a 100644 --- a/linux/drivers/media/dvb/ttusb-dec/ttusbdecfe.c +++ b/linux/drivers/media/dvb/ttusb-dec/ttusbdecfe.c @@ -47,7 +47,7 @@ static int ttusbdecfe_read_status(struct dvb_frontend* fe, fe_status_t* status) return 0; } - + static int ttusbdecfe_dvbt_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) { struct ttusbdecfe_state* state = (struct ttusbdecfe_state*) fe->demodulator_priv; @@ -104,7 +104,7 @@ static int ttusbdecfe_dvbs_diseqc_send_master_cmd(struct dvb_frontend* fe, struc u8 b[] = { 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - + memcpy(&b[4], cmd->msg, cmd->msg_len); state->config->send_command(fe, 0x72, |