mirror of
https://github.com/torvalds/linux.git
synced 2024-11-06 12:11:59 +00:00
V4L/DVB (5151): Implement VIDIOC_[GS]_AUDIO on aztech
v4l1-compat requires those two ioctls to translate VIDIOC[SG]RADIO into V4L2 calls. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
140dcc46ed
commit
676b0ac7aa
@ -226,6 +226,26 @@ static int vidioc_s_tuner (struct file *file, void *priv,
|
||||
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,
|
||||
struct v4l2_frequency *f)
|
||||
{
|
||||
@ -326,6 +346,8 @@ static struct video_device aztech_radio=
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_g_tuner = vidioc_g_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_s_frequency = vidioc_s_frequency,
|
||||
.vidioc_queryctrl = vidioc_queryctrl,
|
||||
|
Loading…
Reference in New Issue
Block a user