Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33022
b: refs/heads/master
c: 985bc96
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jul 29, 2006
1 parent 6b9f531 commit 10c80c9
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f251d23eaee673524171b24a71a8794acf82783e
refs/heads/master: 985bc96e27c729b8b686126ed26bba9fbaaf562d
4 changes: 2 additions & 2 deletions trunk/drivers/media/video/cx88/cx88-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
struct v4l2_format *f = arg;
return cx8800_try_fmt(dev,fh,f);
}
#ifdef HAVE_V4L1
#ifdef CONFIG_V4L1_COMPAT
/* --- streaming capture ------------------------------------- */
case VIDIOCGMBUF:
{
Expand Down Expand Up @@ -1585,7 +1585,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
*id = 0;
return 0;
}
#ifdef HAVE_V4L1
#ifdef CONFIG_V4L1_COMPAT
case VIDIOCSTUNER:
{
struct video_tuner *v = arg;
Expand Down
10 changes: 9 additions & 1 deletion trunk/drivers/media/video/msp3400-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ int msp_sleep(struct msp_state *state, int timeout)
}

/* ------------------------------------------------------------------------ */

#ifdef CONFIG_VIDEO_V4L1
static int msp_mode_v4l2_to_v4l1(int rxsubchans, int audmode)
{
if (rxsubchans == V4L2_TUNER_SUB_MONO)
Expand All @@ -384,6 +384,7 @@ static int msp_mode_v4l1_to_v4l2(int mode)
return V4L2_TUNER_MODE_LANG1;
return V4L2_TUNER_MODE_MONO;
}
#endif

static int msp_get_ctrl(struct i2c_client *client, struct v4l2_control *ctrl)
{
Expand Down Expand Up @@ -509,6 +510,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
/* --- v4l ioctls --- */
/* take care: bttv does userspace copying, we'll get a
kernel pointer here... */
#ifdef CONFIG_VIDEO_V4L1
case VIDIOCGAUDIO:
{
struct video_audio *va = arg;
Expand Down Expand Up @@ -577,6 +579,12 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
}

case VIDIOCSFREQ:
{
/* new channel -- kick audio carrier scan */
msp_wake_thread(client);
break;
}
#endif
case VIDIOC_S_FREQUENCY:
{
/* new channel -- kick audio carrier scan */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/saa7134/saa7134-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -2087,7 +2087,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
struct v4l2_format *f = arg;
return saa7134_try_fmt(dev,fh,f);
}
#ifdef HAVE_V4L1
#ifdef CONFIG_V4L1_COMPAT
case VIDIOCGMBUF:
{
struct video_mbuf *mbuf = arg;
Expand Down
23 changes: 12 additions & 11 deletions trunk/drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
if (t->standby)
t->standby (client);
break;
#ifdef CONFIG_VIDEO_V4L1
case VIDIOCSAUDIO:
if (check_mode(t, "VIDIOCSAUDIO") == EINVAL)
return 0;
Expand All @@ -599,17 +600,6 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
/* Should be implemented, since bttv calls it */
tuner_dbg("VIDIOCSAUDIO not implemented.\n");
break;
case TDA9887_SET_CONFIG:
if (t->type == TUNER_TDA9887) {
int *i = arg;

t->tda9887_config = *i;
set_freq(client, t->tv_freq);
}
break;
/* --- v4l ioctls --- */
/* take care: bttv does userspace copying, we'll get a
kernel pointer here... */
case VIDIOCSCHAN:
{
static const v4l2_std_id map[] = {
Expand Down Expand Up @@ -693,7 +683,18 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO;
return 0;
}
#endif
case TDA9887_SET_CONFIG:
if (t->type == TUNER_TDA9887) {
int *i = arg;

t->tda9887_config = *i;
set_freq(client, t->tv_freq);
}
break;
/* --- v4l ioctls --- */
/* take care: bttv does userspace copying, we'll get a
kernel pointer here... */
case VIDIOC_S_STD:
{
v4l2_std_id *id = arg;
Expand Down
24 changes: 14 additions & 10 deletions trunk/drivers/media/video/v4l2-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ static char *v4l2_memory_names[] = {
/* ------------------------------------------------------------------ */
/* debug help functions */

#ifdef HAVE_V4L1
#ifdef CONFIG_V4L1_COMPAT
static const char *v4l1_ioctls[] = {
[_IOC_NR(VIDIOCGCAP)] = "VIDIOCGCAP",
[_IOC_NR(VIDIOCGCHAN)] = "VIDIOCGCHAN",
Expand Down Expand Up @@ -301,7 +301,7 @@ static const char *v4l2_ioctls[] = {
#define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls)

static const char *v4l2_int_ioctls[] = {
#ifdef HAVE_VIDEO_DECODER
#ifdef CONFIG_V4L1_COMPAT
[_IOC_NR(DECODER_GET_CAPABILITIES)] = "DECODER_GET_CAPABILITIES",
[_IOC_NR(DECODER_GET_STATUS)] = "DECODER_GET_STATUS",
[_IOC_NR(DECODER_SET_NORM)] = "DECODER_SET_NORM",
Expand Down Expand Up @@ -367,7 +367,7 @@ void v4l_printk_ioctl(unsigned int cmd)
(_IOC_NR(cmd) < V4L2_INT_IOCTLS) ?
v4l2_int_ioctls[_IOC_NR(cmd)] : "UNKNOWN", dir, cmd);
break;
#ifdef HAVE_V4L1
#ifdef CONFIG_V4L1_COMPAT
case 'v':
printk("v4l1 ioctl %s, dir=%s (0x%08x)\n",
(_IOC_NR(cmd) < V4L1_IOCTLS) ?
Expand Down Expand Up @@ -414,6 +414,7 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg)
printk ("%s: tuner type=%d\n", s, *p);
break;
}
#ifdef CONFIG_VIDEO_V4L1_COMPAT
case DECODER_SET_VBI_BYPASS:
case DECODER_ENABLE_OUTPUT:
case DECODER_GET_STATUS:
Expand All @@ -424,6 +425,7 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg)
case VIDIOCCAPTURE:
case VIDIOCSYNC:
case VIDIOCSWRITEMODE:
#endif
case TUNER_SET_TYPE_ADDR:
case TUNER_SET_STANDBY:
case TDA9887_SET_CONFIG:
Expand Down Expand Up @@ -755,6 +757,7 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg)
p->afc);
break;
}
#ifdef CONFIG_VIDEO_V4L1_COMPAT
case VIDIOCGVBIFMT:
case VIDIOCSVBIFMT:
{
Expand Down Expand Up @@ -924,6 +927,14 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg)
p->clipcount);
break;
}
case VIDIOCGFREQ:
case VIDIOCSFREQ:
{
unsigned long *p=arg;
printk ("%s: value=%lu\n", s, *p);
break;
}
#endif
case VIDIOC_INT_AUDIO_CLOCK_FREQ:
case VIDIOC_INT_I2S_CLOCK_FREQ:
case VIDIOC_INT_S_STANDBY:
Expand All @@ -933,13 +944,6 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg)
printk ("%s: value=%d\n", s, *p);
break;
}
case VIDIOCGFREQ:
case VIDIOCSFREQ:
{
unsigned long *p=arg;
printk ("%s: value=%lu\n", s, *p);
break;
}
case VIDIOC_G_STD:
case VIDIOC_S_STD:
case VIDIOC_QUERYSTD:
Expand Down
8 changes: 6 additions & 2 deletions trunk/drivers/media/video/videodev.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
ret=vfd->vidioc_overlay(file, fh, *i);
break;
}
#ifdef HAVE_V4L1
#ifdef CONFIG_V4L1_COMPAT
/* --- streaming capture ------------------------------------- */
case VIDIOCGMBUF:
{
Expand Down Expand Up @@ -1578,7 +1578,11 @@ int video_register_device(struct video_device *vfd, int type, int nr)
__FUNCTION__);
return ret;
}
video_device_create_file(vfd, &class_device_attr_name);
ret = class_device_create_file(&vfd->class_dev, &class_device_attr_name);
if (ret < 0) {
printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret);
return ret;
}

#if 1
/* needed until all drivers are fixed */
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/media/video/vivi.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ static int vidioc_dqbuf (struct file *file, void *priv, struct v4l2_buffer *p)
file->f_flags & O_NONBLOCK));
}

#ifdef HAVE_V4L1
#ifdef CONFIG_V4L1_COMPAT
static int vidiocgmbuf (struct file *file, void *priv, struct video_mbuf *mbuf)
{
struct vivi_fh *fh=priv;
Expand Down Expand Up @@ -1328,7 +1328,7 @@ static struct video_device vivi = {
.vidioc_s_ctrl = vidioc_s_ctrl,
.vidioc_streamon = vidioc_streamon,
.vidioc_streamoff = vidioc_streamoff,
#ifdef HAVE_V4L1
#ifdef CONFIG_V4L1_COMPAT
.vidiocgmbuf = vidiocgmbuf,
#endif
.tvnorms = tvnorms,
Expand Down
7 changes: 5 additions & 2 deletions trunk/include/linux/videodev.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
#ifndef __LINUX_VIDEODEV_H
#define __LINUX_VIDEODEV_H

#define HAVE_V4L1 1

#include <linux/videodev2.h>

#ifdef CONFIG_VIDEO_V4L1_COMPAT
#define HAVE_V4L1 1

struct video_capability
{
char name[32];
Expand Down Expand Up @@ -336,6 +337,8 @@ struct video_code
#define VID_HARDWARE_SN9C102 38
#define VID_HARDWARE_ARV 39

#endif /* CONFIG_VIDEO_V4L1_COMPAT */

#endif /* __LINUX_VIDEODEV_H */

/*
Expand Down

0 comments on commit 10c80c9

Please sign in to comment.