Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124364
b: refs/heads/master
c: f955c4f
h: refs/heads/master
v: v3
  • Loading branch information
Jean-Francois Moine authored and Mauro Carvalho Chehab committed Dec 30, 2008
1 parent 447ee25 commit 3c5d7b4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 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: cbb0554f9db8a7f592fad898d57df79fe38bf492
refs/heads/master: f955c4fc863c0823ec6c224b6645ab67c46f1a0d
34 changes: 33 additions & 1 deletion trunk/drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ static int gspca_set_alt0(struct gspca_dev *gspca_dev)

ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, 0);
if (ret < 0)
PDEBUG(D_ERR|D_STREAM, "set interface 0 err %d", ret);
PDEBUG(D_ERR|D_STREAM, "set alt 0 err %d", ret);
return ret;
}

Expand Down Expand Up @@ -1071,6 +1071,35 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
return -EINVAL;
}

/*fixme: have an audio flag in gspca_dev?*/
static int vidioc_s_audio(struct file *file, void *priv,
struct v4l2_audio *audio)
{
if (audio->index != 0)
return -EINVAL;
return 0;
}

static int vidioc_g_audio(struct file *file, void *priv,
struct v4l2_audio *audio)
{
memset(audio, 0, sizeof *audio);
strcpy(audio->name, "Microphone");
return 0;
}

static int vidioc_enumaudio(struct file *file, void *priv,
struct v4l2_audio *audio)
{
if (audio->index != 0)
return -EINVAL;

strcpy(audio->name, "Microphone");
audio->capability = 0;
audio->mode = 0;
return 0;
}

static int vidioc_querymenu(struct file *file, void *priv,
struct v4l2_querymenu *qmenu)
{
Expand Down Expand Up @@ -1787,6 +1816,9 @@ static const struct v4l2_ioctl_ops dev_ioctl_ops = {
.vidioc_queryctrl = vidioc_queryctrl,
.vidioc_g_ctrl = vidioc_g_ctrl,
.vidioc_s_ctrl = vidioc_s_ctrl,
.vidioc_g_audio = vidioc_g_audio,
.vidioc_s_audio = vidioc_s_audio,
.vidioc_enumaudio = vidioc_enumaudio,
.vidioc_querymenu = vidioc_querymenu,
.vidioc_enum_input = vidioc_enum_input,
.vidioc_g_input = vidioc_g_input,
Expand Down

0 comments on commit 3c5d7b4

Please sign in to comment.