From 198688cdc1544061ea1b7df3ff7dbae4f3338bb9 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 19 Sep 2017 19:11:22 -0400 Subject: media: dvb_demux.h: document structs defined on it There are three structs defined inside dvb_demux.h. None of them are currently documented. Add documentation for them. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_demux.h | 59 +++++++++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 10 deletions(-) (limited to 'drivers/media/dvb-core/dvb_demux.h') diff --git a/drivers/media/dvb-core/dvb_demux.h b/drivers/media/dvb-core/dvb_demux.h index 08cc86247f08..ed136836ab6e 100644 --- a/drivers/media/dvb-core/dvb_demux.h +++ b/drivers/media/dvb-core/dvb_demux.h @@ -95,16 +95,16 @@ struct dvb_demux_filter { * struct dvb_demux_feed - describes a DVB field * * @feed: a digital TV feed. It can either be a TS or a section feed: - * - if the feed is TS, it contains &struct dvb_ts_feed; - * - if the feed is section, it contains - * &struct dmx_section_feed. + * if the feed is TS, it contains &struct dvb_ts_feed @ts; + * if the feed is section, it contains + * &struct dmx_section_feed @sec. * @cb: digital TV callbacks. depending on the feed type, it can be: - * - if the feed is TS, it contains a dmx_ts_cb() callback; - * - if the feed is section, it contains a dmx_section_cb() - * callback. + * if the feed is TS, it contains a dmx_ts_cb() @ts callback; + * if the feed is section, it contains a dmx_section_cb() @sec + * callback. * * @demux: pointer to &struct dvb_demux. - * @priv: private data for the filter handling routine. + * @priv: private data that can optionally be used by a DVB driver. * @type: type of the filter, as defined by &enum dvb_dmx_filter_type. * @state: state of the filter as defined by &enum dvb_dmx_state. * @pid: PID to be filtered. @@ -119,7 +119,6 @@ struct dvb_demux_filter { * @list_head: head for the list of digital TV demux feeds. * @index: a unique index for each feed. Can be used as hardware * pid filter index. - * */ struct dvb_demux_feed { union { @@ -153,6 +152,44 @@ struct dvb_demux_feed { unsigned int index; }; +/** + * struct dvb_demux - represents a digital TV demux + * @dmx: embedded &struct dmx_demux with demux capabilities + * and callbacks. + * @priv: private data that can optionally be used by + * a DVB driver. + * @filternum: maximum amount of DVB filters. + * @feednum: maximum amount of DVB feeds. + * @start_feed: callback routine to be called in order to start + * a DVB feed. + * @stop_feed: callback routine to be called in order to stop + * a DVB feed. + * @write_to_decoder: callback routine to be called if the feed is TS and + * it is routed to an A/V decoder, when a new TS packet + * is received. + * Used only on av7110-av.c. + * @check_crc32: callback routine to check CRC. If not initialized, + * dvb_demux will use an internal one. + * @memcopy: callback routine to memcopy received data. + * If not initialized, dvb_demux will default to memcpy(). + * @users: counter for the number of demux opened file descriptors. + * Currently, it is limited to 10 users. + * @filter: pointer to &struct dvb_demux_filter. + * @feed: pointer to &struct dvb_demux_feed. + * @frontend_list: &struct list_head with frontends used by the demux. + * @pesfilter: array of &struct dvb_demux_feed with the PES types + * that will be filtered. + * @pids: list of filtered program IDs. + * @feed_list: &struct list_head with feeds. + * @tsbuf: temporary buffer used internally to store TS packets. + * @tsbufp: temporary buffer index used internally. + * @mutex: pointer to &struct mutex used to protect feed set + * logic. + * @lock: pointer to &spinlock_t, used to protect buffer handling. + * @cnt_storage: buffer used for TS/TEI continuity check. + * @speed_last_time: &ktime_t used for TS speed check. + * @speed_pkts_cnt: packets count used for TS speed check. + */ struct dvb_demux { struct dmx_demux dmx; void *priv; @@ -176,8 +213,6 @@ struct dvb_demux { struct dvb_demux_feed *pesfilter[DMX_PES_OTHER]; u16 pids[DMX_PES_OTHER]; - int playing; - int recording; #define DMX_MAX_PID 0x2000 struct list_head feed_list; @@ -191,6 +226,10 @@ struct dvb_demux { ktime_t speed_last_time; /* for TS speed check */ uint32_t speed_pkts_cnt; /* for TS speed check */ + + /* private: used only on av7110 */ + int playing; + int recording; }; int dvb_dmx_init(struct dvb_demux *dvbdemux); -- cgit v1.2.3