diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 18:09:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 18:09:54 -0400 |
commit | 7ae0dea900b027cd90e8a3e14deca9a19e17638b (patch) | |
tree | 428cbe411bba90f6580ae21338276c949e91f23a /drivers/media/video/msp3400-driver.h | |
parent | 6c74700fdb8e3bc34c31790384a8ec16c4fefd97 (diff) | |
parent | 560afa7d85bdfb294506afd3032c315e6827824f (diff) |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (94 commits)
V4L/DVB: tvp7002: fix write to H-PLL Feedback Divider LSB register
V4L/DVB: dvb: siano: free spinlock before schedule()
V4L/DVB: media: video: pvrusb2: remove custom hex_to_bin()
V4L/DVB: drivers: usbvideo: remove custom implementation of hex_to_bin()
V4L/DVB: Report supported QAM modes on bt8xx
V4L/DVB: media: ir-keytable: null dereference in debug code
V4L/DVB: ivtv: convert to the new control framework
V4L/DVB: ivtv: convert gpio subdev to new control framework
V4L/DVB: wm8739: convert to the new control framework
V4L/DVB: cs53l32a: convert to new control framework
V4L/DVB: wm8775: convert to the new control framework
V4L/DVB: cx2341x: convert to the control framework
V4L/DVB: cx25840: convert to the new control framework
V4L/DVB: cx25840/ivtv: replace ugly priv control with s_config
V4L/DVB: saa717x: convert to the new control framework
V4L/DVB: msp3400: convert to the new control framework
V4L/DVB: saa7115: convert to the new control framework
V4L/DVB: v4l2: hook up the new control framework into the core framework
V4L/DVB: Documentation: add v4l2-controls.txt documenting the new controls API
V4L/DVB: v4l2-ctrls: Whitespace cleanups
...
Diffstat (limited to 'drivers/media/video/msp3400-driver.h')
-rw-r--r-- | drivers/media/video/msp3400-driver.h | 18 |
1 files changed, 14 insertions, 4 deletions
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 @@ | |||
6 | 6 | ||
7 | #include <media/msp3400.h> | 7 | #include <media/msp3400.h> |
8 | #include <media/v4l2-device.h> | 8 | #include <media/v4l2-device.h> |
9 | #include <media/v4l2-ctrls.h> | ||
9 | 10 | ||
10 | /* ---------------------------------------------------------------------- */ | 11 | /* ---------------------------------------------------------------------- */ |
11 | 12 | ||
@@ -51,6 +52,7 @@ extern int msp_stereo_thresh; | |||
51 | 52 | ||
52 | struct msp_state { | 53 | struct msp_state { |
53 | struct v4l2_subdev sd; | 54 | struct v4l2_subdev sd; |
55 | struct v4l2_ctrl_handler hdl; | ||
54 | int rev1, rev2; | 56 | int rev1, rev2; |
55 | int ident; | 57 | int ident; |
56 | u8 has_nicam; | 58 | u8 has_nicam; |
@@ -87,9 +89,12 @@ struct msp_state { | |||
87 | int audmode; | 89 | int audmode; |
88 | int rxsubchans; | 90 | int rxsubchans; |
89 | 91 | ||
90 | int volume, muted; | 92 | struct { |
91 | int balance, loudness; | 93 | /* volume cluster */ |
92 | int bass, treble; | 94 | struct v4l2_ctrl *volume; |
95 | struct v4l2_ctrl *muted; | ||
96 | }; | ||
97 | |||
93 | int scan_in_progress; | 98 | int scan_in_progress; |
94 | 99 | ||
95 | /* thread */ | 100 | /* thread */ |
@@ -104,6 +109,11 @@ static inline struct msp_state *to_state(struct v4l2_subdev *sd) | |||
104 | return container_of(sd, struct msp_state, sd); | 109 | return container_of(sd, struct msp_state, sd); |
105 | } | 110 | } |
106 | 111 | ||
112 | static inline struct msp_state *ctrl_to_state(struct v4l2_ctrl *ctrl) | ||
113 | { | ||
114 | return container_of(ctrl->handler, struct msp_state, hdl); | ||
115 | } | ||
116 | |||
107 | /* msp3400-driver.c */ | 117 | /* msp3400-driver.c */ |
108 | int msp_write_dem(struct i2c_client *client, int addr, int val); | 118 | int msp_write_dem(struct i2c_client *client, int addr, int val); |
109 | int msp_write_dsp(struct i2c_client *client, int addr, int val); | 119 | 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); | |||
111 | int msp_read_dsp(struct i2c_client *client, int addr); | 121 | int msp_read_dsp(struct i2c_client *client, int addr); |
112 | int msp_reset(struct i2c_client *client); | 122 | int msp_reset(struct i2c_client *client); |
113 | void msp_set_scart(struct i2c_client *client, int in, int out); | 123 | void msp_set_scart(struct i2c_client *client, int in, int out); |
114 | void msp_set_audio(struct i2c_client *client); | 124 | void msp_update_volume(struct msp_state *state); |
115 | int msp_sleep(struct msp_state *state, int timeout); | 125 | int msp_sleep(struct msp_state *state, int timeout); |
116 | 126 | ||
117 | /* msp3400-kthreads.c */ | 127 | /* msp3400-kthreads.c */ |