Lines Matching +full:per +full:- +full:stream

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
5 * Derived from ivtv-driver.h
24 #include <linux/i2c-algo-bit.h>
33 #include <media/v4l2-common.h>
34 #include <media/v4l2-ioctl.h>
35 #include <media/v4l2-device.h>
36 #include <media/v4l2-fh.h>
38 #include <media/i2c/ir-kbd-i2c.h>
39 #include "cx18-mailbox.h"
40 #include "cx18-av-core.h"
52 #include <media/videobuf2-vmalloc.h>
71 #define CX18_CARD_TOSHIBA_QOSMIO_DVBT 5 /* Toshiba Qosmio Interal DVB-T/Analog*/
112 /* Maximum firmware DMA buffers per stream */
115 /* YUV buffer sizes in bytes to ensure integer # of frames per buffer */
157 gcc-2.95, otherwise it won't compile. */
161 v4l2_info(&cx->v4l2_dev, " " type ": " fmt , ## args); \
175 v4l2_info(&cx->v4l2_dev, " " type ": " fmt , ## args); \
187 #define CX18_ERR(fmt, args...) v4l2_err(&cx->v4l2_dev, fmt , ## args)
188 #define CX18_WARN(fmt, args...) v4l2_warn(&cx->v4l2_dev, fmt , ## args)
189 #define CX18_INFO(fmt, args...) v4l2_info(&cx->v4l2_dev, fmt , ## args)
243 int megabytes[CX18_MAX_STREAMS]; /* Size in megabytes of each stream */
249 /* per-mdl bit flags */
252 /* per-stream, s_flags */
253 #define CX18_F_S_CLAIMED 3 /* this stream is claimed */
254 #define CX18_F_S_STREAMING 4 /* the fw is decoding/encoding this stream */
255 #define CX18_F_S_INTERNAL_USE 5 /* this stream is used internally (sliced VBI processing) */
256 #define CX18_F_S_STREAMOFF 7 /* signal end of stream EOS */
257 #define CX18_F_S_APPL_IO 8 /* this stream is used read/written by an application */
260 /* per-cx18, i_flags */
262 #define CX18_F_I_EOS 4 /* End of encoder stream */
275 * list_entry_is_past_end - check if a previous loop cursor is off list end
284 (&pos->member == (head))
287 /* Common video buffer sub-system struct */
305 u32 id; /* index into cx->scb->cpu_mdl[] of 1st cx18_mdl_ent */
327 struct cx18_stream *stream; member
367 /* These first five fields are always set, even if the stream
369 struct video_device video_dev; /* v4l2_dev is NULL when stream not created */
372 const char *name; /* name of the stream */
373 int type; /* stream type */
387 u32 buffers; /* total buffers owned by this stream */
390 /* MDL sizes - all stream MDLs are the same size */
395 struct cx18_queue q_free; /* free - in rotation, not committed */
396 struct cx18_queue q_busy; /* busy - in use by firmware */
397 struct cx18_queue q_full; /* full - data for user apps */
398 struct cx18_queue q_idle; /* idle - not in rotation */
429 return fh2id(file->private_data); in file2id()
432 /* forward declaration of struct defined in cx18-cards.h */
442 * to provide sliced VBI. (AV Core: sliced mode - Encoder: raw mode)
445 * to the user application directly or build up MPEG-2 private stream 1
446 * packets to splice into (only!) MPEG-2 PS streams for the user app.
451 * us and provide it in a separate stream or splice it into any type of
452 * MPEG PS or TS stream, but this isn't implemented yet.
456 * Number of "raw" VBI samples per horizontal line we tell the Encoder to
470 * NTSC-M, PAL-M, PAL-60, and other 60 Hz/525 line systems, we have:
476 * PAL-B/G/H, PAL-I, SECAM-L and other 50 Hz/625 line systems, we have:
492 u32 start[2]; /* First VBI data line per field: 10 & 273 or 6 & 318 */
497 * Vars for creation and insertion of MPEG Private Stream 1 packets
501 /* Boolean: create and insert Private Stream 1 packets into the PS */
506 * Used in cx18-vbi.c only for collecting sliced data, and as a source
507 * during conversion of sliced VBI data into MPEG Priv Stream 1 packets.
514 * A ring buffer of driver-generated MPEG-2 PS
515 * Program Pack/Private Stream 1 packets for sliced VBI data insertion
516 * into the MPEG PS stream.
519 * 16 byte MPEG-2 PS Program Pack Header
520 * 16 byte MPEG-2 Private Stream 1 PES Header
530 * That's a maximum 1552 bytes of payload in the Private Stream 1 packet
531 * which is the payload size a PVR-350 (CX23415) MPEG decoder will
541 /* Count of Program Pack/Program Stream 1 packets inserted into PS */
545 * A dummy driver stream transfer mdl & buffer with a copy of the next
547 * Only used in cx18-fileops.c, but its state needs to persist at times.
553 /* Per cx23418, per I2C bus private algo callback data */
566 struct v4l2_subdev *sd_av; /* A/V decoder/digitizer sub-device */
567 struct v4l2_subdev *sd_extmux; /* External multiplexer sub-dev */
597 int stream_buffers[CX18_MAX_STREAMS]; /* # of buffers for each stream */
598 int stream_buf_size[CX18_MAX_STREAMS]; /* Stream buffer size */
599 struct cx18_stream streams[CX18_MAX_STREAMS]; /* Stream data */
600 struct snd_cx18_card *alsa; /* ALSA interface for PCM capture stream */
611 uninitialized value in the stream->id. */
634 char in_workq_name[39]; /* "cx18-NN-in" */
660 /* Used for cx18-alsa module loading */
677 /* Return non-zero if a signal is pending */
684 /* First-open initialization: load firmware, etc. */
690 return cx->vbi.in.type == V4L2_BUF_TYPE_VBI_CAPTURE; in cx18_raw_vbi()
696 v4l2_device_mask_call_all(&(cx)->v4l2_dev, hw, o, f, ##args)
702 * other than 0 or -ENOIOCTLCMD, then return with that error code. */
704 v4l2_device_mask_call_until_err(&(cx)->v4l2_dev, hw, o, f, ##args)