Commit 5d1a9ae6 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

V4L/DVB (4191): Add CX2341X MPEG encoder module.

Adds the cx2341x.c module that handles the programming of the Conexant
cx23415/6 MPEG encoder chip used by cx88-blackbird, pvrusb2 and ivtv.
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 9cb2318b
......@@ -82,6 +82,9 @@ config VIDEO_IR
config VIDEO_TVEEPROM
tristate
config VIDEO_CX2341X
tristate
config USB_DABUSB
tristate "DABUSB driver"
depends on USB
......
......@@ -73,6 +73,7 @@ obj-$(CONFIG_VIDEO_SAA711X) += saa7115.o
obj-$(CONFIG_VIDEO_SAA7127) += saa7127.o
obj-$(CONFIG_VIDEO_UPD64031A) += upd64031a.o
obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o
obj-$(CONFIG_VIDEO_CX2341X) += cx2341x.o
obj-$(CONFIG_USB_DABUSB) += dabusb.o
obj-$(CONFIG_USB_DSBR) += dsbr100.o
......
This diff is collapsed.
......@@ -11,6 +11,7 @@ config VIDEO_CX88
select VIDEO_BUF
select VIDEO_TUNER
select VIDEO_TVEEPROM
select VIDEO_CX2341X
select VIDEO_IR
---help---
This is a video4linux driver for Conexant 2388x based
......
......@@ -19,6 +19,66 @@
#ifndef CX2341X_H
#define CX2341X_H
struct cx2341x_mpeg_params {
/* misc */
u16 width;
u16 height;
u16 is_50hz;
/* stream */
enum v4l2_mpeg_stream_type stream_type;
/* audio */
enum v4l2_mpeg_audio_sampling_freq audio_sampling_freq;
enum v4l2_mpeg_audio_encoding audio_encoding;
enum v4l2_mpeg_audio_l2_bitrate audio_l2_bitrate;
enum v4l2_mpeg_audio_mode audio_mode;
enum v4l2_mpeg_audio_mode_extension audio_mode_extension;
enum v4l2_mpeg_audio_emphasis audio_emphasis;
enum v4l2_mpeg_audio_crc audio_crc;
u8 audio_properties;
/* video */
enum v4l2_mpeg_video_encoding video_encoding;
enum v4l2_mpeg_video_aspect video_aspect;
u16 video_b_frames;
u16 video_gop_size;
u16 video_gop_closure;
u16 video_pulldown;
enum v4l2_mpeg_video_bitrate_mode video_bitrate_mode;
u32 video_bitrate;
u32 video_bitrate_peak;
u16 video_temporal_decimation;
/* encoding filters */
enum v4l2_mpeg_cx2341x_video_spatial_filter_mode video_spatial_filter_mode;
u16 video_spatial_filter;
enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type video_luma_spatial_filter_type;
enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type video_chroma_spatial_filter_type;
enum v4l2_mpeg_cx2341x_video_temporal_filter_mode video_temporal_filter_mode;
u16 video_temporal_filter;
enum v4l2_mpeg_cx2341x_video_median_filter_type video_median_filter_type;
u16 video_luma_median_filter_top;
u16 video_luma_median_filter_bottom;
u16 video_chroma_median_filter_top;
u16 video_chroma_median_filter_bottom;
};
#define CX2341X_MBOX_MAX_DATA 16
typedef int (*cx2341x_mbox_func)(void *priv, int cmd, int in, int out,
u32 data[CX2341X_MBOX_MAX_DATA]);
int cx2341x_update(void *priv, cx2341x_mbox_func func,
const struct cx2341x_mpeg_params *old,
const struct cx2341x_mpeg_params *new);
int cx2341x_ctrl_query(struct cx2341x_mpeg_params *params,
struct v4l2_queryctrl *qctrl);
const char **cx2341x_ctrl_get_menu(u32 id);
int cx2341x_ext_ctrls(struct cx2341x_mpeg_params *params,
struct v4l2_ext_controls *ctrls, int cmd);
void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p);
void cx2341x_log_status(struct cx2341x_mpeg_params *p, int cardid);
/* Firmware names */
#define CX2341X_FIRM_ENC_FILENAME "v4l-cx2341x-enc.fw"
/* Decoder firmware for the cx23415 only */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment