summaryrefslogtreecommitdiff
path: root/drivers/media/pci/cx25821/cx25821-video.c
AgeCommit message (Collapse)Author
2013-04-15[media] cx25821: do not expose broken video output streamsHans Verkuil
The cx25821 driver has support for one audio output channel and two video output channels. This is implemented in a very ugly and very evil way through a custom ioctl that passes the filename of a file containing the video data, which is then read by the driver itself using vfs. There are a number of problems with this: 1) it's very ugly and very evil (I can't say that often enough). 2) V4L2 supports video output, so why not use that? 3) it's very buggy, closing the filehandle through which you passed the ioctl will oops the kernel. 4) it's a nasty security leak since this allows you to load any file in the system as a video or audio source, so in theory you can output /etc/passwd to audio or video out and record & decode it on another device. Because of all these issues we no longer register those output video nodes. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] v4l2: add const to argument of write-only s_register ioctlHans Verkuil
This ioctl is defined as IOW, so pass the argument as const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] v4l2: pass std by value to the write-only s_std ioctlHans Verkuil
This ioctl is defined as IOW, so pass the argument by value instead of by reference. I could have chosen to add const instead, but this is 1) easier to handle in drivers and 2) consistent with the s_std subdev operation. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Jonathan Corbet <corbet@lwn.net> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] v4l2: add const to argument of write-only s_tuner ioctlHans Verkuil
This ioctl is defined as IOW, so pass the argument as const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] v4l2: add const to argument of write-only s_frequency ioctlHans Verkuil
This ioctl is defined as IOW, so pass the argument as const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-21[media] v4l: Convert drivers to use monotonic timestampsSakari Ailus
Convert drivers using wall clock time (CLOCK_REALTIME) to timestamp from the monotonic timer (CLOCK_MONOTONIC). Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27[media] cx25821: get rid of warning: no previous prototypeMauro Carvalho Chehab
drivers/media/pci/cx25821/cx25821-audio-upstream.c:136:5: warning: no previous prototype for 'cx25821_risc_buffer_upstream_audio' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-audio-upstream.c:200:6: warning: no previous prototype for 'cx25821_free_memory_audio' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-audio-upstream.c:259:5: warning: no previous prototype for 'cx25821_get_audio_data' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-audio-upstream.c:354:5: warning: no previous prototype for 'cx25821_openfile_audio' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-audio-upstream.c:47:5: warning: no previous prototype for 'cx25821_sram_channel_setup_upstream_audio' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-audio-upstream.c:493:5: warning: no previous prototype for 'cx25821_audio_upstream_irq' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-audio-upstream.c:637:5: warning: no previous prototype for 'cx25821_start_audio_dma_upstream' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-biffuncs.h:28:11: warning: no previous prototype for 'getBit' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-biffuncs.h:33:12: warning: no previous prototype for 'clearBitAtPos' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-biffuncs.h:38:12: warning: no previous prototype for 'setBitAtPos' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-i2c.c:332:6: warning: no previous prototype for 'cx25821_av_clk' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-video.c:294:5: warning: no previous prototype for 'cx25821_restart_video_queue' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-video.c:345:6: warning: no previous prototype for 'cx25821_vid_timeout' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-video-upstream.c:176:5: warning: no previous prototype for 'cx25821_risc_buffer_upstream' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-video-upstream.c:303:5: warning: no previous prototype for 'cx25821_get_frame' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-video-upstream.c:408:5: warning: no previous prototype for 'cx25821_openfile' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-video-upstream.c:489:5: warning: no previous prototype for 'cx25821_upstream_buffer_prepare' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-video-upstream.c:551:5: warning: no previous prototype for 'cx25821_video_upstream_irq' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-video-upstream.c:667:6: warning: no previous prototype for 'cx25821_set_pixelengine' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-video-upstream.c:699:5: warning: no previous prototype for 'cx25821_start_video_dma_upstream' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c:126:5: warning: no previous prototype for 'cx25821_risc_buffer_upstream_ch2' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c:258:5: warning: no previous prototype for 'cx25821_get_frame_ch2' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c:363:5: warning: no previous prototype for 'cx25821_openfile_ch2' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c:510:5: warning: no previous prototype for 'cx25821_video_upstream_irq_ch2' [-Wmissing-prototypes] drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c:650:5: warning: no previous prototype for 'cx25821_start_video_dma_upstream_ch2' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26[media] v4l2: make vidioc_s_crop constHans Verkuil
Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_crop. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] rename most media/video pci drivers to media/pciMauro Carvalho Chehab
Rename all PCI drivers with their own directory under drivers/media/video into drivers/media/pci and update the building system. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>