diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2006-06-24 19:36:02 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2006-06-24 19:36:02 +0200 |
commit | ab9eca654d43314813593d7ea057ccad4342d932 (patch) | |
tree | bab071ea18c84d2cd5dd1af81e4073e1b6a2eefd /linux/drivers/media/video/cx2341x.c | |
parent | bfb61b19e1ac6aba274aa46f23ed8dc621c88a86 (diff) | |
download | mediapointer-dvb-s2-ab9eca654d43314813593d7ea057ccad4342d932.tar.gz mediapointer-dvb-s2-ab9eca654d43314813593d7ea057ccad4342d932.tar.bz2 |
Add V4L2_CID_MPEG_STREAM_VBI_FMT control
From: Hans Verkuil <hverkuil@xs4all.nl>
V4L2_CID_MPEG_STREAM_VBI_FMT controls if and how VBI data is embedded in
an MPEG stream. Currently only one format is supported: the format designed
for the ivtv driver. This should be extended with new standard formats
(such as defined for DVB) in the future.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/cx2341x.c')
-rw-r--r-- | linux/drivers/media/video/cx2341x.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx2341x.c b/linux/drivers/media/video/cx2341x.c index 29a5c8e5c..ae37d0513 100644 --- a/linux/drivers/media/video/cx2341x.c +++ b/linux/drivers/media/video/cx2341x.c @@ -47,6 +47,7 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)"); const u32 cx2341x_mpeg_ctrls[] = { V4L2_CID_MPEG_CLASS, V4L2_CID_MPEG_STREAM_TYPE, + V4L2_CID_MPEG_STREAM_VBI_FMT, V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ, V4L2_CID_MPEG_AUDIO_ENCODING, V4L2_CID_MPEG_AUDIO_L2_BITRATE, @@ -139,6 +140,9 @@ static int cx2341x_get_ctrl(struct cx2341x_mpeg_params *params, case V4L2_CID_MPEG_STREAM_TYPE: ctrl->value = params->stream_type; break; + case V4L2_CID_MPEG_STREAM_VBI_FMT: + ctrl->value = params->stream_vbi_fmt; + break; case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: ctrl->value = params->video_spatial_filter_mode; break; @@ -261,6 +265,9 @@ static int cx2341x_set_ctrl(struct cx2341x_mpeg_params *params, params->video_bitrate_mode = V4L2_MPEG_VIDEO_BITRATE_MODE_CBR; } break; + case V4L2_CID_MPEG_STREAM_VBI_FMT: + params->stream_vbi_fmt = ctrl->value; + break; case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: params->video_spatial_filter_mode = ctrl->value; break; @@ -422,6 +429,14 @@ int cx2341x_ctrl_query(struct cx2341x_mpeg_params *params, struct v4l2_queryctrl qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; return err; + case V4L2_CID_MPEG_STREAM_VBI_FMT: + if (params->capabilities & CX2341X_CAP_HAS_SLICED_VBI) + return v4l2_ctrl_query_fill_std(qctrl); + return cx2341x_ctrl_query_fill(qctrl, + V4L2_MPEG_STREAM_VBI_FMT_NONE, + V4L2_MPEG_STREAM_VBI_FMT_NONE, 1, + V4L2_MPEG_STREAM_VBI_FMT_NONE); + /* CX23415/6 specific */ case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: return cx2341x_ctrl_query_fill(qctrl, @@ -643,6 +658,7 @@ void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p) { static struct cx2341x_mpeg_params default_params = { /* misc */ + .capabilities = 0, .port = CX2341X_PORT_MEMORY, .width = 720, .height = 480, @@ -650,6 +666,7 @@ void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p) /* stream */ .stream_type = V4L2_MPEG_STREAM_TYPE_MPEG2_PS, + .stream_vbi_fmt = V4L2_MPEG_STREAM_VBI_FMT_NONE, /* audio */ .audio_sampling_freq = V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000, |