diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-01-20 11:58:17 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-21 10:34:42 -0500 |
commit | 8d87cb9f31930c7ac25d03043fa90cbd5313fe26 (patch) | |
tree | f98c3dee7886ed7c2405c9e97ad534c1ea46c6c6 /drivers/media/video/cx88/cx88.h | |
parent | fd69496461050296fb0fdd9acf6d789d27a0ef44 (diff) |
V4L/DVB (5097): Convert cx8800 driver to video_ioctl2 handler
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 'drivers/media/video/cx88/cx88.h')
-rw-r--r-- | drivers/media/video/cx88/cx88.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h index a9575ad8ca27..97177c0d022f 100644 --- a/drivers/media/video/cx88/cx88.h +++ b/drivers/media/video/cx88/cx88.h | |||
@@ -82,20 +82,13 @@ enum cx8802_board_access { | |||
82 | /* ----------------------------------------------------------- */ | 82 | /* ----------------------------------------------------------- */ |
83 | /* tv norms */ | 83 | /* tv norms */ |
84 | 84 | ||
85 | struct cx88_tvnorm { | 85 | static unsigned int inline norm_maxw(struct v4l2_tvnorm *norm) |
86 | char *name; | ||
87 | v4l2_std_id id; | ||
88 | u32 cxiformat; | ||
89 | u32 cxoformat; | ||
90 | }; | ||
91 | |||
92 | static unsigned int inline norm_maxw(struct cx88_tvnorm *norm) | ||
93 | { | 86 | { |
94 | return (norm->id & (V4L2_STD_MN & ~V4L2_STD_PAL_Nc)) ? 720 : 768; | 87 | return (norm->id & (V4L2_STD_MN & ~V4L2_STD_PAL_Nc)) ? 720 : 768; |
95 | } | 88 | } |
96 | 89 | ||
97 | 90 | ||
98 | static unsigned int inline norm_maxh(struct cx88_tvnorm *norm) | 91 | static unsigned int inline norm_maxh(struct v4l2_tvnorm *norm) |
99 | { | 92 | { |
100 | return (norm->id & V4L2_STD_625_50) ? 576 : 480; | 93 | return (norm->id & V4L2_STD_625_50) ? 576 : 480; |
101 | } | 94 | } |
@@ -319,7 +312,7 @@ struct cx88_core { | |||
319 | 312 | ||
320 | /* state info */ | 313 | /* state info */ |
321 | struct task_struct *kthread; | 314 | struct task_struct *kthread; |
322 | struct cx88_tvnorm *tvnorm; | 315 | struct v4l2_tvnorm *tvnorm; |
323 | u32 tvaudio; | 316 | u32 tvaudio; |
324 | u32 audiomode_manual; | 317 | u32 audiomode_manual; |
325 | u32 audiomode_current; | 318 | u32 audiomode_current; |
@@ -536,7 +529,7 @@ extern void cx88_sram_channel_dump(struct cx88_core *core, | |||
536 | 529 | ||
537 | extern int cx88_set_scale(struct cx88_core *core, unsigned int width, | 530 | extern int cx88_set_scale(struct cx88_core *core, unsigned int width, |
538 | unsigned int height, enum v4l2_field field); | 531 | unsigned int height, enum v4l2_field field); |
539 | extern int cx88_set_tvnorm(struct cx88_core *core, struct cx88_tvnorm *norm); | 532 | extern int cx88_set_tvnorm(struct cx88_core *core, struct v4l2_tvnorm *norm); |
540 | 533 | ||
541 | extern struct video_device *cx88_vdev_init(struct cx88_core *core, | 534 | extern struct video_device *cx88_vdev_init(struct cx88_core *core, |
542 | struct pci_dev *pci, | 535 | struct pci_dev *pci, |
@@ -553,7 +546,10 @@ extern int cx88_stop_audio_dma(struct cx88_core *core); | |||
553 | /* ----------------------------------------------------------- */ | 546 | /* ----------------------------------------------------------- */ |
554 | /* cx88-vbi.c */ | 547 | /* cx88-vbi.c */ |
555 | 548 | ||
556 | void cx8800_vbi_fmt(struct cx8800_dev *dev, struct v4l2_format *f); | 549 | /* Can be used as g_vbi_fmt, try_vbi_fmt and s_vbi_fmt */ |
550 | int cx8800_vbi_fmt (struct file *file, void *priv, | ||
551 | struct v4l2_format *f); | ||
552 | |||
557 | /* | 553 | /* |
558 | int cx8800_start_vbi_dma(struct cx8800_dev *dev, | 554 | int cx8800_start_vbi_dma(struct cx8800_dev *dev, |
559 | struct cx88_dmaqueue *q, | 555 | struct cx88_dmaqueue *q, |