diff options
author | Michael Hunold <devnull@localhost> | 2003-05-27 08:23:08 +0000 |
---|---|---|
committer | Michael Hunold <devnull@localhost> | 2003-05-27 08:23:08 +0000 |
commit | ad0373531b89bbe79715e18bc36f7660d1f2b882 (patch) | |
tree | cd52375fa4ae5a60a56d8da681eafe9081950188 /linux/drivers/media/dvb/ttpci | |
parent | c01ec848557e671b528c110a4e10b7ef48c1418a (diff) | |
download | mediapointer-dvb-s2-ad0373531b89bbe79715e18bc36f7660d1f2b882.tar.gz mediapointer-dvb-s2-ad0373531b89bbe79715e18bc36f7660d1f2b882.tar.bz2 |
Here comes a huge cleanup patch in order to get the sources into
"kernel shape":
I mainly changed all "typedef struct foo_s {...} foo_t"
to "struct foo {}". Please don't start a policy war, I know the pros
cons of typedefs and structures.
We should, however, stick to the coding rules of the kernel: typedefed
structs are only used for opaque data types, where the internal
representation is irrelevant and we have get()/set() functions for
accessing them (ie. spinlock_t)
Diffstat (limited to 'linux/drivers/media/dvb/ttpci')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110.c | 292 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110.h | 113 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110_ipack.c | 16 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110_ipack.h | 10 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget.h | 8 |
5 files changed, 185 insertions, 254 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c index d0637d62c..c84fbd584 100644 --- a/linux/drivers/media/dvb/ttpci/av7110.c +++ b/linux/drivers/media/dvb/ttpci/av7110.c @@ -89,16 +89,16 @@ #include "av7110.h" #include "av7110_ipack.h" -static int AV_StartPlay(av7110_t *av7110, int av); -static void restart_feeds(av7110_t *av7110); -static int bootarm(av7110_t *av7110); -static inline int i2c_writereg(av7110_t *av7110, u8 id, u8 reg, u8 val); -static inline u8 i2c_readreg(av7110_t *av7110, u8 id, u8 reg); -static int outcom(av7110_t *av7110, int type, int com, int num, ...); -static void SetMode(av7110_t *av7110, int mode); -static void dvb_video_add_event (av7110_t *av7110, struct video_event *event); - -void pes_to_ts(u8 const *buf, long int length, u16 pid, p2t_t *p); +static int AV_StartPlay(struct av7110 *av7110, int av); +static void restart_feeds(struct av7110 *av7110); +static int bootarm(struct av7110 *av7110); +static inline int i2c_writereg(struct av7110 *av7110, u8 id, u8 reg, u8 val); +static inline u8 i2c_readreg(struct av7110 *av7110, u8 id, u8 reg); +static int outcom(struct av7110 *av7110, int type, int com, int num, ...); +static void SetMode(struct av7110 *av7110, int mode); +static void dvb_video_add_event (struct av7110 *av7110, struct video_event *event); + +void pes_to_ts(u8 const *buf, long int length, u16 pid, struct av7110_p2t *p); void p_to_t(u8 const *buf, long int length, u16 pid, u8 *counter, struct dvb_demux_feed *feed); static int av7110_debug = 0; @@ -120,7 +120,7 @@ int av7110_num = 0; by Nathan Laredo <laredo@gnu.org> */ static -int wait_for_debi_done(av7110_t *av7110) +int wait_for_debi_done(struct av7110 *av7110) { struct saa7146_dev *dev = av7110->dev; int start; @@ -153,7 +153,7 @@ int wait_for_debi_done(av7110_t *av7110) return 0; } -static int debiwrite(av7110_t *av7110, u32 config, +static int debiwrite(struct av7110 *av7110, u32 config, int addr, u32 val, int count) { struct saa7146_dev *dev = av7110->dev; @@ -173,7 +173,7 @@ static int debiwrite(av7110_t *av7110, u32 config, return 0; } -static u32 debiread(av7110_t *av7110, u32 config, int addr, int count) +static u32 debiread(struct av7110 *av7110, u32 config, int addr, int count) { struct saa7146_dev *dev = av7110->dev; u32 result = 0; @@ -200,7 +200,7 @@ static u32 debiread(av7110_t *av7110, u32 config, int addr, int count) /* fixme: val can be a pointer to a memory or an u32 value -- this won't work on 64bit platforms! */ static inline void -iwdebi(av7110_t *av7110, u32 config, int addr, u32 val, int count) +iwdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) { if (count>4 && val) memcpy(av7110->debi_virt, (char *) val, count); @@ -208,7 +208,7 @@ iwdebi(av7110_t *av7110, u32 config, int addr, u32 val, int count) } static inline u32 -irdebi(av7110_t *av7110, u32 config, int addr, u32 val, int count) +irdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) { u32 res; @@ -221,7 +221,7 @@ irdebi(av7110_t *av7110, u32 config, int addr, u32 val, int count) /* DEBI outside interrupts, only for count<=4! */ static inline void -wdebi(av7110_t *av7110, u32 config, int addr, u32 val, int count) +wdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) { unsigned long flags; @@ -231,7 +231,7 @@ wdebi(av7110_t *av7110, u32 config, int addr, u32 val, int count) } static inline u32 -rdebi(av7110_t *av7110, u32 config, int addr, u32 val, int count) +rdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) { unsigned long flags; u32 res; @@ -255,7 +255,7 @@ chtrans(char c) /* handle mailbox registers of the dual ported RAM */ static inline void -ARM_ResetMailBox(av7110_t *av7110) +ARM_ResetMailBox(struct av7110 *av7110) { unsigned long flags; @@ -269,19 +269,19 @@ ARM_ResetMailBox(av7110_t *av7110) } static inline void -ARM_ClearMailBox(av7110_t *av7110) +ARM_ClearMailBox(struct av7110 *av7110) { iwdebi(av7110, DEBINOSWAP, IRQ_RX, 0, 2); } static inline void -ARM_ClearIrq(av7110_t *av7110) +ARM_ClearIrq(struct av7110 *av7110) { irdebi(av7110, DEBINOSWAP, IRQ_RX, 0, 2); } static void -reset_arm(av7110_t *av7110) +reset_arm(struct av7110 *av7110) { saa7146_setgpio(av7110->dev, RESET_LINE, SAA7146_GPIO_OUTLO); @@ -308,7 +308,7 @@ reset_arm(av7110_t *av7110) } static void -recover_arm(av7110_t *av7110) +recover_arm(struct av7110 *av7110) { DEB_EE(("av7110: %p\n",av7110)); @@ -325,7 +325,7 @@ recover_arm(av7110_t *av7110) } static void -arm_error(av7110_t *av7110) +arm_error(struct av7110 *av7110) { DEB_EE(("av7110: %p\n",av7110)); @@ -336,7 +336,7 @@ arm_error(av7110_t *av7110) static int arm_thread(void *data) { - av7110_t *av7110 = data; + struct av7110 *av7110 = data; u16 newloops = 0; DEB_EE(("av7110: %p\n",av7110)); @@ -377,11 +377,11 @@ static int arm_thread(void *data) static int -record_cb(dvb_filter_pes2ts_t *p2t, u8 *buf, size_t len) +record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len) { struct dvb_demux_feed *dvbdmxfeed=(struct dvb_demux_feed *) p2t->priv; - DEB_EE(("dvb_filter_pes2ts_t:%p\n",p2t)); + DEB_EE(("struct dvb_filter_pes2ts:%p\n",p2t)); if (!(dvbdmxfeed->ts_type & TS_PACKET)) return 0; @@ -408,7 +408,7 @@ dvb_filter_pes2ts_cb(void *priv, unsigned char *data) } static int -AV_StartRecord(av7110_t *av7110, int av, +AV_StartRecord(struct av7110 *av7110, int av, struct dvb_demux_feed *dvbdmxfeed) { struct dvb_demux *dvbdmx=dvbdmxfeed->demux; @@ -454,7 +454,7 @@ AV_StartRecord(av7110_t *av7110, int av, } static int -AV_StartPlay(av7110_t *av7110, int av) +AV_StartPlay(struct av7110 *av7110, int av) { DEB_EE(("av7110: %p\n",av7110)); @@ -488,7 +488,7 @@ AV_StartPlay(av7110_t *av7110, int av) } static void -AV_Stop(av7110_t *av7110, int av) +AV_Stop(struct av7110 *av7110, int av) { DEB_EE(("av7110: %p\n",av7110)); @@ -530,9 +530,9 @@ AV_Stop(av7110_t *av7110, int av) * * If we want to support multiple controls we would have to do much more... */ -void av7110_setup_irc_config (av7110_t *av7110, u32 ir_config) +void av7110_setup_irc_config (struct av7110 *av7110, u32 ir_config) { - static av7110_t *last; + static struct av7110 *last; DEB_EE(("av7110: %p\n",av7110)); @@ -569,7 +569,7 @@ void run_handlers(unsigned long ircom) DECLARE_TASKLET(irtask,run_handlers,0); -void IR_handle(av7110_t *av7110, u32 ircom) +void IR_handle(struct av7110 *av7110, u32 ircom) { DEB_S(("av7110: ircommand = %08x\n", ircom)); irtask.data = (unsigned long) ircom; @@ -580,7 +580,7 @@ void IR_handle(av7110_t *av7110, u32 ircom) * IRQ handling ****************************************************************************/ -void CI_handle(av7110_t *av7110, u8 *data, u16 len) +void CI_handle(struct av7110 *av7110, u8 *data, u16 len) { //CI_out(av7110, data, len); @@ -618,7 +618,7 @@ DvbDmxFilterCallback(u8 * buffer1, size_t buffer1_len, u8 * buffer2, size_t buffer2_len, struct dvb_demux_filter *dvbdmxfilter, dmx_success_t success, - av7110_t *av7110) + struct av7110 *av7110) { DEB_EE(("av7110: %p\n",av7110)); @@ -632,7 +632,7 @@ DvbDmxFilterCallback(u8 * buffer1, size_t buffer1_len, if ((((buffer1[1]<<8)|buffer1[2])&0xfff)+3!=buffer1_len) return 0; if (dvbdmxfilter->doneq) { - dmx_section_filter_t *filter=&dvbdmxfilter->filter; + struct dmx_section_filter *filter=&dvbdmxfilter->filter; int i; u8 xor, neq=0; @@ -686,7 +686,7 @@ print_time(char *s) } static void -ci_get_data(dvb_ringbuffer_t *cibuf, u8 *data, int len) +ci_get_data(struct dvb_ringbuffer *cibuf, u8 *data, int len) { if (dvb_ringbuffer_free(cibuf) < len+2) return; @@ -702,7 +702,7 @@ ci_get_data(dvb_ringbuffer_t *cibuf, u8 *data, int len) static void debiirq (unsigned long data) { - struct av7110_s *av7110 = (struct av7110_s*) data; + struct av7110 *av7110 = (struct av7110*) data; int type=av7110->debitype; int handle=(type>>8)&0x1f; @@ -831,7 +831,7 @@ void debiirq (unsigned long data) } static int -pes_play(void *dest, dvb_ringbuffer_t *buf, int dlen) +pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen) { int len; u32 sync; @@ -878,7 +878,7 @@ pes_play(void *dest, dvb_ringbuffer_t *buf, int dlen) static void gpioirq (unsigned long data) { - struct av7110_s *av7110 = (struct av7110_s*) data; + struct av7110 *av7110 = (struct av7110*) data; u32 rxbuf, txbuf; int len; @@ -956,7 +956,7 @@ void gpioirq (unsigned long data) case DATA_CI_PUT: { int avail; - dvb_ringbuffer_t *cibuf=&av7110->ci_wbuffer; + struct dvb_ringbuffer *cibuf=&av7110->ci_wbuffer; avail=dvb_ringbuffer_avail(cibuf); if (avail<=2) { @@ -1104,7 +1104,7 @@ void gpioirq (unsigned long data) ****************************************************************************/ -static int OutCommand(av7110_t *av7110, u16* buf, int length) +static int OutCommand(struct av7110 *av7110, u16* buf, int length) { int i; u32 start; @@ -1186,7 +1186,7 @@ static int OutCommand(av7110_t *av7110, u16* buf, int length) } inline static int -SOutCommand(av7110_t *av7110, u16* buf, int length) +SOutCommand(struct av7110 *av7110, u16* buf, int length) { int ret; @@ -1208,7 +1208,7 @@ SOutCommand(av7110_t *av7110, u16* buf, int length) } -static int outcom(av7110_t *av7110, int type, int com, int num, ...) +static int outcom(struct av7110 *av7110, int type, int com, int num, ...) { va_list args; u16 buf[num+2]; @@ -1232,7 +1232,7 @@ static int outcom(av7110_t *av7110, int type, int com, int num, ...) return ret; } -int SendCICommand(av7110_t *av7110, u8 subcom, u8 *Params, u8 ParamLen) +int SendCICommand(struct av7110 *av7110, u8 subcom, u8 *Params, u8 ParamLen) { int i, ret; u16 CommandBuffer[18] = { ((COMTYPE_COMMON_IF << 8) + subcom), @@ -1255,7 +1255,7 @@ int SendCICommand(av7110_t *av7110, u8 subcom, u8 *Params, u8 ParamLen) } -static int CommandRequest(av7110_t *av7110, u16 *Buff, int length, u16 *buf, int n) +static int CommandRequest(struct av7110 *av7110, u16 *Buff, int length, u16 *buf, int n) { int err; s16 i; @@ -1328,7 +1328,7 @@ static int CommandRequest(av7110_t *av7110, u16 *Buff, int length, u16 *buf, int static inline int -RequestParameter(av7110_t *av7110, u16 tag, u16* Buff, s16 length) +RequestParameter(struct av7110 *av7110, u16 tag, u16* Buff, s16 length) { int ret; ret = CommandRequest(av7110, &tag, 0, Buff, length); @@ -1343,7 +1343,7 @@ RequestParameter(av7110_t *av7110, u16 tag, u16* Buff, s16 length) ****************************************************************************/ static inline int -msp_writereg(av7110_t *av7110, u8 dev, u16 reg, u16 val) +msp_writereg(struct av7110 *av7110, u8 dev, u16 reg, u16 val) { u8 msg[5]={ dev, reg>>8, reg&0xff, val>>8 , val&0xff }; struct dvb_i2c_bus *i2c = av7110->i2c_bus; @@ -1357,7 +1357,7 @@ msp_writereg(av7110_t *av7110, u8 dev, u16 reg, u16 val) } inline static int -SendDAC(av7110_t *av7110, u8 addr, u8 data) +SendDAC(struct av7110 *av7110, u8 addr, u8 data) { DEB_EE(("av7110: %p\n",av7110)); @@ -1365,7 +1365,7 @@ SendDAC(av7110_t *av7110, u8 addr, u8 data) } static int -SetVolume(av7110_t *av7110, int volleft, int volright) +SetVolume(struct av7110 *av7110, int volleft, int volright) { int err, vol, val, balance = 0; @@ -1406,48 +1406,48 @@ SetVolume(av7110_t *av7110, int volleft, int volright) #ifdef CONFIG_DVB_AV7110_OSD -inline static int ResetBlend(av7110_t *av7110, u8 windownr) +inline static int ResetBlend(struct av7110 *av7110, u8 windownr) { return outcom(av7110, COMTYPE_OSD, SetNonBlend, 1, windownr); } -inline static int SetColorBlend(av7110_t *av7110, u8 windownr) +inline static int SetColorBlend(struct av7110 *av7110, u8 windownr) { return outcom(av7110, COMTYPE_OSD, SetCBlend, 1, windownr); } -inline static int SetWindowBlend(av7110_t *av7110, u8 windownr, u8 blending) +inline static int SetWindowBlend(struct av7110 *av7110, u8 windownr, u8 blending) { return outcom(av7110, COMTYPE_OSD, SetWBlend, 2, windownr, blending); } -inline static int SetBlend_(av7110_t *av7110, u8 windownr, +inline static int SetBlend_(struct av7110 *av7110, u8 windownr, OSDPALTYPE colordepth, u16 index, u8 blending) { return outcom(av7110, COMTYPE_OSD, SetBlend, 4, windownr, colordepth, index, blending); } -inline static int SetColor_(av7110_t *av7110, u8 windownr, +inline static int SetColor_(struct av7110 *av7110, u8 windownr, OSDPALTYPE colordepth, u16 index, u16 colorhi, u16 colorlo) { return outcom(av7110, COMTYPE_OSD, SetColor, 5, windownr, colordepth, index, colorhi, colorlo); } -inline static int BringToTop(av7110_t *av7110, u8 windownr) +inline static int BringToTop(struct av7110 *av7110, u8 windownr) { return outcom(av7110, COMTYPE_OSD, WTop, 1, windownr); } -inline static int SetFont(av7110_t *av7110, u8 windownr, u8 fontsize, +inline static int SetFont(struct av7110 *av7110, u8 windownr, u8 fontsize, u16 colorfg, u16 colorbg) { return outcom(av7110, COMTYPE_OSD, Set_Font, 4, windownr, fontsize, colorfg, colorbg); } -static int FlushText(av7110_t *av7110) +static int FlushText(struct av7110 *av7110) { u32 start; @@ -1466,7 +1466,7 @@ static int FlushText(av7110_t *av7110) return 0; } -static int WriteText(av7110_t *av7110, u8 win, u16 x, u16 y, u8* buf) +static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, u8* buf) { int i, ret; u32 start; @@ -1508,42 +1508,42 @@ static int WriteText(av7110_t *av7110, u8 win, u16 x, u16 y, u8* buf) return ret; } -inline static int DrawLine(av7110_t *av7110, u8 windownr, +inline static int DrawLine(struct av7110 *av7110, u8 windownr, u16 x, u16 y, u16 dx, u16 dy, u16 color) { return outcom(av7110, COMTYPE_OSD, DLine, 6, windownr, x, y, dx, dy, color); } -inline static int DrawBlock(av7110_t *av7110, u8 windownr, +inline static int DrawBlock(struct av7110 *av7110, u8 windownr, u16 x, u16 y, u16 dx, u16 dy, u16 color) { return outcom(av7110, COMTYPE_OSD, DBox, 6, windownr, x, y, dx, dy, color); } -inline static int HideWindow(av7110_t *av7110, u8 windownr) +inline static int HideWindow(struct av7110 *av7110, u8 windownr) { return outcom(av7110, COMTYPE_OSD, WHide, 1, windownr); } -inline static int MoveWindowRel(av7110_t *av7110, u8 windownr, u16 x, u16 y) +inline static int MoveWindowRel(struct av7110 *av7110, u8 windownr, u16 x, u16 y) { return outcom(av7110, COMTYPE_OSD, WMoveD, 3, windownr, x, y); } -inline static int MoveWindowAbs(av7110_t *av7110, u8 windownr, u16 x, u16 y) +inline static int MoveWindowAbs(struct av7110 *av7110, u8 windownr, u16 x, u16 y) { return outcom(av7110, COMTYPE_OSD, WMoveA, 3, windownr, x, y); } -inline static int DestroyOSDWindow(av7110_t *av7110, u8 windownr) +inline static int DestroyOSDWindow(struct av7110 *av7110, u8 windownr) { return outcom(av7110, COMTYPE_OSD, WDestroy, 1, windownr); } #if 0 -static void DestroyOSDWindows(av7110_t *av7110) +static void DestroyOSDWindows(struct av7110 *av7110) { int i; @@ -1553,7 +1553,7 @@ static void DestroyOSDWindows(av7110_t *av7110) #endif static inline int -CreateOSDWindow(av7110_t *av7110, u8 windownr, +CreateOSDWindow(struct av7110 *av7110, u8 windownr, DISPTYPE disptype, u16 width, u16 height) { return outcom(av7110, COMTYPE_OSD, WCreate, 4, @@ -1565,7 +1565,7 @@ static OSDPALTYPE bpp2pal[8]={Pal1Bit, Pal2Bit, 0, Pal4Bit, 0, 0, 0, Pal8Bit}; static DISPTYPE bpp2bit[8]={BITMAP1, BITMAP2, 0, BITMAP4, 0, 0, 0, BITMAP8}; static inline int -LoadBitmap(av7110_t *av7110, u16 format, u16 dx, u16 dy, int inc, u8* data) +LoadBitmap(struct av7110 *av7110, u16 format, u16 dx, u16 dy, int inc, u8* data) { int bpp; int i; @@ -1625,7 +1625,7 @@ LoadBitmap(av7110_t *av7110, u16 format, u16 dx, u16 dy, int inc, u8* data) } static int -BlitBitmap(av7110_t *av7110, u16 win, u16 x, u16 y, u16 trans) +BlitBitmap(struct av7110 *av7110, u16 win, u16 x, u16 y, u16 trans) { DECLARE_WAITQUEUE(wait, current); @@ -1651,7 +1651,7 @@ BlitBitmap(av7110_t *av7110, u16 win, u16 x, u16 y, u16 trans) } static inline int -ReleaseBitmap(av7110_t *av7110) +ReleaseBitmap(struct av7110 *av7110) { DEB_EE(("av7110: %p\n",av7110)); @@ -1678,7 +1678,7 @@ static u32 RGB2YUV(u16 R, u16 G, u16 B) } static void -OSDSetColor(av7110_t *av7110, u8 color, u8 r, u8 g, u8 b, u8 blend) +OSDSetColor(struct av7110 *av7110, u8 color, u8 r, u8 g, u8 b, u8 blend) { u16 ch, cl; u32 yuv; @@ -1693,7 +1693,7 @@ OSDSetColor(av7110_t *av7110, u8 color, u8 r, u8 g, u8 b, u8 blend) } static int -OSDSetBlock(av7110_t *av7110, int x0, int y0, int x1, int y1, int inc, u8 *data) +OSDSetBlock(struct av7110 *av7110, int x0, int y0, int x1, int y1, int inc, u8 *data) { uint w, h, bpp, bpl, size, lpb, bnum, brest; int i; @@ -1724,7 +1724,7 @@ OSDSetBlock(av7110_t *av7110, int x0, int y0, int x1, int y1, int inc, u8 *data) } static int -OSD_DrawCommand(av7110_t *av7110, osd_cmd_t *dc) +OSD_DrawCommand(struct av7110 *av7110, osd_cmd_t *dc) { switch (dc->cmd) { case OSD_Close: @@ -1835,7 +1835,7 @@ dvb_osd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - av7110_t *av7110=(av7110_t *) dvbdev->priv; + struct av7110 *av7110=(struct av7110 *) dvbdev->priv; DEB_EE(("av7110: %p\n",av7110)); @@ -1867,7 +1867,7 @@ static struct dvb_device dvbdev_osd = { /* get version of the firmware ROM, RTSL, video ucode and ARM application */ static void -firmversion(av7110_t *av7110) +firmversion(struct av7110 *av7110) { u16 buf[20]; @@ -1899,7 +1899,7 @@ firmversion(av7110_t *av7110) } static int -waitdebi(av7110_t *av7110, int adr, int state) +waitdebi(struct av7110 *av7110, int adr, int state) { int k; @@ -1914,7 +1914,7 @@ waitdebi(av7110_t *av7110, int adr, int state) static int -load_dram(av7110_t *av7110, u32 *data, int len) +load_dram(struct av7110 *av7110, u32 *data, int len) { int i; int blocks, rest; @@ -1990,7 +1990,7 @@ bootcode[] = { #include "av7110_firm.h" static int -bootarm(av7110_t *av7110) +bootarm(struct av7110 *av7110) { struct saa7146_dev *dev= av7110->dev; u32 ret; @@ -2070,7 +2070,7 @@ bootarm(av7110_t *av7110) } static inline int -SetPIDs(av7110_t *av7110, u16 vpid, u16 apid, u16 ttpid, +SetPIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, u16 subpid, u16 pcrpid) { DEB_EE(("av7110: %p\n",av7110)); @@ -2089,7 +2089,7 @@ SetPIDs(av7110_t *av7110, u16 vpid, u16 apid, u16 ttpid, } static void -ChangePIDs(av7110_t *av7110, u16 vpid, u16 apid, u16 ttpid, +ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, u16 subpid, u16 pcrpid) { DEB_EE(("av7110: %p\n",av7110)); @@ -2114,7 +2114,7 @@ ChangePIDs(av7110_t *av7110, u16 vpid, u16 apid, u16 ttpid, static void -SetMode(av7110_t *av7110, int mode) +SetMode(struct av7110 *av7110, int mode) { DEB_EE(("av7110: %p\n",av7110)); @@ -2130,14 +2130,14 @@ SetMode(av7110_t *av7110, int mode) } inline static void -TestMode(av7110_t *av7110, int mode) +TestMode(struct av7110 *av7110, int mode) { DEB_EE(("av7110: %p\n",av7110)); outcom(av7110, COMTYPE_ENCODER, SetTestMode, 1, mode); } inline static void -VidMode(av7110_t *av7110, int mode) +VidMode(struct av7110 *av7110, int mode) { DEB_EE(("av7110: %p\n",av7110)); outcom(av7110, COMTYPE_ENCODER, SetVidMode, 1, mode); @@ -2145,7 +2145,7 @@ VidMode(av7110_t *av7110, int mode) static int inline -vidcom(av7110_t *av7110, u32 com, u32 arg) +vidcom(struct av7110 *av7110, u32 com, u32 arg) { DEB_EE(("av7110: %p\n",av7110)); return outcom(av7110, 0x80, 0x02, 4, @@ -2154,7 +2154,7 @@ vidcom(av7110_t *av7110, u32 com, u32 arg) } static int inline -audcom(av7110_t *av7110, u32 com) +audcom(struct av7110 *av7110, u32 com) { DEB_EE(("av7110: %p\n",av7110)); return outcom(av7110, 0x80, 0x03, 4, @@ -2162,7 +2162,7 @@ audcom(av7110_t *av7110, u32 com) } inline static void -Set22K(av7110_t *av7110, int state) +Set22K(struct av7110 *av7110, int state) { DEB_EE(("av7110: %p\n",av7110)); outcom(av7110, COMTYPE_AUDIODAC, (state ? ON22K : OFF22K), 0); @@ -2170,7 +2170,7 @@ Set22K(av7110_t *av7110, int state) static -int SendDiSEqCMsg(av7110_t *av7110, int len, u8 *msg, unsigned long burst) +int SendDiSEqCMsg(struct av7110 *av7110, int len, u8 *msg, unsigned long burst) { int i; u16 buf[18] = { ((COMTYPE_AUDIODAC << 8) + SendDiSEqC), @@ -2203,7 +2203,7 @@ int SendDiSEqCMsg(av7110_t *av7110, int len, u8 *msg, unsigned long burst) ****************************************************************************/ static inline int -i2c_writereg(av7110_t *av7110, u8 id, u8 reg, u8 val) +i2c_writereg(struct av7110 *av7110, u8 id, u8 reg, u8 val) { u8 msg[2]={ reg, val }; struct dvb_i2c_bus *i2c = av7110->i2c_bus; @@ -2217,7 +2217,7 @@ i2c_writereg(av7110_t *av7110, u8 id, u8 reg, u8 val) } static inline u8 -i2c_readreg(av7110_t *av7110, u8 id, u8 reg) +i2c_readreg(struct av7110 *av7110, u8 id, u8 reg) { struct dvb_i2c_bus *i2c = av7110->i2c_bus; u8 mm1[] = {0x00}; @@ -2248,7 +2248,7 @@ static int sw2mode[16] = { }; static void -get_video_format(av7110_t *av7110, u8 *buf, int count) +get_video_format(struct av7110 *av7110, u8 *buf, int count) { int i; int hsize,vsize; @@ -2275,7 +2275,7 @@ get_video_format(av7110_t *av7110, u8 *buf, int count) } static inline long -aux_ring_buffer_write(dvb_ringbuffer_t *rbuf, const char *buf, unsigned long count) +aux_ring_buffer_write(struct dvb_ringbuffer *rbuf, const char *buf, unsigned long count) { unsigned long todo = count; int free; @@ -2300,7 +2300,7 @@ aux_ring_buffer_write(dvb_ringbuffer_t *rbuf, const char *buf, unsigned long cou static void play_video_cb(u8 *buf, int count, void *priv) { - av7110_t *av7110=(av7110_t *) priv; + struct av7110 *av7110=(struct av7110 *) priv; DEB_EE(("av7110: %p\n",av7110)); if ((buf[3]&0xe0)==0xe0) { @@ -2313,7 +2313,7 @@ play_video_cb(u8 *buf, int count, void *priv) static void play_audio_cb(u8 *buf, int count, void *priv) { - av7110_t *av7110=(av7110_t *) priv; + struct av7110 *av7110=(struct av7110 *) priv; DEB_EE(("av7110: %p\n",av7110)); aux_ring_buffer_write(&av7110->aout, buf, count); @@ -2322,7 +2322,7 @@ play_audio_cb(u8 *buf, int count, void *priv) #define FREE_COND (dvb_ringbuffer_free(&av7110->avout)>=20*1024 && dvb_ringbuffer_free(&av7110->aout)>=20*1024) static ssize_t -dvb_play(av7110_t *av7110, const u8 *buf, +dvb_play(struct av7110 *av7110, const u8 *buf, unsigned long count, int nonblock, int type, int umem) { unsigned long todo = count, n; @@ -2361,7 +2361,7 @@ dvb_play(av7110_t *av7110, const u8 *buf, } static ssize_t -dvb_aplay(av7110_t *av7110, const u8 *buf, +dvb_aplay(struct av7110 *av7110, const u8 *buf, unsigned long count, int nonblock, int type) { unsigned long todo = count, n; @@ -2395,7 +2395,7 @@ dvb_aplay(av7110_t *av7110, const u8 *buf, return count-todo; } -void init_p2t(p2t_t *p, struct dvb_demux_feed *feed) +void init_p2t(struct av7110_p2t *p, struct dvb_demux_feed *feed) { memset(p->pes,0,TS_SIZE); p->counter = 0; @@ -2404,7 +2404,7 @@ void init_p2t(p2t_t *p, struct dvb_demux_feed *feed) if (feed) p->feed = feed; } -void clear_p2t(p2t_t *p) +void clear_p2t(struct av7110_p2t *p) { memset(p->pes,0,TS_SIZE); // p->counter = 0; @@ -2458,7 +2458,7 @@ long int find_pes_header(u8 const *buf, long int length, int *frags) return c; } -void pes_to_ts( u8 const *buf, long int length, u16 pid, p2t_t *p) +void pes_to_ts( u8 const *buf, long int length, u16 pid, struct av7110_p2t *p) { int c,c2,l,add; int check,rest; @@ -2682,7 +2682,7 @@ static unsigned int dvb_audio_poll(struct file *file, poll_table *wait) { struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - av7110_t *av7110 = (av7110_t *) dvbdev->priv; + struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; unsigned int mask = 0; DEB_EE(("av7110: %p\n",av7110)); @@ -2717,7 +2717,7 @@ static int StartHWFilter(struct dvb_demux_filter *dvbdmxfilter) { struct dvb_demux_feed *dvbdmxfeed=dvbdmxfilter->feed; - av7110_t *av7110=(av7110_t *) dvbdmxfeed->demux->priv; + struct av7110 *av7110=(struct av7110 *) dvbdmxfeed->demux->priv; u16 buf[20]; int ret, i; u16 handle; @@ -2760,7 +2760,7 @@ StartHWFilter(struct dvb_demux_filter *dvbdmxfilter) static int StopHWFilter(struct dvb_demux_filter *dvbdmxfilter) { - av7110_t *av7110=(av7110_t *) dvbdmxfilter->feed->demux->priv; + struct av7110 *av7110=(struct av7110 *) dvbdmxfilter->feed->demux->priv; u16 buf[3]; u16 answ[2]; int ret; @@ -2797,8 +2797,8 @@ static int av7110_write_to_decoder(struct dvb_demux_feed *feed, const u8 *buf, size_t len) { struct dvb_demux *demux = feed->demux; - av7110_t *av7110 = (av7110_t *) demux->priv; - ipack *ipack = &av7110->ipack[feed->pes_type]; + struct av7110 *av7110 = (struct av7110 *) demux->priv; + struct ipack *ipack = &av7110->ipack[feed->pes_type]; DEB_EE(("av7110: %p\n",av7110)); @@ -2837,7 +2837,7 @@ static void dvb_feed_start_pid(struct dvb_demux_feed *dvbdmxfeed) { struct dvb_demux *dvbdmx=dvbdmxfeed->demux; - av7110_t *av7110=(av7110_t *) dvbdmx->priv; + struct av7110 *av7110=(struct av7110 *) dvbdmx->priv; u16 *pid=dvbdmx->pids, npids[5]; int i; @@ -2876,7 +2876,7 @@ static void dvb_feed_stop_pid(struct dvb_demux_feed *dvbdmxfeed) { struct dvb_demux *dvbdmx=dvbdmxfeed->demux; - av7110_t *av7110=(av7110_t *) dvbdmx->priv; + struct av7110 *av7110=(struct av7110 *) dvbdmx->priv; u16 *pid=dvbdmx->pids, npids[5]; int i; @@ -2914,7 +2914,7 @@ static int av7110_start_feed(struct dvb_demux_feed *feed) { struct dvb_demux *demux = feed->demux; - av7110_t *av7110 = (av7110_t *) demux->priv; + struct av7110 *av7110 = (struct av7110 *) demux->priv; DEB_EE(("av7110: %p\n",av7110)); @@ -2973,7 +2973,7 @@ static int av7110_stop_feed(struct dvb_demux_feed *feed) { struct dvb_demux *demux = feed->demux; - av7110_t *av7110 = (av7110_t *) demux->priv; + struct av7110 *av7110 = (struct av7110 *) demux->priv; DEB_EE(("av7110: %p\n",av7110)); @@ -3011,7 +3011,7 @@ av7110_stop_feed(struct dvb_demux_feed *feed) static void -restart_feeds(av7110_t *av7110) +restart_feeds(struct av7110 *av7110) { struct dvb_demux *dvbdmx=&av7110->demux; struct dvb_demux_feed *feed; @@ -3034,14 +3034,14 @@ restart_feeds(av7110_t *av7110) AV_StartPlay(av7110, mode); } -static int dvb_get_stc(dmx_demux_t *demux, unsigned int num, +static int dvb_get_stc(struct dmx_demux *demux, unsigned int num, uint64_t *stc, unsigned int *base) { int ret; u16 fwstc[4]; u16 tag = ((COMTYPE_REQUEST << 8) + ReqSTC); struct dvb_demux *dvbdemux; - av7110_t *av7110; + struct av7110 *av7110; /* pointer casting paranoia... */ if (!demux) @@ -3049,7 +3049,7 @@ static int dvb_get_stc(dmx_demux_t *demux, unsigned int num, dvbdemux = (struct dvb_demux *) demux->priv; if (!dvbdemux) BUG(); - av7110 = (av7110_t *) dvbdemux->priv; + av7110 = (struct av7110 *) dvbdemux->priv; DEB_EE(("av7110: %p\n",av7110)); @@ -3081,7 +3081,7 @@ static int dvb_get_stc(dmx_demux_t *demux, unsigned int num, static int av7110_diseqc_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) { - av7110_t *av7110 = fe->before_after_data; + struct av7110 *av7110 = fe->before_after_data; DEB_EE(("av7110: %p\n",av7110)); @@ -3121,20 +3121,20 @@ int av7110_diseqc_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) * CI link layer file ops (FIXME: move this to separate module later) ******************************************************************************/ -int ci_ll_init(dvb_ringbuffer_t *cirbuf, dvb_ringbuffer_t *ciwbuf, int size) +int ci_ll_init(struct dvb_ringbuffer *cirbuf, struct dvb_ringbuffer *ciwbuf, int size) { dvb_ringbuffer_init(cirbuf, vmalloc(size), size); dvb_ringbuffer_init(ciwbuf, vmalloc(size), size); return 0; } -void ci_ll_flush(dvb_ringbuffer_t *cirbuf, dvb_ringbuffer_t *ciwbuf) +void ci_ll_flush(struct dvb_ringbuffer *cirbuf, struct dvb_ringbuffer *ciwbuf) { dvb_ringbuffer_flush_spinlock_wakeup(cirbuf); dvb_ringbuffer_flush_spinlock_wakeup(ciwbuf); } -void ci_ll_release(dvb_ringbuffer_t *cirbuf, dvb_ringbuffer_t *ciwbuf) +void ci_ll_release(struct dvb_ringbuffer *cirbuf, struct dvb_ringbuffer *ciwbuf) { vfree(cirbuf->data); cirbuf->data=0; @@ -3143,7 +3143,7 @@ void ci_ll_release(dvb_ringbuffer_t *cirbuf, dvb_ringbuffer_t *ciwbuf) } -int ci_ll_reset(dvb_ringbuffer_t *cibuf, struct file *file, +int ci_ll_reset(struct dvb_ringbuffer *cibuf, struct file *file, int slots, ca_slot_info_t *slot) { int i; @@ -3170,7 +3170,7 @@ int ci_ll_reset(dvb_ringbuffer_t *cibuf, struct file *file, } static ssize_t -ci_ll_write(dvb_ringbuffer_t *cibuf, struct file *file, const char *buf, size_t count, loff_t *ppos) +ci_ll_write(struct dvb_ringbuffer *cibuf, struct file *file, const char *buf, size_t count, loff_t *ppos) { int free; int non_blocking=file->f_flags&O_NONBLOCK; @@ -3193,7 +3193,7 @@ ci_ll_write(dvb_ringbuffer_t *cibuf, struct file *file, const char *buf, size_t } static ssize_t -ci_ll_read(dvb_ringbuffer_t *cibuf, struct file *file, char *buf, size_t count, loff_t *ppos) +ci_ll_read(struct dvb_ringbuffer *cibuf, struct file *file, char *buf, size_t count, loff_t *ppos) { int avail; int non_blocking=file->f_flags&O_NONBLOCK; @@ -3222,7 +3222,7 @@ static int dvb_ca_open(struct inode *inode, struct file *file) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - av7110_t *av7110=(av7110_t *) dvbdev->priv; + struct av7110 *av7110=(struct av7110 *) dvbdev->priv; int err=dvb_generic_open(inode, file); DEB_EE(("av7110: %p\n",av7110)); @@ -3237,9 +3237,9 @@ static unsigned int dvb_ca_poll (struct file *file, poll_table *wait) { struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - av7110_t *av7110 = (av7110_t *) dvbdev->priv; - dvb_ringbuffer_t *rbuf = &av7110->ci_rbuffer; - dvb_ringbuffer_t *wbuf = &av7110->ci_wbuffer; + struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; + struct dvb_ringbuffer *rbuf = &av7110->ci_rbuffer; + struct dvb_ringbuffer *wbuf = &av7110->ci_wbuffer; unsigned int mask = 0; DEB_EE(("av7110: %p\n",av7110)); @@ -3260,7 +3260,7 @@ int dvb_ca_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - av7110_t *av7110=(av7110_t *) dvbdev->priv; + struct av7110 *av7110=(struct av7110 *) dvbdev->priv; unsigned long arg=(unsigned long) parg; DEB_EE(("av7110: %p\n",av7110)); @@ -3349,7 +3349,7 @@ dvb_ca_write(struct file *file, const char *buf, size_t count, loff_t *ppos) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - av7110_t *av7110=(av7110_t *) dvbdev->priv; + struct av7110 *av7110=(struct av7110 *) dvbdev->priv; DEB_EE(("av7110: %p\n",av7110)); return ci_ll_write(&av7110->ci_wbuffer, file, buf, count, ppos); @@ -3359,7 +3359,7 @@ static ssize_t dvb_ca_read(struct file *file, char *buf, size_t count, loff_t *ppos) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - av7110_t *av7110=(av7110_t *) dvbdev->priv; + struct av7110 *av7110=(struct av7110 *) dvbdev->priv; DEB_EE(("av7110: %p\n",av7110)); return ci_ll_read(&av7110->ci_rbuffer, file, buf, count, ppos); @@ -3371,7 +3371,7 @@ dvb_ca_read(struct file *file, char *buf, size_t count, loff_t *ppos) * Video MPEG decoder events ******************************************************************************/ static -void dvb_video_add_event (av7110_t *av7110, struct video_event *event) +void dvb_video_add_event (struct av7110 *av7110, struct video_event *event) { struct dvb_video_events *events = &av7110->video_events; int wp; @@ -3399,7 +3399,7 @@ void dvb_video_add_event (av7110_t *av7110, struct video_event *event) static -int dvb_video_get_event (av7110_t *av7110, struct video_event *event, int flags) +int dvb_video_get_event (struct av7110 *av7110, struct video_event *event, int flags) { struct dvb_video_events *events = &av7110->video_events; @@ -3443,7 +3443,7 @@ static unsigned int dvb_video_poll(struct file *file, poll_table *wait) { struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - av7110_t *av7110 = (av7110_t *) dvbdev->priv; + struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; unsigned int mask = 0; DEB_EE(("av7110: %p\n",av7110)); @@ -3468,7 +3468,7 @@ dvb_video_write(struct file *file, const char *buf, size_t count, loff_t *ppos) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - av7110_t *av7110=(av7110_t *) dvbdev->priv; + struct av7110 *av7110=(struct av7110 *) dvbdev->priv; DEB_EE(("av7110: %p\n",av7110)); @@ -3483,7 +3483,7 @@ dvb_audio_write(struct file *file, const char *buf, size_t count, loff_t *ppos) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - av7110_t *av7110=(av7110_t *) dvbdev->priv; + struct av7110 *av7110=(struct av7110 *) dvbdev->priv; DEB_EE(("av7110: %p\n",av7110)); @@ -3499,7 +3499,7 @@ u8 iframe_header[] = { 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x00 }; #define MIN_IFRAME 400000 static int -play_iframe(av7110_t *av7110, u8 *buf, unsigned int len, int nonblock) +play_iframe(struct av7110 *av7110, u8 *buf, unsigned int len, int nonblock) { int i, n=1; @@ -3527,7 +3527,7 @@ dvb_video_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - av7110_t *av7110=(av7110_t *) dvbdev->priv; + struct av7110 *av7110=(struct av7110 *) dvbdev->priv; unsigned long arg=(unsigned long) parg; int ret=0; @@ -3723,7 +3723,7 @@ dvb_audio_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - av7110_t *av7110=(av7110_t *) dvbdev->priv; + struct av7110 *av7110=(struct av7110 *) dvbdev->priv; unsigned long arg=(unsigned long) parg; int ret=0; @@ -3843,7 +3843,7 @@ dvb_audio_ioctl(struct inode *inode, struct file *file, static int dvb_video_open(struct inode *inode, struct file *file) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - av7110_t *av7110=(av7110_t *) dvbdev->priv; + struct av7110 *av7110=(struct av7110 *) dvbdev->priv; int err; DEB_EE(("av7110: %p\n",av7110)); @@ -3866,7 +3866,7 @@ static int dvb_video_open(struct inode *inode, struct file *file) static int dvb_video_release(struct inode *inode, struct file *file) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - av7110_t *av7110=(av7110_t *) dvbdev->priv; + struct av7110 *av7110=(struct av7110 *) dvbdev->priv; DEB_EE(("av7110: %p\n",av7110)); @@ -3877,7 +3877,7 @@ static int dvb_video_release(struct inode *inode, struct file *file) static int dvb_audio_open(struct inode *inode, struct file *file) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - av7110_t *av7110=(av7110_t *) dvbdev->priv; + struct av7110 *av7110=(struct av7110 *) dvbdev->priv; int err=dvb_generic_open(inode, file); DEB_EE(("av7110: %p\n",av7110)); @@ -3892,7 +3892,7 @@ static int dvb_audio_open(struct inode *inode, struct file *file) static int dvb_audio_release(struct inode *inode, struct file *file) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - av7110_t *av7110=(av7110_t *) dvbdev->priv; + struct av7110 *av7110=(struct av7110 *) dvbdev->priv; DEB_EE(("av7110: %p\n",av7110)); @@ -3962,7 +3962,7 @@ static struct dvb_device dvbdev_ca = { static void av7110_before_after_tune (fe_status_t s, void *data) { - struct av7110_s *av7110 = data; + struct av7110 *av7110 = data; DEB_EE(("av7110: %p\n",av7110)); @@ -3988,7 +3988,7 @@ void av7110_before_after_tune (fe_status_t s, void *data) static -int av7110_register(av7110_t *av7110) +int av7110_register(struct av7110 *av7110) { int ret, i; struct dvb_demux *dvbdemux=&av7110->demux; @@ -4099,7 +4099,7 @@ int av7110_register(av7110_t *av7110) static void -dvb_unregister(av7110_t *av7110) +dvb_unregister(struct av7110 *av7110) { struct dvb_demux *dvbdemux=&av7110->demux; @@ -4154,18 +4154,18 @@ struct saa7146_extension_ioctls ioctls[] = { static int av7110_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *pci_ext) { - av7110_t *av7110 = NULL; + struct av7110 *av7110 = NULL; int ret = 0; - if (!(av7110 = kmalloc (sizeof (struct av7110_s), GFP_KERNEL))) { + if (!(av7110 = kmalloc (sizeof (struct av7110), GFP_KERNEL))) { printk ("%s: out of memory!\n", __FUNCTION__); return -ENOMEM; } - memset(av7110, 0, sizeof(av7110_t)); + memset(av7110, 0, sizeof(struct av7110)); av7110->card_name = (char*)pci_ext->ext_priv; - (av7110_t*)dev->ext_priv = av7110; + (struct av7110*)dev->ext_priv = av7110; DEB_EE(("dev: %p, av7110: %p\n",dev,av7110)); @@ -4359,7 +4359,7 @@ err: static int av7110_detach (struct saa7146_dev* saa) { - av7110_t *av7110 = (av7110_t*)saa->ext_priv; + struct av7110 *av7110 = (struct av7110*)saa->ext_priv; DEB_EE(("av7110: %p\n",av7110)); saa7146_unregister_device(&av7110->vd, saa); @@ -4400,7 +4400,7 @@ int av7110_detach (struct saa7146_dev* saa) static void av7110_irq(struct saa7146_dev* dev, u32 *isr) { - av7110_t *av7110 = (av7110_t*)dev->ext_priv; + struct av7110 *av7110 = (struct av7110*)dev->ext_priv; DEB_EE(("dev: %p, av7110: %p\n",dev,av7110)); @@ -4464,7 +4464,7 @@ MODULE_DEVICE_TABLE(pci, pci_tbl); static int std_callback(struct saa7146_dev* dev, struct saa7146_standard *std) { - av7110_t *av7110 = (av7110_t*)dev->ext_priv; + struct av7110 *av7110 = (struct av7110*)dev->ext_priv; if (std->id == V4L2_STD_PAL) { av7110->vidmode = VIDEO_MODE_PAL; SetMode(av7110, av7110->vidmode); diff --git a/linux/drivers/media/dvb/ttpci/av7110.h b/linux/drivers/media/dvb/ttpci/av7110.h index 73964fafa..944ff7c1b 100644 --- a/linux/drivers/media/dvb/ttpci/av7110.h +++ b/linux/drivers/media/dvb/ttpci/av7110.h @@ -56,13 +56,6 @@ typedef enum AV_PES } TYPE_REC_PLAY_FORMAT; -typedef struct PARAMSTRUCT -{ - unsigned int wCommand; - int error; - unsigned long pdwData[100]; -} PARAMSTRUCT, *PPARAMSTRUCT; - typedef enum OSDPALTYPE { NoPalet = 0, /* No palette */ @@ -95,7 +88,7 @@ typedef enum { CURSOR /* Cursor */ } DISPTYPE; /* Window display type */ -// switch defines +/* switch defines */ #define SB_GPIO 3 #define SB_OFF SAA7146_GPIO_OUTLO //SlowBlank aus (TV-Mode) #define SB_ON SAA7146_GPIO_INPUT //SlowBlank an (AV-Mode) @@ -106,14 +99,13 @@ typedef enum { #define FB_ON SAA7146_GPIO_OUTHI //FastBlank an (RGB-Mode) #define FB_LOOP SAA7146_GPIO_INPUT //FastBlank der PC-Grafik durchschleifen -typedef enum VIDEOOUTPUTMODE +typedef enum { NO_OUT = 0, //disable analog Output CVBS_RGB_OUT = 1, CVBS_YC_OUT = 2, YC_OUT = 3 -} VIDEOOUTPUTMODE, *PVIDEOOUTPUTMODE; - +} VIDEOOUTPUTMODE; #define GPMQFull 0x0001 //Main Message Queue Full #define GPMQOver 0x0002 //Main Message Queue Overflow @@ -248,16 +240,6 @@ typedef enum { COMTYPE_CI_LL, } COMTYPE; -typedef enum { - AV7110_VIDEO_FREEZE, - AV7110_VIDEO_CONTINUE -} VIDEOCOM; - -typedef enum { - DVB_AUDIO_PAUSE, -} AUDIOCOM; - - #define VID_NONE_PREF 0x00 /* No aspect ration processing preferred */ #define VID_PAN_SCAN_PREF 0x01 /* Pan and Scan Display preferred */ #define VID_VERT_COMP_PREF 0x02 /* Vertical compression display preferred */ @@ -367,14 +349,6 @@ typedef enum { #define MAX_PLENGTH 0xFFFF #define MAX_VID_PES 0x1FFF -typedef struct section_s { - int id; - int length; - int found; - u8 payload[4096+3]; -} section_t; - - #define MY_STATE_PES_START 1 #define MY_STATE_PES_STARTED 2 #define MY_STATE_FULL 4 @@ -396,56 +370,13 @@ struct dvb_filter { enum {AV_PES_STREAM, PS_STREAM, TS_STREAM, PES_STREAM}; -typedef struct ps_packet_s{ - u8 scr[6]; - u8 mux_rate[3]; - u8 stuff_length; - u8 data[20]; - u8 sheader_llength[2]; - int sheader_length; - u8 rate_bound[3]; - u8 audio_bound; - u8 video_bound; - u8 reserved; - int npes; - int mpeg; -} ps_packet_t; - -typedef struct a2p_s{ - int type; - int found; - int length; - int headr; - u8 cid; - u8 flags; - u8 abuf[MAX_PLENGTH]; - int alength; - u8 vbuf[MAX_PLENGTH]; - int vlength; - int plength; - u8 last_av_pts[4]; - u8 av_pts[4]; - u8 scr[4]; - u16 count0; - u16 count1; - u16 pidv; - u16 pida; - u16 countv; - u16 counta; - void *dataA; - void *dataV; - void (*write_cb)(u8 const *buf, long int count, - void *data); -} a2p_t; - - -typedef struct p2t_s { +struct av7110_p2t { u8 pes[TS_SIZE]; u8 counter; long int pos; int frags; struct dvb_demux_feed *feed; -} p2t_t; +}; /* video MPEG decoder events: */ /* (code copied from dvb_frontend.c, should maybe be factored out...) */ @@ -461,12 +392,12 @@ struct dvb_video_events { /* place to store all the necessary device information */ -typedef struct av7110_s { +struct av7110 { /* devices */ struct dvb_device dvb_dev; - dvb_net_t dvb_net; + struct dvb_net dvb_net; struct video_device vd; struct saa7146_dev *dev; @@ -487,9 +418,9 @@ typedef struct av7110_s { /* buffers */ void *iobuf; /* memory for all buffers */ - dvb_ringbuffer_t avout; /* buffer for video or A/V mux */ + struct dvb_ringbuffer avout; /* buffer for video or A/V mux */ #define AVOUTLEN (128*1024) - dvb_ringbuffer_t aout; /* buffer for audio */ + struct dvb_ringbuffer aout; /* buffer for audio */ #define AOUTLEN (64*1024) void *bmpbuf; #define BMPLEN (8*32768+1024) @@ -539,11 +470,11 @@ typedef struct av7110_s { ca_slot_info_t ci_slot[2]; int vidmode; - dmxdev_t dmxdev; - struct dvb_demux demux; + struct dmxdev dmxdev; + struct dvb_demux demux; - dmx_frontend_t hw_frontend; - dmx_frontend_t mem_frontend; + struct dmx_frontend hw_frontend; + struct dmx_frontend mem_frontend; int fe_synced; struct semaphore pid_mutex; @@ -558,11 +489,11 @@ typedef struct av7110_s { #define TRICK_FREEZE 3 struct audio_status audiostate; - struct dvb_demux_filter *handle2filter[32]; - p2t_t p2t_filter[MAXFILT]; - dvb_filter_pes2ts_t p2t[2]; - struct ipack_s ipack[2]; - u8 *kbuf[2]; + struct dvb_demux_filter *handle2filter[32]; + struct av7110_p2t p2t_filter[MAXFILT]; + struct dvb_filter_pes2ts p2t[2]; + struct ipack ipack[2]; + u8 *kbuf[2]; int sinfo; int feeding; @@ -589,8 +520,8 @@ typedef struct av7110_s { u16 pids[DMX_PES_OTHER]; - dvb_ringbuffer_t ci_rbuffer; - dvb_ringbuffer_t ci_wbuffer; + struct dvb_ringbuffer ci_rbuffer; + struct dvb_ringbuffer ci_wbuffer; struct dvb_adapter *dvb_adapter; @@ -605,7 +536,7 @@ typedef struct av7110_s { int dsp_dev; u32 ir_config; -} av7110_t; +}; #define DPRAM_BASE 0x4000 @@ -683,7 +614,7 @@ extern int av7110_dpram_len, av7110_root_len; extern void av7110_register_irc_handler(void (*func)(u32)); extern void av7110_unregister_irc_handler(void (*func)(u32)); -extern void av7110_setup_irc_config (av7110_t *av7110, u32 ir_config); +extern void av7110_setup_irc_config (struct av7110 *av7110, u32 ir_config); extern int av7110_ir_init (void); extern void av7110_ir_exit (void); diff --git a/linux/drivers/media/dvb/ttpci/av7110_ipack.c b/linux/drivers/media/dvb/ttpci/av7110_ipack.c index 2e1c40b56..003d3e0bb 100644 --- a/linux/drivers/media/dvb/ttpci/av7110_ipack.c +++ b/linux/drivers/media/dvb/ttpci/av7110_ipack.c @@ -4,7 +4,7 @@ #include <linux/vmalloc.h> -void av7110_ipack_reset(ipack *p) +void av7110_ipack_reset(struct ipack *p) { p->found = 0; p->cid = 0; @@ -20,7 +20,7 @@ void av7110_ipack_reset(ipack *p) } -void av7110_ipack_init(ipack *p, int size, +void av7110_ipack_init(struct ipack *p, int size, void (*func)(u8 *buf, int size, void *priv)) { if ( !(p->buf = vmalloc(size*sizeof(u8))) ){ @@ -33,7 +33,7 @@ void av7110_ipack_init(ipack *p, int size, } -void av7110_ipack_free(ipack * p) +void av7110_ipack_free(struct ipack * p) { if (p->buf) vfree(p->buf); @@ -41,10 +41,10 @@ void av7110_ipack_free(ipack * p) static -void send_ipack(ipack *p) +void send_ipack(struct ipack *p) { int off; - AudioInfo ai; + struct dvb_audio_info ai; int ac3_off = 0; int streamid=0; int nframes= 0; @@ -111,7 +111,7 @@ void send_ipack(ipack *p) } -void av7110_ipack_flush(ipack *p) +void av7110_ipack_flush(struct ipack *p) { if (p->plength != MMAX_PLENGTH-6 || p->found<=6) return; @@ -123,7 +123,7 @@ void av7110_ipack_flush(ipack *p) static -void write_ipack(ipack *p, const u8 *data, int count) +void write_ipack(struct ipack *p, const u8 *data, int count) { u8 headr[3] = { 0x00, 0x00, 0x01} ; @@ -146,7 +146,7 @@ void write_ipack(ipack *p, const u8 *data, int count) } -int av7110_ipack_instant_repack (const u8 *buf, int count, ipack *p) +int av7110_ipack_instant_repack (const u8 *buf, int count, struct ipack *p) { int l; int c=0; diff --git a/linux/drivers/media/dvb/ttpci/av7110_ipack.h b/linux/drivers/media/dvb/ttpci/av7110_ipack.h index d1c995aff..6916881f1 100644 --- a/linux/drivers/media/dvb/ttpci/av7110_ipack.h +++ b/linux/drivers/media/dvb/ttpci/av7110_ipack.h @@ -1,13 +1,13 @@ #ifndef _AV7110_IPACK_H_ #define _AV7110_IPACK_H_ -extern void av7110_ipack_init(ipack *p, int size, +extern void av7110_ipack_init(struct ipack *p, int size, void (*func)(u8 *buf, int size, void *priv)); -extern void av7110_ipack_reset(ipack *p); -extern int av7110_ipack_instant_repack(const u8 *buf, int count, ipack *p); -extern void av7110_ipack_free(ipack * p); -extern void av7110_ipack_flush(ipack *p); +extern void av7110_ipack_reset(struct ipack *p); +extern int av7110_ipack_instant_repack(const u8 *buf, int count, struct ipack *p); +extern void av7110_ipack_free(struct ipack * p); +extern void av7110_ipack_flush(struct ipack *p); #endif diff --git a/linux/drivers/media/dvb/ttpci/budget.h b/linux/drivers/media/dvb/ttpci/budget.h index f3f10f604..0135bee0f 100644 --- a/linux/drivers/media/dvb/ttpci/budget.h +++ b/linux/drivers/media/dvb/ttpci/budget.h @@ -24,7 +24,7 @@ struct budget { /* devices */ struct dvb_device dvb_dev; - dvb_net_t dvb_net; + struct dvb_net dvb_net; struct saa7146_dev *dev; @@ -37,11 +37,11 @@ struct budget { struct tasklet_struct fidb_tasklet; struct tasklet_struct vpe_tasklet; - dmxdev_t dmxdev; + struct dmxdev dmxdev; struct dvb_demux demux; - dmx_frontend_t hw_frontend; - dmx_frontend_t mem_frontend; + struct dmx_frontend hw_frontend; + struct dmx_frontend mem_frontend; int fe_synced; struct semaphore pid_mutex; |