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 | |
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')
20 files changed, 454 insertions, 533 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h index 2401b42d8..2b30be6b3 100644 --- a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h +++ b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h @@ -33,9 +33,9 @@ struct dvb_bt8xx_card { struct bt878 *bt; unsigned int bttv_nr; struct dvb_demux demux; - dmxdev_t dmxdev; - dmx_frontend_t fe_hw; - dmx_frontend_t fe_mem; + struct dmxdev dmxdev; + struct dmx_frontend fe_hw; + struct dmx_frontend fe_mem; u32 gpio_mode; struct i2c_adapter *i2c_adap; diff --git a/linux/drivers/media/dvb/dvb-core/demux.h b/linux/drivers/media/dvb/dvb-core/demux.h index 00724ca18..e1b3f88b6 100644 --- a/linux/drivers/media/dvb/dvb-core/demux.h +++ b/linux/drivers/media/dvb/dvb-core/demux.h @@ -106,11 +106,11 @@ typedef enum #define DMX_TS_PES_PCR DMX_TS_PES_PCR0 -struct dmx_ts_feed_s { +struct dmx_ts_feed { int is_filtering; /* Set to non-zero when filtering in progress */ - struct dmx_demux_s *parent; /* Back-pointer */ + struct dmx_demux *parent; /* Back-pointer */ void *priv; /* Pointer to private data of the API client */ - int (*set) (struct dmx_ts_feed_s *feed, + int (*set) (struct dmx_ts_feed *feed, u16 pid, int type, dmx_ts_pes_t pes_type, @@ -118,27 +118,25 @@ struct dmx_ts_feed_s { size_t circular_buffer_size, int descramble, struct timespec timeout); - int (*start_filtering) (struct dmx_ts_feed_s* feed); - int (*stop_filtering) (struct dmx_ts_feed_s* feed); + int (*start_filtering) (struct dmx_ts_feed* feed); + int (*stop_filtering) (struct dmx_ts_feed* feed); }; -typedef struct dmx_ts_feed_s dmx_ts_feed_t; - /*--------------------------------------------------------------------------*/ /* Section reception */ /*--------------------------------------------------------------------------*/ -typedef struct { +struct dmx_section_filter { u8 filter_value [DMX_MAX_FILTER_SIZE]; u8 filter_mask [DMX_MAX_FILTER_SIZE]; u8 filter_mode [DMX_MAX_FILTER_SIZE]; - struct dmx_section_feed_s* parent; /* Back-pointer */ + struct dmx_section_feed* parent; /* Back-pointer */ void* priv; /* Pointer to private data of the API client */ -} dmx_section_filter_t; +}; -struct dmx_section_feed_s { +struct dmx_section_feed { int is_filtering; /* Set to non-zero when filtering in progress */ - struct dmx_demux_s* parent; /* Back-pointer */ + struct dmx_demux* parent; /* Back-pointer */ void* priv; /* Pointer to private data of the API client */ int check_crc; @@ -148,19 +146,18 @@ struct dmx_section_feed_s { int secbufp; int seclen; - int (*set) (struct dmx_section_feed_s* feed, + int (*set) (struct dmx_section_feed* feed, u16 pid, size_t circular_buffer_size, int descramble, int check_crc); - int (*allocate_filter) (struct dmx_section_feed_s* feed, - dmx_section_filter_t** filter); - int (*release_filter) (struct dmx_section_feed_s* feed, - dmx_section_filter_t* filter); - int (*start_filtering) (struct dmx_section_feed_s* feed); - int (*stop_filtering) (struct dmx_section_feed_s* feed); + int (*allocate_filter) (struct dmx_section_feed* feed, + struct dmx_section_filter** filter); + int (*release_filter) (struct dmx_section_feed* feed, + struct dmx_section_filter* filter); + int (*start_filtering) (struct dmx_section_feed* feed); + int (*stop_filtering) (struct dmx_section_feed* feed); }; -typedef struct dmx_section_feed_s dmx_section_feed_t; /*--------------------------------------------------------------------------*/ /* Callback functions */ @@ -170,14 +167,14 @@ typedef int (*dmx_ts_cb) ( const u8 * buffer1, size_t buffer1_length, const u8 * buffer2, size_t buffer2_length, - dmx_ts_feed_t* source, + struct dmx_ts_feed* source, dmx_success_t success); typedef int (*dmx_section_cb) ( const u8 * buffer1, size_t buffer1_len, const u8 * buffer2, size_t buffer2_len, - dmx_section_filter_t * source, + struct dmx_section_filter * source, dmx_success_t success); /*--------------------------------------------------------------------------*/ @@ -196,20 +193,20 @@ typedef enum { DMX_STREAM_3 } dmx_frontend_source_t; -typedef struct { +struct dmx_frontend { struct list_head connectivity_list; /* List of front-ends that can be connected to a particular demux */ void* priv; /* Pointer to private data of the API client */ dmx_frontend_source_t source; -} dmx_frontend_t; +}; /*--------------------------------------------------------------------------*/ /* MPEG-2 TS Demux */ /*--------------------------------------------------------------------------*/ /* - * Flags OR'ed in the capabilites field of struct dmx_demux_s. + * Flags OR'ed in the capabilites field of struct dmx_demux. */ #define DMX_TS_FILTERING 1 @@ -228,57 +225,56 @@ typedef struct { /* * DMX_FE_ENTRY(): Casts elements in the list of registered * front-ends from the generic type struct list_head - * to the type * dmx_frontend_t + * to the type * struct dmx_frontend *. */ -#define DMX_FE_ENTRY(list) list_entry(list, dmx_frontend_t, connectivity_list) +#define DMX_FE_ENTRY(list) list_entry(list, struct dmx_frontend, connectivity_list) -struct dmx_demux_s { +struct dmx_demux { u32 capabilities; /* Bitfield of capability flags */ - dmx_frontend_t* frontend; /* Front-end connected to the demux */ + struct dmx_frontend* frontend; /* Front-end connected to the demux */ struct list_head reg_list; /* List of registered demuxes */ void* priv; /* Pointer to private data of the API client */ int users; /* Number of users */ - int (*open) (struct dmx_demux_s* demux); - int (*close) (struct dmx_demux_s* demux); - int (*write) (struct dmx_demux_s* demux, const char* buf, size_t count); - int (*allocate_ts_feed) (struct dmx_demux_s* demux, - dmx_ts_feed_t** feed, + int (*open) (struct dmx_demux* demux); + int (*close) (struct dmx_demux* demux); + int (*write) (struct dmx_demux* demux, const char* buf, size_t count); + int (*allocate_ts_feed) (struct dmx_demux* demux, + struct dmx_ts_feed** feed, dmx_ts_cb callback); - int (*release_ts_feed) (struct dmx_demux_s* demux, - dmx_ts_feed_t* feed); - int (*allocate_section_feed) (struct dmx_demux_s* demux, - dmx_section_feed_t** feed, + int (*release_ts_feed) (struct dmx_demux* demux, + struct dmx_ts_feed* feed); + int (*allocate_section_feed) (struct dmx_demux* demux, + struct dmx_section_feed** feed, dmx_section_cb callback); - int (*release_section_feed) (struct dmx_demux_s* demux, - dmx_section_feed_t* feed); - int (*descramble_mac_address) (struct dmx_demux_s* demux, + int (*release_section_feed) (struct dmx_demux* demux, + struct dmx_section_feed* feed); + int (*descramble_mac_address) (struct dmx_demux* demux, u8* buffer1, size_t buffer1_length, u8* buffer2, size_t buffer2_length, u16 pid); - int (*descramble_section_payload) (struct dmx_demux_s* demux, + int (*descramble_section_payload) (struct dmx_demux* demux, u8* buffer1, size_t buffer1_length, u8* buffer2, size_t buffer2_length, u16 pid); - int (*add_frontend) (struct dmx_demux_s* demux, - dmx_frontend_t* frontend); - int (*remove_frontend) (struct dmx_demux_s* demux, - dmx_frontend_t* frontend); - struct list_head* (*get_frontends) (struct dmx_demux_s* demux); - int (*connect_frontend) (struct dmx_demux_s* demux, - dmx_frontend_t* frontend); - int (*disconnect_frontend) (struct dmx_demux_s* demux); - - int (*get_pes_pids) (struct dmx_demux_s* demux, u16 *pids); - - int (*get_stc) (struct dmx_demux_s* demux, unsigned int num, + int (*add_frontend) (struct dmx_demux* demux, + struct dmx_frontend* frontend); + int (*remove_frontend) (struct dmx_demux* demux, + struct dmx_frontend* frontend); + struct list_head* (*get_frontends) (struct dmx_demux* demux); + int (*connect_frontend) (struct dmx_demux* demux, + struct dmx_frontend* frontend); + int (*disconnect_frontend) (struct dmx_demux* demux); + + int (*get_pes_pids) (struct dmx_demux* demux, u16 *pids); + + int (*get_stc) (struct dmx_demux* demux, unsigned int num, u64 *stc, unsigned int *base); -}; -typedef struct dmx_demux_s dmx_demux_t; +}; /*--------------------------------------------------------------------------*/ /* Demux directory */ @@ -286,14 +282,14 @@ typedef struct dmx_demux_s dmx_demux_t; /* * DMX_DIR_ENTRY(): Casts elements in the list of registered - * demuxes from the generic type struct list_head* to the type dmx_demux_t + * demuxes from the generic type struct list_head* to the type struct dmx_demux *. */ -#define DMX_DIR_ENTRY(list) list_entry(list, dmx_demux_t, reg_list) +#define DMX_DIR_ENTRY(list) list_entry(list, struct dmx_demux, reg_list) -int dmx_register_demux (dmx_demux_t* demux); -int dmx_unregister_demux (dmx_demux_t* demux); +int dmx_register_demux (struct dmx_demux* demux); +int dmx_unregister_demux (struct dmx_demux* demux); struct list_head* dmx_get_demuxes (void); #endif /* #ifndef __DEMUX_H */ diff --git a/linux/drivers/media/dvb/dvb-core/dmxdev.c b/linux/drivers/media/dvb/dvb-core/dmxdev.c index b5e8cea92..61f801f0c 100644 --- a/linux/drivers/media/dvb/dvb-core/dmxdev.c +++ b/linux/drivers/media/dvb/dvb-core/dmxdev.c @@ -40,20 +40,20 @@ static int debug = 0; #define dprintk if (debug) printk -inline dmxdev_filter_t * +inline struct dmxdev_filter * dvb_dmxdev_file_to_filter(struct file *file) { - return (dmxdev_filter_t *) file->private_data; + return (struct dmxdev_filter *) file->private_data; } -inline dmxdev_dvr_t * -dvb_dmxdev_file_to_dvr(dmxdev_t *dmxdev, struct file *file) +inline struct dmxdev_dvr * +dvb_dmxdev_file_to_dvr(struct dmxdev *dmxdev, struct file *file) { - return (dmxdev_dvr_t *) file->private_data; + return (struct dmxdev_dvr *) file->private_data; } static inline void -dvb_dmxdev_buffer_init(dmxdev_buffer_t *buffer) +dvb_dmxdev_buffer_init(struct dmxdev_buffer *buffer) { buffer->data=0; buffer->size=8192; @@ -64,7 +64,7 @@ dvb_dmxdev_buffer_init(dmxdev_buffer_t *buffer) } static inline -int dvb_dmxdev_buffer_write(dmxdev_buffer_t *buf, const u8 *src, int len) +int dvb_dmxdev_buffer_write(struct dmxdev_buffer *buf, const u8 *src, int len) { int split; int free; @@ -99,7 +99,7 @@ int dvb_dmxdev_buffer_write(dmxdev_buffer_t *buf, const u8 *src, int len) } static ssize_t -dvb_dmxdev_buffer_read(dmxdev_buffer_t *src, int non_blocking, +dvb_dmxdev_buffer_read(struct dmxdev_buffer *src, int non_blocking, char *buf, size_t count, loff_t *ppos) { unsigned long todo=count; @@ -159,8 +159,8 @@ dvb_dmxdev_buffer_read(dmxdev_buffer_t *src, int non_blocking, return count; } -static dmx_frontend_t * -get_fe(dmx_demux_t *demux, int type) +static struct dmx_frontend * +get_fe(struct dmx_demux *demux, int type) { struct list_head *head, *pos; @@ -175,7 +175,7 @@ get_fe(dmx_demux_t *demux, int type) } static inline void -dvb_dmxdev_dvr_state_set(dmxdev_dvr_t *dmxdevdvr, int state) +dvb_dmxdev_dvr_state_set(struct dmxdev_dvr *dmxdevdvr, int state) { spin_lock_irq(&dmxdevdvr->dev->lock); dmxdevdvr->state=state; @@ -185,8 +185,8 @@ dvb_dmxdev_dvr_state_set(dmxdev_dvr_t *dmxdevdvr, int state) static int dvb_dvr_open(struct inode *inode, struct file *file) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv; - dmx_frontend_t *front; + struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv; + struct dmx_frontend *front; dprintk ("function : %s\n", __FUNCTION__); @@ -234,7 +234,7 @@ static int dvb_dvr_open(struct inode *inode, struct file *file) static int dvb_dvr_release(struct inode *inode, struct file *file) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv; + struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv; if (down_interruptible (&dmxdev->mutex)) return -ERESTARTSYS; @@ -262,7 +262,7 @@ static ssize_t dvb_dvr_write(struct file *file, const char *buf, size_t count, loff_t *ppos) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv; + struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv; int ret; if (!dmxdev->demux->write) @@ -280,7 +280,7 @@ static ssize_t dvb_dvr_read(struct file *file, char *buf, size_t count, loff_t *ppos) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv; + struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv; int ret; //down(&dmxdev->mutex); @@ -292,7 +292,7 @@ dvb_dvr_read(struct file *file, char *buf, size_t count, loff_t *ppos) } static inline void -dvb_dmxdev_filter_state_set(dmxdev_filter_t *dmxdevfilter, int state) +dvb_dmxdev_filter_state_set(struct dmxdev_filter *dmxdevfilter, int state) { spin_lock_irq(&dmxdevfilter->dev->lock); dmxdevfilter->state=state; @@ -300,9 +300,9 @@ dvb_dmxdev_filter_state_set(dmxdev_filter_t *dmxdevfilter, int state) } static int -dvb_dmxdev_set_buffer_size(dmxdev_filter_t *dmxdevfilter, unsigned long size) +dvb_dmxdev_set_buffer_size(struct dmxdev_filter *dmxdevfilter, unsigned long size) { - dmxdev_buffer_t *buf=&dmxdevfilter->buffer; + struct dmxdev_buffer *buf=&dmxdevfilter->buffer; void *mem; if (buf->size==size) @@ -332,7 +332,7 @@ dvb_dmxdev_set_buffer_size(dmxdev_filter_t *dmxdevfilter, unsigned long size) static void dvb_dmxdev_filter_timeout(unsigned long data) { - dmxdev_filter_t *dmxdevfilter=(dmxdev_filter_t *)data; + struct dmxdev_filter *dmxdevfilter=(struct dmxdev_filter *)data; dmxdevfilter->buffer.error=-ETIMEDOUT; spin_lock_irq(&dmxdevfilter->dev->lock); @@ -342,7 +342,7 @@ dvb_dmxdev_filter_timeout(unsigned long data) } static void -dvb_dmxdev_filter_timer(dmxdev_filter_t *dmxdevfilter) +dvb_dmxdev_filter_timer(struct dmxdev_filter *dmxdevfilter) { struct dmx_sct_filter_params *para=&dmxdevfilter->params.sec; @@ -358,9 +358,9 @@ dvb_dmxdev_filter_timer(dmxdev_filter_t *dmxdevfilter) static int dvb_dmxdev_section_callback(const u8 *buffer1, size_t buffer1_len, const u8 *buffer2, size_t buffer2_len, - dmx_section_filter_t *filter, dmx_success_t success) + struct dmx_section_filter *filter, dmx_success_t success) { - dmxdev_filter_t *dmxdevfilter=(dmxdev_filter_t *) filter->priv; + struct dmxdev_filter *dmxdevfilter=(struct dmxdev_filter *) filter->priv; int ret; if (dmxdevfilter->buffer.error) { @@ -395,10 +395,10 @@ dvb_dmxdev_section_callback(const u8 *buffer1, size_t buffer1_len, static int dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len, const u8 *buffer2, size_t buffer2_len, - dmx_ts_feed_t *feed, dmx_success_t success) + struct dmx_ts_feed *feed, dmx_success_t success) { - dmxdev_filter_t *dmxdevfilter=(dmxdev_filter_t *) feed->priv; - dmxdev_buffer_t *buffer; + struct dmxdev_filter *dmxdevfilter=(struct dmxdev_filter *) feed->priv; + struct dmxdev_buffer *buffer; int ret; spin_lock(&dmxdevfilter->dev->lock); @@ -432,7 +432,7 @@ dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len, /* stop feed but only mark the specified filter as stopped (state set) */ static int -dvb_dmxdev_feed_stop(dmxdev_filter_t *dmxdevfilter) +dvb_dmxdev_feed_stop(struct dmxdev_filter *dmxdevfilter) { dvb_dmxdev_filter_state_set(dmxdevfilter, DMXDEV_STATE_SET); @@ -454,7 +454,7 @@ dvb_dmxdev_feed_stop(dmxdev_filter_t *dmxdevfilter) /* start feed associated with the specified filter */ static -int dvb_dmxdev_feed_start(dmxdev_filter_t *filter) +int dvb_dmxdev_feed_start(struct dmxdev_filter *filter) { dvb_dmxdev_filter_state_set (filter, DMXDEV_STATE_GO); @@ -477,10 +477,10 @@ int dvb_dmxdev_feed_start(dmxdev_filter_t *filter) otherwise release the feed */ static -int dvb_dmxdev_feed_restart(dmxdev_filter_t *filter) +int dvb_dmxdev_feed_restart(struct dmxdev_filter *filter) { int i; - dmxdev_t *dmxdev = filter->dev; + struct dmxdev *dmxdev = filter->dev; u16 pid = filter->params.sec.pid; for (i=0; i<dmxdev->filternum; i++) @@ -497,7 +497,7 @@ int dvb_dmxdev_feed_restart(dmxdev_filter_t *filter) } static int -dvb_dmxdev_filter_stop(dmxdev_filter_t *dmxdevfilter) +dvb_dmxdev_filter_stop(struct dmxdev_filter *dmxdevfilter) { if (dmxdevfilter->state<DMXDEV_STATE_GO) return 0; @@ -533,7 +533,7 @@ dvb_dmxdev_filter_stop(dmxdev_filter_t *dmxdevfilter) } static inline int -dvb_dmxdev_filter_reset(dmxdev_filter_t *dmxdevfilter) +dvb_dmxdev_filter_reset(struct dmxdev_filter *dmxdevfilter) { if (dmxdevfilter->state<DMXDEV_STATE_SET) return 0; @@ -545,9 +545,9 @@ dvb_dmxdev_filter_reset(dmxdev_filter_t *dmxdevfilter) } static int -dvb_dmxdev_filter_start(dmxdev_filter_t *filter) +dvb_dmxdev_filter_start(struct dmxdev_filter *filter) { - dmxdev_t *dmxdev = filter->dev; + struct dmxdev *dmxdev = filter->dev; void *mem; int ret, i; @@ -572,8 +572,8 @@ dvb_dmxdev_filter_start(dmxdev_filter_t *filter) case DMXDEV_TYPE_SEC: { struct dmx_sct_filter_params *para=&filter->params.sec; - dmx_section_filter_t **secfilter=&filter->filter.sec; - dmx_section_feed_t **secfeed=&filter->feed.sec; + struct dmx_section_filter **secfilter=&filter->filter.sec; + struct dmx_section_feed **secfeed=&filter->feed.sec; *secfilter=0; *secfeed=0; @@ -655,7 +655,7 @@ dvb_dmxdev_filter_start(dmxdev_filter_t *filter) int ret; int ts_type; dmx_ts_pes_t ts_pes; - dmx_ts_feed_t **tsfeed = &filter->feed.ts; + struct dmx_ts_feed **tsfeed = &filter->feed.ts; filter->feed.ts = 0; otype=para->output; @@ -707,9 +707,9 @@ dvb_dmxdev_filter_start(dmxdev_filter_t *filter) static int dvb_demux_open(struct inode *inode, struct file *file) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv; + struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv; int i; - dmxdev_filter_t *dmxdevfilter; + struct dmxdev_filter *dmxdevfilter; if (!dmxdev->filter) return -EINVAL; @@ -743,7 +743,7 @@ static int dvb_demux_open(struct inode *inode, struct file *file) static -int dvb_dmxdev_filter_free(dmxdev_t *dmxdev, dmxdev_filter_t *dmxdevfilter) +int dvb_dmxdev_filter_free(struct dmxdev *dmxdev, struct dmxdev_filter *dmxdevfilter) { if (down_interruptible(&dmxdev->mutex)) return -ERESTARTSYS; @@ -783,8 +783,8 @@ invert_mode(dmx_filter_t *filter) static int -dvb_dmxdev_filter_set(dmxdev_t *dmxdev, - dmxdev_filter_t *dmxdevfilter, +dvb_dmxdev_filter_set(struct dmxdev *dmxdev, + struct dmxdev_filter *dmxdevfilter, struct dmx_sct_filter_params *params) { dprintk ("function : %s\n", __FUNCTION__); @@ -805,8 +805,8 @@ dvb_dmxdev_filter_set(dmxdev_t *dmxdev, } static int -dvb_dmxdev_pes_filter_set(dmxdev_t *dmxdev, - dmxdev_filter_t *dmxdevfilter, +dvb_dmxdev_pes_filter_set(struct dmxdev *dmxdev, + struct dmxdev_filter *dmxdevfilter, struct dmx_pes_filter_params *params) { dvb_dmxdev_filter_stop(dmxdevfilter); @@ -827,7 +827,7 @@ dvb_dmxdev_pes_filter_set(dmxdev_t *dmxdev, } static ssize_t -dvb_dmxdev_read_sec(dmxdev_filter_t *dfil, struct file *file, +dvb_dmxdev_read_sec(struct dmxdev_filter *dfil, struct file *file, char *buf, size_t count, loff_t *ppos) { int result, hcount; @@ -869,7 +869,7 @@ dvb_dmxdev_read_sec(dmxdev_filter_t *dfil, struct file *file, ssize_t dvb_demux_read(struct file *file, char *buf, size_t count, loff_t *ppos) { - dmxdev_filter_t *dmxdevfilter=dvb_dmxdev_file_to_filter(file); + struct dmxdev_filter *dmxdevfilter=dvb_dmxdev_file_to_filter(file); int ret=0; if (down_interruptible(&dmxdevfilter->mutex)) @@ -890,8 +890,8 @@ dvb_demux_read(struct file *file, char *buf, size_t count, loff_t *ppos) static int dvb_demux_do_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { - dmxdev_filter_t *dmxdevfilter=dvb_dmxdev_file_to_filter(file); - dmxdev_t *dmxdev=dmxdevfilter->dev; + struct dmxdev_filter *dmxdevfilter=dvb_dmxdev_file_to_filter(file); + struct dmxdev *dmxdev=dmxdevfilter->dev; unsigned long arg=(unsigned long) parg; int ret=0; @@ -988,7 +988,7 @@ static int dvb_demux_ioctl(struct inode *inode, struct file *file, static unsigned int dvb_demux_poll (struct file *file, poll_table *wait) { - dmxdev_filter_t *dmxdevfilter = dvb_dmxdev_file_to_filter(file); + struct dmxdev_filter *dmxdevfilter = dvb_dmxdev_file_to_filter(file); unsigned int mask = 0; if (!dmxdevfilter) @@ -1014,8 +1014,8 @@ unsigned int dvb_demux_poll (struct file *file, poll_table *wait) static int dvb_demux_release(struct inode *inode, struct file *file) { - dmxdev_filter_t *dmxdevfilter = dvb_dmxdev_file_to_filter(file); - dmxdev_t *dmxdev = dmxdevfilter->dev; + struct dmxdev_filter *dmxdevfilter = dvb_dmxdev_file_to_filter(file); + struct dmxdev *dmxdev = dmxdevfilter->dev; return dvb_dmxdev_filter_free(dmxdev, dmxdevfilter); } @@ -1043,7 +1043,7 @@ static int dvb_dvr_do_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; - dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv; + struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv; int ret=0; @@ -1075,7 +1075,7 @@ static unsigned int dvb_dvr_poll (struct file *file, poll_table *wait) { struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - dmxdev_t *dmxdev = (dmxdev_t *) dvbdev->priv; + struct dmxdev *dmxdev = (struct dmxdev *) dvbdev->priv; unsigned int mask = 0; dprintk ("function : %s\n", __FUNCTION__); @@ -1115,18 +1115,18 @@ struct dvb_device dvbdev_dvr = { }; int -dvb_dmxdev_init(dmxdev_t *dmxdev, struct dvb_adapter *dvb_adapter) +dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *dvb_adapter) { int i; if (dmxdev->demux->open(dmxdev->demux) < 0) return -EUSERS; - dmxdev->filter = vmalloc(dmxdev->filternum*sizeof(dmxdev_filter_t)); + dmxdev->filter = vmalloc(dmxdev->filternum*sizeof(struct dmxdev_filter)); if (!dmxdev->filter) return -ENOMEM; - dmxdev->dvr = vmalloc(dmxdev->filternum*sizeof(dmxdev_dvr_t)); + dmxdev->dvr = vmalloc(dmxdev->filternum*sizeof(struct dmxdev_dvr)); if (!dmxdev->dvr) { vfree(dmxdev->filter); dmxdev->filter = NULL; @@ -1154,7 +1154,7 @@ dvb_dmxdev_init(dmxdev_t *dmxdev, struct dvb_adapter *dvb_adapter) } void -dvb_dmxdev_release(dmxdev_t *dmxdev) +dvb_dmxdev_release(struct dmxdev *dmxdev) { dvb_unregister_device(dmxdev->dvbdev); dvb_unregister_device(dmxdev->dvr_dvbdev); diff --git a/linux/drivers/media/dvb/dvb-core/dmxdev.h b/linux/drivers/media/dvb/dvb-core/dmxdev.h index e5bb864fb..c491f1e37 100644 --- a/linux/drivers/media/dvb/dvb-core/dmxdev.h +++ b/linux/drivers/media/dvb/dvb-core/dmxdev.h @@ -42,7 +42,7 @@ typedef enum { DMXDEV_TYPE_NONE, DMXDEV_TYPE_SEC, DMXDEV_TYPE_PES, -} dmxdev_type_t; +} dmxdevype_t; typedef enum { DMXDEV_STATE_FREE, @@ -53,26 +53,25 @@ typedef enum { DMXDEV_STATE_TIMEDOUT } dmxdev_state_t; -typedef struct dmxdev_buffer { +struct dmxdev_buffer { u8 *data; int size; int pread; int pwrite; wait_queue_head_t queue; int error; -} dmxdev_buffer_t; +}; - -typedef struct dmxdev_filter { +struct dmxdev_filter { struct dvb_device *dvbdev; union { - dmx_section_filter_t *sec; + struct dmx_section_filter *sec; } filter; union { - dmx_ts_feed_t *ts; - dmx_section_feed_t *sec; + struct dmx_ts_feed *ts; + struct dmx_section_feed *sec; } feed; union { @@ -83,48 +82,48 @@ typedef struct dmxdev_filter { int type; dmxdev_state_t state; struct dmxdev *dev; - dmxdev_buffer_t buffer; + struct dmxdev_buffer buffer; struct semaphore mutex; - // only for sections + /* only for sections */ struct timer_list timer; int todo; u8 secheader[3]; u16 pid; -} dmxdev_filter_t; +}; -typedef struct dmxdev_dvr { +struct dmxdev_dvr { int state; struct dmxdev *dev; - dmxdev_buffer_t buffer; -} dmxdev_dvr_t; + struct dmxdev_buffer buffer; +}; -typedef struct dmxdev { +struct dmxdev { struct dvb_device *dvbdev; struct dvb_device *dvr_dvbdev; - dmxdev_filter_t *filter; - dmxdev_dvr_t *dvr; - dmx_demux_t *demux; + struct dmxdev_filter *filter; + struct dmxdev_dvr *dvr; + struct dmx_demux *demux; int filternum; int capabilities; #define DMXDEV_CAP_DUPLEX 1 - dmx_frontend_t *dvr_orig_fe; + struct dmx_frontend *dvr_orig_fe; - dmxdev_buffer_t dvr_buffer; + struct dmxdev_buffer dvr_buffer; #define DVR_BUFFER_SIZE (10*188*1024) struct semaphore mutex; spinlock_t lock; -} dmxdev_t; +}; -int dvb_dmxdev_init(dmxdev_t *dmxdev, struct dvb_adapter *); -void dvb_dmxdev_release(dmxdev_t *dmxdev); +int dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *); +void dvb_dmxdev_release(struct dmxdev *dmxdev); #endif /* _DMXDEV_H_ */ diff --git a/linux/drivers/media/dvb/dvb-core/dvb_demux.c b/linux/drivers/media/dvb/dvb-core/dvb_demux.c index 29699a433..973f3ba7a 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_demux.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_demux.c @@ -38,14 +38,14 @@ LIST_HEAD(dmx_muxs); -int dmx_register_demux(dmx_demux_t *demux) +int dmx_register_demux(struct dmx_demux *demux) { demux->users = 0; list_add(&demux->reg_list, &dmx_muxs); return 0; } -int dmx_unregister_demux(dmx_demux_t* demux) +int dmx_unregister_demux(struct dmx_demux* demux) { struct list_head *pos, *n, *head=&dmx_muxs; @@ -196,7 +196,7 @@ int dvb_dmx_swfilter_section_feed (struct dvb_demux_feed *feed) { struct dvb_demux *demux = feed->demux; struct dvb_demux_filter *f = feed->filter; - dmx_section_feed_t *sec = &feed->feed.sec; + struct dmx_section_feed *sec = &feed->feed.sec; u8 *buf = sec->secbuf; if (sec->secbufp != sec->seclen) @@ -228,7 +228,7 @@ static int dvb_dmx_swfilter_section_packet(struct dvb_demux_feed *feed, const u8 *buf) { struct dvb_demux *demux = feed->demux; - dmx_section_feed_t *sec = &feed->feed.sec; + struct dmx_section_feed *sec = &feed->feed.sec; int p, count; int ccok, rest; u8 cc; @@ -508,7 +508,7 @@ int dmx_pid_set (u16 pid, struct dvb_demux_feed *feed) static -int dmx_ts_feed_set (struct dmx_ts_feed_s* ts_feed, u16 pid, int ts_type, +int dmx_ts_feed_set (struct dmx_ts_feed* ts_feed, u16 pid, int ts_type, dmx_ts_pes_t pes_type, size_t callback_length, size_t circular_buffer_size, int descramble, struct timespec timeout) @@ -584,7 +584,7 @@ int dmx_ts_feed_set (struct dmx_ts_feed_s* ts_feed, u16 pid, int ts_type, static -int dmx_ts_feed_start_filtering(struct dmx_ts_feed_s* ts_feed) +int dmx_ts_feed_start_filtering(struct dmx_ts_feed* ts_feed) { struct dvb_demux_feed *feed = (struct dvb_demux_feed *) ts_feed; struct dvb_demux *demux = feed->demux; @@ -618,7 +618,7 @@ int dmx_ts_feed_start_filtering(struct dmx_ts_feed_s* ts_feed) } static -int dmx_ts_feed_stop_filtering(struct dmx_ts_feed_s* ts_feed) +int dmx_ts_feed_stop_filtering(struct dmx_ts_feed* ts_feed) { struct dvb_demux_feed *feed = (struct dvb_demux_feed *) ts_feed; struct dvb_demux *demux = feed->demux; @@ -649,7 +649,7 @@ int dmx_ts_feed_stop_filtering(struct dmx_ts_feed_s* ts_feed) } static -int dvbdmx_allocate_ts_feed (dmx_demux_t *dmx, dmx_ts_feed_t **ts_feed, +int dvbdmx_allocate_ts_feed (struct dmx_demux *dmx, struct dmx_ts_feed **ts_feed, dmx_ts_cb callback) { struct dvb_demux *demux = (struct dvb_demux *) dmx; @@ -695,7 +695,7 @@ int dvbdmx_allocate_ts_feed (dmx_demux_t *dmx, dmx_ts_feed_t **ts_feed, } static -int dvbdmx_release_ts_feed(dmx_demux_t *dmx, dmx_ts_feed_t *ts_feed) +int dvbdmx_release_ts_feed(struct dmx_demux *dmx, struct dmx_ts_feed *ts_feed) { struct dvb_demux *demux = (struct dvb_demux *) dmx; struct dvb_demux_feed *feed = (struct dvb_demux_feed *) ts_feed; @@ -741,8 +741,8 @@ int dvbdmx_release_ts_feed(dmx_demux_t *dmx, dmx_ts_feed_t *ts_feed) ******************************************************************************/ static int -dmx_section_feed_allocate_filter(struct dmx_section_feed_s* feed, - dmx_section_filter_t** filter) +dmx_section_feed_allocate_filter(struct dmx_section_feed* feed, + struct dmx_section_filter** filter) { struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *) feed; struct dvb_demux *dvbdemux = dvbdmxfeed->demux; @@ -774,7 +774,7 @@ dmx_section_feed_allocate_filter(struct dmx_section_feed_s* feed, static int -dmx_section_feed_set(struct dmx_section_feed_s* feed, +dmx_section_feed_set(struct dmx_section_feed* feed, u16 pid, size_t circular_buffer_size, int descramble, int check_crc) { @@ -829,7 +829,7 @@ static void prepare_secfilters(struct dvb_demux_feed *dvbdmxfeed) { int i; struct dvb_demux_filter *f; - dmx_section_filter_t *sf; + struct dmx_section_filter *sf; u8 mask, mode, doneq; if (!(f=dvbdmxfeed->filter)) @@ -849,7 +849,7 @@ static void prepare_secfilters(struct dvb_demux_feed *dvbdmxfeed) static int -dmx_section_feed_start_filtering(dmx_section_feed_t *feed) +dmx_section_feed_start_filtering(struct dmx_section_feed *feed) { struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *) feed; struct dvb_demux *dvbdmx = dvbdmxfeed->demux; @@ -894,7 +894,7 @@ dmx_section_feed_start_filtering(dmx_section_feed_t *feed) static int -dmx_section_feed_stop_filtering(struct dmx_section_feed_s* feed) +dmx_section_feed_stop_filtering(struct dmx_section_feed* feed) { struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *) feed; struct dvb_demux *dvbdmx = dvbdmxfeed->demux; @@ -921,8 +921,8 @@ dmx_section_feed_stop_filtering(struct dmx_section_feed_s* feed) static int -dmx_section_feed_release_filter(dmx_section_feed_t *feed, - dmx_section_filter_t* filter) +dmx_section_feed_release_filter(struct dmx_section_feed *feed, + struct dmx_section_filter* filter) { struct dvb_demux_filter *dvbdmxfilter = (struct dvb_demux_filter *) filter, *f; struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *) feed; @@ -956,8 +956,8 @@ dmx_section_feed_release_filter(dmx_section_feed_t *feed, return 0; } -static int dvbdmx_allocate_section_feed(dmx_demux_t *demux, - dmx_section_feed_t **feed, +static int dvbdmx_allocate_section_feed(struct dmx_demux *demux, + struct dmx_section_feed **feed, dmx_section_cb callback) { struct dvb_demux *dvbdmx = (struct dvb_demux *) demux; @@ -994,8 +994,8 @@ static int dvbdmx_allocate_section_feed(dmx_demux_t *demux, return 0; } -static int dvbdmx_release_section_feed(dmx_demux_t *demux, - dmx_section_feed_t *feed) +static int dvbdmx_release_section_feed(struct dmx_demux *demux, + struct dmx_section_feed *feed) { struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *) feed; struct dvb_demux *dvbdmx = (struct dvb_demux *) demux; @@ -1035,7 +1035,7 @@ static int dvbdmx_release_section_feed(dmx_demux_t *demux, * dvb_demux kernel data API calls ******************************************************************************/ -static int dvbdmx_open(dmx_demux_t *demux) +static int dvbdmx_open(struct dmx_demux *demux) { struct dvb_demux *dvbdemux = (struct dvb_demux *) demux; @@ -1047,7 +1047,7 @@ static int dvbdmx_open(dmx_demux_t *demux) } -static int dvbdmx_close(struct dmx_demux_s *demux) +static int dvbdmx_close(struct dmx_demux *demux) { struct dvb_demux *dvbdemux = (struct dvb_demux *) demux; @@ -1060,7 +1060,7 @@ static int dvbdmx_close(struct dmx_demux_s *demux) } -static int dvbdmx_write(dmx_demux_t *demux, const char *buf, size_t count) +static int dvbdmx_write(struct dmx_demux *demux, const char *buf, size_t count) { struct dvb_demux *dvbdemux=(struct dvb_demux *) demux; @@ -1077,7 +1077,7 @@ static int dvbdmx_write(dmx_demux_t *demux, const char *buf, size_t count) } -static int dvbdmx_add_frontend(dmx_demux_t *demux, dmx_frontend_t *frontend) +static int dvbdmx_add_frontend(struct dmx_demux *demux, struct dmx_frontend *frontend) { struct dvb_demux *dvbdemux = (struct dvb_demux *) demux; struct list_head *head = &dvbdemux->frontend_list; @@ -1089,7 +1089,7 @@ static int dvbdmx_add_frontend(dmx_demux_t *demux, dmx_frontend_t *frontend) static int -dvbdmx_remove_frontend(dmx_demux_t *demux, dmx_frontend_t *frontend) +dvbdmx_remove_frontend(struct dmx_demux *demux, struct dmx_frontend *frontend) { struct dvb_demux *dvbdemux = (struct dvb_demux *) demux; struct list_head *pos, *n, *head = &dvbdemux->frontend_list; @@ -1106,7 +1106,7 @@ dvbdmx_remove_frontend(dmx_demux_t *demux, dmx_frontend_t *frontend) static struct list_head* -dvbdmx_get_frontends(dmx_demux_t *demux) +dvbdmx_get_frontends(struct dmx_demux *demux) { struct dvb_demux *dvbdemux = (struct dvb_demux *) demux; @@ -1117,7 +1117,7 @@ dvbdmx_get_frontends(dmx_demux_t *demux) } -int dvbdmx_connect_frontend(dmx_demux_t *demux, dmx_frontend_t *frontend) +int dvbdmx_connect_frontend(struct dmx_demux *demux, struct dmx_frontend *frontend) { struct dvb_demux *dvbdemux = (struct dvb_demux *) demux; @@ -1133,7 +1133,7 @@ int dvbdmx_connect_frontend(dmx_demux_t *demux, dmx_frontend_t *frontend) } -int dvbdmx_disconnect_frontend(dmx_demux_t *demux) +int dvbdmx_disconnect_frontend(struct dmx_demux *demux) { struct dvb_demux *dvbdemux = (struct dvb_demux *) demux; @@ -1147,7 +1147,7 @@ int dvbdmx_disconnect_frontend(dmx_demux_t *demux) } -static int dvbdmx_get_pes_pids(dmx_demux_t *demux, u16 *pids) +static int dvbdmx_get_pes_pids(struct dmx_demux *demux, u16 *pids) { struct dvb_demux *dvbdemux = (struct dvb_demux *) demux; @@ -1160,7 +1160,7 @@ int dvb_dmx_init(struct dvb_demux *dvbdemux) { int i, err; - dmx_demux_t *dmx = &dvbdemux->dmx; + struct dmx_demux *dmx = &dvbdemux->dmx; dvbdemux->users = 0; dvbdemux->filter = vmalloc(dvbdemux->filternum*sizeof(struct dvb_demux_filter)); @@ -1237,7 +1237,7 @@ dvb_dmx_init(struct dvb_demux *dvbdemux) int dvb_dmx_release(struct dvb_demux *dvbdemux) { - dmx_demux_t *dmx = &dvbdemux->dmx; + struct dmx_demux *dmx = &dvbdemux->dmx; dmx_unregister_demux(dmx); if (dvbdemux->filter) diff --git a/linux/drivers/media/dvb/dvb-core/dvb_demux.h b/linux/drivers/media/dvb/dvb-core/dvb_demux.h index 96eb418bd..35dc8d4b3 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_demux.h +++ b/linux/drivers/media/dvb/dvb-core/dvb_demux.h @@ -45,7 +45,7 @@ #define DVB_DEMUX_MASK_MAX 18 struct dvb_demux_filter { - dmx_section_filter_t filter; + struct dmx_section_filter filter; u8 maskandmode [DMX_MAX_FILTER_SIZE]; u8 maskandnotmode [DMX_MAX_FILTER_SIZE]; int doneq; @@ -68,8 +68,8 @@ struct dvb_demux_filter { struct dvb_demux_feed { union { - dmx_ts_feed_t ts; - dmx_section_feed_t sec; + struct dmx_ts_feed ts; + struct dmx_section_feed sec; } feed; union { @@ -101,7 +101,7 @@ struct dvb_demux_feed { }; struct dvb_demux { - dmx_demux_t dmx; + struct dmx_demux dmx; void *priv; int filternum; int feednum; @@ -142,8 +142,8 @@ void dvb_dmx_swfilter_packet(struct dvb_demux *dvbdmx, const u8 *buf); void dvb_dmx_swfilter_packets(struct dvb_demux *dvbdmx, const u8 *buf, size_t count); void dvb_dmx_swfilter(struct dvb_demux *demux, const u8 *buf, size_t count); -int dvbdmx_connect_frontend(dmx_demux_t *demux, dmx_frontend_t *frontend); -int dvbdmx_disconnect_frontend(dmx_demux_t *demux); +int dvbdmx_connect_frontend(struct dmx_demux *demux, struct dmx_frontend *frontend); +int dvbdmx_disconnect_frontend(struct dmx_demux *demux); #endif /* _DVB_DEMUX_H_ */ diff --git a/linux/drivers/media/dvb/dvb-core/dvb_filter.c b/linux/drivers/media/dvb/dvb-core/dvb_filter.c index 44ad8e563..718ea900b 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_filter.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_filter.c @@ -69,7 +69,7 @@ void ts_to_pes(ipack *p, u8 *buf) // don't need count (=188) #if 0 /* needs 5 byte input, returns picture coding type*/ static -int read_picture_header(u8 *headr, mpg_picture *pic, int field, int pr) +int read_picture_header(u8 *headr, struct mpg_picture *pic, int field, int pr) { u8 pct; @@ -116,7 +116,7 @@ int read_picture_header(u8 *headr, mpg_picture *pic, int field, int pr) #if 0 /* needs 4 byte input */ static -int read_gop_header(u8 *headr, mpg_picture *pic, int pr) +int read_gop_header(u8 *headr, struct mpg_picture *pic, int pr) { if (pr) printk("GOP header: "); @@ -148,7 +148,7 @@ int read_gop_header(u8 *headr, mpg_picture *pic, int pr) #if 0 /* needs 8 byte input */ static -int read_sequence_header(u8 *headr, VideoInfo *vi, int pr) +int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr) { int sw; int form = -1; @@ -263,7 +263,7 @@ int read_sequence_header(u8 *headr, VideoInfo *vi, int pr) #if 0 static -int get_vinfo(u8 *mbuf, int count, VideoInfo *vi, int pr) +int get_vinfo(u8 *mbuf, int count, struct dvb_video_info *vi, int pr) { u8 *headr; int found = 0; @@ -293,7 +293,7 @@ int get_vinfo(u8 *mbuf, int count, VideoInfo *vi, int pr) #if 0 static -int get_ainfo(u8 *mbuf, int count, AudioInfo *ai, int pr) +int get_ainfo(u8 *mbuf, int count, struct dvb_audio_info *ai, int pr) { u8 *headr; int found = 0; @@ -348,7 +348,7 @@ int get_ainfo(u8 *mbuf, int count, AudioInfo *ai, int pr) #endif -int dvb_filter_get_ac3info(u8 *mbuf, int count, AudioInfo *ai, int pr) +int dvb_filter_get_ac3info(u8 *mbuf, int count, struct dvb_audio_info *ai, int pr) { u8 *headr; int found = 0; @@ -467,7 +467,7 @@ void initialize_quant_matrix( u32 *matrix ) #if 0 static -void initialize_mpg_picture(mpg_picture *pic) +void initialize_mpg_picture(struct mpg_picture *pic) { int i; @@ -495,7 +495,7 @@ void initialize_mpg_picture(mpg_picture *pic) #if 0 static -void mpg_set_picture_parameter( int32_t field_type, mpg_picture *pic ) +void mpg_set_picture_parameter( int32_t field_type, struct mpg_picture *pic ) { int16_t last_h_offset; int16_t last_v_offset; @@ -534,7 +534,7 @@ void mpg_set_picture_parameter( int32_t field_type, mpg_picture *pic ) #if 0 static -void init_mpg_picture( mpg_picture *pic, int chan, int32_t field_type) +void init_mpg_picture( struct mpg_picture *pic, int chan, int32_t field_type) { pic->picture_header = 0; pic->sequence_header_data @@ -563,7 +563,7 @@ void init_mpg_picture( mpg_picture *pic, int chan, int32_t field_type) } #endif -void dvb_filter_pes2ts_init(dvb_filter_pes2ts_t *p2ts, unsigned short pid, +void dvb_filter_pes2ts_init(struct dvb_filter_pes2ts *p2ts, unsigned short pid, dvb_filter_pes2ts_cb_t *cb, void *priv) { unsigned char *buf=p2ts->buf; @@ -576,7 +576,7 @@ void dvb_filter_pes2ts_init(dvb_filter_pes2ts_t *p2ts, unsigned short pid, p2ts->priv=priv; } -int dvb_filter_pes2ts(dvb_filter_pes2ts_t *p2ts, unsigned char *pes, int len) +int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes, int len) { unsigned char *buf=p2ts->buf; int ret=0, rest; diff --git a/linux/drivers/media/dvb/dvb-core/dvb_filter.h b/linux/drivers/media/dvb/dvb-core/dvb_filter.h index ace51c7fb..f79f67638 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_filter.h +++ b/linux/drivers/media/dvb/dvb-core/dvb_filter.h @@ -7,17 +7,17 @@ typedef int (dvb_filter_pes2ts_cb_t) (void *, unsigned char *); -typedef struct dvb_filter_pes2ts_s { +struct dvb_filter_pes2ts { unsigned char buf[188]; unsigned char cc; dvb_filter_pes2ts_cb_t *cb; void *priv; -} dvb_filter_pes2ts_t; +}; -void dvb_filter_pes2ts_init(dvb_filter_pes2ts_t *p2ts, unsigned short pid, +void dvb_filter_pes2ts_init(struct dvb_filter_pes2ts *p2ts, unsigned short pid, dvb_filter_pes2ts_cb_t *cb, void *priv); -int dvb_filter_pes2ts(dvb_filter_pes2ts_t *p2ts, unsigned char *pes, int len); +int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes, int len); #define PROG_STREAM_MAP 0xBC @@ -110,7 +110,7 @@ int dvb_filter_pes2ts(dvb_filter_pes2ts_t *p2ts, unsigned char *pes, int len); #define IPACKS 2048 #endif -typedef struct ipack_s { +struct ipack { int size; int found; u8 *buf; @@ -130,9 +130,9 @@ typedef struct ipack_s { void (*func)(u8 *buf, int size, void *priv); int count; int repack_subids; -} ipack; +}; -typedef struct video_i{ +struct dvb_video_info { u32 horizontal_size; u32 vertical_size; u32 aspect_ratio; @@ -144,17 +144,16 @@ typedef struct video_i{ s16 vbv_delay; u32 CSPF; u32 off; -} VideoInfo; - +}; #define OFF_SIZE 4 #define FIRST_FIELD 0 #define SECOND_FIELD 1 #define VIDEO_FRAME_PICTURE 0x03 -typedef struct mpg_picture_s{ +struct mpg_picture { int channel; - VideoInfo vinfo; + struct dvb_video_info vinfo; u32 *sequence_gop_header; u32 *picture_header; s32 time_code; @@ -207,12 +206,9 @@ typedef struct mpg_picture_s{ /* picture_display_extenion() 0:no 1:exit*/ s8 pts_flag[2]; /* [0] 1st field, [1] 2nd field */ -} mpg_picture; - - - +}; -typedef struct audio_i{ +struct dvb_audio_info { int layer; u32 bit_rate; u32 frequency; @@ -221,9 +217,9 @@ typedef struct audio_i{ u32 emphasis; u32 framesize; u32 off; -} AudioInfo; +}; -int dvb_filter_get_ac3info(u8 *mbuf, int count, AudioInfo *ai, int pr); +int dvb_filter_get_ac3info(u8 *mbuf, int count, struct dvb_audio_info *ai, int pr); #endif diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.c b/linux/drivers/media/dvb/dvb-core/dvb_net.c index 97c613004..82bf226e7 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_net.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_net.c @@ -43,11 +43,11 @@ struct dvb_net_priv { struct net_device_stats stats; char name[6]; u16 pid; - struct dmx_demux_s *demux; - dmx_section_feed_t *secfeed; - dmx_section_filter_t *secfilter; + struct dmx_demux *demux; + struct dmx_section_feed *secfeed; + struct dmx_section_filter *secfilter; int multi_num; - dmx_section_filter_t *multi_secfilter[DVB_NET_MULTICAST_MAX]; + struct dmx_section_filter *multi_secfilter[DVB_NET_MULTICAST_MAX]; unsigned char multi_macs[DVB_NET_MULTICAST_MAX][6]; int mode; }; @@ -138,7 +138,7 @@ dvb_net_sec(struct net_device *dev, const u8 *pkt, int pkt_len) static int dvb_net_callback(const u8 *buffer1, size_t buffer1_len, const u8 *buffer2, size_t buffer2_len, - dmx_section_filter_t *filter, + struct dmx_section_filter *filter, dmx_success_t success) { struct net_device *dev=(struct net_device *) filter->priv; @@ -162,7 +162,7 @@ static u8 mask_promisc[6]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static int dvb_net_filter_set(struct net_device *dev, - dmx_section_filter_t **secfilter, + struct dmx_section_filter **secfilter, u8 *mac, u8 *mac_mask) { struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv; @@ -208,7 +208,7 @@ dvb_net_feed_start(struct net_device *dev) { int ret, i; struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv; - dmx_demux_t *demux = priv->demux; + struct dmx_demux *demux = priv->demux; unsigned char *mac = (unsigned char *) dev->dev_addr; priv->secfeed=0; @@ -433,7 +433,7 @@ int dvb_net_add_if(struct dvb_net *dvbnet, u16 pid) { struct net_device *net; - dmx_demux_t *demux; + struct dmx_demux *demux; struct dvb_net_priv *priv; int result; int if_num; @@ -572,7 +572,7 @@ dvb_net_release(struct dvb_net *dvbnet) } int -dvb_net_init(struct dvb_adapter *adap, struct dvb_net *dvbnet, dmx_demux_t *dmx) +dvb_net_init(struct dvb_adapter *adap, struct dvb_net *dvbnet, struct dmx_demux *dmx) { int i; diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.h b/linux/drivers/media/dvb/dvb-core/dvb_net.h index 1813b2298..dd4f7f981 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_net.h +++ b/linux/drivers/media/dvb/dvb-core/dvb_net.h @@ -33,18 +33,18 @@ #define DVB_NET_DEVICES_MAX 10 -typedef struct dvb_net { +struct dvb_net { struct dvb_device *dvbdev; int card_num; int dev_num; struct net_device device[DVB_NET_DEVICES_MAX]; int state[DVB_NET_DEVICES_MAX]; - dmx_demux_t *demux; -} dvb_net_t; + struct dmx_demux *demux; +}; void dvb_net_release(struct dvb_net *); -int dvb_net_init(struct dvb_adapter *, struct dvb_net *, dmx_demux_t *); +int dvb_net_init(struct dvb_adapter *, struct dvb_net *, struct dmx_demux *); #endif diff --git a/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c b/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c index 8a32231b0..fa1970619 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c @@ -43,7 +43,7 @@ -void dvb_ringbuffer_init(dvb_ringbuffer_t *rbuf, void *data, size_t len) +void dvb_ringbuffer_init(struct dvb_ringbuffer *rbuf, void *data, size_t len) { rbuf->pread=rbuf->pwrite=0; rbuf->data=data; @@ -56,14 +56,14 @@ void dvb_ringbuffer_init(dvb_ringbuffer_t *rbuf, void *data, size_t len) -int dvb_ringbuffer_empty(dvb_ringbuffer_t *rbuf) +int dvb_ringbuffer_empty(struct dvb_ringbuffer *rbuf) { return (rbuf->pread==rbuf->pwrite); } -ssize_t dvb_ringbuffer_free(dvb_ringbuffer_t *rbuf) +ssize_t dvb_ringbuffer_free(struct dvb_ringbuffer *rbuf) { ssize_t free; @@ -75,7 +75,7 @@ ssize_t dvb_ringbuffer_free(dvb_ringbuffer_t *rbuf) -ssize_t dvb_ringbuffer_avail(dvb_ringbuffer_t *rbuf) +ssize_t dvb_ringbuffer_avail(struct dvb_ringbuffer *rbuf) { ssize_t avail; @@ -87,14 +87,14 @@ ssize_t dvb_ringbuffer_avail(dvb_ringbuffer_t *rbuf) -void dvb_ringbuffer_flush(dvb_ringbuffer_t *rbuf) +void dvb_ringbuffer_flush(struct dvb_ringbuffer *rbuf) { rbuf->pread = rbuf->pwrite; } -void dvb_ringbuffer_flush_spinlock_wakeup(dvb_ringbuffer_t *rbuf) +void dvb_ringbuffer_flush_spinlock_wakeup(struct dvb_ringbuffer *rbuf) { unsigned long flags; @@ -107,7 +107,7 @@ void dvb_ringbuffer_flush_spinlock_wakeup(dvb_ringbuffer_t *rbuf) -ssize_t dvb_ringbuffer_read(dvb_ringbuffer_t *rbuf, u8 *buf, size_t len, int usermem) +ssize_t dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf, u8 *buf, size_t len, int usermem) { size_t todo = len; size_t split; @@ -136,7 +136,7 @@ ssize_t dvb_ringbuffer_read(dvb_ringbuffer_t *rbuf, u8 *buf, size_t len, int use -ssize_t dvb_ringbuffer_write(dvb_ringbuffer_t *rbuf, const u8 *buf, +ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf, size_t len, int usermem) { size_t todo = len; diff --git a/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.h b/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.h index f0d8b8caf..df17ffc36 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.h +++ b/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.h @@ -35,8 +35,7 @@ #include <linux/spinlock.h> #include <linux/wait.h> - -typedef struct dvb_ringbuffer { +struct dvb_ringbuffer { u8 *data; ssize_t size; ssize_t pread; @@ -44,7 +43,7 @@ typedef struct dvb_ringbuffer { wait_queue_head_t queue; spinlock_t lock; -} dvb_ringbuffer_t; +}; /* @@ -76,25 +75,25 @@ typedef struct dvb_ringbuffer { */ /* initialize ring buffer, lock and queue */ -extern void dvb_ringbuffer_init(dvb_ringbuffer_t *rbuf, void *data, size_t len); +extern void dvb_ringbuffer_init(struct dvb_ringbuffer *rbuf, void *data, size_t len); /* test whether buffer is empty */ -extern int dvb_ringbuffer_empty(dvb_ringbuffer_t *rbuf); +extern int dvb_ringbuffer_empty(struct dvb_ringbuffer *rbuf); /* return the number of free bytes in the buffer */ -extern ssize_t dvb_ringbuffer_free(dvb_ringbuffer_t *rbuf); +extern ssize_t dvb_ringbuffer_free(struct dvb_ringbuffer *rbuf); /* return the number of bytes waiting in the buffer */ -extern ssize_t dvb_ringbuffer_avail(dvb_ringbuffer_t *rbuf); +extern ssize_t dvb_ringbuffer_avail(struct dvb_ringbuffer *rbuf); /* read routines & macros */ /* ---------------------- */ /* flush buffer */ -extern void dvb_ringbuffer_flush(dvb_ringbuffer_t *rbuf); +extern void dvb_ringbuffer_flush(struct dvb_ringbuffer *rbuf); /* flush buffer protected by spinlock and wake-up waiting task(s) */ -extern void dvb_ringbuffer_flush_spinlock_wakeup(dvb_ringbuffer_t *rbuf); +extern void dvb_ringbuffer_flush_spinlock_wakeup(struct dvb_ringbuffer *rbuf); /* peek at byte <offs> in the buffer */ #define DVB_RINGBUFFER_PEEK(rbuf,offs) \ @@ -109,7 +108,7 @@ extern void dvb_ringbuffer_flush_spinlock_wakeup(dvb_ringbuffer_t *rbuf); ** <usermem> specifies whether <buf> resides in user space ** returns number of bytes transferred or -EFAULT */ -extern ssize_t dvb_ringbuffer_read(dvb_ringbuffer_t *rbuf, u8 *buf, +extern ssize_t dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf, u8 *buf, size_t len, int usermem); @@ -124,7 +123,7 @@ extern ssize_t dvb_ringbuffer_read(dvb_ringbuffer_t *rbuf, u8 *buf, ** <usermem> specifies whether <buf> resides in user space ** returns number of bytes transferred or -EFAULT */ -extern ssize_t dvb_ringbuffer_write(dvb_ringbuffer_t *rbuf, const u8 *buf, +extern ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf, size_t len, int usermem); #endif /* _DVB_RINGBUFFER_H_ */ 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; diff --git a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c index 1922128ae..07ca6d077 100644 --- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c @@ -69,8 +69,8 @@ static int debug = 1; */ struct ttusb { struct dvb_demux dvb_demux; - dmxdev_t dmxdev; - dvb_net_t dvbnet; + struct dmxdev dmxdev; + struct dvb_net dvbnet; /* our semaphore, for channel allocation/deallocation */ struct semaphore sem; diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c index 2b845e216..1e9d8ddc6 100644 --- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c +++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c @@ -33,7 +33,7 @@ static int debug = 0; #define dprintk if (debug) printk static int -ttusb_dec_send_command(ttusb_dec_t * dec, const u8 command, int param_length, +ttusb_dec_send_command(struct ttusb_dec * dec, const u8 command, int param_length, const u8 params[], int *result_length, u8 cmd_result[]) { @@ -127,7 +127,7 @@ ttusb_dec_av_pes2ts_cb(void *priv, unsigned char *data) } static void -ttusb_dec_set_pids(ttusb_dec_t * dec) +ttusb_dec_set_pids(struct ttusb_dec * dec) { u8 b[] = @@ -180,7 +180,7 @@ ttusb_dec_i2c_master_xfer(struct dvb_i2c_bus *i2c, const struct i2c_msg msgs[], } static void -ttusb_dec_process_av_pes(ttusb_dec_t * dec, u8 * av_pes, int length) +ttusb_dec_process_av_pes(struct ttusb_dec * dec, u8 * av_pes, int length) { int i; @@ -327,7 +327,7 @@ ttusb_dec_process_av_pes(ttusb_dec_t * dec, u8 * av_pes, int length) } static void -ttusb_dec_process_urb_frame(ttusb_dec_t * dec, u8 * b, int length) +ttusb_dec_process_urb_frame(struct ttusb_dec * dec, u8 * b, int length) { while (length) { @@ -441,7 +441,7 @@ ttusb_dec_process_urb(struct urb *urb, struct pt_regs *ptregs) #endif { - ttusb_dec_t *dec = urb->context; + struct ttusb_dec *dec = urb->context; if (!urb->status) { @@ -477,7 +477,7 @@ ttusb_dec_process_urb(struct urb *urb, struct pt_regs *ptregs) } static void -ttusb_dec_setup_urbs(ttusb_dec_t * dec) +ttusb_dec_setup_urbs(struct ttusb_dec * dec) { int i, j, buffer_offset = 0; @@ -516,7 +516,7 @@ ttusb_dec_setup_urbs(ttusb_dec_t * dec) } static void -ttusb_dec_stop_iso_xfer(ttusb_dec_t * dec) +ttusb_dec_stop_iso_xfer(struct ttusb_dec * dec) { int i; @@ -544,7 +544,7 @@ ttusb_dec_stop_iso_xfer(ttusb_dec_t * dec) } static int -ttusb_dec_start_iso_xfer(ttusb_dec_t *dec) +ttusb_dec_start_iso_xfer(struct ttusb_dec *dec) { int i, result; @@ -628,7 +628,7 @@ ttusb_dec_start_feed(struct dvb_demux_feed *dvbdmxfeed) { struct dvb_demux *dvbdmx = dvbdmxfeed->demux; - ttusb_dec_t *dec = dvbdmx->priv; + struct ttusb_dec *dec = dvbdmx->priv; dprintk("%s\n", __FUNCTION__); @@ -712,7 +712,7 @@ static int ttusb_dec_stop_feed(struct dvb_demux_feed *dvbdmxfeed) { - ttusb_dec_t *dec = dvbdmxfeed->demux->priv; + struct ttusb_dec *dec = dvbdmxfeed->demux->priv; dprintk("%s\n", __FUNCTION__); @@ -723,7 +723,7 @@ ttusb_dec_stop_feed(struct dvb_demux_feed *dvbdmxfeed) } static void -ttusb_dec_free_iso_urbs(ttusb_dec_t * dec) +ttusb_dec_free_iso_urbs(struct ttusb_dec * dec) { int i; @@ -742,7 +742,7 @@ ttusb_dec_free_iso_urbs(ttusb_dec_t * dec) } static int -ttusb_dec_alloc_iso_urbs(ttusb_dec_t * dec) +ttusb_dec_alloc_iso_urbs(struct ttusb_dec * dec) { int i; @@ -789,7 +789,7 @@ ttusb_dec_alloc_iso_urbs(ttusb_dec_t * dec) } static void -ttusb_dec_init_v_pes(ttusb_dec_t * dec) +ttusb_dec_init_v_pes(struct ttusb_dec * dec) { dprintk("%s\n", __FUNCTION__); @@ -802,7 +802,7 @@ ttusb_dec_init_v_pes(ttusb_dec_t * dec) } static void -ttusb_dec_init_usb(ttusb_dec_t * dec) +ttusb_dec_init_usb(struct ttusb_dec * dec) { dprintk("%s\n", __FUNCTION__); @@ -821,7 +821,7 @@ ttusb_dec_init_usb(ttusb_dec_t * dec) #include "dsp_dec2000.h" static int -ttusb_dec_boot_dsp(ttusb_dec_t * dec) +ttusb_dec_boot_dsp(struct ttusb_dec * dec) { int i, j, actual_len, result, size, trans_count; @@ -882,7 +882,7 @@ ttusb_dec_boot_dsp(ttusb_dec_t * dec) } static void -ttusb_dec_init_stb(ttusb_dec_t * dec) +ttusb_dec_init_stb(struct ttusb_dec * dec) { u8 c[COMMAND_PACKET_SIZE]; @@ -901,7 +901,7 @@ ttusb_dec_init_stb(ttusb_dec_t * dec) } static int -ttusb_dec_init_dvb(ttusb_dec_t * dec) +ttusb_dec_init_dvb(struct ttusb_dec * dec) { int result; @@ -1017,7 +1017,7 @@ ttusb_dec_init_dvb(ttusb_dec_t * dec) } static void -ttusb_dec_exit_dvb(ttusb_dec_t * dec) +ttusb_dec_exit_dvb(struct ttusb_dec * dec) { dprintk("%s\n", __FUNCTION__); @@ -1033,7 +1033,7 @@ ttusb_dec_exit_dvb(ttusb_dec_t * dec) } static void -ttusb_dec_exit_usb(ttusb_dec_t * dec) +ttusb_dec_exit_usb(struct ttusb_dec * dec) { int i; @@ -1053,21 +1053,21 @@ ttusb_dec_probe(struct usb_device *udev, unsigned int ifnum, const struct usb_device_id *id) { - ttusb_dec_t *dec; + struct ttusb_dec *dec; dprintk("%s\n", __FUNCTION__); if (ifnum != 0) return NULL; - if (!(dec = kmalloc(sizeof (ttusb_dec_t), GFP_KERNEL))) { + if (!(dec = kmalloc(sizeof (struct ttusb_dec), GFP_KERNEL))) { printk("%s: couldn't allocate memory.\n", __FUNCTION__); return NULL; } - memset(dec, 0, sizeof (ttusb_dec_t)); + memset(dec, 0, sizeof (struct ttusb_dec)); dec->udev = udev; @@ -1088,20 +1088,20 @@ ttusb_dec_probe(struct usb_interface *intf, const struct usb_device_id *id) { struct usb_device *udev; - ttusb_dec_t *dec; + struct ttusb_dec *dec; dprintk("%s\n", __FUNCTION__); udev = interface_to_usbdev(intf); - if (!(dec = kmalloc(sizeof (ttusb_dec_t), GFP_KERNEL))) { + if (!(dec = kmalloc(sizeof (struct ttusb_dec), GFP_KERNEL))) { printk("%s: couldn't allocate memory.\n", __FUNCTION__); return -ENOMEM; } - memset(dec, 0, sizeof (ttusb_dec_t)); + memset(dec, 0, sizeof (struct ttusb_dec)); dec->udev = udev; @@ -1125,13 +1125,13 @@ static void ttusb_dec_disconnect(struct usb_device *udev, void *data) { - ttusb_dec_t *dec = data; + struct ttusb_dec *dec = data; #else static void ttusb_dec_disconnect(struct usb_interface *intf) { - ttusb_dec_t *dec = usb_get_intfdata(intf); + struct ttusb_dec *dec = usb_get_intfdata(intf); usb_set_intfdata(intf, NULL); #endif diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.h b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.h index b0dd8199c..e0b9097be 100644 --- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.h +++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.h @@ -44,15 +44,15 @@ #define MAX_AV_PES_LENGTH 6144 -typedef struct ttusb_dec_s { +struct ttusb_dec { /* DVB bits */ struct dvb_adapter *adapter; - dmxdev_t dmxdev; + struct dmxdev dmxdev; struct dvb_demux demux; - dmx_frontend_t frontend; + struct dmx_frontend frontend; struct dvb_i2c_bus *i2c_bus; - dvb_net_t dvb_net; + struct dvb_net dvb_net; u16 pid[DMX_PES_OTHER]; @@ -76,14 +76,14 @@ typedef struct ttusb_dec_s { int av_pes_length; int av_pes_payload_length; - dvb_filter_pes2ts_t a_pes2ts; - dvb_filter_pes2ts_t v_pes2ts; - struct semaphore pes2ts_sem; + struct dvb_filter_pes2ts a_pes2ts; + struct dvb_filter_pes2ts v_pes2ts; + struct semaphore pes2ts_sem; u8 v_pes[16 + MAX_AV_PES_LENGTH]; int v_pes_length; int v_pes_postbytes; -} ttusb_dec_t; +}; #endif |