aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ks0127.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/ks0127.c')
-rw-r--r--drivers/media/video/ks0127.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/media/video/ks0127.c b/drivers/media/video/ks0127.c
index 841024b6bcdf..fab8e0254bbc 100644
--- a/drivers/media/video/ks0127.c
+++ b/drivers/media/video/ks0127.c
@@ -409,11 +409,12 @@ static void ks0127_init(struct v4l2_subdev *sd)
409 } 409 }
410} 410}
411 411
412static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route) 412static int ks0127_s_routing(struct v4l2_subdev *sd,
413 u32 input, u32 output, u32 config)
413{ 414{
414 struct ks0127 *ks = to_ks0127(sd); 415 struct ks0127 *ks = to_ks0127(sd);
415 416
416 switch (route->input) { 417 switch (input) {
417 case KS_INPUT_COMPOSITE_1: 418 case KS_INPUT_COMPOSITE_1:
418 case KS_INPUT_COMPOSITE_2: 419 case KS_INPUT_COMPOSITE_2:
419 case KS_INPUT_COMPOSITE_3: 420 case KS_INPUT_COMPOSITE_3:
@@ -421,13 +422,13 @@ static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r
421 case KS_INPUT_COMPOSITE_5: 422 case KS_INPUT_COMPOSITE_5:
422 case KS_INPUT_COMPOSITE_6: 423 case KS_INPUT_COMPOSITE_6:
423 v4l2_dbg(1, debug, sd, 424 v4l2_dbg(1, debug, sd,
424 "s_routing %d: Composite\n", route->input); 425 "s_routing %d: Composite\n", input);
425 /* autodetect 50/60 Hz */ 426 /* autodetect 50/60 Hz */
426 ks0127_and_or(sd, KS_CMDA, 0xfc, 0x00); 427 ks0127_and_or(sd, KS_CMDA, 0xfc, 0x00);
427 /* VSE=0 */ 428 /* VSE=0 */
428 ks0127_and_or(sd, KS_CMDA, ~0x40, 0x00); 429 ks0127_and_or(sd, KS_CMDA, ~0x40, 0x00);
429 /* set input line */ 430 /* set input line */
430 ks0127_and_or(sd, KS_CMDB, 0xb0, route->input); 431 ks0127_and_or(sd, KS_CMDB, 0xb0, input);
431 /* non-freerunning mode */ 432 /* non-freerunning mode */
432 ks0127_and_or(sd, KS_CMDC, 0x70, 0x0a); 433 ks0127_and_or(sd, KS_CMDC, 0x70, 0x0a);
433 /* analog input */ 434 /* analog input */
@@ -455,13 +456,13 @@ static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r
455 case KS_INPUT_SVIDEO_2: 456 case KS_INPUT_SVIDEO_2:
456 case KS_INPUT_SVIDEO_3: 457 case KS_INPUT_SVIDEO_3:
457 v4l2_dbg(1, debug, sd, 458 v4l2_dbg(1, debug, sd,
458 "s_routing %d: S-Video\n", route->input); 459 "s_routing %d: S-Video\n", input);
459 /* autodetect 50/60 Hz */ 460 /* autodetect 50/60 Hz */
460 ks0127_and_or(sd, KS_CMDA, 0xfc, 0x00); 461 ks0127_and_or(sd, KS_CMDA, 0xfc, 0x00);
461 /* VSE=0 */ 462 /* VSE=0 */
462 ks0127_and_or(sd, KS_CMDA, ~0x40, 0x00); 463 ks0127_and_or(sd, KS_CMDA, ~0x40, 0x00);
463 /* set input line */ 464 /* set input line */
464 ks0127_and_or(sd, KS_CMDB, 0xb0, route->input); 465 ks0127_and_or(sd, KS_CMDB, 0xb0, input);
465 /* non-freerunning mode */ 466 /* non-freerunning mode */
466 ks0127_and_or(sd, KS_CMDC, 0x70, 0x0a); 467 ks0127_and_or(sd, KS_CMDC, 0x70, 0x0a);
467 /* analog input */ 468 /* analog input */
@@ -496,7 +497,7 @@ static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r
496 497
497 ks0127_and_or(sd, KS_CMDA, 0xff, 0x40); /* VSE=1 */ 498 ks0127_and_or(sd, KS_CMDA, 0xff, 0x40); /* VSE=1 */
498 /* set input line and VALIGN */ 499 /* set input line and VALIGN */
499 ks0127_and_or(sd, KS_CMDB, 0xb0, (route->input | 0x40)); 500 ks0127_and_or(sd, KS_CMDB, 0xb0, (input | 0x40));
500 /* freerunning mode, */ 501 /* freerunning mode, */
501 /* TSTGEN = 1 TSTGFR=11 TSTGPH=0 TSTGPK=0 VMEM=1*/ 502 /* TSTGEN = 1 TSTGFR=11 TSTGPH=0 TSTGPK=0 VMEM=1*/
502 ks0127_and_or(sd, KS_CMDC, 0x70, 0x87); 503 ks0127_and_or(sd, KS_CMDC, 0x70, 0x87);
@@ -531,7 +532,7 @@ static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r
531 532
532 default: 533 default:
533 v4l2_dbg(1, debug, sd, 534 v4l2_dbg(1, debug, sd,
534 "s_routing: Unknown input %d\n", route->input); 535 "s_routing: Unknown input %d\n", input);
535 break; 536 break;
536 } 537 }
537 538
@@ -648,9 +649,6 @@ static int ks0127_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_iden
648 649
649static const struct v4l2_subdev_core_ops ks0127_core_ops = { 650static const struct v4l2_subdev_core_ops ks0127_core_ops = {
650 .g_chip_ident = ks0127_g_chip_ident, 651 .g_chip_ident = ks0127_g_chip_ident,
651};
652
653static const struct v4l2_subdev_tuner_ops ks0127_tuner_ops = {
654 .s_std = ks0127_s_std, 652 .s_std = ks0127_s_std,
655}; 653};
656 654
@@ -663,7 +661,6 @@ static const struct v4l2_subdev_video_ops ks0127_video_ops = {
663 661
664static const struct v4l2_subdev_ops ks0127_ops = { 662static const struct v4l2_subdev_ops ks0127_ops = {
665 .core = &ks0127_core_ops, 663 .core = &ks0127_core_ops,
666 .tuner = &ks0127_tuner_ops,
667 .video = &ks0127_video_ops, 664 .video = &ks0127_video_ops,
668}; 665};
669 666