diff options
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-video.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 471b92793c12..3b9ffb4b648a 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -560,15 +560,8 @@ void set_tvnorm(struct saa7134_dev *dev, struct saa7134_tvnorm *norm) | |||
560 | 560 | ||
561 | dev->crop_current = dev->crop_defrect; | 561 | dev->crop_current = dev->crop_defrect; |
562 | 562 | ||
563 | saa7134_set_decoder(dev); | 563 | saa7134_set_tvnorm_hw(dev); |
564 | 564 | ||
565 | if (card_in(dev, dev->ctl_input).tv) { | ||
566 | if ((card(dev).tuner_type == TUNER_PHILIPS_TDA8290) | ||
567 | && ((card(dev).tuner_config == 1) | ||
568 | || (card(dev).tuner_config == 2))) | ||
569 | saa7134_set_gpio(dev, 22, 5); | ||
570 | saa7134_i2c_call_clients(dev, VIDIOC_S_STD, &norm->id); | ||
571 | } | ||
572 | } | 565 | } |
573 | 566 | ||
574 | static void video_mux(struct saa7134_dev *dev, int input) | 567 | static void video_mux(struct saa7134_dev *dev, int input) |
@@ -579,7 +572,8 @@ static void video_mux(struct saa7134_dev *dev, int input) | |||
579 | saa7134_tvaudio_setinput(dev, &card_in(dev, input)); | 572 | saa7134_tvaudio_setinput(dev, &card_in(dev, input)); |
580 | } | 573 | } |
581 | 574 | ||
582 | void saa7134_set_decoder(struct saa7134_dev *dev) | 575 | |
576 | static void saa7134_set_decoder(struct saa7134_dev *dev) | ||
583 | { | 577 | { |
584 | int luma_control, sync_control, mux; | 578 | int luma_control, sync_control, mux; |
585 | 579 | ||
@@ -630,6 +624,19 @@ void saa7134_set_decoder(struct saa7134_dev *dev) | |||
630 | saa_writeb(SAA7134_RAW_DATA_OFFSET, 0x80); | 624 | saa_writeb(SAA7134_RAW_DATA_OFFSET, 0x80); |
631 | } | 625 | } |
632 | 626 | ||
627 | void saa7134_set_tvnorm_hw(struct saa7134_dev *dev) | ||
628 | { | ||
629 | saa7134_set_decoder(dev); | ||
630 | |||
631 | if (card_in(dev, dev->ctl_input).tv) { | ||
632 | if ((card(dev).tuner_type == TUNER_PHILIPS_TDA8290) | ||
633 | && ((card(dev).tuner_config == 1) | ||
634 | || (card(dev).tuner_config == 2))) | ||
635 | saa7134_set_gpio(dev, 22, 5); | ||
636 | saa7134_i2c_call_clients(dev, VIDIOC_S_STD, &dev->tvnorm->id); | ||
637 | } | ||
638 | } | ||
639 | |||
633 | static void set_h_prescale(struct saa7134_dev *dev, int task, int prescale) | 640 | static void set_h_prescale(struct saa7134_dev *dev, int task, int prescale) |
634 | { | 641 | { |
635 | static const struct { | 642 | static const struct { |
@@ -2352,7 +2359,6 @@ struct video_device saa7134_video_template = | |||
2352 | .name = "saa7134-video", | 2359 | .name = "saa7134-video", |
2353 | .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER| | 2360 | .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER| |
2354 | VID_TYPE_CLIPPING|VID_TYPE_SCALES, | 2361 | VID_TYPE_CLIPPING|VID_TYPE_SCALES, |
2355 | .hardware = 0, | ||
2356 | .fops = &video_fops, | 2362 | .fops = &video_fops, |
2357 | .minor = -1, | 2363 | .minor = -1, |
2358 | }; | 2364 | }; |
@@ -2361,7 +2367,6 @@ struct video_device saa7134_vbi_template = | |||
2361 | { | 2367 | { |
2362 | .name = "saa7134-vbi", | 2368 | .name = "saa7134-vbi", |
2363 | .type = VID_TYPE_TUNER|VID_TYPE_TELETEXT, | 2369 | .type = VID_TYPE_TUNER|VID_TYPE_TELETEXT, |
2364 | .hardware = 0, | ||
2365 | .fops = &video_fops, | 2370 | .fops = &video_fops, |
2366 | .minor = -1, | 2371 | .minor = -1, |
2367 | }; | 2372 | }; |
@@ -2370,7 +2375,6 @@ struct video_device saa7134_radio_template = | |||
2370 | { | 2375 | { |
2371 | .name = "saa7134-radio", | 2376 | .name = "saa7134-radio", |
2372 | .type = VID_TYPE_TUNER, | 2377 | .type = VID_TYPE_TUNER, |
2373 | .hardware = 0, | ||
2374 | .fops = &radio_fops, | 2378 | .fops = &radio_fops, |
2375 | .minor = -1, | 2379 | .minor = -1, |
2376 | }; | 2380 | }; |