diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/zoran_card.c | 45 | ||||
-rw-r--r-- | drivers/media/video/zoran_device.c | 2 | ||||
-rw-r--r-- | drivers/media/video/zoran_driver.c | 4 |
3 files changed, 30 insertions, 21 deletions
diff --git a/drivers/media/video/zoran_card.c b/drivers/media/video/zoran_card.c index 8e12ff80550d..48da36a15fca 100644 --- a/drivers/media/video/zoran_card.c +++ b/drivers/media/video/zoran_card.c | |||
@@ -64,15 +64,15 @@ | |||
64 | extern const struct zoran_format zoran_formats[]; | 64 | extern const struct zoran_format zoran_formats[]; |
65 | 65 | ||
66 | static int card[BUZ_MAX] = { -1, -1, -1, -1 }; | 66 | static int card[BUZ_MAX] = { -1, -1, -1, -1 }; |
67 | module_param_array(card, int, NULL, 0); | 67 | module_param_array(card, int, NULL, 0444); |
68 | MODULE_PARM_DESC(card, "The type of card"); | 68 | MODULE_PARM_DESC(card, "The type of card"); |
69 | 69 | ||
70 | static int encoder[BUZ_MAX] = { -1, -1, -1, -1 }; | 70 | static int encoder[BUZ_MAX] = { -1, -1, -1, -1 }; |
71 | module_param_array(encoder, int, NULL, 0); | 71 | module_param_array(encoder, int, NULL, 0444); |
72 | MODULE_PARM_DESC(encoder, "i2c TV encoder"); | 72 | MODULE_PARM_DESC(encoder, "i2c TV encoder"); |
73 | 73 | ||
74 | static int decoder[BUZ_MAX] = { -1, -1, -1, -1 }; | 74 | static int decoder[BUZ_MAX] = { -1, -1, -1, -1 }; |
75 | module_param_array(decoder, int, NULL, 0); | 75 | module_param_array(decoder, int, NULL, 0444); |
76 | MODULE_PARM_DESC(decoder, "i2c TV decoder"); | 76 | MODULE_PARM_DESC(decoder, "i2c TV decoder"); |
77 | 77 | ||
78 | /* | 78 | /* |
@@ -84,29 +84,31 @@ MODULE_PARM_DESC(decoder, "i2c TV decoder"); | |||
84 | */ | 84 | */ |
85 | 85 | ||
86 | static unsigned long vidmem = 0; /* Video memory base address */ | 86 | static unsigned long vidmem = 0; /* Video memory base address */ |
87 | module_param(vidmem, ulong, 0); | 87 | module_param(vidmem, ulong, 0444); |
88 | MODULE_PARM_DESC(vidmem, "Default video memory base address"); | ||
88 | 89 | ||
89 | /* | 90 | /* |
90 | Default input and video norm at startup of the driver. | 91 | Default input and video norm at startup of the driver. |
91 | */ | 92 | */ |
92 | 93 | ||
93 | static int default_input = 0; /* 0=Composite, 1=S-Video */ | 94 | static unsigned int default_input = 0; /* 0=Composite, 1=S-Video */ |
94 | module_param(default_input, int, 0); | 95 | module_param(default_input, uint, 0444); |
95 | MODULE_PARM_DESC(default_input, | 96 | MODULE_PARM_DESC(default_input, |
96 | "Default input (0=Composite, 1=S-Video, 2=Internal)"); | 97 | "Default input (0=Composite, 1=S-Video, 2=Internal)"); |
97 | 98 | ||
98 | static int default_mux = 1; /* 6 Eyes input selection */ | 99 | static int default_mux = 1; /* 6 Eyes input selection */ |
99 | module_param(default_mux, int, 0); | 100 | module_param(default_mux, int, 0644); |
100 | MODULE_PARM_DESC(default_mux, | 101 | MODULE_PARM_DESC(default_mux, |
101 | "Default 6 Eyes mux setting (Input selection)"); | 102 | "Default 6 Eyes mux setting (Input selection)"); |
102 | 103 | ||
103 | static int default_norm = 0; /* 0=PAL, 1=NTSC 2=SECAM */ | 104 | static int default_norm = 0; /* 0=PAL, 1=NTSC 2=SECAM */ |
104 | module_param(default_norm, int, 0); | 105 | module_param(default_norm, int, 0444); |
105 | MODULE_PARM_DESC(default_norm, "Default norm (0=PAL, 1=NTSC, 2=SECAM)"); | 106 | MODULE_PARM_DESC(default_norm, "Default norm (0=PAL, 1=NTSC, 2=SECAM)"); |
106 | 107 | ||
107 | static int video_nr = -1; /* /dev/videoN, -1 for autodetect */ | 108 | /* /dev/videoN, -1 for autodetect */ |
108 | module_param(video_nr, int, 0); | 109 | static int video_nr[BUZ_MAX] = {-1, -1, -1, -1}; |
109 | MODULE_PARM_DESC(video_nr, "video device number"); | 110 | module_param_array(video_nr, int, NULL, 0444); |
111 | MODULE_PARM_DESC(video_nr, "video device number (-1=Auto)"); | ||
110 | 112 | ||
111 | /* | 113 | /* |
112 | Number and size of grab buffers for Video 4 Linux | 114 | Number and size of grab buffers for Video 4 Linux |
@@ -127,21 +129,21 @@ MODULE_PARM_DESC(video_nr, "video device number"); | |||
127 | 129 | ||
128 | int v4l_nbufs = 2; | 130 | int v4l_nbufs = 2; |
129 | int v4l_bufsize = 128; /* Everybody should be able to work with this setting */ | 131 | int v4l_bufsize = 128; /* Everybody should be able to work with this setting */ |
130 | module_param(v4l_nbufs, int, 0); | 132 | module_param(v4l_nbufs, int, 0644); |
131 | MODULE_PARM_DESC(v4l_nbufs, "Maximum number of V4L buffers to use"); | 133 | MODULE_PARM_DESC(v4l_nbufs, "Maximum number of V4L buffers to use"); |
132 | module_param(v4l_bufsize, int, 0); | 134 | module_param(v4l_bufsize, int, 0644); |
133 | MODULE_PARM_DESC(v4l_bufsize, "Maximum size per V4L buffer (in kB)"); | 135 | MODULE_PARM_DESC(v4l_bufsize, "Maximum size per V4L buffer (in kB)"); |
134 | 136 | ||
135 | int jpg_nbufs = 32; | 137 | int jpg_nbufs = 32; |
136 | int jpg_bufsize = 512; /* max size for 100% quality full-PAL frame */ | 138 | int jpg_bufsize = 512; /* max size for 100% quality full-PAL frame */ |
137 | module_param(jpg_nbufs, int, 0); | 139 | module_param(jpg_nbufs, int, 0644); |
138 | MODULE_PARM_DESC(jpg_nbufs, "Maximum number of JPG buffers to use"); | 140 | MODULE_PARM_DESC(jpg_nbufs, "Maximum number of JPG buffers to use"); |
139 | module_param(jpg_bufsize, int, 0); | 141 | module_param(jpg_bufsize, int, 0644); |
140 | MODULE_PARM_DESC(jpg_bufsize, "Maximum size per JPG buffer (in kB)"); | 142 | MODULE_PARM_DESC(jpg_bufsize, "Maximum size per JPG buffer (in kB)"); |
141 | 143 | ||
142 | int pass_through = 0; /* 1=Pass through TV signal when device is not used */ | 144 | int pass_through = 0; /* 1=Pass through TV signal when device is not used */ |
143 | /* 0=Show color bar when device is not used (LML33: only if lml33dpath=1) */ | 145 | /* 0=Show color bar when device is not used (LML33: only if lml33dpath=1) */ |
144 | module_param(pass_through, int, 0); | 146 | module_param(pass_through, int, 0644); |
145 | MODULE_PARM_DESC(pass_through, | 147 | MODULE_PARM_DESC(pass_through, |
146 | "Pass TV signal through to TV-out when idling"); | 148 | "Pass TV signal through to TV-out when idling"); |
147 | 149 | ||
@@ -1114,7 +1116,14 @@ zr36057_init (struct zoran *zr) | |||
1114 | zr->timing = zr->card.tvn[zr->norm]; | 1116 | zr->timing = zr->card.tvn[zr->norm]; |
1115 | } | 1117 | } |
1116 | 1118 | ||
1117 | zr->input = default_input = (default_input ? 1 : 0); | 1119 | if (default_input > zr->card.inputs-1) { |
1120 | dprintk(1, | ||
1121 | KERN_WARNING | ||
1122 | "%s: default_input value %d out of range (0-%d)\n", | ||
1123 | ZR_DEVNAME(zr), default_input, zr->card.inputs-1); | ||
1124 | default_input = 0; | ||
1125 | } | ||
1126 | zr->input = default_input; | ||
1118 | 1127 | ||
1119 | /* Should the following be reset at every open ? */ | 1128 | /* Should the following be reset at every open ? */ |
1120 | zr->hue = 32768; | 1129 | zr->hue = 32768; |
@@ -1146,7 +1155,7 @@ zr36057_init (struct zoran *zr) | |||
1146 | */ | 1155 | */ |
1147 | memcpy(zr->video_dev, &zoran_template, sizeof(zoran_template)); | 1156 | memcpy(zr->video_dev, &zoran_template, sizeof(zoran_template)); |
1148 | strcpy(zr->video_dev->name, ZR_DEVNAME(zr)); | 1157 | strcpy(zr->video_dev->name, ZR_DEVNAME(zr)); |
1149 | err = video_register_device(zr->video_dev, VFL_TYPE_GRABBER, video_nr); | 1158 | err = video_register_device(zr->video_dev, VFL_TYPE_GRABBER, video_nr[zr->id]); |
1150 | if (err < 0) | 1159 | if (err < 0) |
1151 | goto exit_unregister; | 1160 | goto exit_unregister; |
1152 | 1161 | ||
diff --git a/drivers/media/video/zoran_device.c b/drivers/media/video/zoran_device.c index dc1ec20fb266..68c7c505587e 100644 --- a/drivers/media/video/zoran_device.c +++ b/drivers/media/video/zoran_device.c | |||
@@ -69,7 +69,7 @@ static int lml33dpath = 0; /* 1 will use digital path in capture | |||
69 | * load on Bt819 input, there will be | 69 | * load on Bt819 input, there will be |
70 | * some image imperfections */ | 70 | * some image imperfections */ |
71 | 71 | ||
72 | module_param(lml33dpath, bool, 0); | 72 | module_param(lml33dpath, bool, 0644); |
73 | MODULE_PARM_DESC(lml33dpath, | 73 | MODULE_PARM_DESC(lml33dpath, |
74 | "Use digital path capture mode (on LML33 cards)"); | 74 | "Use digital path capture mode (on LML33 cards)"); |
75 | 75 | ||
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c index 377bb2d11ffd..4dbe2d449b50 100644 --- a/drivers/media/video/zoran_driver.c +++ b/drivers/media/video/zoran_driver.c | |||
@@ -207,8 +207,8 @@ extern int jpg_bufsize; | |||
207 | extern int pass_through; | 207 | extern int pass_through; |
208 | 208 | ||
209 | static int lock_norm = 0; /* 1=Don't change TV standard (norm) */ | 209 | static int lock_norm = 0; /* 1=Don't change TV standard (norm) */ |
210 | module_param(lock_norm, int, 0); | 210 | module_param(lock_norm, int, 0644); |
211 | MODULE_PARM_DESC(lock_norm, "Users can't change norm"); | 211 | MODULE_PARM_DESC(lock_norm, "Prevent norm changes (1 = ignore, >1 = fail)"); |
212 | 212 | ||
213 | #ifdef CONFIG_VIDEO_V4L2 | 213 | #ifdef CONFIG_VIDEO_V4L2 |
214 | /* small helper function for calculating buffersizes for v4l2 | 214 | /* small helper function for calculating buffersizes for v4l2 |