diff options
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88.h')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88.h | 86 |
1 files changed, 66 insertions, 20 deletions
diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h index aa32b1e4b..d4fc1d58a 100644 --- a/linux/drivers/media/video/cx88/cx88.h +++ b/linux/drivers/media/video/cx88/cx88.h @@ -1,5 +1,5 @@ /* - * $Id: cx88.h,v 1.24 2004/08/23 10:38:54 kraxel Exp $ + * $Id: cx88.h,v 1.25 2004/08/25 14:47:54 kraxel Exp $ * * v4l2 device driver for cx2388x based TV cards * @@ -26,6 +26,12 @@ #include <linux/videodev.h> #include <linux/kdev_t.h> +#include <dvbdev.h> +#include <dmxdev.h> +#include <dvb_demux.h> +#include <dvb_net.h> +#include <dvb_frontend.h> + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,64) #include "video-buf.h" #include "tuner.h" @@ -57,6 +63,8 @@ /* ----------------------------------------------------------- */ /* defines and enums */ +#define V4L2_I2C_CLIENTS 1 + #define FORMAT_FLAGS_PACKED 0x01 #define FORMAT_FLAGS_PLANAR 0x02 @@ -69,15 +77,29 @@ #define SHADOW_MAX 2 /* ----------------------------------------------------------- */ -/* static data */ +/* tv norms */ -struct cx8800_tvnorm { +struct cx88_tvnorm { char *name; v4l2_std_id id; u32 cxiformat; u32 cxoformat; }; +static unsigned int inline norm_maxw(struct cx88_tvnorm *norm) +{ + return (norm->id & V4L2_STD_625_50) ? 768 : 640; +// return (norm->id & V4L2_STD_625_50) ? 720 : 640; +} + +static unsigned int inline norm_maxh(struct cx88_tvnorm *norm) +{ + return (norm->id & V4L2_STD_625_50) ? 576 : 480; +} + +/* ----------------------------------------------------------- */ +/* static data */ + struct cx8800_fmt { char *name; u32 fourcc; /* v4l2 format id */ @@ -141,6 +163,7 @@ extern struct sram_channel cx88_sram_channels[]; #define CX88_BOARD_MSI_TVANYWHERE 13 #define CX88_BOARD_KWORLD_DVB_T 14 #define CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1 15 +#define CX88_BOARD_KWORLD_LTV883 16 enum cx88_itype { CX88_VMUX_COMPOSITE1 = 1, @@ -176,7 +199,7 @@ struct cx88_subid { u32 card; }; -#define INPUT(nr) (&cx88_boards[dev->core->board].input[nr]) +#define INPUT(nr) (&cx88_boards[core->board].input[nr]) /* ----------------------------------------------------------- */ /* device / file handle status */ @@ -234,6 +257,13 @@ struct cx88_core { unsigned int tuner_type; unsigned int tda9887_conf; unsigned int has_radio; + + /* state info */ + struct task_struct *kthread; + struct cx88_tvnorm *tvnorm; + u32 tvaudio; + u32 input; + u32 astat; }; struct cx8800_dev; @@ -283,26 +313,21 @@ struct cx8800_dev { struct pci_dev *pci; unsigned char pci_rev,pci_lat; +#if 0 /* video overlay */ struct v4l2_framebuffer fbuf; struct cx88_buffer *screen; +#endif /* capture queues */ struct cx88_dmaqueue vidq; struct cx88_dmaqueue vbiq; /* various v4l controls */ - struct cx8800_tvnorm *tvnorm; - u32 tvaudio; - u32 input; u32 freq; /* other global state info */ - int shutdown; - pid_t tpid; - struct completion texit; struct cx8800_suspend_state state; - u32 astat; }; /* ----------------------------------------------------------- */ @@ -326,19 +351,32 @@ struct cx8802_fh { struct cx8802_dev { struct cx88_core *core; - struct list_head devlist; struct semaphore lock; spinlock_t slock; - /* misc */ - struct video_device *mpeg_dev; - /* pci i/o */ struct pci_dev *pci; unsigned char pci_rev,pci_lat; /* dma queues */ struct cx88_dmaqueue mpegq; + u32 ts_packet_size; + u32 ts_packet_count; + + /* for blackbird only */ + struct list_head devlist; + struct video_device *mpeg_dev; + u32 mailbox; + + /* for dvb only */ + struct videobuf_queue dvbq; + struct task_struct *dvb_thread; + struct dvb_adapter *dvb_adapter; + struct dvb_demux demux; + struct dmxdev dmxdev; + struct dmx_frontend fe_hw; + struct dmx_frontend fe_mem; + struct dvb_net dvbnet; }; /* ----------------------------------------------------------- */ @@ -397,6 +435,11 @@ extern int cx88_sram_channel_setup(struct cx88_core *core, unsigned int bpl, u32 risc); extern void cx88_sram_channel_dump(struct cx88_core *core, struct sram_channel *ch); + +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 struct video_device *cx88_vdev_init(struct cx88_core *core, struct pci_dev *pci, struct video_device *template, @@ -454,16 +497,19 @@ extern void cx88_card_setup(struct cx88_core *core); #define WW_I2SPT 11 #define WW_FM 12 -void cx88_set_tvaudio(struct cx8800_dev *dev); -void cx88_get_stereo(struct cx8800_dev *dev, struct v4l2_tuner *t); -void cx88_set_stereo(struct cx8800_dev *dev, u32 mode); +void cx88_set_tvaudio(struct cx88_core *core); +void cx88_get_stereo(struct cx88_core *core, struct v4l2_tuner *t); +void cx88_set_stereo(struct cx88_core *core, u32 mode); int cx88_audio_thread(void *data); /* ----------------------------------------------------------- */ /* cx88-mpeg.c */ -extern struct list_head cx8802_devlist; -extern struct videobuf_queue_ops cx8802_mpeg_qops; +int cx8802_buf_prepare(struct cx8802_dev *dev, struct cx88_buffer *buf); +void cx8802_buf_queue(struct cx8802_dev *dev, struct cx88_buffer *buf); + +int cx8802_init_common(struct cx8802_dev *dev); +void cx8802_fini_common(struct cx8802_dev *dev); /* * Local variables: |