aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-av-core.h
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2009-02-14 00:32:39 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:43:01 -0400
commit1a2670465ec94029e5df62e3decca9e2f7aea075 (patch)
tree23b2984c9d92089a726da305a13f53388d7c348c /drivers/media/video/cx18/cx18-av-core.h
parenta0beec8f6fd37fc1418970ab6a574fabedd9e324 (diff)
V4L/DVB (10755): cx18: Convert the integrated A/V decoder core interface to a v4l2_subdev
This is the next step in converting the cx18 driver to use the v4l2_device/ v4l2_subdevice framework. This is a straightforward conversion of the cx18_av_*[ch] files. It compiles, but leaves the driver in an unlinkable state at the moment. Note, the cx18 integrated A/V digitizer will now make a host match at address 1, as far as v4l2-dbg is concerned. That means it identifies itself as a separate "chip", and acts as an alias to the integrated A/V decoder registers that are also available with the host match at address 0. Signed-off-by: Andy Walls <awalls@radix.net> [mchehab@redhat.com: fix merge conflicts due to the removal of v4l2_ctrl_query_fill_std()] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-av-core.h')
-rw-r--r--drivers/media/video/cx18/cx18-av-core.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/media/video/cx18/cx18-av-core.h b/drivers/media/video/cx18/cx18-av-core.h
index d83760cae540..025100aee4b8 100644
--- a/drivers/media/video/cx18/cx18-av-core.h
+++ b/drivers/media/video/cx18/cx18-av-core.h
@@ -25,6 +25,8 @@
25#ifndef _CX18_AV_CORE_H_ 25#ifndef _CX18_AV_CORE_H_
26#define _CX18_AV_CORE_H_ 26#define _CX18_AV_CORE_H_
27 27
28#include <media/v4l2-device.h>
29
28struct cx18; 30struct cx18;
29 31
30enum cx18_av_video_input { 32enum cx18_av_video_input {
@@ -73,6 +75,7 @@ enum cx18_av_audio_input {
73}; 75};
74 76
75struct cx18_av_state { 77struct cx18_av_state {
78 struct v4l2_subdev sd;
76 int radio; 79 int radio;
77 v4l2_std_id std; 80 v4l2_std_id std;
78 enum cx18_av_video_input vid_input; 81 enum cx18_av_video_input vid_input;
@@ -315,6 +318,11 @@ struct cx18_av_state {
315#define CXADEC_SELECT_AUDIO_STANDARD_FM 0xF9 /* FM radio */ 318#define CXADEC_SELECT_AUDIO_STANDARD_FM 0xF9 /* FM radio */
316#define CXADEC_SELECT_AUDIO_STANDARD_AUTO 0xFF /* Auto detect */ 319#define CXADEC_SELECT_AUDIO_STANDARD_AUTO 0xFF /* Auto detect */
317 320
321static inline struct cx18_av_state *to_cx18_av_state(struct v4l2_subdev *sd)
322{
323 return container_of(sd, struct cx18_av_state, sd);
324}
325
318/* ----------------------------------------------------------------------- */ 326/* ----------------------------------------------------------------------- */
319/* cx18_av-core.c */ 327/* cx18_av-core.c */
320int cx18_av_write(struct cx18 *cx, u16 addr, u8 value); 328int cx18_av_write(struct cx18 *cx, u16 addr, u8 value);
@@ -327,9 +335,12 @@ u8 cx18_av_read(struct cx18 *cx, u16 addr);
327u32 cx18_av_read4(struct cx18 *cx, u16 addr); 335u32 cx18_av_read4(struct cx18 *cx, u16 addr);
328int cx18_av_and_or(struct cx18 *cx, u16 addr, unsigned mask, u8 value); 336int cx18_av_and_or(struct cx18 *cx, u16 addr, unsigned mask, u8 value);
329int cx18_av_and_or4(struct cx18 *cx, u16 addr, u32 mask, u32 value); 337int cx18_av_and_or4(struct cx18 *cx, u16 addr, u32 mask, u32 value);
330int cx18_av_cmd(struct cx18 *cx, unsigned int cmd, void *arg);
331void cx18_av_std_setup(struct cx18 *cx); 338void cx18_av_std_setup(struct cx18 *cx);
332 339
340int cx18_av_cmd(struct cx18 *cx, int cmd, void *arg); /* FIXME - Remove */
341int cx18_av_init(struct cx18 *cx);
342void cx18_av_fini(struct cx18 *cx);
343
333/* ----------------------------------------------------------------------- */ 344/* ----------------------------------------------------------------------- */
334/* cx18_av-firmware.c */ 345/* cx18_av-firmware.c */
335int cx18_av_loadfw(struct cx18 *cx); 346int cx18_av_loadfw(struct cx18 *cx);