diff options
-rw-r--r-- | linux/drivers/media/video/Makefile | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/bttv-driver.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-video.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/Makefile | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-alsa.c | 8 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-core.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-oss.c | 126 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-video.c | 4 | ||||
-rw-r--r-- | linux/include/linux/videodev2.h | 5 | ||||
-rw-r--r-- | v4l/ChangeLog | 33 | ||||
-rw-r--r-- | v4l/Makefile | 3 |
11 files changed, 120 insertions, 76 deletions
diff --git a/linux/drivers/media/video/Makefile b/linux/drivers/media/video/Makefile index 6bd9ff71e..f24bc360b 100644 --- a/linux/drivers/media/video/Makefile +++ b/linux/drivers/media/video/Makefile @@ -9,7 +9,7 @@ zr36067-objs := zoran_procfs.o zoran_device.o \ zoran_driver.o zoran_card.o tuner-objs := tuner-core.o tuner-simple.o mt20xx.o tda8290.o tea5767.o -obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-common.o v4l1-compat.o +obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-common.o v4l1-compat.o compat_ioctl32.o obj-$(CONFIG_VIDEO_BT848) += bttv.o msp3400.o tvaudio.o \ tda7432.o tda9875.o ir-kbd-i2c.o ir-kbd-gpio.o diff --git a/linux/drivers/media/video/bttv-driver.c b/linux/drivers/media/video/bttv-driver.c index f32144b36..303d78b1b 100644 --- a/linux/drivers/media/video/bttv-driver.c +++ b/linux/drivers/media/video/bttv-driver.c @@ -1,5 +1,5 @@ /* - $Id: bttv-driver.c,v 1.66 2005/11/08 18:02:29 nsh Exp $ + $Id: bttv-driver.c,v 1.67 2005/11/09 18:30:51 mchehab Exp $ bttv - Bt848 frame grabber driver @@ -3115,6 +3115,7 @@ static struct file_operations bttv_fops = .open = bttv_open, .release = bttv_release, .ioctl = bttv_ioctl, + .compat_ioctl = v4l_compat_ioctl32, .llseek = no_llseek, .read = bttv_read, .mmap = bttv_mmap, diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 44fb4e671..910c773f7 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-video.c,v 1.100 2005/11/06 17:01:47 mchehab Exp $ + * $Id: cx88-video.c,v 1.101 2005/11/09 18:30:51 mchehab Exp $ * * device driver for Conexant 2388x based TV cards * video4linux video interface @@ -2031,6 +2031,7 @@ static struct file_operations video_fops = .poll = video_poll, .mmap = video_mmap, .ioctl = video_ioctl, + .compat_ioctl = v4l_compat_ioctl32, .llseek = no_llseek, }; @@ -2058,6 +2059,7 @@ static struct file_operations radio_fops = .open = video_open, .release = video_release, .ioctl = radio_ioctl, + .compat_ioctl = v4l_compat_ioctl32, .llseek = no_llseek, }; diff --git a/linux/drivers/media/video/saa7134/Makefile b/linux/drivers/media/video/saa7134/Makefile index fe11e4feb..df27ce45a 100644 --- a/linux/drivers/media/video/saa7134/Makefile +++ b/linux/drivers/media/video/saa7134/Makefile @@ -1,7 +1,7 @@ saa7134-objs := saa7134-cards.o saa7134-core.o saa7134-i2c.o \ saa7134-ts.o saa7134-tvaudio.o saa7134-vbi.o \ - saa7134-video.o saa7134-input.o + saa7134-video.o saa7134-input.o obj-$(CONFIG_VIDEO_SAA7134) += saa7134.o saa7134-empress.o saa6752hs.o obj-$(CONFIG_VIDEO_SAA7134) += saa7134-alsa.o saa7134-oss.o diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c index d8de17cda..102e9ab19 100644 --- a/linux/drivers/media/video/saa7134/saa7134-alsa.c +++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c @@ -1,7 +1,7 @@ /* * SAA713x ALSA support for V4L * - * $Id: saa7134-alsa.c,v 1.23 2005/11/09 04:03:11 rmcc Exp $ + * $Id: saa7134-alsa.c,v 1.24 2005/11/09 18:30:51 mchehab Exp $ * * Caveats: * - Volume doesn't work (it's always at max) @@ -222,8 +222,8 @@ void saa7134_irq_alsa_done(struct saa7134_dev *dev, unsigned long status) static irqreturn_t saa7134_alsa_irq(int irq, void *dev_id, struct pt_regs *regs) { - struct saa7134_dmasound *dmasound = dev_id; - struct saa7134_dev *dev = dmasound->priv_data; + struct saa7134_dmasound *dmasound = dev_id; + struct saa7134_dev *dev = dmasound->priv_data; unsigned long report, status; int loop, handled = 0; @@ -968,7 +968,7 @@ int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum) err = request_irq(dev->pci->irq, saa7134_alsa_irq, - SA_SHIRQ | SA_INTERRUPT, dev->name, + SA_SHIRQ | SA_INTERRUPT, dev->name, (void*) &dev->dmasound); if (err < 0) { diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c index efa935195..76e228456 100644 --- a/linux/drivers/media/video/saa7134/saa7134-core.c +++ b/linux/drivers/media/video/saa7134/saa7134-core.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-core.c,v 1.54 2005/11/09 03:33:33 rmcc Exp $ + * $Id: saa7134-core.c,v 1.55 2005/11/09 18:30:51 mchehab Exp $ * * device driver for philips saa7134 based TV cards * driver core @@ -643,8 +643,8 @@ static irqreturn_t saa7134_irq(int irq, void *dev_id, struct pt_regs *regs) /* If dmasound support is active and we get a sound report, exit and let the saa7134-alsa/oss module deal with it */ - if ((report & SAA7134_IRQ_REPORT_DONE_RA3) && - (dev->dmasound.priv_data != NULL) ) + if ((report & SAA7134_IRQ_REPORT_DONE_RA3) && + (dev->dmasound.priv_data != NULL) ) { if (irq_debug > 1) printk(KERN_DEBUG "%s/irq: ignoring interrupt for DMA sound\n", diff --git a/linux/drivers/media/video/saa7134/saa7134-oss.c b/linux/drivers/media/video/saa7134/saa7134-oss.c index 3efd192c3..b9d9d7406 100644 --- a/linux/drivers/media/video/saa7134/saa7134-oss.c +++ b/linux/drivers/media/video/saa7134/saa7134-oss.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-oss.c,v 1.22 2005/11/09 03:33:33 rmcc Exp $ + * $Id: saa7134-oss.c,v 1.23 2005/11/09 18:30:51 mchehab Exp $ * * device driver for philips saa7134 based TV cards * oss dsp interface @@ -783,36 +783,36 @@ struct file_operations saa7134_mixer_fops = { static irqreturn_t saa7134_oss_irq(int irq, void *dev_id, struct pt_regs *regs) { - struct saa7134_dmasound *dmasound = dev_id; - struct saa7134_dev *dev = dmasound->priv_data; - unsigned long report, status; - int loop, handled = 0; - - for (loop = 0; loop < 10; loop++) { - report = saa_readl(SAA7134_IRQ_REPORT); - status = saa_readl(SAA7134_IRQ_STATUS); - - if (report & SAA7134_IRQ_REPORT_DONE_RA3) { - handled = 1; - saa_writel(SAA7134_IRQ_REPORT,report); - saa7134_irq_oss_done(dev, status); - } else { - goto out; - } - } - - if (loop == 10) { - dprintk("error! looping IRQ!"); - } + struct saa7134_dmasound *dmasound = dev_id; + struct saa7134_dev *dev = dmasound->priv_data; + unsigned long report, status; + int loop, handled = 0; + + for (loop = 0; loop < 10; loop++) { + report = saa_readl(SAA7134_IRQ_REPORT); + status = saa_readl(SAA7134_IRQ_STATUS); + + if (report & SAA7134_IRQ_REPORT_DONE_RA3) { + handled = 1; + saa_writel(SAA7134_IRQ_REPORT,report); + saa7134_irq_oss_done(dev, status); + } else { + goto out; + } + } + + if (loop == 10) { + dprintk("error! looping IRQ!"); + } out: - return IRQ_RETVAL(handled); + return IRQ_RETVAL(handled); } int saa7134_oss_init1(struct saa7134_dev *dev) { - if ((request_irq(dev->pci->irq, saa7134_oss_irq, - SA_SHIRQ | SA_INTERRUPT, dev->name, + if ((request_irq(dev->pci->irq, saa7134_oss_irq, + SA_SHIRQ | SA_INTERRUPT, dev->name, (void*) &dev->dmasound)) < 0) return -1; @@ -904,27 +904,27 @@ int saa7134_dsp_create(struct saa7134_dev *dev) { int err; - err = dev->dmasound.minor_dsp = - register_sound_dsp(&saa7134_dsp_fops, - dsp_nr[dev->nr]); - if (err < 0) { - goto fail; - } - printk(KERN_INFO "%s: registered device dsp%d\n", - dev->name,dev->dmasound.minor_dsp >> 4); - - err = dev->dmasound.minor_mixer = - register_sound_mixer(&saa7134_mixer_fops, - mixer_nr[dev->nr]); - if (err < 0) - goto fail; - printk(KERN_INFO "%s: registered device mixer%d\n", - dev->name,dev->dmasound.minor_mixer >> 4); + err = dev->dmasound.minor_dsp = + register_sound_dsp(&saa7134_dsp_fops, + dsp_nr[dev->nr]); + if (err < 0) { + goto fail; + } + printk(KERN_INFO "%s: registered device dsp%d\n", + dev->name,dev->dmasound.minor_dsp >> 4); + + err = dev->dmasound.minor_mixer = + register_sound_mixer(&saa7134_mixer_fops, + mixer_nr[dev->nr]); + if (err < 0) + goto fail; + printk(KERN_INFO "%s: registered device mixer%d\n", + dev->name,dev->dmasound.minor_mixer >> 4); return 0; fail: - unregister_sound_dsp(dev->dmasound.minor_dsp); + unregister_sound_dsp(dev->dmasound.minor_dsp); return 0; @@ -932,44 +932,44 @@ fail: static int saa7134_oss_init(void) { - struct saa7134_dev *dev = NULL; - struct list_head *list; + struct saa7134_dev *dev = NULL; + struct list_head *list; - printk(KERN_INFO "saa7134 OSS driver for DMA sound loaded\n"); + printk(KERN_INFO "saa7134 OSS driver for DMA sound loaded\n"); - list_for_each(list,&saa7134_devlist) { - dev = list_entry(list, struct saa7134_dev, devlist); + list_for_each(list,&saa7134_devlist) { + dev = list_entry(list, struct saa7134_dev, devlist); if (dev->dmasound.priv_data == NULL) { dev->dmasound.priv_data = dev; saa7134_oss_init1(dev); saa7134_dsp_create(dev); } else { - printk(KERN_ERR "saa7134 OSS: DMA sound is being handled by ALSA, ignoring %s\n",dev->name); + printk(KERN_ERR "saa7134 OSS: DMA sound is being handled by ALSA, ignoring %s\n",dev->name); return -EBUSY; } - } + } - if (dev == NULL) - printk(KERN_INFO "saa7134 OSS: no saa7134 cards found\n"); + if (dev == NULL) + printk(KERN_INFO "saa7134 OSS: no saa7134 cards found\n"); - return 0; + return 0; } void saa7134_oss_exit(void) { - struct saa7134_dev *dev = NULL; - struct list_head *list; + struct saa7134_dev *dev = NULL; + struct list_head *list; - list_for_each(list,&saa7134_devlist) { - dev = list_entry(list, struct saa7134_dev, devlist); + list_for_each(list,&saa7134_devlist) { + dev = list_entry(list, struct saa7134_dev, devlist); /* Device isn't registered by OSS, probably ALSA's */ - if (!dev->dmasound.minor_dsp) + if (!dev->dmasound.minor_dsp) continue; - unregister_sound_mixer(dev->dmasound.minor_mixer); - unregister_sound_dsp(dev->dmasound.minor_dsp); + unregister_sound_mixer(dev->dmasound.minor_mixer); + unregister_sound_dsp(dev->dmasound.minor_dsp); saa7134_oss_fini(dev); @@ -978,13 +978,13 @@ void saa7134_oss_exit(void) free_irq(dev->pci->irq,&dev->dmasound); } - dev->dmasound.priv_data = NULL; + dev->dmasound.priv_data = NULL; - } + } - printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n"); + printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n"); - return; + return; } module_init(saa7134_oss_init); diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c index f16dd82ae..c9af508cb 100644 --- a/linux/drivers/media/video/saa7134/saa7134-video.c +++ b/linux/drivers/media/video/saa7134/saa7134-video.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-video.c,v 1.46 2005/10/18 21:49:21 nsh Exp $ + * $Id: saa7134-video.c,v 1.47 2005/11/09 18:30:51 mchehab Exp $ * * device driver for philips saa7134 based TV cards * video4linux video interface @@ -2273,6 +2273,7 @@ static struct file_operations video_fops = .poll = video_poll, .mmap = video_mmap, .ioctl = video_ioctl, + .compat_ioctl = v4l_compat_ioctl32, .llseek = no_llseek, }; @@ -2282,6 +2283,7 @@ static struct file_operations radio_fops = .open = video_open, .release = video_release, .ioctl = radio_ioctl, + .compat_ioctl = v4l_compat_ioctl32, .llseek = no_llseek, }; diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index 3e84fac7e..8a2bddc0b 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -1146,6 +1146,11 @@ typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, int cmd, void *arg, v4l2_kioctl driver_ioctl); +/* 32 Bits compatibility layer for 64 bits processors */ +extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, + unsigned long arg); + + #endif /* __KERNEL__ */ #endif /* __LINUX_VIDEODEV2_H */ diff --git a/v4l/ChangeLog b/v4l/ChangeLog index fd6c6780e..b2783b750 100644 --- a/v4l/ChangeLog +++ b/v4l/ChangeLog @@ -1,3 +1,36 @@ +2005-11-09 18:21 mchehab + + * ../linux/drivers/media/video/Makefile: + * ../linux/drivers/media/video/bttv-driver.c: + * ../linux/drivers/media/video/cx88/cx88-video.c: + * ../linux/drivers/media/video/saa7134/Makefile: + * ../linux/drivers/media/video/saa7134/saa7134-alsa.c: + (saa7134_alsa_irq), (alsa_card_saa7134_create): + * ../linux/drivers/media/video/saa7134/saa7134-core.c: + (saa7134_irq): + * ../linux/drivers/media/video/saa7134/saa7134-oss.c: + (saa7134_oss_irq), (saa7134_oss_init1), (saa7134_dsp_create), + (saa7134_oss_init), (saa7134_oss_exit): + * ../linux/drivers/media/video/saa7134/saa7134-video.c: + * ../linux/include/linux/videodev2.h: + * ../v4l/Makefile: + - This moves the 32 bit ioctl compatibility handlers for + Video4Linux into a new file and adds explicit calls to them + to each v4l device driver. + + - Unfortunately, there does not seem to be any code handling + the v4l2 ioctls, so quite often the code goes through two + separate conversions, first from 32 bit v4l to 64 bit v4l, + and from there to 64 bit v4l2. My patch does not change + that, so there is still much room for improvement. + + - Also, some drivers have additional ioctl numbers, for + which the conversion should be handled internally to + that driver. + + Signed-off-by: Arnd Bergmann <arnd@arndb.de> + Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> + 2005-11-09 11:44 mchehab * ../linux/drivers/media/video/cx25840/Makefile: diff --git a/v4l/Makefile b/v4l/Makefile index 93e4c2e04..54e3f6513 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -33,8 +33,9 @@ em28xx-objs := em28xx-video.o em28xx-i2c.o em28xx-cards.o em28xx-core.o \ cx25840-objs := cx25840-core.o cx25840-audio.o cx25840-firmware.o \ cx25840-vbi.o -# what to build obj-m := video-buf.o v4l1-compat.o v4l2-common.o +obj-m += compat_ioctl32.o + obj-$(CONFIG_VIDEO_BTTV) += btcx-risc.o ir-common.o bttv.o tveeprom.o obj-$(CONFIG_VIDEO_CX88) += btcx-risc.o cx88xx.o cx8800.o cx8802.o \ cx88-blackbird.o tveeprom.o |