Lines Matching +full:codec +full:- +full:irq

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
5 * Interface for MJPEG (and maybe later MPEG/WAVELETS) codec's
16 * Should ease the (re-)usage of drivers supporting cards with (different)
20 * The codecs are typically have a "strong" binding to their master - so I
22 * i2c. If you have an other opinion, let's discuss & implement it :-)))
29 * The best is just calling them at module (de-)initialisation.
47 * ----------------------------------------------------------------------------
51 * ----------------------------------------------------------------------------
60 * name -> name of the device structure for reference and debugging
61 * master_data -> data ref. for the master (e.g. the zr36055,57,67)
62 * readreg -> ref. to read-fn from register (setup by master, used by slave)
63 * writereg -> ref. to write-fn to register (setup by master, used by slave)
67 * slave_data -> data ref. for the slave (e.g. the zr36050,60)
68 * check -> fn-ref. checks availability of an device, returns -EIO on failure or
71 * one codec which may be quite similar to access, nevertheless it
74 * -- main functions you always need for compression/decompression --
76 * set_mode -> this fn-ref. resets the entire codec, and sets up the mode
78 * available) - it returns 0 if the mode is possible
79 * set_size -> this fn-ref. sets the norm and image size for
83 * additional setup may be available, too - but the codec should work with
86 * set_data -> sets device-specific data (tables, quality etc.)
87 * get_data -> query device-specific data (tables, quality etc.)
90 * setup_interrupt -> codec irq setup (not needed for 36050/60)
91 * handle_interrupt -> codec irq handling (not needed for 36050/60)
94 * put_image -> puts image data to the codec (not needed for 36050/60)
95 * get_image -> gets image data from the codec (not needed for 36050/60)
109 * but it makes sense to "hide" it in the /proc/video tree of v4l(2) --TODO--.
132 /* this are the current codec flags I think they are needed */
133 /* -> type value in structure */
134 #define CODEC_FLAG_JPEG 0x00000001L // JPEG codec
135 #define CODEC_FLAG_MPEG 0x00000002L // MPEG1/2/4 codec
136 #define CODEC_FLAG_DIVX 0x00000004L // DIVX codec
137 #define CODEC_FLAG_WAVELET 0x00000008L // WAVELET codec
141 #define CODEC_FLAG_HARDWARE 0x00001000L // is a hardware codec
145 #define CODEC_FLAG_NEEDIRQ 0x00010000L // needs irq handling
158 /* this are the current codec types I want to implement */
159 /* -> type value in structure */
166 /* the type of data may be enhanced by future implementations (data-fn.'s) */
167 /* -> used in command */
168 #define CODEC_G_STATUS 0x0000 /* codec status (query only) */
169 #define CODEC_S_CODEC_MODE 0x0001 /* codec mode (baseline JPEG, MPEG1,... */
179 #define CODEC_S_JPEG_HDT_DATA 0x0018 /* huffman-tables */
181 #define CODEC_S_JPEG_QDT_DATA 0x0019 /* quantizing-tables */
193 /* types of transfer, directly user space or a kernel buffer (image-fn.'s) */
194 /* -> used in get_image, put_image */
237 /* -- filled in by slave device during register -- */
239 unsigned long magic; /* may be used for client<->master attaching */
241 unsigned int type; /* codec type */
243 /* -- these is filled in later during master device attach -- */
247 /* -- these are filled in by the slave device during register -- */
252 int (*setup)(struct videocodec *codec);
253 int (*unset)(struct videocodec *codec);
257 int (*set_mode)(struct videocodec *codec, int mode);
258 // setup picture size and norm (for the codec's video frontend)
259 int (*set_video)(struct videocodec *codec, const struct tvnorm *norm,
262 int (*control)(struct videocodec *codec, int type, int size, void *data);
265 // interrupt setup / handling (for irq's delivered by master)
266 int (*setup_interrupt)(struct videocodec *codec, long mode);
267 int (*handle_interrupt)(struct videocodec *codec, int source, long flag);
269 long (*put_image)(struct videocodec *codec, int tr_type, int block,
271 long (*get_image)(struct videocodec *codec, int tr_type, int block,
276 /* -- filled in by master device for registration -- */
278 unsigned long magic; /* may be used for client<->master attaching */
284 __u32 (*readreg)(struct videocodec *codec, __u16 reg);
285 void (*writereg)(struct videocodec *codec, __u16 reg, __u32 value);
298 int videocodec_detach(struct videocodec *codec);
302 int videocodec_register(const struct videocodec *codec);
304 int videocodec_unregister(const struct videocodec *codec);
313 struct zoran *zr = master->data; in videocodec_master_to_zoran()
318 static inline struct zoran *videocodec_to_zoran(struct videocodec *codec) in videocodec_to_zoran() argument
320 struct videocodec_master *master = codec->master_data; in videocodec_to_zoran()