diff options
Diffstat (limited to 'linux/drivers/media/dvb/ttusb-dec/ttusb_dec.h')
-rw-r--r-- | linux/drivers/media/dvb/ttusb-dec/ttusb_dec.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.h b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.h new file mode 100644 index 000000000..d66edadc6 --- /dev/null +++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.h @@ -0,0 +1,83 @@ +/* + * TTUSB DEC Driver + * + * Copyright (C) 2003 Alex Woods <linux-dvb@giblets.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#ifndef _TTUSB_DEC_H +#define _TTUSB_DEC_H + +#include "dmxdev.h" +#include "dvb_demux.h" +#include "dvb_filter.h" +#include "dvb_i2c.h" + +#define DRIVER_NAME "TechnoTrend/Hauppauge DEC USB" + +#define COMMAND_PIPE 0x03 +#define RESULT_PIPE 0x84 +#define STREAM_PIPE 0x88 + +#define COMMAND_PACKET_SIZE 0x3c +#define ARM_PACKET_SIZE 0x1000 + +#define ISO_BUF_COUNT 0x04 +#define FRAMES_PER_ISO_BUF 0x04 +#define ISO_FRAME_SIZE 0x0380 + +#define MAX_AV_PES_LENGTH 6144 + +typedef struct ttusb_dec_s { + + /* DVB bits */ + struct dvb_adapter *adapter; + dmxdev_t dmxdev; + struct dvb_demux demux; + dmx_frontend_t frontend; + struct dvb_i2c_bus *i2c_bus; + + u16 pid[DMX_PES_OTHER]; + + /* USB bits */ + struct usb_device *udev; + u8 trans_count; + unsigned int command_pipe; + unsigned int result_pipe; + unsigned int stream_pipe; + int interface; + + void *iso_buffer; + dma_addr_t iso_dma_handle; + struct urb *iso_urb[ISO_BUF_COUNT]; + int iso_streaming; + + u8 av_pes[MAX_AV_PES_LENGTH + 4]; + int av_pes_state; + int av_pes_length; + int av_pes_payload_length; + + dvb_filter_pes2ts_t a_pes2ts; + dvb_filter_pes2ts_t v_pes2ts; + + u8 v_pes[16 + MAX_AV_PES_LENGTH]; + int v_pes_length; + int v_pes_postbytes; + +} ttusb_dec_t; + +#endif |