diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-05-29 05:59:45 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-17 07:48:03 -0400 |
commit | 33001010013749886eca5b5645efd80006dd2e51 (patch) | |
tree | e9fce4f64409b50f29814a2f1add69b9584a2fcb | |
parent | 7486af1ae3ee34b12fcff1b1ce3a9cc6a2eca03a (diff) |
[media] tveeprom: remove v4l2-chip-ident.h include
Replace the V4L2_IDENT_* usage with tveeprom-specific defines. This header
is deprecated, so those defines shouldn't be used anymore.
The em28xx driver is the only one that uses the tveeprom audio_processor
field, so that has been updated to use the new tveeprom AUDPROC define.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/common/tveeprom.c | 142 | ||||
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-cards.c | 3 | ||||
-rw-r--r-- | include/media/tveeprom.h | 11 |
3 files changed, 78 insertions, 78 deletions
diff --git a/drivers/media/common/tveeprom.c b/drivers/media/common/tveeprom.c index cc1e172dfece..c7dace671a9d 100644 --- a/drivers/media/common/tveeprom.c +++ b/drivers/media/common/tveeprom.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <media/tuner.h> | 40 | #include <media/tuner.h> |
41 | #include <media/tveeprom.h> | 41 | #include <media/tveeprom.h> |
42 | #include <media/v4l2-common.h> | 42 | #include <media/v4l2-common.h> |
43 | #include <media/v4l2-chip-ident.h> | ||
44 | 43 | ||
45 | MODULE_DESCRIPTION("i2c Hauppauge eeprom decoder driver"); | 44 | MODULE_DESCRIPTION("i2c Hauppauge eeprom decoder driver"); |
46 | MODULE_AUTHOR("John Klar"); | 45 | MODULE_AUTHOR("John Klar"); |
@@ -67,13 +66,10 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)"); | |||
67 | * The Hauppauge eeprom uses an 8bit field to determine which | 66 | * The Hauppauge eeprom uses an 8bit field to determine which |
68 | * tuner formats the tuner supports. | 67 | * tuner formats the tuner supports. |
69 | */ | 68 | */ |
70 | static struct HAUPPAUGE_TUNER_FMT | 69 | static const struct { |
71 | { | ||
72 | int id; | 70 | int id; |
73 | char *name; | 71 | const char * const name; |
74 | } | 72 | } hauppauge_tuner_fmt[] = { |
75 | hauppauge_tuner_fmt[] = | ||
76 | { | ||
77 | { V4L2_STD_UNKNOWN, " UNKNOWN" }, | 73 | { V4L2_STD_UNKNOWN, " UNKNOWN" }, |
78 | { V4L2_STD_UNKNOWN, " FM" }, | 74 | { V4L2_STD_UNKNOWN, " FM" }, |
79 | { V4L2_STD_B|V4L2_STD_GH, " PAL(B/G)" }, | 75 | { V4L2_STD_B|V4L2_STD_GH, " PAL(B/G)" }, |
@@ -88,13 +84,10 @@ hauppauge_tuner_fmt[] = | |||
88 | supplying this information. Note that many tuners where only used for | 84 | supplying this information. Note that many tuners where only used for |
89 | testing and never made it to the outside world. So you will only see | 85 | testing and never made it to the outside world. So you will only see |
90 | a subset in actual produced cards. */ | 86 | a subset in actual produced cards. */ |
91 | static struct HAUPPAUGE_TUNER | 87 | static const struct { |
92 | { | ||
93 | int id; | 88 | int id; |
94 | char *name; | 89 | const char * const name; |
95 | } | 90 | } hauppauge_tuner[] = { |
96 | hauppauge_tuner[] = | ||
97 | { | ||
98 | /* 0-9 */ | 91 | /* 0-9 */ |
99 | { TUNER_ABSENT, "None" }, | 92 | { TUNER_ABSENT, "None" }, |
100 | { TUNER_ABSENT, "External" }, | 93 | { TUNER_ABSENT, "External" }, |
@@ -298,69 +291,66 @@ hauppauge_tuner[] = | |||
298 | { TUNER_ABSENT, "NXP 18272S"}, | 291 | { TUNER_ABSENT, "NXP 18272S"}, |
299 | }; | 292 | }; |
300 | 293 | ||
301 | /* Use V4L2_IDENT_AMBIGUOUS for those audio 'chips' that are | 294 | /* Use TVEEPROM_AUDPROC_INTERNAL for those audio 'chips' that are |
302 | * internal to a video chip, i.e. not a separate audio chip. */ | 295 | * internal to a video chip, i.e. not a separate audio chip. */ |
303 | static struct HAUPPAUGE_AUDIOIC | 296 | static const struct { |
304 | { | ||
305 | u32 id; | 297 | u32 id; |
306 | char *name; | 298 | const char * const name; |
307 | } | 299 | } audio_ic[] = { |
308 | audioIC[] = | ||
309 | { | ||
310 | /* 0-4 */ | 300 | /* 0-4 */ |
311 | { V4L2_IDENT_NONE, "None" }, | 301 | { TVEEPROM_AUDPROC_NONE, "None" }, |
312 | { V4L2_IDENT_UNKNOWN, "TEA6300" }, | 302 | { TVEEPROM_AUDPROC_OTHER, "TEA6300" }, |
313 | { V4L2_IDENT_UNKNOWN, "TEA6320" }, | 303 | { TVEEPROM_AUDPROC_OTHER, "TEA6320" }, |
314 | { V4L2_IDENT_UNKNOWN, "TDA9850" }, | 304 | { TVEEPROM_AUDPROC_OTHER, "TDA9850" }, |
315 | { V4L2_IDENT_MSPX4XX, "MSP3400C" }, | 305 | { TVEEPROM_AUDPROC_MSP, "MSP3400C" }, |
316 | /* 5-9 */ | 306 | /* 5-9 */ |
317 | { V4L2_IDENT_MSPX4XX, "MSP3410D" }, | 307 | { TVEEPROM_AUDPROC_MSP, "MSP3410D" }, |
318 | { V4L2_IDENT_MSPX4XX, "MSP3415" }, | 308 | { TVEEPROM_AUDPROC_MSP, "MSP3415" }, |
319 | { V4L2_IDENT_MSPX4XX, "MSP3430" }, | 309 | { TVEEPROM_AUDPROC_MSP, "MSP3430" }, |
320 | { V4L2_IDENT_MSPX4XX, "MSP3438" }, | 310 | { TVEEPROM_AUDPROC_MSP, "MSP3438" }, |
321 | { V4L2_IDENT_UNKNOWN, "CS5331" }, | 311 | { TVEEPROM_AUDPROC_OTHER, "CS5331" }, |
322 | /* 10-14 */ | 312 | /* 10-14 */ |
323 | { V4L2_IDENT_MSPX4XX, "MSP3435" }, | 313 | { TVEEPROM_AUDPROC_MSP, "MSP3435" }, |
324 | { V4L2_IDENT_MSPX4XX, "MSP3440" }, | 314 | { TVEEPROM_AUDPROC_MSP, "MSP3440" }, |
325 | { V4L2_IDENT_MSPX4XX, "MSP3445" }, | 315 | { TVEEPROM_AUDPROC_MSP, "MSP3445" }, |
326 | { V4L2_IDENT_MSPX4XX, "MSP3411" }, | 316 | { TVEEPROM_AUDPROC_MSP, "MSP3411" }, |
327 | { V4L2_IDENT_MSPX4XX, "MSP3416" }, | 317 | { TVEEPROM_AUDPROC_MSP, "MSP3416" }, |
328 | /* 15-19 */ | 318 | /* 15-19 */ |
329 | { V4L2_IDENT_MSPX4XX, "MSP3425" }, | 319 | { TVEEPROM_AUDPROC_MSP, "MSP3425" }, |
330 | { V4L2_IDENT_MSPX4XX, "MSP3451" }, | 320 | { TVEEPROM_AUDPROC_MSP, "MSP3451" }, |
331 | { V4L2_IDENT_MSPX4XX, "MSP3418" }, | 321 | { TVEEPROM_AUDPROC_MSP, "MSP3418" }, |
332 | { V4L2_IDENT_UNKNOWN, "Type 0x12" }, | 322 | { TVEEPROM_AUDPROC_OTHER, "Type 0x12" }, |
333 | { V4L2_IDENT_UNKNOWN, "OKI7716" }, | 323 | { TVEEPROM_AUDPROC_OTHER, "OKI7716" }, |
334 | /* 20-24 */ | 324 | /* 20-24 */ |
335 | { V4L2_IDENT_MSPX4XX, "MSP4410" }, | 325 | { TVEEPROM_AUDPROC_MSP, "MSP4410" }, |
336 | { V4L2_IDENT_MSPX4XX, "MSP4420" }, | 326 | { TVEEPROM_AUDPROC_MSP, "MSP4420" }, |
337 | { V4L2_IDENT_MSPX4XX, "MSP4440" }, | 327 | { TVEEPROM_AUDPROC_MSP, "MSP4440" }, |
338 | { V4L2_IDENT_MSPX4XX, "MSP4450" }, | 328 | { TVEEPROM_AUDPROC_MSP, "MSP4450" }, |
339 | { V4L2_IDENT_MSPX4XX, "MSP4408" }, | 329 | { TVEEPROM_AUDPROC_MSP, "MSP4408" }, |
340 | /* 25-29 */ | 330 | /* 25-29 */ |
341 | { V4L2_IDENT_MSPX4XX, "MSP4418" }, | 331 | { TVEEPROM_AUDPROC_MSP, "MSP4418" }, |
342 | { V4L2_IDENT_MSPX4XX, "MSP4428" }, | 332 | { TVEEPROM_AUDPROC_MSP, "MSP4428" }, |
343 | { V4L2_IDENT_MSPX4XX, "MSP4448" }, | 333 | { TVEEPROM_AUDPROC_MSP, "MSP4448" }, |
344 | { V4L2_IDENT_MSPX4XX, "MSP4458" }, | 334 | { TVEEPROM_AUDPROC_MSP, "MSP4458" }, |
345 | { V4L2_IDENT_MSPX4XX, "Type 0x1d" }, | 335 | { TVEEPROM_AUDPROC_MSP, "Type 0x1d" }, |
346 | /* 30-34 */ | 336 | /* 30-34 */ |
347 | { V4L2_IDENT_AMBIGUOUS, "CX880" }, | 337 | { TVEEPROM_AUDPROC_INTERNAL, "CX880" }, |
348 | { V4L2_IDENT_AMBIGUOUS, "CX881" }, | 338 | { TVEEPROM_AUDPROC_INTERNAL, "CX881" }, |
349 | { V4L2_IDENT_AMBIGUOUS, "CX883" }, | 339 | { TVEEPROM_AUDPROC_INTERNAL, "CX883" }, |
350 | { V4L2_IDENT_AMBIGUOUS, "CX882" }, | 340 | { TVEEPROM_AUDPROC_INTERNAL, "CX882" }, |
351 | { V4L2_IDENT_AMBIGUOUS, "CX25840" }, | 341 | { TVEEPROM_AUDPROC_INTERNAL, "CX25840" }, |
352 | /* 35-39 */ | 342 | /* 35-39 */ |
353 | { V4L2_IDENT_AMBIGUOUS, "CX25841" }, | 343 | { TVEEPROM_AUDPROC_INTERNAL, "CX25841" }, |
354 | { V4L2_IDENT_AMBIGUOUS, "CX25842" }, | 344 | { TVEEPROM_AUDPROC_INTERNAL, "CX25842" }, |
355 | { V4L2_IDENT_AMBIGUOUS, "CX25843" }, | 345 | { TVEEPROM_AUDPROC_INTERNAL, "CX25843" }, |
356 | { V4L2_IDENT_AMBIGUOUS, "CX23418" }, | 346 | { TVEEPROM_AUDPROC_INTERNAL, "CX23418" }, |
357 | { V4L2_IDENT_AMBIGUOUS, "CX23885" }, | 347 | { TVEEPROM_AUDPROC_INTERNAL, "CX23885" }, |
358 | /* 40-44 */ | 348 | /* 40-44 */ |
359 | { V4L2_IDENT_AMBIGUOUS, "CX23888" }, | 349 | { TVEEPROM_AUDPROC_INTERNAL, "CX23888" }, |
360 | { V4L2_IDENT_AMBIGUOUS, "SAA7131" }, | 350 | { TVEEPROM_AUDPROC_INTERNAL, "SAA7131" }, |
361 | { V4L2_IDENT_AMBIGUOUS, "CX23887" }, | 351 | { TVEEPROM_AUDPROC_INTERNAL, "CX23887" }, |
362 | { V4L2_IDENT_AMBIGUOUS, "SAA7164" }, | 352 | { TVEEPROM_AUDPROC_INTERNAL, "SAA7164" }, |
363 | { V4L2_IDENT_AMBIGUOUS, "AU8522" }, | 353 | { TVEEPROM_AUDPROC_INTERNAL, "AU8522" }, |
364 | }; | 354 | }; |
365 | 355 | ||
366 | /* This list is supplied by Hauppauge. Thanks! */ | 356 | /* This list is supplied by Hauppauge. Thanks! */ |
@@ -453,11 +443,11 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
453 | int i, j, len, done, beenhere, tag, start; | 443 | int i, j, len, done, beenhere, tag, start; |
454 | 444 | ||
455 | int tuner1 = 0, t_format1 = 0, audioic = -1; | 445 | int tuner1 = 0, t_format1 = 0, audioic = -1; |
456 | char *t_name1 = NULL; | 446 | const char *t_name1 = NULL; |
457 | const char *t_fmt_name1[8] = { " none", "", "", "", "", "", "", "" }; | 447 | const char *t_fmt_name1[8] = { " none", "", "", "", "", "", "", "" }; |
458 | 448 | ||
459 | int tuner2 = 0, t_format2 = 0; | 449 | int tuner2 = 0, t_format2 = 0; |
460 | char *t_name2 = NULL; | 450 | const char *t_name2 = NULL; |
461 | const char *t_fmt_name2[8] = { " none", "", "", "", "", "", "", "" }; | 451 | const char *t_fmt_name2[8] = { " none", "", "", "", "", "", "", "" }; |
462 | 452 | ||
463 | memset(tvee, 0, sizeof(*tvee)); | 453 | memset(tvee, 0, sizeof(*tvee)); |
@@ -545,10 +535,10 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
545 | to indicate 4052 mux was removed in favor of using MSP | 535 | to indicate 4052 mux was removed in favor of using MSP |
546 | inputs directly. */ | 536 | inputs directly. */ |
547 | audioic = eeprom_data[i+2] & 0x7f; | 537 | audioic = eeprom_data[i+2] & 0x7f; |
548 | if (audioic < ARRAY_SIZE(audioIC)) | 538 | if (audioic < ARRAY_SIZE(audio_ic)) |
549 | tvee->audio_processor = audioIC[audioic].id; | 539 | tvee->audio_processor = audio_ic[audioic].id; |
550 | else | 540 | else |
551 | tvee->audio_processor = V4L2_IDENT_UNKNOWN; | 541 | tvee->audio_processor = TVEEPROM_AUDPROC_OTHER; |
552 | break; | 542 | break; |
553 | 543 | ||
554 | /* case 0x03: tag 'EEInfo' */ | 544 | /* case 0x03: tag 'EEInfo' */ |
@@ -578,10 +568,10 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
578 | to indicate 4052 mux was removed in favor of using MSP | 568 | to indicate 4052 mux was removed in favor of using MSP |
579 | inputs directly. */ | 569 | inputs directly. */ |
580 | audioic = eeprom_data[i+1] & 0x7f; | 570 | audioic = eeprom_data[i+1] & 0x7f; |
581 | if (audioic < ARRAY_SIZE(audioIC)) | 571 | if (audioic < ARRAY_SIZE(audio_ic)) |
582 | tvee->audio_processor = audioIC[audioic].id; | 572 | tvee->audio_processor = audio_ic[audioic].id; |
583 | else | 573 | else |
584 | tvee->audio_processor = V4L2_IDENT_UNKNOWN; | 574 | tvee->audio_processor = TVEEPROM_AUDPROC_OTHER; |
585 | 575 | ||
586 | break; | 576 | break; |
587 | 577 | ||
@@ -726,11 +716,11 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
726 | t_fmt_name2[6], t_fmt_name2[7], t_format2); | 716 | t_fmt_name2[6], t_fmt_name2[7], t_format2); |
727 | if (audioic < 0) { | 717 | if (audioic < 0) { |
728 | tveeprom_info("audio processor is unknown (no idx)\n"); | 718 | tveeprom_info("audio processor is unknown (no idx)\n"); |
729 | tvee->audio_processor = V4L2_IDENT_UNKNOWN; | 719 | tvee->audio_processor = TVEEPROM_AUDPROC_OTHER; |
730 | } else { | 720 | } else { |
731 | if (audioic < ARRAY_SIZE(audioIC)) | 721 | if (audioic < ARRAY_SIZE(audio_ic)) |
732 | tveeprom_info("audio processor is %s (idx %d)\n", | 722 | tveeprom_info("audio processor is %s (idx %d)\n", |
733 | audioIC[audioic].name, audioic); | 723 | audio_ic[audioic].name, audioic); |
734 | else | 724 | else |
735 | tveeprom_info("audio processor is unknown (idx %d)\n", | 725 | tveeprom_info("audio processor is unknown (idx %d)\n", |
736 | audioic); | 726 | audioic); |
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c index 927956b4dca7..e4b0669d49dd 100644 --- a/drivers/media/usb/em28xx/em28xx-cards.c +++ b/drivers/media/usb/em28xx/em28xx-cards.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <media/i2c-addr.h> | 37 | #include <media/i2c-addr.h> |
38 | #include <media/tveeprom.h> | 38 | #include <media/tveeprom.h> |
39 | #include <media/v4l2-common.h> | 39 | #include <media/v4l2-common.h> |
40 | #include <media/v4l2-chip-ident.h> | ||
41 | 40 | ||
42 | #include "em28xx.h" | 41 | #include "em28xx.h" |
43 | 42 | ||
@@ -2669,7 +2668,7 @@ static void em28xx_card_setup(struct em28xx *dev) | |||
2669 | 2668 | ||
2670 | dev->tuner_type = tv.tuner_type; | 2669 | dev->tuner_type = tv.tuner_type; |
2671 | 2670 | ||
2672 | if (tv.audio_processor == V4L2_IDENT_MSPX4XX) { | 2671 | if (tv.audio_processor == TVEEPROM_AUDPROC_MSP) { |
2673 | dev->i2s_speed = 2048000; | 2672 | dev->i2s_speed = 2048000; |
2674 | dev->board.has_msp34xx = 1; | 2673 | dev->board.has_msp34xx = 1; |
2675 | } | 2674 | } |
diff --git a/include/media/tveeprom.h b/include/media/tveeprom.h index a8ad75a9152a..4a1191abd936 100644 --- a/include/media/tveeprom.h +++ b/include/media/tveeprom.h | |||
@@ -1,6 +1,17 @@ | |||
1 | /* | 1 | /* |
2 | */ | 2 | */ |
3 | 3 | ||
4 | enum tveeprom_audio_processor { | ||
5 | /* No audio processor present */ | ||
6 | TVEEPROM_AUDPROC_NONE, | ||
7 | /* The audio processor is internal to the video processor */ | ||
8 | TVEEPROM_AUDPROC_INTERNAL, | ||
9 | /* The audio processor is a MSPXXXX device */ | ||
10 | TVEEPROM_AUDPROC_MSP, | ||
11 | /* The audio processor is another device */ | ||
12 | TVEEPROM_AUDPROC_OTHER, | ||
13 | }; | ||
14 | |||
4 | struct tveeprom { | 15 | struct tveeprom { |
5 | u32 has_radio; | 16 | u32 has_radio; |
6 | /* If has_ir == 0, then it is unknown what the IR capabilities are, | 17 | /* If has_ir == 0, then it is unknown what the IR capabilities are, |