Commit 9b8451d5 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] go7007: convert to the control framework and remove obsolete JPEGCOMP support

Just add a read-only V4L2_CID_JPEG_ACTIVE_MARKER control to replace
the JPEGCOMP support.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent d5d3a7cc
...@@ -268,12 +268,17 @@ int go7007_register_encoder(struct go7007 *go, unsigned num_i2c_devs) ...@@ -268,12 +268,17 @@ int go7007_register_encoder(struct go7007 *go, unsigned num_i2c_devs)
ret = go7007_init_encoder(go); ret = go7007_init_encoder(go);
mutex_unlock(&go->hw_lock); mutex_unlock(&go->hw_lock);
if (ret < 0) if (ret < 0)
return -1; return ret;
ret = go7007_v4l2_ctrl_init(go);
if (ret < 0)
return ret;
if (!go->i2c_adapter_online && if (!go->i2c_adapter_online &&
go->board_info->flags & GO7007_BOARD_USE_ONBOARD_I2C) { go->board_info->flags & GO7007_BOARD_USE_ONBOARD_I2C) {
if (go7007_i2c_init(go) < 0) ret = go7007_i2c_init(go);
return -1; if (ret < 0)
return ret;
go->i2c_adapter_online = 1; go->i2c_adapter_online = 1;
} }
if (go->i2c_adapter_online) { if (go->i2c_adapter_online) {
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
*/ */
#include <media/v4l2-device.h> #include <media/v4l2-device.h>
#include <media/v4l2-ctrls.h>
struct go7007; struct go7007;
...@@ -182,6 +183,7 @@ struct go7007 { ...@@ -182,6 +183,7 @@ struct go7007 {
void *boot_fw; void *boot_fw;
unsigned boot_fw_len; unsigned boot_fw_len;
struct v4l2_device v4l2_dev; struct v4l2_device v4l2_dev;
struct v4l2_ctrl_handler hdl;
enum { STATUS_INIT, STATUS_ONLINE, STATUS_SHUTDOWN } status; enum { STATUS_INIT, STATUS_ONLINE, STATUS_SHUTDOWN } status;
spinlock_t spinlock; spinlock_t spinlock;
struct mutex hw_lock; struct mutex hw_lock;
...@@ -296,6 +298,7 @@ int go7007_i2c_remove(struct go7007 *go); ...@@ -296,6 +298,7 @@ int go7007_i2c_remove(struct go7007 *go);
/* go7007-v4l2.c */ /* go7007-v4l2.c */
int go7007_v4l2_init(struct go7007 *go); int go7007_v4l2_init(struct go7007 *go);
int go7007_v4l2_ctrl_init(struct go7007 *go);
void go7007_v4l2_remove(struct go7007 *go); void go7007_v4l2_remove(struct go7007 *go);
/* snd-go7007.c */ /* snd-go7007.c */
......
This diff is collapsed.
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