Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124404
b: refs/heads/master
c: 50b86ba
h: refs/heads/master
v: v3
  • Loading branch information
Andy Walls authored and Mauro Carvalho Chehab committed Dec 30, 2008
1 parent 0eb8c23 commit 407d6af
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 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: f6b181ac3bda7aab227e9ee3148bc9b7f1889c57
refs/heads/master: 50b86bac6ae6dda00faa14f7d73ae2412eacc240
5 changes: 4 additions & 1 deletion trunk/drivers/media/video/cx18/cx18-controls.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ int cx18_s_ext_ctrls(struct file *file, void *fh, struct v4l2_ext_controls *c)
return err;
}
if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) {
struct cx18_api_func_private priv;
struct cx2341x_mpeg_params p = cx->params;
int err = cx2341x_ext_ctrls(&p, atomic_read(&cx->ana_capturing),
c, VIDIOC_S_EXT_CTRLS);
Expand All @@ -278,7 +279,9 @@ int cx18_s_ext_ctrls(struct file *file, void *fh, struct v4l2_ext_controls *c)
fmt.fmt.pix.height = cx->params.height;
cx18_av_cmd(cx, VIDIOC_S_FMT, &fmt);
}
err = cx2341x_update(cx, cx18_api_func, &cx->params, &p);
priv.cx = cx;
priv.s = &cx->streams[id->type];
err = cx2341x_update(&priv, cx18_api_func, &cx->params, &p);
if (!err && cx->params.stream_vbi_fmt != p.stream_vbi_fmt)
err = cx18_setup_vbi_fmt(cx, p.stream_vbi_fmt);
cx->params = p;
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/media/video/cx18/cx18-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,9 @@ static int cx18_set_filter_param(struct cx18_stream *s)
int cx18_api_func(void *priv, u32 cmd, int in, int out,
u32 data[CX2341X_MBOX_MAX_DATA])
{
struct cx18 *cx = priv;
struct cx18_stream *s = &cx->streams[CX18_ENC_STREAM_TYPE_MPG];
struct cx18_api_func_private *api_priv = priv;
struct cx18 *cx = api_priv->cx;
struct cx18_stream *s = api_priv->s;

switch (cmd) {
case CX2341X_ENC_SET_OUTPUT_PORT:
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/media/video/cx18/cx18-mailbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ struct cx18_mailbox {
u32 error;
};

struct cx18_stream;

struct cx18_api_func_private {
struct cx18 *cx;
struct cx18_stream *s;
};

int cx18_api(struct cx18 *cx, u32 cmd, int args, u32 data[]);
int cx18_vapi_result(struct cx18 *cx, u32 data[MAX_MB_ARGUMENTS], u32 cmd,
int args, ...);
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/media/video/cx18/cx18-streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,8 @@ int cx18_start_v4l2_encode_stream(struct cx18_stream *s)
cx18_vapi(cx, CX18_CPU_SET_CHANNEL_TYPE, 2, s->handle, captype);

if (atomic_read(&cx->ana_capturing) == 0 && !ts) {
struct cx18_api_func_private priv;

/* Stuff from Windows, we don't know what it is */
cx18_vapi(cx, CX18_CPU_SET_VER_CROP_LINE, 2, s->handle, 0);
cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 3, s->handle, 3, 1);
Expand All @@ -513,7 +515,9 @@ int cx18_start_v4l2_encode_stream(struct cx18_stream *s)
cx18_vapi_result(cx, data, CX18_CPU_SET_INDEXTABLE, 1, 0);

/* Setup API for Stream */
cx2341x_update(cx, cx18_api_func, NULL, &cx->params);
priv.cx = cx;
priv.s = s;
cx2341x_update(&priv, cx18_api_func, NULL, &cx->params);
}

if (atomic_read(&cx->tot_capturing) == 0) {
Expand Down

0 comments on commit 407d6af

Please sign in to comment.