diff options
Diffstat (limited to 'v4l_experimental/v3tv')
-rw-r--r-- | v4l_experimental/v3tv/i2c-voodoo3.c | 10 | ||||
-rw-r--r-- | v4l_experimental/v3tv/v3tv.c | 96 | ||||
-rw-r--r-- | v4l_experimental/v3tv/vpx3224.c | 24 |
3 files changed, 65 insertions, 65 deletions
diff --git a/v4l_experimental/v3tv/i2c-voodoo3.c b/v4l_experimental/v3tv/i2c-voodoo3.c index 3ec720f78..d303a6a9c 100644 --- a/v4l_experimental/v3tv/i2c-voodoo3.c +++ b/v4l_experimental/v3tv/i2c-voodoo3.c @@ -1,11 +1,11 @@ /* voodoo3.c - Part of lm_sensors, Linux kernel modules for hardware - monitoring + monitoring Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>, Philip Edelbrock <phil@netroedge.com>, Ralph Metzler <rjkm@thp.uni-koeln.de>, and Mark D. Studebaker <mdsxyz123@yahoo.com> - + Based on code written by Ralph Metzler <rjkm@thp.uni-koeln.de> and Simon Vogl @@ -168,7 +168,7 @@ static struct i2c_algo_bit_data voo_i2c_bit_data = { static struct i2c_adapter voodoo3_i2c_adapter = { .owner = THIS_MODULE, - .class = I2C_CLASS_TV_ANALOG, + .class = I2C_CLASS_TV_ANALOG, .name = "I2C Voodoo3/Banshee adapter", .algo_data = &voo_i2c_bit_data, }; @@ -185,7 +185,7 @@ static struct i2c_algo_bit_data voo_ddc_bit_data = { static struct i2c_adapter voodoo3_ddc_adapter = { .owner = THIS_MODULE, - .class = I2C_CLASS_DDC, + .class = I2C_CLASS_DDC, .name = "DDC Voodoo3/Banshee adapter", .algo_data = &voo_ddc_bit_data, }; @@ -222,7 +222,7 @@ static int __devinit voodoo3_probe(struct pci_dev *dev, const struct pci_device_ static void __devexit voodoo3_remove(struct pci_dev *dev) { i2c_bit_del_bus(&voodoo3_i2c_adapter); - i2c_bit_del_bus(&voodoo3_ddc_adapter); + i2c_bit_del_bus(&voodoo3_ddc_adapter); iounmap(ioaddr); } diff --git a/v4l_experimental/v3tv/v3tv.c b/v4l_experimental/v3tv/v3tv.c index a29569c6a..6f105cb3b 100644 --- a/v4l_experimental/v3tv/v3tv.c +++ b/v4l_experimental/v3tv/v3tv.c @@ -321,21 +321,21 @@ static struct conf_struct voodoo3_init_reg[] = { static struct conf_struct Chromakey_Enable[] = { {V3REG_vidProcCfg, 1, 5, 5} }; -static struct conf_struct Horizontal_Decimation_Enable[] = +static struct conf_struct Horizontal_Decimation_Enable[] = { {V3REG_vidInFormat, 1, 20, 20} }; /* Horizontal Decimation enable */ -static struct conf_struct Horizontal_Decimation_Disable[] = +static struct conf_struct Horizontal_Decimation_Disable[] = { {V3REG_vidInFormat, 0, 20, 20} }; /* Horizontal Decimation disable */ -static struct conf_struct Vertical_Decimation_Enable[] = +static struct conf_struct Vertical_Decimation_Enable[] = { {V3REG_vidInFormat, 1, 21, 21} }; /* Vertical Decimation enable */ -static struct conf_struct Vertical_Decimation_Disable[] = +static struct conf_struct Vertical_Decimation_Disable[] = { {V3REG_vidInFormat, 0, 21, 21} }; /* Vertical Decimation enable */ -static struct conf_struct Horizontal_Magnification_Enable[] = +static struct conf_struct Horizontal_Magnification_Enable[] = { {V3REG_vidProcCfg, 1, 14, 14} }; /* Horizontal Scaling enable */ -static struct conf_struct Horizontal_Magnification_Disable[] = +static struct conf_struct Horizontal_Magnification_Disable[] = { {V3REG_vidProcCfg, 0, 14, 14} }; /* Horizontal Scaling disable */ -static struct conf_struct Vertical_Magnification_Enable[] = +static struct conf_struct Vertical_Magnification_Enable[] = { {V3REG_vidProcCfg, 1, 15, 15} }; /* Vertical Scaling enable */ -static struct conf_struct Vertical_Magnification_Disable[] = +static struct conf_struct Vertical_Magnification_Disable[] = { {V3REG_vidProcCfg, 0, 15, 15} }; /* Vertical Scaling disable */ static struct conf_struct Overlay_Disable[] = @@ -356,9 +356,9 @@ static struct conf_struct Overlay_Enable[] = { {V3REG_vidProcCfg, 0, 31, 31}, /* No overlay backend de-interlacing */ {V3REG_vidInFormat, 1, 14, 14}, /* VMI interface enable */ {V3REG_vidSerialParallelPort, 1, 0, 0} }; /* VMI host interface enable */ -static struct conf_struct Overlay_Filter_Off[] = { +static struct conf_struct Overlay_Filter_Off[] = { {V3REG_vidProcCfg, 0, 17, 16} }; /* overlay filter OFF */ -static struct conf_struct Overlay_Filter_On[] = { +static struct conf_struct Overlay_Filter_On[] = { {V3REG_vidProcCfg, 3, 17, 16} }; /* overlay filter ON */ static struct conf_struct Disable_VMI_Interrupt[] = { @@ -465,7 +465,7 @@ inline static void voodoo3_regor(unsigned int reg, unsigned int data, unsigned i if (!voodoo || !voodoo->io_base) return; - + reg_ptr = (unsigned int *) voodoo->io_base + reg; *reg_ptr = (*reg_ptr & ~mask) | (data & mask); } @@ -619,7 +619,7 @@ void inline *rvmalloc(signed long size) adr = (unsigned long)mem; while (size > 0) { page = kvirt_to_pa(adr); - mem_map_reserve(virt_to_page(__va(page))); + mem_map_reserve(virt_to_page(__va(page))); adr += PAGE_SIZE; size -= PAGE_SIZE; } @@ -636,7 +636,7 @@ void inline rvfree(void *mem, signed long size) adr = (unsigned long)mem; while (size > 0) { page = kvirt_to_pa(adr); - mem_map_unreserve(virt_to_page(__va(page))); + mem_map_unreserve(virt_to_page(__va(page))); adr += PAGE_SIZE; size -= PAGE_SIZE; } @@ -744,7 +744,7 @@ int v3tv_get_adapter(struct i2c_adapter *adapter) default: return 0; } -#endif +#endif if (debug) printk(KERN_INFO "v3tv: i2c_attach_client found adapter: %s\n", adapter->name); @@ -1364,7 +1364,7 @@ static int fbuffer_alloc() /* * This maps the vmalloced and reserved fbuffer to user space. * - * FIXME: + * FIXME: * - PAGE_READONLY should suffice!? * - remap_page_range is kind of inefficient for page by page remapping. * But e.g. pte_alloc() does not work in modules ... :-( @@ -1495,7 +1495,7 @@ static int get_control(struct voodoo_data *voodoo, struct v4l2_control *c) { struct video_audio va; int i; - + for (i = 0; i < V3TV_CTLS; i++) if (v3tv_ctls[i].id == c->id) break; @@ -1623,7 +1623,7 @@ static int v3tv_radio_do_ioctl(struct inode *inode, struct file *file, case VIDIOC_ENUMINPUT: { struct v4l2_input *i = arg; - + printk("v3tv: VIDIOC_ENUMINPUT %d.\n",i->index); if( i->index != 0 ) { return -EINVAL; @@ -1693,8 +1693,8 @@ static int v3tv_radio_do_ioctl(struct inode *inode, struct file *file, printk("v3tv: VIDIOC_QUERYCAP\n"); - strcpy(cap->driver,"v3tv radio"); - strcpy(cap->card,"Voodoo3 TV 3500"); + strcpy(cap->driver,"v3tv radio"); + strcpy(cap->card,"Voodoo3 TV 3500"); strcpy(cap->bus_info,"AGP Slot 0"); cap->version = KERNEL_VERSION(0,1,0); cap->capabilities = @@ -1801,7 +1801,7 @@ static int v3tv_radio_do_ioctl(struct inode *inode, struct file *file, return -EINVAL; if (unlikely(f->type != V4L2_TUNER_RADIO)) return -EINVAL; -#if 0 +#if 0 if (f->frequency < 45 * 16000) { // if (f->frequency < 696000) { printk ("v3tv: Radio program does not support the VIDEO_TUNER_LOW flag\n"); @@ -1953,7 +1953,7 @@ static int v3tv_radio_do_ioctl(struct inode *inode, struct file *file, printk ("v3tv: FIXME: VIDIOSAUDIO: Audio=%d\n", va.audio); - // FIXME. This should really be checked. + // FIXME. This should really be checked. // If only user programs respected it :-( return -EINVAL; } @@ -2028,9 +2028,9 @@ static int v3tv_radio_open(struct inode *inode, struct file *file) i2c_clients_command(voodoo->voodoo_i2c_adapter, TUNER_SET_TYPE_ADDR, &tun_setup); - } + } - i2c_clients_command(voodoo->voodoo_i2c_adapter, + i2c_clients_command(voodoo->voodoo_i2c_adapter, AUDC_SET_RADIO, &voodoo->tuner_type); // up(&voodoo->lock); @@ -2158,19 +2158,19 @@ static irqreturn_t v3tv_video_irq(int irq, void *dev_id, struct pt_regs *regs) voodoo->initialized &= ~I_irq; voodoo->decoder_enabled = 0; - i2c_clients_command(voodoo->voodoo_i2c_adapter, + i2c_clients_command(voodoo->voodoo_i2c_adapter, DECODER_ENABLE_OUTPUT, &voodoo->decoder_enabled); - struct video_audio va; + struct video_audio va; - i2c_clients_command(voodoo->voodoo_i2c_adapter, VIDIOCGAUDIO, &va); + i2c_clients_command(voodoo->voodoo_i2c_adapter, VIDIOCGAUDIO, &va); - va.volume = 0; - va.balance = 32768; - i2c_clients_command(voodoo->voodoo_i2c_adapter, VIDIOCSAUDIO, &va); + va.volume = 0; + va.balance = 32768; + i2c_clients_command(voodoo->voodoo_i2c_adapter, VIDIOCSAUDIO, &va); */ -/* Optionaly disable Video In. */ +/* Optionaly disable Video In. */ // v3tv_conf(VMI_Disable, CONF_SIZE(VMI_Disable)); break; } @@ -2225,7 +2225,7 @@ static int v3tv_video_open(struct inode *inode, struct file *file) if (debug) printk(KERN_DEBUG "v3tv: open minor=%d\n",minor); - if (voodoo->vbi_dev && + if (voodoo->vbi_dev && voodoo->vbi_dev->minor == minor) type = V4L2_BUF_TYPE_VBI_CAPTURE; if (voodoo->video_dev && @@ -2279,12 +2279,12 @@ static int v3tv_video_open(struct inode *inode, struct file *file) i2c_clients_command(voodoo->voodoo_i2c_adapter, TUNER_SET_TYPE_ADDR, &tun_setup); - } + } // struct video_audio va; // i2c_clients_command(voodoo->voodoo_i2c_adapter, VIDIOCGAUDIO, &va); - + // va.flags = VIDEO_AUDIO_MUTE; // va.volume = 65535; // va.balance = 32768; /* FIXME. This shouldn't be necessary */ @@ -2311,7 +2311,7 @@ static int v3tv_video_release(struct inode *inode, struct file *file) struct voodoo_data *voodoo_tv = file->private_data; if (voodoo_tv->initialized & I_irq) { - free_irq(voodoo_tv->dev->irq, voodoo_tv->dev); + free_irq(voodoo_tv->dev->irq, voodoo_tv->dev); voodoo_tv->initialized &= ~I_irq; } @@ -2337,7 +2337,7 @@ static int v3tv_video_release(struct inode *inode, struct file *file) return 0; } -/* No poll now +/* No poll now static int v4l_voodoo_poll (struct video_device*dev, structfile *file, struct poll_table *wait) @@ -2422,14 +2422,14 @@ static long v3tv_voodoo_read(struct video_device *dev, char *buf,unsigned long c current->state = TASK_RUNNING; return -ERESTARTSYS; } - schedule(); + schedule(); current->state = TASK_INTERRUPTIBLE; } remove_wait_queue(&capture_wait, &wait); current->state = TASK_RUNNING; - capture_ready = 0; + capture_ready = 0; ptr = (u8 *)buf; len=capture_w * 3 * capture_h; @@ -2585,7 +2585,7 @@ static int v3tv_video_do_ioctl(struct inode *inode, struct file *file, i2c_clients_command(voodoo_tv->voodoo_i2c_adapter, VIDIOCSCHAN, &vchan); - sarg = (voodoo_tv->channel) ? AUDIO_EXTERN_2 : + sarg = (voodoo_tv->channel) ? AUDIO_EXTERN_2 : AUDIO_TUNER; i2c_clients_command(voodoo_tv->voodoo_i2c_adapter, AUDC_SET_INPUT, &sarg); @@ -2615,7 +2615,7 @@ static int v3tv_video_do_ioctl(struct inode *inode, struct file *file, "contrast: 0x%04x colour: 0x%04x " "w: 0x%04x\n", voodoo_tv->picture_settings.brightness, - voodoo_tv->picture_settings.hue, + voodoo_tv->picture_settings.hue, voodoo_tv->picture_settings.contrast, voodoo_tv->picture_settings.colour, voodoo_tv->picture_settings.whiteness); @@ -2651,7 +2651,7 @@ static int v3tv_video_do_ioctl(struct inode *inode, struct file *file, /* Set picture parameters here */ if ((pic->palette != VIDEO_PALETTE_RGB565) && (pic->palette != VIDEO_PALETTE_RGB24) && - (pic->palette != VIDEO_PALETTE_RGB32)) + (pic->palette != VIDEO_PALETTE_RGB32)) v3tv_set_palette(pic); #else if (pic->palette != voodoo_tv->picture_settings.palette) { @@ -2840,7 +2840,7 @@ static int v3tv_video_do_ioctl(struct inode *inode, struct file *file, return 0; } case VIDIOCSTUNER: - { + { struct video_tuner *tuner_info = arg; if (tuner_info->tuner) /* Only tuner 0 */ @@ -2853,7 +2853,7 @@ static int v3tv_video_do_ioctl(struct inode *inode, struct file *file, DECODER_SET_NORM, &voodoo_tv->norm); return 0; - } + } case VIDIOCGFREQ: { @@ -3068,7 +3068,7 @@ static void v3tv_unregister_video(struct voodoo_data *voodoo) if (voodoo->video_dev) { if (-1 != voodoo->video_dev->minor) { printk("v3tv: unregistering device video%d (%d)\n", - voodoo->video_dev->minor & 0x1f, + voodoo->video_dev->minor & 0x1f, voodoo->video_dev->minor); video_unregister_device(voodoo->video_dev); } @@ -3078,7 +3078,7 @@ static void v3tv_unregister_video(struct voodoo_data *voodoo) if (voodoo->vbi_dev) { if (-1 != voodoo->vbi_dev->minor) { printk("v3tv: unregistering device vbi%d (%d)\n", - voodoo->vbi_dev->minor & 0x1f, + voodoo->vbi_dev->minor & 0x1f, voodoo->vbi_dev->minor); video_unregister_device(voodoo->vbi_dev); } @@ -3088,7 +3088,7 @@ static void v3tv_unregister_video(struct voodoo_data *voodoo) if (voodoo->radio_dev) { if (-1 != voodoo->radio_dev->minor) { printk("v3tv: unregistering device radio%d (%d)\n", - voodoo->radio_dev->minor & 0x1f, + voodoo->radio_dev->minor & 0x1f, voodoo->radio_dev->minor); video_unregister_device(voodoo->radio_dev); } @@ -3108,7 +3108,7 @@ static int __devinit v3tv_register_video(struct voodoo_data *voodoo) /* vbi */ voodoo->vbi_dev = &v3tv_vdev_vbi; - if (video_register_device(voodoo->vbi_dev,VFL_TYPE_VBI,vbi_nr)<0) + if (video_register_device(voodoo->vbi_dev,VFL_TYPE_VBI,vbi_nr)<0) goto err; printk(KERN_INFO "v3tv: registered device vbi%d (%d)\n", voodoo->vbi_dev->minor & 0x1f, voodoo->vbi_dev->minor); @@ -3135,7 +3135,7 @@ int v3tv_video_init(struct voodoo_data *voodoo) switch (voodoo->model) { case VOODOO3_MODEL_NTSC: printk(KERN_INFO "v3tv: NTSC model.\n"); - snprintf(voodoo->name, sizeof(voodoo->name), + snprintf(voodoo->name, sizeof(voodoo->name), "Voodoo3 TV 3500 %s", "NTSC"); voodoo->norm = VIDEO_MODE_NTSC; voodoo->tuner_type = TUNER_PHILIPS_NTSC; /* 2 */ @@ -3178,7 +3178,7 @@ int v3tv_video_init(struct voodoo_data *voodoo) i2c_clients_command(voodoo->voodoo_i2c_adapter, TUNER_SET_TYPE_ADDR, &tun_setup); - } + } voodoo->picture_settings.brightness = 0x8000; voodoo->picture_settings.hue = 0x8000; diff --git a/v4l_experimental/v3tv/vpx3224.c b/v4l_experimental/v3tv/vpx3224.c index 5e4a10694..fb5f05b79 100644 --- a/v4l_experimental/v3tv/vpx3224.c +++ b/v4l_experimental/v3tv/vpx3224.c @@ -1,4 +1,4 @@ -/* +/* * vpx3224d & vpx3225d video decoder driver version 0.0.1 * @@ -407,26 +407,26 @@ static const u16 init_ntsc[] = { static const u16 init_pal[] = { RFP_vbegin1, 0, /* Window 1 vertical begin */ // RFP_vbegin1, 23, /* Window 1 vertical begin */ - RFP_vlinesin1, 288 + 16, /* Vertical lines in (16 lines + RFP_vlinesin1, 288 + 16, /* Vertical lines in (16 lines * skipped by the VFE) */ RFP_vlinesout1, 288 + 16, /* Vertical lines out (16 lines * skipped by the VFE) */ RFP_hbeg1, 16, /* Horizontal begin */ RFP_hlen1, 768, /* Horizontal length */ - RFP_npix1, 784, /* Number of pixels + RFP_npix1, 784, /* Number of pixels * Must be >= Horizontal begin + Horizontal length */ RFP_sdt, 0, /* PAL B,G,H,I, */ }; static const u16 init_secam[] = { RFP_vbegin1, 23 - 16, /* Window 1 vertical begin */ - RFP_vlinesin1, 288 + 16, /* Vertical lines in (16 lines + RFP_vlinesin1, 288 + 16, /* Vertical lines in (16 lines * skipped by the VFE) */ - RFP_vlinesout1, 288 + 16, /* Vertical lines out (16 lines + RFP_vlinesout1, 288 + 16, /* Vertical lines out (16 lines * skipped by the VFE) */ RFP_hbeg1, 16, /* Horizontal begin */ RFP_hlen1, 768, /* Horizontal length */ - RFP_npix1, 784, /* Number of pixels + RFP_npix1, 784, /* Number of pixels * Must be >= Horizontal begin + Horizontal length */ RFP_sdt, 2, /* SECAM, */ }; @@ -447,7 +447,7 @@ static const u16 init_fp[] = { /* 16 reg-value pairs */ static const unsigned char init_common[] = { R_llc, 0, /* active mode, outputs enabled */ - R_driver_a, 0x24, /* Port A, PIXCLK, HF# & FE# + R_driver_a, 0x24, /* Port A, PIXCLK, HF# & FE# * stra1 = 100; stra2 = 100 */ R_driver_b, 0x20, /* Port B, HREF, VREF, PREF & * strb2 = 100 */ @@ -672,7 +672,7 @@ static int vpx3224_get_status(struct i2c_client *client) static int vpx3224_auto_norm(struct i2c_client *client) { /* * Auto is not supported by the vpx3224/5d. - * Scan the valid modes, read RFP_asr for score, pick the highest score. + * Scan the valid modes, read RFP_asr for score, pick the highest score. * With an NTSC M signal, there is no clear winner... */ DEB(printk (KERN_INFO "%s: Auto video mode detection not supported.\n", @@ -735,7 +735,7 @@ static int vpx3224_set_norm(struct i2c_client *client, int norm) break; /* case VIDEO_MODE_AUTO: norm = vpx3224_auto_norm(client); - break; + break; */ default: return -EINVAL; @@ -886,7 +886,7 @@ static int vpx3224_init_client(struct i2c_client *client) return res; /* * We cycle through the supported modes - * and read RFP_asr to see which is valid. + * and read RFP_asr to see which is valid. * restore this line to see output when module loads */ /* vpx3224_auto_norm(client); */ res = vpx3224_set_norm(client, VIDEO_MODE_NTSC); @@ -1209,8 +1209,8 @@ static int vpx3224_detect_client(struct i2c_adapter *adapter, int address, /* i2c_attach_client adds client to client->adapter->clients[] returns: - -EBUSY - -ENOMEM enlarge I2C_CLIENT_MAX */ + -EBUSY + -ENOMEM enlarge I2C_CLIENT_MAX */ res = i2c_attach_client(client); DEB2(printk(KERN_INFO "%s: i2c_attach_client returned %d\n", client->name, res)); |