diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-06-03 04:36:45 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-17 08:35:41 -0400 |
commit | 8d2d41e92d99e25f7d42fc83fc39096d89caa35e (patch) | |
tree | 84406604f751daa5cdd8fb163c26ebc966f659d7 /drivers/media/pci | |
parent | 804be2d4933a44ce76bce3d12b09c5db980523a4 (diff) |
[media] saa7164: replace current_norm by g_std
current_norm is deprecated. Replace it by g_std.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r-- | drivers/media/pci/saa7164/saa7164-encoder.c | 13 | ||||
-rw-r--r-- | drivers/media/pci/saa7164/saa7164-vbi.c | 13 | ||||
-rw-r--r-- | drivers/media/pci/saa7164/saa7164.h | 1 |
3 files changed, 25 insertions, 2 deletions
diff --git a/drivers/media/pci/saa7164/saa7164-encoder.c b/drivers/media/pci/saa7164/saa7164-encoder.c index e4f53a55eab1..7b7ed97b8503 100644 --- a/drivers/media/pci/saa7164/saa7164-encoder.c +++ b/drivers/media/pci/saa7164/saa7164-encoder.c | |||
@@ -228,6 +228,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id id) | |||
228 | return -EINVAL; | 228 | return -EINVAL; |
229 | 229 | ||
230 | port->encodernorm = saa7164_tvnorms[i]; | 230 | port->encodernorm = saa7164_tvnorms[i]; |
231 | port->std = id; | ||
231 | 232 | ||
232 | /* Update the audio decoder while is not running in | 233 | /* Update the audio decoder while is not running in |
233 | * auto detect mode. | 234 | * auto detect mode. |
@@ -239,6 +240,15 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id id) | |||
239 | return 0; | 240 | return 0; |
240 | } | 241 | } |
241 | 242 | ||
243 | static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *id) | ||
244 | { | ||
245 | struct saa7164_encoder_fh *fh = file->private_data; | ||
246 | struct saa7164_port *port = fh->port; | ||
247 | |||
248 | *id = port->std; | ||
249 | return 0; | ||
250 | } | ||
251 | |||
242 | static int vidioc_enum_input(struct file *file, void *priv, | 252 | static int vidioc_enum_input(struct file *file, void *priv, |
243 | struct v4l2_input *i) | 253 | struct v4l2_input *i) |
244 | { | 254 | { |
@@ -1290,6 +1300,7 @@ static const struct v4l2_file_operations mpeg_fops = { | |||
1290 | 1300 | ||
1291 | static const struct v4l2_ioctl_ops mpeg_ioctl_ops = { | 1301 | static const struct v4l2_ioctl_ops mpeg_ioctl_ops = { |
1292 | .vidioc_s_std = vidioc_s_std, | 1302 | .vidioc_s_std = vidioc_s_std, |
1303 | .vidioc_g_std = vidioc_g_std, | ||
1293 | .vidioc_enum_input = vidioc_enum_input, | 1304 | .vidioc_enum_input = vidioc_enum_input, |
1294 | .vidioc_g_input = vidioc_g_input, | 1305 | .vidioc_g_input = vidioc_g_input, |
1295 | .vidioc_s_input = vidioc_s_input, | 1306 | .vidioc_s_input = vidioc_s_input, |
@@ -1316,7 +1327,6 @@ static struct video_device saa7164_mpeg_template = { | |||
1316 | .ioctl_ops = &mpeg_ioctl_ops, | 1327 | .ioctl_ops = &mpeg_ioctl_ops, |
1317 | .minor = -1, | 1328 | .minor = -1, |
1318 | .tvnorms = SAA7164_NORMS, | 1329 | .tvnorms = SAA7164_NORMS, |
1319 | .current_norm = V4L2_STD_NTSC_M, | ||
1320 | }; | 1330 | }; |
1321 | 1331 | ||
1322 | static struct video_device *saa7164_encoder_alloc( | 1332 | static struct video_device *saa7164_encoder_alloc( |
@@ -1383,6 +1393,7 @@ int saa7164_encoder_register(struct saa7164_port *port) | |||
1383 | port->encoder_params.ctl_aspect = V4L2_MPEG_VIDEO_ASPECT_4x3; | 1393 | port->encoder_params.ctl_aspect = V4L2_MPEG_VIDEO_ASPECT_4x3; |
1384 | port->encoder_params.refdist = 1; | 1394 | port->encoder_params.refdist = 1; |
1385 | port->encoder_params.gop_size = SAA7164_ENCODER_DEFAULT_GOP_SIZE; | 1395 | port->encoder_params.gop_size = SAA7164_ENCODER_DEFAULT_GOP_SIZE; |
1396 | port->std = V4L2_STD_NTSC_M; | ||
1386 | 1397 | ||
1387 | if (port->encodernorm.id & V4L2_STD_525_60) | 1398 | if (port->encodernorm.id & V4L2_STD_525_60) |
1388 | port->height = 480; | 1399 | port->height = 480; |
diff --git a/drivers/media/pci/saa7164/saa7164-vbi.c b/drivers/media/pci/saa7164/saa7164-vbi.c index 5a1a69b3dd15..552c01ad9f63 100644 --- a/drivers/media/pci/saa7164/saa7164-vbi.c +++ b/drivers/media/pci/saa7164/saa7164-vbi.c | |||
@@ -200,6 +200,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id id) | |||
200 | return -EINVAL; | 200 | return -EINVAL; |
201 | 201 | ||
202 | port->encodernorm = saa7164_tvnorms[i]; | 202 | port->encodernorm = saa7164_tvnorms[i]; |
203 | port->std = id; | ||
203 | 204 | ||
204 | /* Update the audio decoder while is not running in | 205 | /* Update the audio decoder while is not running in |
205 | * auto detect mode. | 206 | * auto detect mode. |
@@ -211,6 +212,15 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id id) | |||
211 | return 0; | 212 | return 0; |
212 | } | 213 | } |
213 | 214 | ||
215 | static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *id) | ||
216 | { | ||
217 | struct saa7164_encoder_fh *fh = file->private_data; | ||
218 | struct saa7164_port *port = fh->port; | ||
219 | |||
220 | *id = port->std; | ||
221 | return 0; | ||
222 | } | ||
223 | |||
214 | static int vidioc_enum_input(struct file *file, void *priv, | 224 | static int vidioc_enum_input(struct file *file, void *priv, |
215 | struct v4l2_input *i) | 225 | struct v4l2_input *i) |
216 | { | 226 | { |
@@ -1236,6 +1246,7 @@ static const struct v4l2_file_operations vbi_fops = { | |||
1236 | 1246 | ||
1237 | static const struct v4l2_ioctl_ops vbi_ioctl_ops = { | 1247 | static const struct v4l2_ioctl_ops vbi_ioctl_ops = { |
1238 | .vidioc_s_std = vidioc_s_std, | 1248 | .vidioc_s_std = vidioc_s_std, |
1249 | .vidioc_g_std = vidioc_g_std, | ||
1239 | .vidioc_enum_input = vidioc_enum_input, | 1250 | .vidioc_enum_input = vidioc_enum_input, |
1240 | .vidioc_g_input = vidioc_g_input, | 1251 | .vidioc_g_input = vidioc_g_input, |
1241 | .vidioc_s_input = vidioc_s_input, | 1252 | .vidioc_s_input = vidioc_s_input, |
@@ -1265,7 +1276,6 @@ static struct video_device saa7164_vbi_template = { | |||
1265 | .ioctl_ops = &vbi_ioctl_ops, | 1276 | .ioctl_ops = &vbi_ioctl_ops, |
1266 | .minor = -1, | 1277 | .minor = -1, |
1267 | .tvnorms = SAA7164_NORMS, | 1278 | .tvnorms = SAA7164_NORMS, |
1268 | .current_norm = V4L2_STD_NTSC_M, | ||
1269 | }; | 1279 | }; |
1270 | 1280 | ||
1271 | static struct video_device *saa7164_vbi_alloc( | 1281 | static struct video_device *saa7164_vbi_alloc( |
@@ -1324,6 +1334,7 @@ int saa7164_vbi_register(struct saa7164_port *port) | |||
1324 | goto failed; | 1334 | goto failed; |
1325 | } | 1335 | } |
1326 | 1336 | ||
1337 | port->std = V4L2_STD_NTSC_M; | ||
1327 | video_set_drvdata(port->v4l_device, port); | 1338 | video_set_drvdata(port->v4l_device, port); |
1328 | result = video_register_device(port->v4l_device, | 1339 | result = video_register_device(port->v4l_device, |
1329 | VFL_TYPE_VBI, -1); | 1340 | VFL_TYPE_VBI, -1); |
diff --git a/drivers/media/pci/saa7164/saa7164.h b/drivers/media/pci/saa7164/saa7164.h index 8d9c7e692242..2df47ea28289 100644 --- a/drivers/media/pci/saa7164/saa7164.h +++ b/drivers/media/pci/saa7164/saa7164.h | |||
@@ -375,6 +375,7 @@ struct saa7164_port { | |||
375 | /* Encoder */ | 375 | /* Encoder */ |
376 | /* Defaults established in saa7164-encoder.c */ | 376 | /* Defaults established in saa7164-encoder.c */ |
377 | struct saa7164_tvnorm encodernorm; | 377 | struct saa7164_tvnorm encodernorm; |
378 | v4l2_std_id std; | ||
378 | u32 height; | 379 | u32 height; |
379 | u32 width; | 380 | u32 width; |
380 | u32 freq; | 381 | u32 freq; |