Skip to content

Commit

Permalink
[media] go7007: convert to the control framework and remove obsolete …
Browse files Browse the repository at this point in the history
…JPEGCOMP support

Just add a read-only V4L2_CID_JPEG_ACTIVE_MARKER control to replace
the JPEGCOMP support.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Mar 24, 2013
1 parent d5d3a7c commit 9b8451d
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 192 deletions.
11 changes: 8 additions & 3 deletions drivers/staging/media/go7007/go7007-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,17 @@ int go7007_register_encoder(struct go7007 *go, unsigned num_i2c_devs)
ret = go7007_init_encoder(go);
mutex_unlock(&go->hw_lock);
if (ret < 0)
return -1;
return ret;

ret = go7007_v4l2_ctrl_init(go);
if (ret < 0)
return ret;

if (!go->i2c_adapter_online &&
go->board_info->flags & GO7007_BOARD_USE_ONBOARD_I2C) {
if (go7007_i2c_init(go) < 0)
return -1;
ret = go7007_i2c_init(go);
if (ret < 0)
return ret;
go->i2c_adapter_online = 1;
}
if (go->i2c_adapter_online) {
Expand Down
3 changes: 3 additions & 0 deletions drivers/staging/media/go7007/go7007-priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/

#include <media/v4l2-device.h>
#include <media/v4l2-ctrls.h>

struct go7007;

Expand Down Expand Up @@ -182,6 +183,7 @@ struct go7007 {
void *boot_fw;
unsigned boot_fw_len;
struct v4l2_device v4l2_dev;
struct v4l2_ctrl_handler hdl;
enum { STATUS_INIT, STATUS_ONLINE, STATUS_SHUTDOWN } status;
spinlock_t spinlock;
struct mutex hw_lock;
Expand Down Expand Up @@ -296,6 +298,7 @@ int go7007_i2c_remove(struct go7007 *go);

/* go7007-v4l2.c */
int go7007_v4l2_init(struct go7007 *go);
int go7007_v4l2_ctrl_init(struct go7007 *go);
void go7007_v4l2_remove(struct go7007 *go);

/* snd-go7007.c */
Expand Down
Loading

0 comments on commit 9b8451d

Please sign in to comment.