[media] DocBook: document typedef dmx_section_cb at demux.h
[deliverable/linux.git] / drivers / media / dvb-core / demux.h
CommitLineData
1da177e4
LT
1/*
2 * demux.h
3 *
4 * Copyright (c) 2002 Convergence GmbH
5 *
6 * based on code:
7 * Copyright (c) 2000 Nokia Research Center
8 * Tampere, FINLAND
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public License
12 * as published by the Free Software Foundation; either version 2.1
13 * of the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 *
24 */
25
26#ifndef __DEMUX_H
27#define __DEMUX_H
28
29#include <linux/types.h>
30#include <linux/errno.h>
31#include <linux/list.h>
32#include <linux/time.h>
c0510052 33#include <linux/dvb/dmx.h>
1da177e4 34
abfc97f7
MCC
35/*
36 * Common definitions
37 */
1da177e4
LT
38
39/*
40 * DMX_MAX_FILTER_SIZE: Maximum length (in bytes) of a section/PES filter.
41 */
42
43#ifndef DMX_MAX_FILTER_SIZE
44#define DMX_MAX_FILTER_SIZE 18
45#endif
46
47/*
abfc97f7
MCC
48 * DMX_MAX_SECFEED_SIZE: Maximum length (in bytes) of a private section feed
49 * filter.
1da177e4
LT
50 */
51
b3967d6c
MA
52#ifndef DMX_MAX_SECTION_SIZE
53#define DMX_MAX_SECTION_SIZE 4096
54#endif
1da177e4 55#ifndef DMX_MAX_SECFEED_SIZE
b3967d6c 56#define DMX_MAX_SECFEED_SIZE (DMX_MAX_SECTION_SIZE + 188)
1da177e4
LT
57#endif
58
abfc97f7
MCC
59/*
60 * TS packet reception
61 */
1da177e4
LT
62
63/* TS filter type for set() */
64
abfc97f7
MCC
65#define TS_PACKET 1 /*
66 * send TS packets (188 bytes) to callback
67 * (default)
68 */
69
70#define TS_PAYLOAD_ONLY 2 /*
71 * in case TS_PACKET is set, only send the TS
72 * payload (<=184 bytes per packet) to callback
73 */
74
75#define TS_DECODER 4 /*
76 * send stream to built-in decoder (if present)
77 */
78
79#define TS_DEMUX 8 /*
80 * in case TS_PACKET is set, send the TS to
81 * the demux device, not to the dvr device
82 */
1da177e4 83
548e5ae0
MCC
84/**
85 * struct dmx_ts_feed - Structure that contains a TS feed filter
86 *
87 * @is_filtering: Set to non-zero when filtering in progress
88 * @parent: pointer to struct dmx_demux
89 * @priv: pointer to private data of the API client
90 * @set: sets the TS filter
91 * @start_filtering: starts TS filtering
92 * @stop_filtering: stops TS filtering
93 *
94 * A TS feed is typically mapped to a hardware PID filter on the demux chip.
95 * Using this API, the client can set the filtering properties to start/stop
96 * filtering TS packets on a particular TS feed.
97 */
1da177e4 98struct dmx_ts_feed {
548e5ae0
MCC
99 int is_filtering;
100 struct dmx_demux *parent;
101 void *priv;
abfc97f7
MCC
102 int (*set)(struct dmx_ts_feed *feed,
103 u16 pid,
104 int type,
105 enum dmx_ts_pes pes_type,
106 size_t circular_buffer_size,
107 struct timespec timeout);
108 int (*start_filtering)(struct dmx_ts_feed *feed);
109 int (*stop_filtering)(struct dmx_ts_feed *feed);
1da177e4
LT
110};
111
abfc97f7
MCC
112/*
113 * Section reception
114 */
1da177e4 115
548e5ae0
MCC
116/**
117 * struct dmx_section_filter - Structure that describes a section filter
118 *
119 * @filter_value: Contains up to 16 bytes (128 bits) of the TS section header
120 * that will be matched by the section filter
121 * @filter_mask: Contains a 16 bytes (128 bits) filter mask with the bits
122 * specified by @filter_value that will be used on the filter
123 * match logic.
124 * @filter_mode: Contains a 16 bytes (128 bits) filter mode.
125 * @parent: Pointer to struct dmx_section_feed.
126 * @priv: Pointer to private data of the API client.
127 *
128 *
129 * The @filter_mask controls which bits of @filter_value are compared with
130 * the section headers/payload. On a binary value of 1 in filter_mask, the
131 * corresponding bits are compared. The filter only accepts sections that are
132 * equal to filter_value in all the tested bit positions.
133 */
1da177e4 134struct dmx_section_filter {
abfc97f7
MCC
135 u8 filter_value[DMX_MAX_FILTER_SIZE];
136 u8 filter_mask[DMX_MAX_FILTER_SIZE];
137 u8 filter_mode[DMX_MAX_FILTER_SIZE];
138 struct dmx_section_feed *parent; /* Back-pointer */
139 void *priv; /* Pointer to private data of the API client */
1da177e4
LT
140};
141
548e5ae0
MCC
142/**
143 * struct dmx_section_feed - Structure that contains a section feed filter
144 *
145 * @is_filtering: Set to non-zero when filtering in progress
146 * @parent: pointer to struct dmx_demux
147 * @priv: pointer to private data of the API client
148 * @check_crc: If non-zero, check the CRC values of filtered sections.
149 * @set: sets the section filter
150 * @allocate_filter: This function is used to allocate a section filter on
151 * the demux. It should only be called when no filtering
152 * is in progress on this section feed. If a filter cannot
153 * be allocated, the function fails with -ENOSPC.
154 * @release_filter: This function releases all the resources of a
abfc97f7 155 * previously allocated section filter. The function
548e5ae0
MCC
156 * should not be called while filtering is in progress
157 * on this section feed. After calling this function,
158 * the caller should not try to dereference the filter
159 * pointer.
160 * @start_filtering: starts section filtering
161 * @stop_filtering: stops section filtering
162 *
163 * A TS feed is typically mapped to a hardware PID filter on the demux chip.
164 * Using this API, the client can set the filtering properties to start/stop
165 * filtering TS packets on a particular TS feed.
166 */
1da177e4 167struct dmx_section_feed {
548e5ae0 168 int is_filtering;
abfc97f7
MCC
169 struct dmx_demux *parent;
170 void *priv;
1da177e4 171
afd1a0c9 172 int check_crc;
548e5ae0
MCC
173
174 /* private: Used internally at dvb_demux.c */
1da177e4
LT
175 u32 crc_val;
176
afd1a0c9
MCC
177 u8 *secbuf;
178 u8 secbuf_base[DMX_MAX_SECFEED_SIZE];
179 u16 secbufp, seclen, tsfeedp;
1da177e4 180
548e5ae0 181 /* public: */
abfc97f7
MCC
182 int (*set)(struct dmx_section_feed *feed,
183 u16 pid,
184 size_t circular_buffer_size,
185 int check_crc);
186 int (*allocate_filter)(struct dmx_section_feed *feed,
187 struct dmx_section_filter **filter);
188 int (*release_filter)(struct dmx_section_feed *feed,
189 struct dmx_section_filter *filter);
190 int (*start_filtering)(struct dmx_section_feed *feed);
191 int (*stop_filtering)(struct dmx_section_feed *feed);
1da177e4
LT
192};
193
abfc97f7
MCC
194/*
195 * Callback functions
196 */
1da177e4 197
0cf35e84
MCC
198/**
199 * typedef dmx_ts_cb - DVB demux TS filter callback function prototype
200 *
201 * @buffer1: Pointer to the start of the filtered TS packets.
202 * @buffer1_length: Length of the TS data in buffer1.
203 * @buffer2: Pointer to the tail of the filtered TS packets, or NULL.
204 * @buffer2_length: Length of the TS data in buffer2.
205 * @source: Indicates which TS feed is the source of the callback.
206 *
207 * This function callback prototype, provided by the client of the demux API,
208 * is called from the demux code. The function is only called when filtering
209 * on ae TS feed has been enabled using the start_filtering() function at
210 * the &dmx_demux.
211 * Any TS packets that match the filter settings are copied to a circular
212 * buffer. The filtered TS packets are delivered to the client using this
213 * callback function. The size of the circular buffer is controlled by the
214 * circular_buffer_size parameter of the &dmx_ts_feed.@set function.
215 * It is expected that the @buffer1 and @buffer2 callback parameters point to
216 * addresses within the circular buffer, but other implementations are also
217 * possible. Note that the called party should not try to free the memory
218 * the @buffer1 and @buffer2 parameters point to.
219 *
220 * When this function is called, the @buffer1 parameter typically points to
221 * the start of the first undelivered TS packet within a circular buffer.
222 * The @buffer2 buffer parameter is normally NULL, except when the received
223 * TS packets have crossed the last address of the circular buffer and
224 * ”wrapped” to the beginning of the buffer. In the latter case the @buffer1
225 * parameter would contain an address within the circular buffer, while the
226 * @buffer2 parameter would contain the first address of the circular buffer.
227 * The number of bytes delivered with this function (i.e. @buffer1_length +
228 * @buffer2_length) is usually equal to the value of callback_length parameter
229 * given in the set() function, with one exception: if a timeout occurs before
230 * receiving callback_length bytes of TS data, any undelivered packets are
231 * immediately delivered to the client by calling this function. The timeout
232 * duration is controlled by the set() function in the TS Feed API.
233 *
234 * If a TS packet is received with errors that could not be fixed by the
235 * TS-level forward error correction (FEC), the Transport_error_indicator
236 * flag of the TS packet header should be set. The TS packet should not be
237 * discarded, as the error can possibly be corrected by a higher layer
238 * protocol. If the called party is slow in processing the callback, it
239 * is possible that the circular buffer eventually fills up. If this happens,
240 * the demux driver should discard any TS packets received while the buffer
241 * is full and return -EOVERFLOW.
242 *
243 * The type of data returned to the callback can be selected by the
244 * &dmx_ts_feed.@set function. The type parameter decides if the raw
245 * TS packet (TS_PACKET) or just the payload (TS_PACKET|TS_PAYLOAD_ONLY)
246 * should be returned. If additionally the TS_DECODER bit is set the stream
247 * will also be sent to the hardware MPEG decoder.
248 *
249 * Return:
250 * 0, on success;
251 * -EOVERFLOW, on buffer overflow.
252 */
abfc97f7
MCC
253typedef int (*dmx_ts_cb)(const u8 *buffer1,
254 size_t buffer1_length,
255 const u8 *buffer2,
256 size_t buffer2_length,
257 struct dmx_ts_feed *source);
1da177e4 258
4be45fb4
MCC
259/**
260 * typedef dmx_section_cb - DVB demux TS filter callback function prototype
261 *
262 * @buffer1: Pointer to the start of the filtered section, e.g.
263 * within the circular buffer of the demux driver.
264 * @buffer1_len: Length of the filtered section data in @buffer1,
265 * including headers and CRC.
266 * @buffer2: Pointer to the tail of the filtered section data,
267 * or NULL. Useful to handle the wrapping of a
268 * circular buffer.
269 * @buffer2_len: Length of the filtered section data in @buffer2,
270 * including headers and CRC.
271 * @source: Indicates which section feed is the source of the
272 * callback.
273 *
274 * This function callback prototype, provided by the client of the demux API,
275 * is called from the demux code. The function is only called when
276 * filtering of sections has been enabled using the function
277 * &dmx_ts_feed.@start_filtering. When the demux driver has received a
278 * complete section that matches at least one section filter, the client
279 * is notified via this callback function. Normally this function is called
280 * for each received section; however, it is also possible to deliver
281 * multiple sections with one callback, for example when the system load
282 * is high. If an error occurs while receiving a section, this
283 * function should be called with the corresponding error type set in the
284 * success field, whether or not there is data to deliver. The Section Feed
285 * implementation should maintain a circular buffer for received sections.
286 * However, this is not necessary if the Section Feed API is implemented as
287 * a client of the TS Feed API, because the TS Feed implementation then
288 * buffers the received data. The size of the circular buffer can be
289 * configured using the &dmx_ts_feed.@set function in the Section Feed API.
290 * If there is no room in the circular buffer when a new section is received,
291 * the section must be discarded. If this happens, the value of the success
292 * parameter should be DMX_OVERRUN_ERROR on the next callback.
293 */
abfc97f7
MCC
294typedef int (*dmx_section_cb)(const u8 *buffer1,
295 size_t buffer1_len,
296 const u8 *buffer2,
297 size_t buffer2_len,
4be45fb4 298 struct dmx_section_filter *source);
1da177e4
LT
299
300/*--------------------------------------------------------------------------*/
301/* DVB Front-End */
302/*--------------------------------------------------------------------------*/
303
548e5ae0
MCC
304/**
305 * enum dmx_frontend_source - Used to identify the type of frontend
306 *
307 * @DMX_MEMORY_FE: The source of the demux is memory. It means that
308 * the MPEG-TS to be filtered comes from userspace,
309 * via write() syscall.
310 *
311 * @DMX_FRONTEND_0: The source of the demux is a frontend connected
312 * to the demux.
313 */
1da177e4
LT
314enum dmx_frontend_source {
315 DMX_MEMORY_FE,
316 DMX_FRONTEND_0,
1da177e4
LT
317};
318
548e5ae0
MCC
319/**
320 * struct dmx_frontend - Structure that lists the frontends associated with
321 * a demux
322 *
323 * @connectivity_list: List of front-ends that can be connected to a
324 * particular demux;
325 * @source: Type of the frontend.
326 *
327 * FIXME: this structure should likely be replaced soon by some
328 * media-controller based logic.
329 */
1da177e4 330struct dmx_frontend {
548e5ae0 331 struct list_head connectivity_list;
afd1a0c9 332 enum dmx_frontend_source source;
1da177e4
LT
333};
334
abfc97f7
MCC
335/*
336 * MPEG-2 TS Demux
337 */
1da177e4
LT
338
339/*
8a59822f 340 * Flags OR'ed in the capabilities field of struct dmx_demux.
1da177e4
LT
341 */
342
343#define DMX_TS_FILTERING 1
344#define DMX_PES_FILTERING 2
345#define DMX_SECTION_FILTERING 4
346#define DMX_MEMORY_BASED_FILTERING 8 /* write() available */
347#define DMX_CRC_CHECKING 16
348#define DMX_TS_DESCRAMBLING 32
1da177e4
LT
349
350/*
351 * Demux resource type identifier.
352*/
353
354/*
355 * DMX_FE_ENTRY(): Casts elements in the list of registered
356 * front-ends from the generic type struct list_head
357 * to the type * struct dmx_frontend
358 *.
359*/
360
abfc97f7
MCC
361#define DMX_FE_ENTRY(list) \
362 list_entry(list, struct dmx_frontend, connectivity_list)
1da177e4 363
95abfdb9
MCC
364/**
365 * struct dmx_demux - Structure that contains the demux capabilities and
366 * callbacks.
367 *
368 * @capabilities: Bitfield of capability flags
369 *
370 * @frontend: Front-end connected to the demux
371 *
372 * @priv: Pointer to private data of the API client
373 *
374 * @open: This function reserves the demux for use by the caller and, if
375 * necessary, initializes the demux. When the demux is no longer needed,
abfc97f7 376 * the function @close should be called. It should be possible for
95abfdb9
MCC
377 * multiple clients to access the demux at the same time. Thus, the
378 * function implementation should increment the demux usage count when
28cff82c 379 * @open is called and decrement it when @close is called.
95abfdb9
MCC
380 * The @demux function parameter contains a pointer to the demux API and
381 * instance data.
382 * It returns
383 * 0 on success;
abfc97f7 384 * -EUSERS, if maximum usage count was reached;
95abfdb9
MCC
385 * -EINVAL, on bad parameter.
386 *
387 * @close: This function reserves the demux for use by the caller and, if
388 * necessary, initializes the demux. When the demux is no longer needed,
28cff82c 389 * the function @close should be called. It should be possible for
95abfdb9
MCC
390 * multiple clients to access the demux at the same time. Thus, the
391 * function implementation should increment the demux usage count when
28cff82c 392 * @open is called and decrement it when @close is called.
95abfdb9
MCC
393 * The @demux function parameter contains a pointer to the demux API and
394 * instance data.
395 * It returns
396 * 0 on success;
28cff82c 397 * -ENODEV, if demux was not in use (e. g. no users);
95abfdb9
MCC
398 * -EINVAL, on bad parameter.
399 *
400 * @write: This function provides the demux driver with a memory buffer
401 * containing TS packets. Instead of receiving TS packets from the DVB
402 * front-end, the demux driver software will read packets from memory.
403 * Any clients of this demux with active TS, PES or Section filters will
404 * receive filtered data via the Demux callback API (see 0). The function
405 * returns when all the data in the buffer has been consumed by the demux.
406 * Demux hardware typically cannot read TS from memory. If this is the
407 * case, memory-based filtering has to be implemented entirely in software.
408 * The @demux function parameter contains a pointer to the demux API and
409 * instance data.
410 * The @buf function parameter contains a pointer to the TS data in
411 * kernel-space memory.
412 * The @count function parameter contains the length of the TS data.
413 * It returns
414 * 0 on success;
28cff82c
MCC
415 * -ERESTARTSYS, if mutex lock was interrupted;
416 * -EINTR, if a signal handling is pending;
417 * -ENODEV, if demux was removed;
95abfdb9
MCC
418 * -EINVAL, on bad parameter.
419 *
420 * @allocate_ts_feed: Allocates a new TS feed, which is used to filter the TS
421 * packets carrying a certain PID. The TS feed normally corresponds to a
422 * hardware PID filter on the demux chip.
423 * The @demux function parameter contains a pointer to the demux API and
424 * instance data.
425 * The @feed function parameter contains a pointer to the TS feed API and
426 * instance data.
427 * The @callback function parameter contains a pointer to the callback
428 * function for passing received TS packet.
429 * It returns
430 * 0 on success;
28cff82c 431 * -ERESTARTSYS, if mutex lock was interrupted;
95abfdb9 432 * -EBUSY, if no more TS feeds is available;
95abfdb9
MCC
433 * -EINVAL, on bad parameter.
434 *
28cff82c 435 * @release_ts_feed: Releases the resources allocated with @allocate_ts_feed.
95abfdb9
MCC
436 * Any filtering in progress on the TS feed should be stopped before
437 * calling this function.
438 * The @demux function parameter contains a pointer to the demux API and
439 * instance data.
440 * The @feed function parameter contains a pointer to the TS feed API and
441 * instance data.
442 * It returns
443 * 0 on success;
444 * -EINVAL on bad parameter.
445 *
446 * @allocate_section_feed: Allocates a new section feed, i.e. a demux resource
447 * for filtering and receiving sections. On platforms with hardware
448 * support for section filtering, a section feed is directly mapped to
449 * the demux HW. On other platforms, TS packets are first PID filtered in
450 * hardware and a hardware section filter then emulated in software. The
451 * caller obtains an API pointer of type dmx_section_feed_t as an out
452 * parameter. Using this API the caller can set filtering parameters and
453 * start receiving sections.
454 * The @demux function parameter contains a pointer to the demux API and
455 * instance data.
456 * The @feed function parameter contains a pointer to the TS feed API and
457 * instance data.
458 * The @callback function parameter contains a pointer to the callback
459 * function for passing received TS packet.
460 * It returns
461 * 0 on success;
462 * -EBUSY, if no more TS feeds is available;
95abfdb9
MCC
463 * -EINVAL, on bad parameter.
464 *
465 * @release_section_feed: Releases the resources allocated with
28cff82c 466 * @allocate_section_feed, including allocated filters. Any filtering in
95abfdb9
MCC
467 * progress on the section feed should be stopped before calling this
468 * function.
469 * The @demux function parameter contains a pointer to the demux API and
470 * instance data.
471 * The @feed function parameter contains a pointer to the TS feed API and
472 * instance data.
473 * It returns
474 * 0 on success;
475 * -EINVAL, on bad parameter.
476 *
477 * @add_frontend: Registers a connectivity between a demux and a front-end,
478 * i.e., indicates that the demux can be connected via a call to
28cff82c 479 * @connect_frontend to use the given front-end as a TS source. The
95abfdb9
MCC
480 * client of this function has to allocate dynamic or static memory for
481 * the frontend structure and initialize its fields before calling this
482 * function. This function is normally called during the driver
483 * initialization. The caller must not free the memory of the frontend
28cff82c 484 * struct before successfully calling @remove_frontend.
95abfdb9
MCC
485 * The @demux function parameter contains a pointer to the demux API and
486 * instance data.
487 * The @frontend function parameter contains a pointer to the front-end
488 * instance data.
489 * It returns
490 * 0 on success;
95abfdb9
MCC
491 * -EINVAL, on bad parameter.
492 *
493 * @remove_frontend: Indicates that the given front-end, registered by a call
28cff82c 494 * to @add_frontend, can no longer be connected as a TS source by this
95abfdb9
MCC
495 * demux. The function should be called when a front-end driver or a demux
496 * driver is removed from the system. If the front-end is in use, the
497 * function fails with the return value of -EBUSY. After successfully
498 * calling this function, the caller can free the memory of the frontend
28cff82c 499 * struct if it was dynamically allocated before the @add_frontend
95abfdb9
MCC
500 * operation.
501 * The @demux function parameter contains a pointer to the demux API and
502 * instance data.
503 * The @frontend function parameter contains a pointer to the front-end
504 * instance data.
505 * It returns
506 * 0 on success;
28cff82c 507 * -ENODEV, if the front-end was not found,
95abfdb9
MCC
508 * -EINVAL, on bad parameter.
509 *
510 * @get_frontends: Provides the APIs of the front-ends that have been
511 * registered for this demux. Any of the front-ends obtained with this
28cff82c 512 * call can be used as a parameter for @connect_frontend. The include
95abfdb9 513 * file demux.h contains the macro DMX_FE_ENTRY() for converting an
28cff82c 514 * element of the generic type struct &list_head * to the type
abfc97f7 515 * struct &dmx_frontend *. The caller must not free the memory of any of
28cff82c 516 * the elements obtained via this function call.
95abfdb9
MCC
517 * The @demux function parameter contains a pointer to the demux API and
518 * instance data.
519 * It returns a struct list_head pointer to the list of front-end
520 * interfaces, or NULL in the case of an empty list.
521 *
522 * @connect_frontend: Connects the TS output of the front-end to the input of
523 * the demux. A demux can only be connected to a front-end registered to
28cff82c 524 * the demux with the function @add_frontend. It may or may not be
95abfdb9
MCC
525 * possible to connect multiple demuxes to the same front-end, depending
526 * on the capabilities of the HW platform. When not used, the front-end
28cff82c 527 * should be released by calling @disconnect_frontend.
95abfdb9
MCC
528 * The @demux function parameter contains a pointer to the demux API and
529 * instance data.
530 * The @frontend function parameter contains a pointer to the front-end
531 * instance data.
532 * It returns
533 * 0 on success;
95abfdb9
MCC
534 * -EINVAL, on bad parameter.
535 *
536 * @disconnect_frontend: Disconnects the demux and a front-end previously
28cff82c 537 * connected by a @connect_frontend call.
95abfdb9
MCC
538 * The @demux function parameter contains a pointer to the demux API and
539 * instance data.
540 * It returns
541 * 0 on success;
542 * -EINVAL on bad parameter.
4bc645df
MCC
543 *
544 * @get_pes_pids: Get the PIDs for DMX_PES_AUDIO0, DMX_PES_VIDEO0,
545 * DMX_PES_TELETEXT0, DMX_PES_SUBTITLE0 and DMX_PES_PCR0.
546 * The @demux function parameter contains a pointer to the demux API and
547 * instance data.
548 * The @pids function parameter contains an array with five u16 elements
549 * where the PIDs will be stored.
550 * It returns
551 * 0 on success;
552 * -EINVAL on bad parameter.
95abfdb9
MCC
553 */
554
1da177e4 555struct dmx_demux {
95abfdb9 556 u32 capabilities;
abfc97f7
MCC
557 struct dmx_frontend *frontend;
558 void *priv;
559 int (*open)(struct dmx_demux *demux);
560 int (*close)(struct dmx_demux *demux);
561 int (*write)(struct dmx_demux *demux, const char __user *buf,
562 size_t count);
563 int (*allocate_ts_feed)(struct dmx_demux *demux,
564 struct dmx_ts_feed **feed,
565 dmx_ts_cb callback);
566 int (*release_ts_feed)(struct dmx_demux *demux,
567 struct dmx_ts_feed *feed);
568 int (*allocate_section_feed)(struct dmx_demux *demux,
569 struct dmx_section_feed **feed,
570 dmx_section_cb callback);
571 int (*release_section_feed)(struct dmx_demux *demux,
572 struct dmx_section_feed *feed);
573 int (*add_frontend)(struct dmx_demux *demux,
574 struct dmx_frontend *frontend);
575 int (*remove_frontend)(struct dmx_demux *demux,
576 struct dmx_frontend *frontend);
577 struct list_head *(*get_frontends)(struct dmx_demux *demux);
578 int (*connect_frontend)(struct dmx_demux *demux,
579 struct dmx_frontend *frontend);
580 int (*disconnect_frontend)(struct dmx_demux *demux);
581
582 int (*get_pes_pids)(struct dmx_demux *demux, u16 *pids);
1da177e4 583
1e92bbe0
MCC
584 /* private: Not used upstream and never documented */
585#if 0
abfc97f7
MCC
586 int (*get_caps)(struct dmx_demux *demux, struct dmx_caps *caps);
587 int (*set_source)(struct dmx_demux *demux, const dmx_source_t *src);
1e92bbe0 588#endif
4bc645df
MCC
589 /*
590 * private: Only used at av7110, to read some data from firmware.
591 * As this was never documented, we have no clue about what's
abfc97f7 592 * there, and its usage on other drivers aren't encouraged.
4bc645df 593 */
abfc97f7
MCC
594 int (*get_stc)(struct dmx_demux *demux, unsigned int num,
595 u64 *stc, unsigned int *base);
1da177e4
LT
596};
597
1da177e4 598#endif /* #ifndef __DEMUX_H */
This page took 0.96248 seconds and 5 git commands to generate.