Skip to content

Commit

Permalink
V4L/DVB (4065): Several improvements at videodev.c
Browse files Browse the repository at this point in the history
Videodev now is capable of better handling V4L2 api, by
processing V4L2 ioctls and using callbacks to the driver.
The drivers should be migrated to the newer way and the older
one will be obsoleted soon.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Mauro Carvalho Chehab committed Jun 25, 2006
1 parent 7565ab0 commit 401998f
Show file tree
Hide file tree
Showing 9 changed files with 1,579 additions and 179 deletions.
1 change: 1 addition & 0 deletions drivers/media/video/cx88/cx88.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <linux/videodev2.h>
#include <linux/kdev_t.h>

#include <media/v4l2-common.h>
#include <media/tuner.h>
#include <media/tveeprom.h>
#include <media/video-buf.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/media/video/saa7134/saa7134.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

#include <asm/io.h>

#include <media/v4l2-common.h>
#include <media/tuner.h>
#include <media/ir-common.h>
#include <media/ir-kbd-i2c.h>
Expand Down
13 changes: 13 additions & 0 deletions drivers/media/video/v4l2-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
#include <asm/io.h>
#include <asm/div64.h>
#include <linux/video_decoder.h>
#define __OLD_VIDIOC_ /* To allow fixing old calls*/
#include <media/v4l2-common.h>

#ifdef CONFIG_KMOD
Expand Down Expand Up @@ -424,7 +425,9 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg)
case TUNER_SET_TYPE_ADDR:
case TUNER_SET_STANDBY:
case TDA9887_SET_CONFIG:
#ifdef __OLD_VIDIOC_
case VIDIOC_OVERLAY_OLD:
#endif
case VIDIOC_STREAMOFF:
case VIDIOC_G_OUTPUT:
case VIDIOC_S_OUTPUT:
Expand All @@ -440,7 +443,9 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg)
case VIDIOC_G_AUDIO:
case VIDIOC_S_AUDIO:
case VIDIOC_ENUMAUDIO:
#ifdef __OLD_VIDIOC_
case VIDIOC_G_AUDIO_OLD:
#endif
{
struct v4l2_audio *p=arg;

Expand All @@ -451,7 +456,9 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg)
case VIDIOC_G_AUDOUT:
case VIDIOC_S_AUDOUT:
case VIDIOC_ENUMAUDOUT:
#ifdef __OLD_VIDIOC_
case VIDIOC_G_AUDOUT_OLD:
#endif
{
struct v4l2_audioout *p=arg;
printk ("%s: index=%d, name=%s, capability=%d, mode=%d\n", s,
Expand Down Expand Up @@ -496,7 +503,9 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg)
}
case VIDIOC_G_CTRL:
case VIDIOC_S_CTRL:
#ifdef __OLD_VIDIOC_
case VIDIOC_S_CTRL_OLD:
#endif
{
struct v4l2_control *p=arg;
printk ("%s: id=%d, value=%d\n", s, p->id, p->value);
Expand All @@ -511,7 +520,9 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg)
break;
}
case VIDIOC_CROPCAP:
#ifdef __OLD_VIDIOC_
case VIDIOC_CROPCAP_OLD:
#endif
{
struct v4l2_cropcap *p=arg;
/*FIXME: Should also show rect structs */
Expand Down Expand Up @@ -703,7 +714,9 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg)
}
case VIDIOC_G_PARM:
case VIDIOC_S_PARM:
#ifdef __OLD_VIDIOC_
case VIDIOC_S_PARM_OLD:
#endif
{
struct v4l2_streamparm *p=arg;
printk ("%s: type=%d\n", s, p->type);
Expand Down
Loading

0 comments on commit 401998f

Please sign in to comment.