diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2006-06-26 17:24:05 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-26 23:17:40 -0400 |
commit | 99eb44fe941b35b28914881774515005fa2ab7f6 (patch) | |
tree | d76716309716fcb5be999a956d546349d02b866f /drivers/media/video | |
parent | 4d6b5aee9d19d1a982d9db0b5ffea20ee94816c6 (diff) |
V4L/DVB (4259): Pass an explicit log prefix to cx2341x_log_status
A card number is not unique enough. Instead, let the caller specify the
prefix of the status messages.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/cx2341x.c | 38 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-blackbird.c | 7 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 2 |
3 files changed, 26 insertions, 21 deletions
diff --git a/drivers/media/video/cx2341x.c b/drivers/media/video/cx2341x.c index c98740979b60..65f00fc08fa9 100644 --- a/drivers/media/video/cx2341x.c +++ b/drivers/media/video/cx2341x.c | |||
@@ -847,22 +847,22 @@ invalid: | |||
847 | return "<invalid>"; | 847 | return "<invalid>"; |
848 | } | 848 | } |
849 | 849 | ||
850 | 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) |
851 | { | 851 | { |
852 | 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; |
853 | 853 | ||
854 | /* Stream */ | 854 | /* Stream */ |
855 | printk(KERN_INFO "cx2341x-%d: Stream: %s\n", | 855 | printk(KERN_INFO "%s: Stream: %s\n", |
856 | card_id, | 856 | prefix, |
857 | cx2341x_menu_item(p, V4L2_CID_MPEG_STREAM_TYPE)); | 857 | cx2341x_menu_item(p, V4L2_CID_MPEG_STREAM_TYPE)); |
858 | 858 | ||
859 | /* Video */ | 859 | /* Video */ |
860 | printk(KERN_INFO "cx2341x-%d: Video: %dx%d, %d fps\n", | 860 | printk(KERN_INFO "%s: Video: %dx%d, %d fps\n", |
861 | card_id, | 861 | prefix, |
862 | 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), |
863 | p->is_50hz ? 25 : 30); | 863 | p->is_50hz ? 25 : 30); |
864 | printk(KERN_INFO "cx2341x-%d: Video: %s, %s, %s, %d", | 864 | printk(KERN_INFO "%s: Video: %s, %s, %s, %d", |
865 | card_id, | 865 | prefix, |
866 | cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_ENCODING), | 866 | cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_ENCODING), |
867 | cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_ASPECT), | 867 | cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_ASPECT), |
868 | cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_BITRATE_MODE), | 868 | cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_BITRATE_MODE), |
@@ -871,19 +871,19 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, int card_id) | |||
871 | printk(", Peak %d", p->video_bitrate_peak); | 871 | printk(", Peak %d", p->video_bitrate_peak); |
872 | } | 872 | } |
873 | printk("\n"); | 873 | printk("\n"); |
874 | 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", |
875 | card_id, | 875 | prefix, |
876 | p->video_gop_size, p->video_b_frames, | 876 | p->video_gop_size, p->video_b_frames, |
877 | p->video_gop_closure ? "" : "No ", | 877 | p->video_gop_closure ? "" : "No ", |
878 | p->video_pulldown ? "" : "No "); | 878 | p->video_pulldown ? "" : "No "); |
879 | if (p->video_temporal_decimation) { | 879 | if (p->video_temporal_decimation) { |
880 | printk(KERN_INFO "cx2341x-%d: Video: Temporal Decimation %d\n", | 880 | printk(KERN_INFO "%s: Video: Temporal Decimation %d\n", |
881 | card_id, p->video_temporal_decimation); | 881 | prefix, p->video_temporal_decimation); |
882 | } | 882 | } |
883 | 883 | ||
884 | /* Audio */ | 884 | /* Audio */ |
885 | printk(KERN_INFO "cx2341x-%d: Audio: %s, %s, %s, %s", | 885 | printk(KERN_INFO "%s: Audio: %s, %s, %s, %s", |
886 | card_id, | 886 | prefix, |
887 | cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ), | 887 | cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ), |
888 | cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_ENCODING), | 888 | cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_ENCODING), |
889 | cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_L2_BITRATE), | 889 | cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_L2_BITRATE), |
@@ -897,18 +897,18 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, int card_id) | |||
897 | cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_CRC)); | 897 | cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_CRC)); |
898 | 898 | ||
899 | /* Encoding filters */ | 899 | /* Encoding filters */ |
900 | 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", |
901 | card_id, | 901 | prefix, |
902 | 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), |
903 | 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), |
904 | 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), |
905 | p->video_spatial_filter); | 905 | p->video_spatial_filter); |
906 | printk(KERN_INFO "cx2341x-%d: Temporal Filter: %s, %d\n", | 906 | printk(KERN_INFO "%s: Temporal Filter: %s, %d\n", |
907 | card_id, | 907 | prefix, |
908 | 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), |
909 | p->video_temporal_filter); | 909 | p->video_temporal_filter); |
910 | 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", |
911 | card_id, | 911 | prefix, |
912 | 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), |
913 | p->video_luma_median_filter_bottom, | 913 | p->video_luma_median_filter_bottom, |
914 | p->video_luma_median_filter_top, | 914 | p->video_luma_median_filter_top, |
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index a7893a6eb58e..4ff81582ec56 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c | |||
@@ -854,13 +854,18 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file, | |||
854 | return 0; | 854 | return 0; |
855 | } | 855 | } |
856 | case VIDIOC_LOG_STATUS: | 856 | case VIDIOC_LOG_STATUS: |
857 | { | ||
858 | char name[32 + 2]; | ||
859 | |||
860 | snprintf(name, sizeof(name), "%s/2", core->name); | ||
857 | printk("%s/2: ============ START LOG STATUS ============\n", | 861 | printk("%s/2: ============ START LOG STATUS ============\n", |
858 | core->name); | 862 | core->name); |
859 | cx88_call_i2c_clients(core, VIDIOC_LOG_STATUS, 0); | 863 | cx88_call_i2c_clients(core, VIDIOC_LOG_STATUS, 0); |
860 | cx2341x_log_status(&dev->params, dev->mpeg_dev->minor); | 864 | cx2341x_log_status(&dev->params, name); |
861 | printk("%s/2: ============= END LOG STATUS =============\n", | 865 | printk("%s/2: ============= END LOG STATUS =============\n", |
862 | core->name); | 866 | core->name); |
863 | return 0; | 867 | return 0; |
868 | } | ||
864 | 869 | ||
865 | default: | 870 | default: |
866 | return cx88_do_ioctl(inode, file, 0, dev->core, cmd, arg, mpeg_do_ioctl); | 871 | return cx88_do_ioctl(inode, file, 0, dev->core, cmd, arg, mpeg_do_ioctl); |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 2fd40e061ccc..643c471375da 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -2407,7 +2407,7 @@ void pvr2_hdw_trigger_module_log(struct pvr2_hdw *hdw) | |||
2407 | hdw->log_requested = 0; | 2407 | hdw->log_requested = 0; |
2408 | pvr2_i2c_core_sync(hdw); | 2408 | pvr2_i2c_core_sync(hdw); |
2409 | pvr2_trace(PVR2_TRACE_INFO,"cx2341x config:"); | 2409 | pvr2_trace(PVR2_TRACE_INFO,"cx2341x config:"); |
2410 | cx2341x_log_status(&hdw->enc_ctl_state,0); | 2410 | cx2341x_log_status(&hdw->enc_ctl_state, "pvrusb2"); |
2411 | printk(KERN_INFO "pvrusb2: ================== END STATUS CARD #%d ==================\n", nr); | 2411 | printk(KERN_INFO "pvrusb2: ================== END STATUS CARD #%d ==================\n", nr); |
2412 | } while (0); LOCK_GIVE(hdw->big_lock); | 2412 | } while (0); LOCK_GIVE(hdw->big_lock); |
2413 | } | 2413 | } |