diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-28 14:06:39 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-28 14:06:39 -0400 |
commit | f28e71617ddaf2483e3e5c5237103484a303743f (patch) | |
tree | 67627d2d8ddbf6a4449371e9261d796c013b1fa1 /drivers/media/video/cx2341x.c | |
parent | dc6a78f1af10d28fb8c395034ae1e099b85c05b0 (diff) | |
parent | a39727f212426b9d5f9267b3318a2afaf9922d3b (diff) |
Merge ../linux-2.6/
Conflicts:
drivers/scsi/aacraid/comminit.c
Fixed up by removing the now renamed CONFIG_IOMMU option from
aacraid
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/media/video/cx2341x.c')
-rw-r--r-- | drivers/media/video/cx2341x.c | 57 |
1 files changed, 37 insertions, 20 deletions
diff --git a/drivers/media/video/cx2341x.c b/drivers/media/video/cx2341x.c index 554813e6f65d..65f00fc08fa9 100644 --- a/drivers/media/video/cx2341x.c +++ b/drivers/media/video/cx2341x.c | |||
@@ -43,6 +43,7 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)"); | |||
43 | const u32 cx2341x_mpeg_ctrls[] = { | 43 | const u32 cx2341x_mpeg_ctrls[] = { |
44 | V4L2_CID_MPEG_CLASS, | 44 | V4L2_CID_MPEG_CLASS, |
45 | V4L2_CID_MPEG_STREAM_TYPE, | 45 | V4L2_CID_MPEG_STREAM_TYPE, |
46 | V4L2_CID_MPEG_STREAM_VBI_FMT, | ||
46 | V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ, | 47 | V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ, |
47 | V4L2_CID_MPEG_AUDIO_ENCODING, | 48 | V4L2_CID_MPEG_AUDIO_ENCODING, |
48 | V4L2_CID_MPEG_AUDIO_L2_BITRATE, | 49 | V4L2_CID_MPEG_AUDIO_L2_BITRATE, |
@@ -135,6 +136,9 @@ static int cx2341x_get_ctrl(struct cx2341x_mpeg_params *params, | |||
135 | case V4L2_CID_MPEG_STREAM_TYPE: | 136 | case V4L2_CID_MPEG_STREAM_TYPE: |
136 | ctrl->value = params->stream_type; | 137 | ctrl->value = params->stream_type; |
137 | break; | 138 | break; |
139 | case V4L2_CID_MPEG_STREAM_VBI_FMT: | ||
140 | ctrl->value = params->stream_vbi_fmt; | ||
141 | break; | ||
138 | case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: | 142 | case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: |
139 | ctrl->value = params->video_spatial_filter_mode; | 143 | ctrl->value = params->video_spatial_filter_mode; |
140 | break; | 144 | break; |
@@ -257,6 +261,9 @@ static int cx2341x_set_ctrl(struct cx2341x_mpeg_params *params, | |||
257 | params->video_bitrate_mode = V4L2_MPEG_VIDEO_BITRATE_MODE_CBR; | 261 | params->video_bitrate_mode = V4L2_MPEG_VIDEO_BITRATE_MODE_CBR; |
258 | } | 262 | } |
259 | break; | 263 | break; |
264 | case V4L2_CID_MPEG_STREAM_VBI_FMT: | ||
265 | params->stream_vbi_fmt = ctrl->value; | ||
266 | break; | ||
260 | case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: | 267 | case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: |
261 | params->video_spatial_filter_mode = ctrl->value; | 268 | params->video_spatial_filter_mode = ctrl->value; |
262 | break; | 269 | break; |
@@ -418,6 +425,14 @@ int cx2341x_ctrl_query(struct cx2341x_mpeg_params *params, struct v4l2_queryctrl | |||
418 | qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; | 425 | qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; |
419 | return err; | 426 | return err; |
420 | 427 | ||
428 | case V4L2_CID_MPEG_STREAM_VBI_FMT: | ||
429 | if (params->capabilities & CX2341X_CAP_HAS_SLICED_VBI) | ||
430 | return v4l2_ctrl_query_fill_std(qctrl); | ||
431 | return cx2341x_ctrl_query_fill(qctrl, | ||
432 | V4L2_MPEG_STREAM_VBI_FMT_NONE, | ||
433 | V4L2_MPEG_STREAM_VBI_FMT_NONE, 1, | ||
434 | V4L2_MPEG_STREAM_VBI_FMT_NONE); | ||
435 | |||
421 | /* CX23415/6 specific */ | 436 | /* CX23415/6 specific */ |
422 | case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: | 437 | case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: |
423 | return cx2341x_ctrl_query_fill(qctrl, | 438 | return cx2341x_ctrl_query_fill(qctrl, |
@@ -586,7 +601,7 @@ static void cx2341x_calc_audio_properties(struct cx2341x_mpeg_params *params) | |||
586 | } | 601 | } |
587 | 602 | ||
588 | int cx2341x_ext_ctrls(struct cx2341x_mpeg_params *params, | 603 | int cx2341x_ext_ctrls(struct cx2341x_mpeg_params *params, |
589 | struct v4l2_ext_controls *ctrls, int cmd) | 604 | struct v4l2_ext_controls *ctrls, unsigned int cmd) |
590 | { | 605 | { |
591 | int err = 0; | 606 | int err = 0; |
592 | int i; | 607 | int i; |
@@ -639,6 +654,7 @@ void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p) | |||
639 | { | 654 | { |
640 | static struct cx2341x_mpeg_params default_params = { | 655 | static struct cx2341x_mpeg_params default_params = { |
641 | /* misc */ | 656 | /* misc */ |
657 | .capabilities = 0, | ||
642 | .port = CX2341X_PORT_MEMORY, | 658 | .port = CX2341X_PORT_MEMORY, |
643 | .width = 720, | 659 | .width = 720, |
644 | .height = 480, | 660 | .height = 480, |
@@ -646,6 +662,7 @@ void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p) | |||
646 | 662 | ||
647 | /* stream */ | 663 | /* stream */ |
648 | .stream_type = V4L2_MPEG_STREAM_TYPE_MPEG2_PS, | 664 | .stream_type = V4L2_MPEG_STREAM_TYPE_MPEG2_PS, |
665 | .stream_vbi_fmt = V4L2_MPEG_STREAM_VBI_FMT_NONE, | ||
649 | 666 | ||
650 | /* audio */ | 667 | /* audio */ |
651 | .audio_sampling_freq = V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000, | 668 | .audio_sampling_freq = V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000, |
@@ -830,22 +847,22 @@ invalid: | |||
830 | return "<invalid>"; | 847 | return "<invalid>"; |
831 | } | 848 | } |
832 | 849 | ||
833 | void cx2341x_log_status(struct cx2341x_mpeg_params *p, int card_id) | 850 | void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix) |
834 | { | 851 | { |
835 | int is_mpeg1 = p->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1; | 852 | int is_mpeg1 = p->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1; |
836 | 853 | ||
837 | /* Stream */ | 854 | /* Stream */ |
838 | printk(KERN_INFO "cx2341x-%d: Stream: %s\n", | 855 | printk(KERN_INFO "%s: Stream: %s\n", |
839 | card_id, | 856 | prefix, |
840 | cx2341x_menu_item(p, V4L2_CID_MPEG_STREAM_TYPE)); | 857 | cx2341x_menu_item(p, V4L2_CID_MPEG_STREAM_TYPE)); |
841 | 858 | ||
842 | /* Video */ | 859 | /* Video */ |
843 | printk(KERN_INFO "cx2341x-%d: Video: %dx%d, %d fps\n", | 860 | printk(KERN_INFO "%s: Video: %dx%d, %d fps\n", |
844 | card_id, | 861 | prefix, |
845 | p->width / (is_mpeg1 ? 2 : 1), p->height / (is_mpeg1 ? 2 : 1), | 862 | p->width / (is_mpeg1 ? 2 : 1), p->height / (is_mpeg1 ? 2 : 1), |
846 | p->is_50hz ? 25 : 30); | 863 | p->is_50hz ? 25 : 30); |
847 | printk(KERN_INFO "cx2341x-%d: Video: %s, %s, %s, %d", | 864 | printk(KERN_INFO "%s: Video: %s, %s, %s, %d", |
848 | card_id, | 865 | prefix, |
849 | cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_ENCODING), | 866 | cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_ENCODING), |
850 | cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_ASPECT), | 867 | cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_ASPECT), |
851 | cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_BITRATE_MODE), | 868 | cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_BITRATE_MODE), |
@@ -854,19 +871,19 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, int card_id) | |||
854 | printk(", Peak %d", p->video_bitrate_peak); | 871 | printk(", Peak %d", p->video_bitrate_peak); |
855 | } | 872 | } |
856 | printk("\n"); | 873 | printk("\n"); |
857 | printk(KERN_INFO "cx2341x-%d: Video: GOP Size %d, %d B-Frames, %sGOP Closure, %s3:2 Pulldown\n", | 874 | printk(KERN_INFO "%s: Video: GOP Size %d, %d B-Frames, %sGOP Closure, %s3:2 Pulldown\n", |
858 | card_id, | 875 | prefix, |
859 | p->video_gop_size, p->video_b_frames, | 876 | p->video_gop_size, p->video_b_frames, |
860 | p->video_gop_closure ? "" : "No ", | 877 | p->video_gop_closure ? "" : "No ", |
861 | p->video_pulldown ? "" : "No "); | 878 | p->video_pulldown ? "" : "No "); |
862 | if (p->video_temporal_decimation) { | 879 | if (p->video_temporal_decimation) { |
863 | printk(KERN_INFO "cx2341x-%d: Video: Temporal Decimation %d\n", | 880 | printk(KERN_INFO "%s: Video: Temporal Decimation %d\n", |
864 | card_id, p->video_temporal_decimation); | 881 | prefix, p->video_temporal_decimation); |
865 | } | 882 | } |
866 | 883 | ||
867 | /* Audio */ | 884 | /* Audio */ |
868 | printk(KERN_INFO "cx2341x-%d: Audio: %s, %s, %s, %s", | 885 | printk(KERN_INFO "%s: Audio: %s, %s, %s, %s", |
869 | card_id, | 886 | prefix, |
870 | cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ), | 887 | cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ), |
871 | cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_ENCODING), | 888 | cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_ENCODING), |
872 | cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_L2_BITRATE), | 889 | cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_L2_BITRATE), |
@@ -880,18 +897,18 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, int card_id) | |||
880 | cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_CRC)); | 897 | cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_CRC)); |
881 | 898 | ||
882 | /* Encoding filters */ | 899 | /* Encoding filters */ |
883 | printk(KERN_INFO "cx2341x-%d: Spatial Filter: %s, Luma %s, Chroma %s, %d\n", | 900 | printk(KERN_INFO "%s: Spatial Filter: %s, Luma %s, Chroma %s, %d\n", |
884 | card_id, | 901 | prefix, |
885 | cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE), | 902 | cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE), |
886 | cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE), | 903 | cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE), |
887 | cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE), | 904 | cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE), |
888 | p->video_spatial_filter); | 905 | p->video_spatial_filter); |
889 | printk(KERN_INFO "cx2341x-%d: Temporal Filter: %s, %d\n", | 906 | printk(KERN_INFO "%s: Temporal Filter: %s, %d\n", |
890 | card_id, | 907 | prefix, |
891 | cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE), | 908 | cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE), |
892 | p->video_temporal_filter); | 909 | p->video_temporal_filter); |
893 | printk(KERN_INFO "cx2341x-%d: Median Filter: %s, Luma [%d, %d], Chroma [%d, %d]\n", | 910 | printk(KERN_INFO "%s: Median Filter: %s, Luma [%d, %d], Chroma [%d, %d]\n", |
894 | card_id, | 911 | prefix, |
895 | cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE), | 912 | cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE), |
896 | p->video_luma_median_filter_bottom, | 913 | p->video_luma_median_filter_bottom, |
897 | p->video_luma_median_filter_top, | 914 | p->video_luma_median_filter_top, |