summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88/cx88.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-01-20 14:58:17 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-01-20 14:58:17 -0200
commitd0eb1f909832fbb0959a05a7bb96d31f2c385515 (patch)
tree2f90105f0835176e651e0085bd3130401a6f8d99 /linux/drivers/media/video/cx88/cx88.h
parentc0720857a3c9833755f75a795763004cf643a0ae (diff)
downloadmediapointer-dvb-s2-d0eb1f909832fbb0959a05a7bb96d31f2c385515.tar.gz
mediapointer-dvb-s2-d0eb1f909832fbb0959a05a7bb96d31f2c385515.tar.bz2
Convert cx8800 driver to video_ioctl2 handler
From: Mauro Carvalho Chehab <mchehab@infradead.org> video_ioctl2 handler provides V4L2 API parsing. Using it makes the driver simpler, and isolates API parsing. This allows future reusage of driver controls using other ways, like sysfs and/or procfs and increases isolation of driver-specific handling from the generic common ioctl processing. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88.h')
-rw-r--r--linux/drivers/media/video/cx88/cx88.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h
index d94a2f7f4..0b12022a8 100644
--- a/linux/drivers/media/video/cx88/cx88.h
+++ b/linux/drivers/media/video/cx88/cx88.h
@@ -87,20 +87,13 @@ enum cx8802_board_access {
/* ----------------------------------------------------------- */
/* tv norms */
-struct cx88_tvnorm {
- char *name;
- v4l2_std_id id;
- u32 cxiformat;
- u32 cxoformat;
-};
-
-static unsigned int inline norm_maxw(struct cx88_tvnorm *norm)
+static unsigned int inline norm_maxw(struct v4l2_tvnorm *norm)
{
return (norm->id & (V4L2_STD_MN & ~V4L2_STD_PAL_Nc)) ? 720 : 768;
}
-static unsigned int inline norm_maxh(struct cx88_tvnorm *norm)
+static unsigned int inline norm_maxh(struct v4l2_tvnorm *norm)
{
return (norm->id & V4L2_STD_625_50) ? 576 : 480;
}
@@ -329,7 +322,7 @@ struct cx88_core {
/* state info */
struct task_struct *kthread;
- struct cx88_tvnorm *tvnorm;
+ struct v4l2_tvnorm *tvnorm;
u32 tvaudio;
u32 audiomode_manual;
u32 audiomode_current;
@@ -575,7 +568,7 @@ extern void cx88_sram_channel_dump(struct cx88_core *core,
extern int cx88_set_scale(struct cx88_core *core, unsigned int width,
unsigned int height, enum v4l2_field field);
-extern int cx88_set_tvnorm(struct cx88_core *core, struct cx88_tvnorm *norm);
+extern int cx88_set_tvnorm(struct cx88_core *core, struct v4l2_tvnorm *norm);
extern struct video_device *cx88_vdev_init(struct cx88_core *core,
struct pci_dev *pci,
@@ -592,7 +585,10 @@ extern int cx88_stop_audio_dma(struct cx88_core *core);
/* ----------------------------------------------------------- */
/* cx88-vbi.c */
-void cx8800_vbi_fmt(struct cx8800_dev *dev, struct v4l2_format *f);
+/* Can be used as g_vbi_fmt, try_vbi_fmt and s_vbi_fmt */
+int cx8800_vbi_fmt (struct file *file, void *priv,
+ struct v4l2_format *f);
+
/*
int cx8800_start_vbi_dma(struct cx8800_dev *dev,
struct cx88_dmaqueue *q,