Commit 140dcc46 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

V4L/DVB (5150): Implement VIDIOC_[GS]_AUDIO on maxiradio

v4l1-compat requires those two ioctls to translate VIDIOC[SG]RADIO
 into V4L2 calls.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 06470ed6
...@@ -220,6 +220,26 @@ static int vidioc_s_tuner (struct file *file, void *priv, ...@@ -220,6 +220,26 @@ static int vidioc_s_tuner (struct file *file, void *priv,
return 0; return 0;
} }
static int vidioc_g_audio (struct file *file, void *priv,
struct v4l2_audio *a)
{
if (a->index > 1)
return -EINVAL;
strcpy(a->name, "Radio");
a->capability = V4L2_AUDCAP_STEREO;
return 0;
}
static int vidioc_s_audio (struct file *file, void *priv,
struct v4l2_audio *a)
{
if (a->index != 0)
return -EINVAL;
return 0;
}
static int vidioc_s_frequency (struct file *file, void *priv, static int vidioc_s_frequency (struct file *file, void *priv,
struct v4l2_frequency *f) struct v4l2_frequency *f)
{ {
...@@ -304,6 +324,8 @@ static struct video_device maxiradio_radio = ...@@ -304,6 +324,8 @@ static struct video_device maxiradio_radio =
.vidioc_querycap = vidioc_querycap, .vidioc_querycap = vidioc_querycap,
.vidioc_g_tuner = vidioc_g_tuner, .vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner, .vidioc_s_tuner = vidioc_s_tuner,
.vidioc_g_audio = vidioc_g_audio,
.vidioc_s_audio = vidioc_s_audio,
.vidioc_g_frequency = vidioc_g_frequency, .vidioc_g_frequency = vidioc_g_frequency,
.vidioc_s_frequency = vidioc_s_frequency, .vidioc_s_frequency = vidioc_s_frequency,
.vidioc_queryctrl = vidioc_queryctrl, .vidioc_queryctrl = vidioc_queryctrl,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment