summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-01-25 17:48:13 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-01-25 17:48:13 -0200
commit58c028064ba2932404e856febb7b05779d9da39d (patch)
tree233cbc908766ed92cd0a9c8985512b97c437fe6b /linux/drivers
parentadac799136b064fd08852b7ea1ef826b3ed7a7bc (diff)
downloadmediapointer-dvb-s2-58c028064ba2932404e856febb7b05779d9da39d.tar.gz
mediapointer-dvb-s2-58c028064ba2932404e856febb7b05779d9da39d.tar.bz2
Implements VIDIOC_[S|G]_INPUT on radio-aztech and radio-maxiradio
From: Mauro Carvalho Chehab <mchehab@infradead.org> fmtools use VIDIOCSTUNER, with, in turn, calls VIDIOC_S_INPUT on v4l1-compat. So, those ioctls are required for V4L1 to work properly. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/radio/radio-aztech.c32
-rw-r--r--linux/drivers/media/radio/radio-maxiradio.c16
2 files changed, 40 insertions, 8 deletions
diff --git a/linux/drivers/media/radio/radio-aztech.c b/linux/drivers/media/radio/radio-aztech.c
index 198eec12c..e622f3c91 100644
--- a/linux/drivers/media/radio/radio-aztech.c
+++ b/linux/drivers/media/radio/radio-aztech.c
@@ -186,7 +186,7 @@ static int az_setfreq(struct az_device *dev, unsigned long frequency)
}
static int vidioc_querycap (struct file *file, void *priv,
- struct v4l2_capability *v)
+ struct v4l2_capability *v)
{
strlcpy(v->driver, "radio-aztech", sizeof (v->driver));
strlcpy(v->card, "Aztech Radio", sizeof (v->card));
@@ -197,7 +197,7 @@ static int vidioc_querycap (struct file *file, void *priv,
}
static int vidioc_g_tuner (struct file *file, void *priv,
- struct v4l2_tuner *v)
+ struct v4l2_tuner *v)
{
struct video_device *dev = video_devdata(file);
struct az_device *az = dev->priv;
@@ -223,7 +223,7 @@ static int vidioc_g_tuner (struct file *file, void *priv,
static int vidioc_s_tuner (struct file *file, void *priv,
- struct v4l2_tuner *v)
+ struct v4l2_tuner *v)
{
if (v->index > 0)
return -EINVAL;
@@ -242,6 +242,20 @@ static int vidioc_g_audio (struct file *file, void *priv,
return 0;
}
+static int vidioc_g_input(struct file *filp, void *priv, unsigned int *i)
+{
+ *i = 0;
+ return 0;
+}
+
+static int vidioc_s_input(struct file *filp, void *priv, unsigned int i)
+{
+ if (i != 0)
+ return -EINVAL;
+ return 0;
+}
+
+
static int vidioc_s_audio (struct file *file, void *priv,
struct v4l2_audio *a)
{
@@ -252,7 +266,7 @@ static int vidioc_s_audio (struct file *file, void *priv,
}
static int vidioc_s_frequency (struct file *file, void *priv,
- struct v4l2_frequency *f)
+ struct v4l2_frequency *f)
{
struct video_device *dev = video_devdata(file);
struct az_device *az = dev->priv;
@@ -263,7 +277,7 @@ static int vidioc_s_frequency (struct file *file, void *priv,
}
static int vidioc_g_frequency (struct file *file, void *priv,
- struct v4l2_frequency *f)
+ struct v4l2_frequency *f)
{
struct video_device *dev = video_devdata(file);
struct az_device *az = dev->priv;
@@ -275,7 +289,7 @@ static int vidioc_g_frequency (struct file *file, void *priv,
}
static int vidioc_queryctrl (struct file *file, void *priv,
- struct v4l2_queryctrl *qc)
+ struct v4l2_queryctrl *qc)
{
int i;
@@ -290,7 +304,7 @@ static int vidioc_queryctrl (struct file *file, void *priv,
}
static int vidioc_g_ctrl (struct file *file, void *priv,
- struct v4l2_control *ctrl)
+ struct v4l2_control *ctrl)
{
struct video_device *dev = video_devdata(file);
struct az_device *az = dev->priv;
@@ -310,7 +324,7 @@ static int vidioc_g_ctrl (struct file *file, void *priv,
}
static int vidioc_s_ctrl (struct file *file, void *priv,
- struct v4l2_control *ctrl)
+ struct v4l2_control *ctrl)
{
struct video_device *dev = video_devdata(file);
struct az_device *az = dev->priv;
@@ -353,6 +367,8 @@ static struct video_device aztech_radio=
.vidioc_s_tuner = vidioc_s_tuner,
.vidioc_g_audio = vidioc_g_audio,
.vidioc_s_audio = vidioc_s_audio,
+ .vidioc_g_input = vidioc_g_input,
+ .vidioc_s_input = vidioc_s_input,
.vidioc_g_frequency = vidioc_g_frequency,
.vidioc_s_frequency = vidioc_s_frequency,
.vidioc_queryctrl = vidioc_queryctrl,
diff --git a/linux/drivers/media/radio/radio-maxiradio.c b/linux/drivers/media/radio/radio-maxiradio.c
index 14b74365d..69e2b01a8 100644
--- a/linux/drivers/media/radio/radio-maxiradio.c
+++ b/linux/drivers/media/radio/radio-maxiradio.c
@@ -239,6 +239,20 @@ static int vidioc_g_audio (struct file *file, void *priv,
return 0;
}
+static int vidioc_g_input(struct file *filp, void *priv, unsigned int *i)
+{
+ *i = 0;
+ return 0;
+}
+
+static int vidioc_s_input(struct file *filp, void *priv, unsigned int i)
+{
+ if (i != 0)
+ return -EINVAL;
+ return 0;
+}
+
+
static int vidioc_s_audio (struct file *file, void *priv,
struct v4l2_audio *a)
{
@@ -334,6 +348,8 @@ static struct video_device maxiradio_radio =
.vidioc_s_tuner = vidioc_s_tuner,
.vidioc_g_audio = vidioc_g_audio,
.vidioc_s_audio = vidioc_s_audio,
+ .vidioc_g_input = vidioc_g_input,
+ .vidioc_s_input = vidioc_s_input,
.vidioc_g_frequency = vidioc_g_frequency,
.vidioc_s_frequency = vidioc_s_frequency,
.vidioc_queryctrl = vidioc_queryctrl,