diff options
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 29 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-video.c | 5 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 2 |
3 files changed, 10 insertions, 26 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index 368a766eb802..2159d0160df2 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -78,7 +78,6 @@ struct em28xx_board em28xx_boards[] = { | |||
78 | .is_em2800 = 1, | 78 | .is_em2800 = 1, |
79 | .vchannels = 2, | 79 | .vchannels = 2, |
80 | .tda9887_conf = TDA9887_PRESENT, | 80 | .tda9887_conf = TDA9887_PRESENT, |
81 | .has_tuner = 1, | ||
82 | .decoder = EM28XX_SAA7113, | 81 | .decoder = EM28XX_SAA7113, |
83 | .input = { { | 82 | .input = { { |
84 | .type = EM28XX_VMUX_COMPOSITE1, | 83 | .type = EM28XX_VMUX_COMPOSITE1, |
@@ -93,13 +92,14 @@ struct em28xx_board em28xx_boards[] = { | |||
93 | [EM2820_BOARD_UNKNOWN] = { | 92 | [EM2820_BOARD_UNKNOWN] = { |
94 | .name = "Unknown EM2750/28xx video grabber", | 93 | .name = "Unknown EM2750/28xx video grabber", |
95 | .is_em2800 = 0, | 94 | .is_em2800 = 0, |
95 | .tuner_type = TUNER_ABSENT, | ||
96 | }, | 96 | }, |
97 | [EM2820_BOARD_KWORLD_PVRTV2800RF] = { | 97 | [EM2820_BOARD_KWORLD_PVRTV2800RF] = { |
98 | .name = "Kworld PVR TV 2800 RF", | 98 | .name = "Kworld PVR TV 2800 RF", |
99 | .is_em2800 = 0, | 99 | .is_em2800 = 0, |
100 | .vchannels = 2, | 100 | .vchannels = 2, |
101 | .tuner_type = TUNER_TEMIC_PAL, | ||
101 | .tda9887_conf = TDA9887_PRESENT, | 102 | .tda9887_conf = TDA9887_PRESENT, |
102 | .has_tuner = 1, | ||
103 | .decoder = EM28XX_SAA7113, | 103 | .decoder = EM28XX_SAA7113, |
104 | .input = { { | 104 | .input = { { |
105 | .type = EM28XX_VMUX_COMPOSITE1, | 105 | .type = EM28XX_VMUX_COMPOSITE1, |
@@ -116,7 +116,6 @@ struct em28xx_board em28xx_boards[] = { | |||
116 | .vchannels = 3, | 116 | .vchannels = 3, |
117 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, | 117 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
118 | .tda9887_conf = TDA9887_PRESENT, | 118 | .tda9887_conf = TDA9887_PRESENT, |
119 | .has_tuner = 1, | ||
120 | .decoder = EM28XX_SAA7113, | 119 | .decoder = EM28XX_SAA7113, |
121 | .input = { { | 120 | .input = { { |
122 | .type = EM28XX_VMUX_TELEVISION, | 121 | .type = EM28XX_VMUX_TELEVISION, |
@@ -137,7 +136,6 @@ struct em28xx_board em28xx_boards[] = { | |||
137 | .vchannels = 3, | 136 | .vchannels = 3, |
138 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, | 137 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
139 | .tda9887_conf = TDA9887_PRESENT, | 138 | .tda9887_conf = TDA9887_PRESENT, |
140 | .has_tuner = 1, | ||
141 | .decoder = EM28XX_SAA7113, | 139 | .decoder = EM28XX_SAA7113, |
142 | .input = { { | 140 | .input = { { |
143 | .type = EM28XX_VMUX_TELEVISION, | 141 | .type = EM28XX_VMUX_TELEVISION, |
@@ -160,7 +158,6 @@ struct em28xx_board em28xx_boards[] = { | |||
160 | .tda9887_conf = TDA9887_PRESENT | | 158 | .tda9887_conf = TDA9887_PRESENT | |
161 | TDA9887_PORT1_ACTIVE| | 159 | TDA9887_PORT1_ACTIVE| |
162 | TDA9887_PORT2_ACTIVE, | 160 | TDA9887_PORT2_ACTIVE, |
163 | .has_tuner = 1, | ||
164 | .decoder = EM28XX_TVP5150, | 161 | .decoder = EM28XX_TVP5150, |
165 | .has_msp34xx = 1, | 162 | .has_msp34xx = 1, |
166 | /*FIXME: S-Video not tested */ | 163 | /*FIXME: S-Video not tested */ |
@@ -180,7 +177,6 @@ struct em28xx_board em28xx_boards[] = { | |||
180 | .vchannels = 3, | 177 | .vchannels = 3, |
181 | .tda9887_conf = TDA9887_PRESENT, | 178 | .tda9887_conf = TDA9887_PRESENT, |
182 | .tuner_type = TUNER_XC2028, | 179 | .tuner_type = TUNER_XC2028, |
183 | .has_tuner = 1, | ||
184 | .mts_firmware = 1, | 180 | .mts_firmware = 1, |
185 | .decoder = EM28XX_TVP5150, | 181 | .decoder = EM28XX_TVP5150, |
186 | .input = { { | 182 | .input = { { |
@@ -202,7 +198,6 @@ struct em28xx_board em28xx_boards[] = { | |||
202 | .vchannels = 3, | 198 | .vchannels = 3, |
203 | .tda9887_conf = TDA9887_PRESENT, | 199 | .tda9887_conf = TDA9887_PRESENT, |
204 | .tuner_type = TUNER_XC2028, | 200 | .tuner_type = TUNER_XC2028, |
205 | .has_tuner = 1, | ||
206 | .mts_firmware = 1, | 201 | .mts_firmware = 1, |
207 | .has_12mhz_i2s = 1, | 202 | .has_12mhz_i2s = 1, |
208 | .decoder = EM28XX_TVP5150, | 203 | .decoder = EM28XX_TVP5150, |
@@ -227,7 +222,6 @@ struct em28xx_board em28xx_boards[] = { | |||
227 | .name = "Terratec Hybrid XS", | 222 | .name = "Terratec Hybrid XS", |
228 | .vchannels = 3, | 223 | .vchannels = 3, |
229 | .tda9887_conf = TDA9887_PRESENT, | 224 | .tda9887_conf = TDA9887_PRESENT, |
230 | .has_tuner = 1, | ||
231 | .tuner_type = TUNER_XC2028, | 225 | .tuner_type = TUNER_XC2028, |
232 | .decoder = EM28XX_TVP5150, | 226 | .decoder = EM28XX_TVP5150, |
233 | .input = { { | 227 | .input = { { |
@@ -251,7 +245,6 @@ struct em28xx_board em28xx_boards[] = { | |||
251 | .name = "Terratec Prodigy XS", | 245 | .name = "Terratec Prodigy XS", |
252 | .vchannels = 3, | 246 | .vchannels = 3, |
253 | .tda9887_conf = TDA9887_PRESENT, | 247 | .tda9887_conf = TDA9887_PRESENT, |
254 | .has_tuner = 1, | ||
255 | .tuner_type = TUNER_XC2028, | 248 | .tuner_type = TUNER_XC2028, |
256 | .decoder = EM28XX_TVP5150, | 249 | .decoder = EM28XX_TVP5150, |
257 | .input = { { | 250 | .input = { { |
@@ -275,7 +268,6 @@ struct em28xx_board em28xx_boards[] = { | |||
275 | .tda9887_conf = TDA9887_PRESENT | | 268 | .tda9887_conf = TDA9887_PRESENT | |
276 | TDA9887_PORT1_ACTIVE | | 269 | TDA9887_PORT1_ACTIVE | |
277 | TDA9887_PORT2_ACTIVE, | 270 | TDA9887_PORT2_ACTIVE, |
278 | .has_tuner = 1, | ||
279 | .max_range_640_480 = 1, | 271 | .max_range_640_480 = 1, |
280 | 272 | ||
281 | .decoder = EM28XX_SAA7114, | 273 | .decoder = EM28XX_SAA7114, |
@@ -299,7 +291,6 @@ struct em28xx_board em28xx_boards[] = { | |||
299 | .vchannels = 3, | 291 | .vchannels = 3, |
300 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, | 292 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
301 | .tda9887_conf = TDA9887_PRESENT, | 293 | .tda9887_conf = TDA9887_PRESENT, |
302 | .has_tuner = 1, | ||
303 | .decoder = EM28XX_SAA7113, | 294 | .decoder = EM28XX_SAA7113, |
304 | .input = { { | 295 | .input = { { |
305 | .type = EM28XX_VMUX_TELEVISION, | 296 | .type = EM28XX_VMUX_TELEVISION, |
@@ -321,7 +312,6 @@ struct em28xx_board em28xx_boards[] = { | |||
321 | .vchannels = 3, | 312 | .vchannels = 3, |
322 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, | 313 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
323 | .tda9887_conf = TDA9887_PRESENT, | 314 | .tda9887_conf = TDA9887_PRESENT, |
324 | .has_tuner = 1, | ||
325 | .decoder = EM28XX_SAA7113, | 315 | .decoder = EM28XX_SAA7113, |
326 | .input = { { | 316 | .input = { { |
327 | .type = EM28XX_VMUX_TELEVISION, | 317 | .type = EM28XX_VMUX_TELEVISION, |
@@ -343,7 +333,6 @@ struct em28xx_board em28xx_boards[] = { | |||
343 | .vchannels = 3, | 333 | .vchannels = 3, |
344 | .tuner_type = TUNER_PHILIPS_ATSC, | 334 | .tuner_type = TUNER_PHILIPS_ATSC, |
345 | .tda9887_conf = TDA9887_PRESENT, | 335 | .tda9887_conf = TDA9887_PRESENT, |
346 | .has_tuner = 1, | ||
347 | .decoder = EM28XX_SAA7113, | 336 | .decoder = EM28XX_SAA7113, |
348 | .input = { { | 337 | .input = { { |
349 | .type = EM28XX_VMUX_TELEVISION, | 338 | .type = EM28XX_VMUX_TELEVISION, |
@@ -362,7 +351,7 @@ struct em28xx_board em28xx_boards[] = { | |||
362 | [EM2820_BOARD_PINNACLE_DVC_90] = { | 351 | [EM2820_BOARD_PINNACLE_DVC_90] = { |
363 | .name = "Pinnacle Dazzle DVC 90/DVC 100", | 352 | .name = "Pinnacle Dazzle DVC 90/DVC 100", |
364 | .vchannels = 3, | 353 | .vchannels = 3, |
365 | .has_tuner = 0, | 354 | .tuner_type = TUNER_ABSENT, |
366 | .decoder = EM28XX_SAA7113, | 355 | .decoder = EM28XX_SAA7113, |
367 | .input = { { | 356 | .input = { { |
368 | .type = EM28XX_VMUX_COMPOSITE1, | 357 | .type = EM28XX_VMUX_COMPOSITE1, |
@@ -380,7 +369,6 @@ struct em28xx_board em28xx_boards[] = { | |||
380 | .vchannels = 3, | 369 | .vchannels = 3, |
381 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, | 370 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
382 | .tda9887_conf = TDA9887_PRESENT, | 371 | .tda9887_conf = TDA9887_PRESENT, |
383 | .has_tuner = 1, | ||
384 | .decoder = EM28XX_SAA7113, | 372 | .decoder = EM28XX_SAA7113, |
385 | .input = { { | 373 | .input = { { |
386 | .type = EM28XX_VMUX_TELEVISION, | 374 | .type = EM28XX_VMUX_TELEVISION, |
@@ -400,7 +388,7 @@ struct em28xx_board em28xx_boards[] = { | |||
400 | .name = "Pixelview Prolink PlayTV USB 2.0", | 388 | .name = "Pixelview Prolink PlayTV USB 2.0", |
401 | .vchannels = 3, | 389 | .vchannels = 3, |
402 | .tda9887_conf = TDA9887_PRESENT, | 390 | .tda9887_conf = TDA9887_PRESENT, |
403 | .has_tuner = 1, | 391 | .tuner_type = TUNER_YMEC_TVF_5533MF, |
404 | .decoder = EM28XX_SAA7113, | 392 | .decoder = EM28XX_SAA7113, |
405 | .input = { { | 393 | .input = { { |
406 | .type = EM28XX_VMUX_TELEVISION, | 394 | .type = EM28XX_VMUX_TELEVISION, |
@@ -551,7 +539,7 @@ static void em28xx_config_tuner(struct em28xx *dev) | |||
551 | struct tuner_setup tun_setup; | 539 | struct tuner_setup tun_setup; |
552 | struct v4l2_frequency f; | 540 | struct v4l2_frequency f; |
553 | 541 | ||
554 | if (!dev->has_tuner) | 542 | if (dev->tuner_type == TUNER_ABSENT) |
555 | return; | 543 | return; |
556 | 544 | ||
557 | tun_setup.mode_mask = T_ANALOG_TV | T_RADIO; | 545 | tun_setup.mode_mask = T_ANALOG_TV | T_RADIO; |
@@ -668,7 +656,6 @@ static int em28xx_hint_board(struct em28xx *dev) | |||
668 | static void em28xx_set_model(struct em28xx *dev) | 656 | static void em28xx_set_model(struct em28xx *dev) |
669 | { | 657 | { |
670 | dev->is_em2800 = em28xx_boards[dev->model].is_em2800; | 658 | dev->is_em2800 = em28xx_boards[dev->model].is_em2800; |
671 | dev->has_tuner = em28xx_boards[dev->model].has_tuner; | ||
672 | dev->has_msp34xx = em28xx_boards[dev->model].has_msp34xx; | 659 | dev->has_msp34xx = em28xx_boards[dev->model].has_msp34xx; |
673 | dev->tda9887_conf = em28xx_boards[dev->model].tda9887_conf; | 660 | dev->tda9887_conf = em28xx_boards[dev->model].tda9887_conf; |
674 | dev->decoder = em28xx_boards[dev->model].decoder; | 661 | dev->decoder = em28xx_boards[dev->model].decoder; |
@@ -676,9 +663,6 @@ static void em28xx_set_model(struct em28xx *dev) | |||
676 | dev->analog_gpio = em28xx_boards[dev->model].analog_gpio; | 663 | dev->analog_gpio = em28xx_boards[dev->model].analog_gpio; |
677 | dev->has_12mhz_i2s = em28xx_boards[dev->model].has_12mhz_i2s; | 664 | dev->has_12mhz_i2s = em28xx_boards[dev->model].has_12mhz_i2s; |
678 | dev->max_range_640_480 = em28xx_boards[dev->model].max_range_640_480; | 665 | dev->max_range_640_480 = em28xx_boards[dev->model].max_range_640_480; |
679 | |||
680 | if (!em28xx_boards[dev->model].has_tuner) | ||
681 | dev->tuner_type = UNSET; | ||
682 | } | 666 | } |
683 | 667 | ||
684 | /* ----------------------------------------------------------------------- */ | 668 | /* ----------------------------------------------------------------------- */ |
@@ -745,6 +729,7 @@ void em28xx_card_setup(struct em28xx *dev) | |||
745 | tveeprom_hauppauge_analog(&dev->i2c_client, &tv, dev->eedata); | 729 | tveeprom_hauppauge_analog(&dev->i2c_client, &tv, dev->eedata); |
746 | 730 | ||
747 | dev->tuner_type = tv.tuner_type; | 731 | dev->tuner_type = tv.tuner_type; |
732 | |||
748 | if (tv.audio_processor == AUDIO_CHIP_MSP34XX) { | 733 | if (tv.audio_processor == AUDIO_CHIP_MSP34XX) { |
749 | dev->i2s_speed = 2048000; | 734 | dev->i2s_speed = 2048000; |
750 | dev->has_msp34xx = 1; | 735 | dev->has_msp34xx = 1; |
@@ -777,7 +762,7 @@ void em28xx_card_setup(struct em28xx *dev) | |||
777 | request_module("saa7115"); | 762 | request_module("saa7115"); |
778 | if (dev->decoder == EM28XX_TVP5150) | 763 | if (dev->decoder == EM28XX_TVP5150) |
779 | request_module("tvp5150"); | 764 | request_module("tvp5150"); |
780 | if (dev->has_tuner) | 765 | if (dev->tuner_type != TUNER_ABSENT) |
781 | request_module("tuner"); | 766 | request_module("tuner"); |
782 | #endif | 767 | #endif |
783 | 768 | ||
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index de95ca874241..a0c334672488 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include "em28xx.h" | 38 | #include "em28xx.h" |
39 | #include <media/v4l2-common.h> | 39 | #include <media/v4l2-common.h> |
40 | #include <media/msp3400.h> | 40 | #include <media/msp3400.h> |
41 | #include <media/tuner.h> | ||
41 | 42 | ||
42 | #define DRIVER_AUTHOR "Ludovico Cavedon <cavedon@sssup.it>, " \ | 43 | #define DRIVER_AUTHOR "Ludovico Cavedon <cavedon@sssup.it>, " \ |
43 | "Markus Rechberger <mrechberger@gmail.com>, " \ | 44 | "Markus Rechberger <mrechberger@gmail.com>, " \ |
@@ -928,7 +929,7 @@ static int vidioc_querycap(struct file *file, void *priv, | |||
928 | V4L2_CAP_AUDIO | | 929 | V4L2_CAP_AUDIO | |
929 | V4L2_CAP_READWRITE | V4L2_CAP_STREAMING; | 930 | V4L2_CAP_READWRITE | V4L2_CAP_STREAMING; |
930 | 931 | ||
931 | if (dev->has_tuner) | 932 | if (dev->tuner_type != TUNER_ABSENT) |
932 | cap->capabilities |= V4L2_CAP_TUNER; | 933 | cap->capabilities |= V4L2_CAP_TUNER; |
933 | 934 | ||
934 | return 0; | 935 | return 0; |
@@ -1900,7 +1901,7 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev, | |||
1900 | em28xx_errdev("cannot allocate video_device.\n"); | 1901 | em28xx_errdev("cannot allocate video_device.\n"); |
1901 | goto fail_unreg; | 1902 | goto fail_unreg; |
1902 | } | 1903 | } |
1903 | if (dev->has_tuner) | 1904 | if (dev->tuner_type != TUNER_ABSENT) |
1904 | dev->vdev->type |= VID_TYPE_TUNER; | 1905 | dev->vdev->type |= VID_TYPE_TUNER; |
1905 | 1906 | ||
1906 | /* register v4l2 video video_device */ | 1907 | /* register v4l2 video video_device */ |
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 3ef80d8b566e..f3bad0c1c517 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -161,7 +161,6 @@ struct em28xx_board { | |||
161 | unsigned int tda9887_conf; | 161 | unsigned int tda9887_conf; |
162 | 162 | ||
163 | unsigned int is_em2800:1; | 163 | unsigned int is_em2800:1; |
164 | unsigned int has_tuner:1; | ||
165 | unsigned int has_msp34xx:1; | 164 | unsigned int has_msp34xx:1; |
166 | unsigned int mts_firmware:1; | 165 | unsigned int mts_firmware:1; |
167 | unsigned int has_12mhz_i2s:1; | 166 | unsigned int has_12mhz_i2s:1; |
@@ -226,7 +225,6 @@ struct em28xx { | |||
226 | int devno; /* marks the number of this device */ | 225 | int devno; /* marks the number of this device */ |
227 | unsigned int analog_gpio; | 226 | unsigned int analog_gpio; |
228 | unsigned int is_em2800:1; | 227 | unsigned int is_em2800:1; |
229 | unsigned int has_tuner:1; | ||
230 | unsigned int has_msp34xx:1; | 228 | unsigned int has_msp34xx:1; |
231 | unsigned int has_tda9887:1; | 229 | unsigned int has_tda9887:1; |
232 | unsigned int stream_on:1; /* Locks streams */ | 230 | unsigned int stream_on:1; /* Locks streams */ |