blob: b045a598fb2de47e13d780560c8ffa1a82c90401 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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>
Andreas Oberritterc0510052005-09-09 13:02:21 -070033#include <linux/dvb/dmx.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070034
35/*--------------------------------------------------------------------------*/
36/* Common definitions */
37/*--------------------------------------------------------------------------*/
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/*
48 * DMX_MAX_SECFEED_SIZE: Maximum length (in bytes) of a private section feed filter.
49 */
50
Mark Adamsb3967d62005-11-08 21:35:50 -080051#ifndef DMX_MAX_SECTION_SIZE
52#define DMX_MAX_SECTION_SIZE 4096
53#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070054#ifndef DMX_MAX_SECFEED_SIZE
Mark Adamsb3967d62005-11-08 21:35:50 -080055#define DMX_MAX_SECFEED_SIZE (DMX_MAX_SECTION_SIZE + 188)
Linus Torvalds1da177e2005-04-16 15:20:36 -070056#endif
57
58
59/*
60 * enum dmx_success: Success codes for the Demux Callback API.
61 */
62
63enum dmx_success {
64 DMX_OK = 0, /* Received Ok */
65 DMX_LENGTH_ERROR, /* Incorrect length */
66 DMX_OVERRUN_ERROR, /* Receiver ring buffer overrun */
67 DMX_CRC_ERROR, /* Incorrect CRC */
68 DMX_FRAME_ERROR, /* Frame alignment error */
69 DMX_FIFO_ERROR, /* Receiver FIFO overrun */
70 DMX_MISSED_ERROR /* Receiver missed packet */
71} ;
72
73/*--------------------------------------------------------------------------*/
74/* TS packet reception */
75/*--------------------------------------------------------------------------*/
76
77/* TS filter type for set() */
78
79#define TS_PACKET 1 /* send TS packets (188 bytes) to callback (default) */
80#define TS_PAYLOAD_ONLY 2 /* in case TS_PACKET is set, only send the TS
81 payload (<=184 bytes per packet) to callback */
82#define TS_DECODER 4 /* send stream to built-in decoder (if present) */
Andreas Oberritter4a24ce32008-04-22 14:45:47 -030083#define TS_DEMUX 8 /* in case TS_PACKET is set, send the TS to
84 the demux device, not to the dvr device */
Linus Torvalds1da177e2005-04-16 15:20:36 -070085
Linus Torvalds1da177e2005-04-16 15:20:36 -070086struct dmx_ts_feed {
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -080087 int is_filtering; /* Set to non-zero when filtering in progress */
88 struct dmx_demux *parent; /* Back-pointer */
89 void *priv; /* Pointer to private data of the API client */
90 int (*set) (struct dmx_ts_feed *feed,
Linus Torvalds1da177e2005-04-16 15:20:36 -070091 u16 pid,
92 int type,
93 enum dmx_ts_pes pes_type,
Linus Torvalds1da177e2005-04-16 15:20:36 -070094 size_t circular_buffer_size,
Linus Torvalds1da177e2005-04-16 15:20:36 -070095 struct timespec timeout);
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -080096 int (*start_filtering) (struct dmx_ts_feed* feed);
97 int (*stop_filtering) (struct dmx_ts_feed* feed);
Linus Torvalds1da177e2005-04-16 15:20:36 -070098};
99
100/*--------------------------------------------------------------------------*/
101/* Section reception */
102/*--------------------------------------------------------------------------*/
103
104struct dmx_section_filter {
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800105 u8 filter_value [DMX_MAX_FILTER_SIZE];
106 u8 filter_mask [DMX_MAX_FILTER_SIZE];
107 u8 filter_mode [DMX_MAX_FILTER_SIZE];
108 struct dmx_section_feed* parent; /* Back-pointer */
109 void* priv; /* Pointer to private data of the API client */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700110};
111
112struct dmx_section_feed {
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800113 int is_filtering; /* Set to non-zero when filtering in progress */
114 struct dmx_demux* parent; /* Back-pointer */
115 void* priv; /* Pointer to private data of the API client */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700116
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800117 int check_crc;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700118 u32 crc_val;
119
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800120 u8 *secbuf;
121 u8 secbuf_base[DMX_MAX_SECFEED_SIZE];
122 u16 secbufp, seclen, tsfeedp;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700123
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800124 int (*set) (struct dmx_section_feed* feed,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700125 u16 pid,
126 size_t circular_buffer_size,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700127 int check_crc);
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800128 int (*allocate_filter) (struct dmx_section_feed* feed,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700129 struct dmx_section_filter** filter);
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800130 int (*release_filter) (struct dmx_section_feed* feed,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700131 struct dmx_section_filter* filter);
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800132 int (*start_filtering) (struct dmx_section_feed* feed);
133 int (*stop_filtering) (struct dmx_section_feed* feed);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700134};
135
136/*--------------------------------------------------------------------------*/
137/* Callback functions */
138/*--------------------------------------------------------------------------*/
139
140typedef int (*dmx_ts_cb) ( const u8 * buffer1,
141 size_t buffer1_length,
142 const u8 * buffer2,
143 size_t buffer2_length,
144 struct dmx_ts_feed* source,
145 enum dmx_success success);
146
147typedef int (*dmx_section_cb) ( const u8 * buffer1,
148 size_t buffer1_len,
149 const u8 * buffer2,
150 size_t buffer2_len,
151 struct dmx_section_filter * source,
152 enum dmx_success success);
153
154/*--------------------------------------------------------------------------*/
155/* DVB Front-End */
156/*--------------------------------------------------------------------------*/
157
158enum dmx_frontend_source {
159 DMX_MEMORY_FE,
160 DMX_FRONTEND_0,
161 DMX_FRONTEND_1,
162 DMX_FRONTEND_2,
163 DMX_FRONTEND_3,
164 DMX_STREAM_0, /* external stream input, e.g. LVDS */
165 DMX_STREAM_1,
166 DMX_STREAM_2,
167 DMX_STREAM_3
168};
169
170struct dmx_frontend {
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800171 struct list_head connectivity_list; /* List of front-ends that can
Linus Torvalds1da177e2005-04-16 15:20:36 -0700172 be connected to a particular
173 demux */
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800174 enum dmx_frontend_source source;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700175};
176
177/*--------------------------------------------------------------------------*/
178/* MPEG-2 TS Demux */
179/*--------------------------------------------------------------------------*/
180
181/*
Alexey Dobriyan8a598222006-03-07 22:20:23 -0300182 * Flags OR'ed in the capabilities field of struct dmx_demux.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700183 */
184
185#define DMX_TS_FILTERING 1
186#define DMX_PES_FILTERING 2
187#define DMX_SECTION_FILTERING 4
188#define DMX_MEMORY_BASED_FILTERING 8 /* write() available */
189#define DMX_CRC_CHECKING 16
190#define DMX_TS_DESCRAMBLING 32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700191
192/*
193 * Demux resource type identifier.
194*/
195
196/*
197 * DMX_FE_ENTRY(): Casts elements in the list of registered
198 * front-ends from the generic type struct list_head
199 * to the type * struct dmx_frontend
200 *.
201*/
202
203#define DMX_FE_ENTRY(list) list_entry(list, struct dmx_frontend, connectivity_list)
204
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300205/**
206 * struct dmx_demux - Structure that contains the demux capabilities and
207 * callbacks.
208 *
209 * @capabilities: Bitfield of capability flags
210 *
211 * @frontend: Front-end connected to the demux
212 *
213 * @priv: Pointer to private data of the API client
214 *
215 * @open: This function reserves the demux for use by the caller and, if
216 * necessary, initializes the demux. When the demux is no longer needed,
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300217 * the function @close should be called. It should be possible for
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300218 * multiple clients to access the demux at the same time. Thus, the
219 * function implementation should increment the demux usage count when
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300220 * @open is called and decrement it when @close is called.
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300221 * The @demux function parameter contains a pointer to the demux API and
222 * instance data.
223 * It returns
224 * 0 on success;
225 * -EUSERS, if maximum usage count was reached;
226 * -EINVAL, on bad parameter.
227 *
228 * @close: This function reserves the demux for use by the caller and, if
229 * necessary, initializes the demux. When the demux is no longer needed,
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300230 * the function @close should be called. It should be possible for
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300231 * multiple clients to access the demux at the same time. Thus, the
232 * function implementation should increment the demux usage count when
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300233 * @open is called and decrement it when @close is called.
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300234 * The @demux function parameter contains a pointer to the demux API and
235 * instance data.
236 * It returns
237 * 0 on success;
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300238 * -ENODEV, if demux was not in use (e. g. no users);
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300239 * -EINVAL, on bad parameter.
240 *
241 * @write: This function provides the demux driver with a memory buffer
242 * containing TS packets. Instead of receiving TS packets from the DVB
243 * front-end, the demux driver software will read packets from memory.
244 * Any clients of this demux with active TS, PES or Section filters will
245 * receive filtered data via the Demux callback API (see 0). The function
246 * returns when all the data in the buffer has been consumed by the demux.
247 * Demux hardware typically cannot read TS from memory. If this is the
248 * case, memory-based filtering has to be implemented entirely in software.
249 * The @demux function parameter contains a pointer to the demux API and
250 * instance data.
251 * The @buf function parameter contains a pointer to the TS data in
252 * kernel-space memory.
253 * The @count function parameter contains the length of the TS data.
254 * It returns
255 * 0 on success;
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300256 * -ERESTARTSYS, if mutex lock was interrupted;
257 * -EINTR, if a signal handling is pending;
258 * -ENODEV, if demux was removed;
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300259 * -EINVAL, on bad parameter.
260 *
261 * @allocate_ts_feed: Allocates a new TS feed, which is used to filter the TS
262 * packets carrying a certain PID. The TS feed normally corresponds to a
263 * hardware PID filter on the demux chip.
264 * The @demux function parameter contains a pointer to the demux API and
265 * instance data.
266 * The @feed function parameter contains a pointer to the TS feed API and
267 * instance data.
268 * The @callback function parameter contains a pointer to the callback
269 * function for passing received TS packet.
270 * It returns
271 * 0 on success;
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300272 * -ERESTARTSYS, if mutex lock was interrupted;
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300273 * -EBUSY, if no more TS feeds is available;
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300274 * -EINVAL, on bad parameter.
275 *
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300276 * @release_ts_feed: Releases the resources allocated with @allocate_ts_feed.
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300277 * Any filtering in progress on the TS feed should be stopped before
278 * calling this function.
279 * The @demux function parameter contains a pointer to the demux API and
280 * instance data.
281 * The @feed function parameter contains a pointer to the TS feed API and
282 * instance data.
283 * It returns
284 * 0 on success;
285 * -EINVAL on bad parameter.
286 *
287 * @allocate_section_feed: Allocates a new section feed, i.e. a demux resource
288 * for filtering and receiving sections. On platforms with hardware
289 * support for section filtering, a section feed is directly mapped to
290 * the demux HW. On other platforms, TS packets are first PID filtered in
291 * hardware and a hardware section filter then emulated in software. The
292 * caller obtains an API pointer of type dmx_section_feed_t as an out
293 * parameter. Using this API the caller can set filtering parameters and
294 * start receiving sections.
295 * The @demux function parameter contains a pointer to the demux API and
296 * instance data.
297 * The @feed function parameter contains a pointer to the TS feed API and
298 * instance data.
299 * The @callback function parameter contains a pointer to the callback
300 * function for passing received TS packet.
301 * It returns
302 * 0 on success;
303 * -EBUSY, if no more TS feeds is available;
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300304 * -EINVAL, on bad parameter.
305 *
306 * @release_section_feed: Releases the resources allocated with
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300307 * @allocate_section_feed, including allocated filters. Any filtering in
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300308 * progress on the section feed should be stopped before calling this
309 * function.
310 * The @demux function parameter contains a pointer to the demux API and
311 * instance data.
312 * The @feed function parameter contains a pointer to the TS feed API and
313 * instance data.
314 * It returns
315 * 0 on success;
316 * -EINVAL, on bad parameter.
317 *
318 * @add_frontend: Registers a connectivity between a demux and a front-end,
319 * i.e., indicates that the demux can be connected via a call to
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300320 * @connect_frontend to use the given front-end as a TS source. The
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300321 * client of this function has to allocate dynamic or static memory for
322 * the frontend structure and initialize its fields before calling this
323 * function. This function is normally called during the driver
324 * initialization. The caller must not free the memory of the frontend
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300325 * struct before successfully calling @remove_frontend.
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300326 * The @demux function parameter contains a pointer to the demux API and
327 * instance data.
328 * The @frontend function parameter contains a pointer to the front-end
329 * instance data.
330 * It returns
331 * 0 on success;
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300332 * -EINVAL, on bad parameter.
333 *
334 * @remove_frontend: Indicates that the given front-end, registered by a call
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300335 * to @add_frontend, can no longer be connected as a TS source by this
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300336 * demux. The function should be called when a front-end driver or a demux
337 * driver is removed from the system. If the front-end is in use, the
338 * function fails with the return value of -EBUSY. After successfully
339 * calling this function, the caller can free the memory of the frontend
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300340 * struct if it was dynamically allocated before the @add_frontend
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300341 * operation.
342 * The @demux function parameter contains a pointer to the demux API and
343 * instance data.
344 * The @frontend function parameter contains a pointer to the front-end
345 * instance data.
346 * It returns
347 * 0 on success;
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300348 * -ENODEV, if the front-end was not found,
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300349 * -EINVAL, on bad parameter.
350 *
351 * @get_frontends: Provides the APIs of the front-ends that have been
352 * registered for this demux. Any of the front-ends obtained with this
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300353 * call can be used as a parameter for @connect_frontend. The include
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300354 * file demux.h contains the macro DMX_FE_ENTRY() for converting an
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300355 * element of the generic type struct &list_head * to the type
356 * struct &dmx_frontend *. The caller must not free the memory of any of
357 * the elements obtained via this function call.
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300358 * The @demux function parameter contains a pointer to the demux API and
359 * instance data.
360 * It returns a struct list_head pointer to the list of front-end
361 * interfaces, or NULL in the case of an empty list.
362 *
363 * @connect_frontend: Connects the TS output of the front-end to the input of
364 * the demux. A demux can only be connected to a front-end registered to
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300365 * the demux with the function @add_frontend. It may or may not be
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300366 * possible to connect multiple demuxes to the same front-end, depending
367 * on the capabilities of the HW platform. When not used, the front-end
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300368 * should be released by calling @disconnect_frontend.
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300369 * The @demux function parameter contains a pointer to the demux API and
370 * instance data.
371 * The @frontend function parameter contains a pointer to the front-end
372 * instance data.
373 * It returns
374 * 0 on success;
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300375 * -EINVAL, on bad parameter.
376 *
377 * @disconnect_frontend: Disconnects the demux and a front-end previously
Mauro Carvalho Chehab28cff822015-10-06 15:30:46 -0300378 * connected by a @connect_frontend call.
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300379 * The @demux function parameter contains a pointer to the demux API and
380 * instance data.
381 * It returns
382 * 0 on success;
383 * -EINVAL on bad parameter.
Mauro Carvalho Chehab4bc645d2015-10-06 18:39:40 -0300384 *
385 * @get_pes_pids: Get the PIDs for DMX_PES_AUDIO0, DMX_PES_VIDEO0,
386 * DMX_PES_TELETEXT0, DMX_PES_SUBTITLE0 and DMX_PES_PCR0.
387 * The @demux function parameter contains a pointer to the demux API and
388 * instance data.
389 * The @pids function parameter contains an array with five u16 elements
390 * where the PIDs will be stored.
391 * It returns
392 * 0 on success;
393 * -EINVAL on bad parameter.
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300394 */
395
Linus Torvalds1da177e2005-04-16 15:20:36 -0700396struct dmx_demux {
Mauro Carvalho Chehab95abfdb2015-10-05 15:10:55 -0300397 u32 capabilities;
398 struct dmx_frontend* frontend;
399 void* priv;
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800400 int (*open) (struct dmx_demux* demux);
401 int (*close) (struct dmx_demux* demux);
Al Viro947a0802008-06-22 14:20:19 -0300402 int (*write) (struct dmx_demux* demux, const char __user *buf, size_t count);
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800403 int (*allocate_ts_feed) (struct dmx_demux* demux,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700404 struct dmx_ts_feed** feed,
405 dmx_ts_cb callback);
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800406 int (*release_ts_feed) (struct dmx_demux* demux,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700407 struct dmx_ts_feed* feed);
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800408 int (*allocate_section_feed) (struct dmx_demux* demux,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700409 struct dmx_section_feed** feed,
410 dmx_section_cb callback);
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800411 int (*release_section_feed) (struct dmx_demux* demux,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700412 struct dmx_section_feed* feed);
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800413 int (*add_frontend) (struct dmx_demux* demux,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700414 struct dmx_frontend* frontend);
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800415 int (*remove_frontend) (struct dmx_demux* demux,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700416 struct dmx_frontend* frontend);
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800417 struct list_head* (*get_frontends) (struct dmx_demux* demux);
418 int (*connect_frontend) (struct dmx_demux* demux,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700419 struct dmx_frontend* frontend);
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800420 int (*disconnect_frontend) (struct dmx_demux* demux);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700421
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800422 int (*get_pes_pids) (struct dmx_demux* demux, u16 *pids);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700423
Mauro Carvalho Chehab1e92bbe2015-10-06 18:36:20 -0300424 /* private: Not used upstream and never documented */
425#if 0
Andreas Oberritterc0510052005-09-09 13:02:21 -0700426 int (*get_caps) (struct dmx_demux* demux, struct dmx_caps *caps);
Andreas Oberritterc0510052005-09-09 13:02:21 -0700427 int (*set_source) (struct dmx_demux* demux, const dmx_source_t *src);
Mauro Carvalho Chehab1e92bbe2015-10-06 18:36:20 -0300428#endif
Mauro Carvalho Chehab4bc645d2015-10-06 18:39:40 -0300429 /*
430 * private: Only used at av7110, to read some data from firmware.
431 * As this was never documented, we have no clue about what's
432 * there, and its usage on other drivers aren't encouraged.
433 */
Mauro Carvalho Chehabafd1a0c2005-12-12 00:37:27 -0800434 int (*get_stc) (struct dmx_demux* demux, unsigned int num,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700435 u64 *stc, unsigned int *base);
436};
437
Linus Torvalds1da177e2005-04-16 15:20:36 -0700438#endif /* #ifndef __DEMUX_H */