Commit 1a267046 authored by Andy Walls's avatar Andy Walls Committed by Mauro Carvalho Chehab

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: default avatarAndy Walls <awalls@radix.net>
[mchehab@redhat.com: fix merge conflicts due to the removal of v4l2_ctrl_query_fill_std()]
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent a0beec8f
This diff is collapsed.
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#ifndef _CX18_AV_CORE_H_ #ifndef _CX18_AV_CORE_H_
#define _CX18_AV_CORE_H_ #define _CX18_AV_CORE_H_
#include <media/v4l2-device.h>
struct cx18; struct cx18;
enum cx18_av_video_input { enum cx18_av_video_input {
...@@ -73,6 +75,7 @@ enum cx18_av_audio_input { ...@@ -73,6 +75,7 @@ enum cx18_av_audio_input {
}; };
struct cx18_av_state { struct cx18_av_state {
struct v4l2_subdev sd;
int radio; int radio;
v4l2_std_id std; v4l2_std_id std;
enum cx18_av_video_input vid_input; enum cx18_av_video_input vid_input;
...@@ -315,6 +318,11 @@ struct cx18_av_state { ...@@ -315,6 +318,11 @@ struct cx18_av_state {
#define CXADEC_SELECT_AUDIO_STANDARD_FM 0xF9 /* FM radio */ #define CXADEC_SELECT_AUDIO_STANDARD_FM 0xF9 /* FM radio */
#define CXADEC_SELECT_AUDIO_STANDARD_AUTO 0xFF /* Auto detect */ #define CXADEC_SELECT_AUDIO_STANDARD_AUTO 0xFF /* Auto detect */
static inline struct cx18_av_state *to_cx18_av_state(struct v4l2_subdev *sd)
{
return container_of(sd, struct cx18_av_state, sd);
}
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
/* cx18_av-core.c */ /* cx18_av-core.c */
int cx18_av_write(struct cx18 *cx, u16 addr, u8 value); int cx18_av_write(struct cx18 *cx, u16 addr, u8 value);
...@@ -327,9 +335,12 @@ u8 cx18_av_read(struct cx18 *cx, u16 addr); ...@@ -327,9 +335,12 @@ u8 cx18_av_read(struct cx18 *cx, u16 addr);
u32 cx18_av_read4(struct cx18 *cx, u16 addr); u32 cx18_av_read4(struct cx18 *cx, u16 addr);
int cx18_av_and_or(struct cx18 *cx, u16 addr, unsigned mask, u8 value); int cx18_av_and_or(struct cx18 *cx, u16 addr, unsigned mask, u8 value);
int cx18_av_and_or4(struct cx18 *cx, u16 addr, u32 mask, u32 value); int cx18_av_and_or4(struct cx18 *cx, u16 addr, u32 mask, u32 value);
int cx18_av_cmd(struct cx18 *cx, unsigned int cmd, void *arg);
void cx18_av_std_setup(struct cx18 *cx); void cx18_av_std_setup(struct cx18 *cx);
int cx18_av_cmd(struct cx18 *cx, int cmd, void *arg); /* FIXME - Remove */
int cx18_av_init(struct cx18 *cx);
void cx18_av_fini(struct cx18 *cx);
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
/* cx18_av-firmware.c */ /* cx18_av-firmware.c */
int cx18_av_loadfw(struct cx18 *cx); int cx18_av_loadfw(struct cx18 *cx);
......
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