From ebc3bba5833e7021336f09767347a52448a60bc5 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 24 May 2010 10:01:58 -0300 Subject: V4L/DVB: msp3400: convert to the new control framework Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/msp3400-driver.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'drivers/media/video/msp3400-driver.h') diff --git a/drivers/media/video/msp3400-driver.h b/drivers/media/video/msp3400-driver.h index d6b3e6d0eef7..32a478e532f3 100644 --- a/drivers/media/video/msp3400-driver.h +++ b/drivers/media/video/msp3400-driver.h @@ -6,6 +6,7 @@ #include #include +#include /* ---------------------------------------------------------------------- */ @@ -51,6 +52,7 @@ extern int msp_stereo_thresh; struct msp_state { struct v4l2_subdev sd; + struct v4l2_ctrl_handler hdl; int rev1, rev2; int ident; u8 has_nicam; @@ -87,9 +89,12 @@ struct msp_state { int audmode; int rxsubchans; - int volume, muted; - int balance, loudness; - int bass, treble; + struct { + /* volume cluster */ + struct v4l2_ctrl *volume; + struct v4l2_ctrl *muted; + }; + int scan_in_progress; /* thread */ @@ -104,6 +109,11 @@ static inline struct msp_state *to_state(struct v4l2_subdev *sd) return container_of(sd, struct msp_state, sd); } +static inline struct msp_state *ctrl_to_state(struct v4l2_ctrl *ctrl) +{ + return container_of(ctrl->handler, struct msp_state, hdl); +} + /* msp3400-driver.c */ int msp_write_dem(struct i2c_client *client, int addr, int val); int msp_write_dsp(struct i2c_client *client, int addr, int val); @@ -111,7 +121,7 @@ int msp_read_dem(struct i2c_client *client, int addr); int msp_read_dsp(struct i2c_client *client, int addr); int msp_reset(struct i2c_client *client); void msp_set_scart(struct i2c_client *client, int in, int out); -void msp_set_audio(struct i2c_client *client); +void msp_update_volume(struct msp_state *state); int msp_sleep(struct msp_state *state, int timeout); /* msp3400-kthreads.c */ -- cgit v1.2.3