diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-04-22 13:45:50 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:07:49 -0400 |
commit | 11305d590895f22c30545ee0ff3fb434128fefb0 (patch) | |
tree | f86819e997ffff3b58e5bcc50dd2a2e34f1df209 /drivers/media/video/ivtv/ivtv-driver.c | |
parent | cd9fa026606848b2238a56e37b2c4aa4f371e152 (diff) |
V4L/DVB (7341): ivtv: rename tunerhz to tunertype
There are two tuner types: those for M/N standards and those for all others.
However, M/N standards are not always 60 Hz (PAL-N/Nc are 50 Hz), so rename
the module option accordingly.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-driver.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index 3e4f55a9edfa..1ed77167b125 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c | |||
@@ -132,7 +132,7 @@ static int ivtv_pci_latency = 1; | |||
132 | 132 | ||
133 | int ivtv_debug; | 133 | int ivtv_debug; |
134 | 134 | ||
135 | static int tunerhz; | 135 | static int tunertype = -1; |
136 | static int newi2c = -1; | 136 | static int newi2c = -1; |
137 | 137 | ||
138 | module_param_array(tuner, int, &tuner_c, 0644); | 138 | module_param_array(tuner, int, &tuner_c, 0644); |
@@ -155,7 +155,7 @@ module_param(dec_mpg_buffers, int, 0644); | |||
155 | module_param(dec_yuv_buffers, int, 0644); | 155 | module_param(dec_yuv_buffers, int, 0644); |
156 | module_param(dec_vbi_buffers, int, 0644); | 156 | module_param(dec_vbi_buffers, int, 0644); |
157 | 157 | ||
158 | module_param(tunerhz, int, 0644); | 158 | module_param(tunertype, int, 0644); |
159 | module_param(newi2c, int, 0644); | 159 | module_param(newi2c, int, 0644); |
160 | 160 | ||
161 | MODULE_PARM_DESC(tuner, "Tuner type selection,\n" | 161 | MODULE_PARM_DESC(tuner, "Tuner type selection,\n" |
@@ -195,11 +195,11 @@ MODULE_PARM_DESC(cardtype, | |||
195 | MODULE_PARM_DESC(pal, "Set PAL standard: BGH, DK, I, M, N, Nc, 60"); | 195 | MODULE_PARM_DESC(pal, "Set PAL standard: BGH, DK, I, M, N, Nc, 60"); |
196 | MODULE_PARM_DESC(secam, "Set SECAM standard: BGH, DK, L, LC"); | 196 | MODULE_PARM_DESC(secam, "Set SECAM standard: BGH, DK, L, LC"); |
197 | MODULE_PARM_DESC(ntsc, "Set NTSC standard: M, J (Japan), K (South Korea)"); | 197 | MODULE_PARM_DESC(ntsc, "Set NTSC standard: M, J (Japan), K (South Korea)"); |
198 | MODULE_PARM_DESC(tunerhz, | 198 | MODULE_PARM_DESC(tunertype, |
199 | "Specify tuner type:\n" | 199 | "Specify tuner type:\n" |
200 | "\t\t\t50 = 50 Hz tuner (PAL-B/G/H/D/K/I, SECAM-B/G/H/D/K/L/Lc)\n" | 200 | "\t\t\t 0 = tuner for PAL-B/G/H/D/K/I, SECAM-B/G/H/D/K/L/Lc\n" |
201 | "\t\t\t60 = 60 Hz tuner (NTSC-M/J/K, PAL-M/N/Nc/60)\n" | 201 | "\t\t\t 1 = tuner for NTSC-M/J/K, PAL-M/N/Nc\n" |
202 | "\t\t\t 0 = Autodetect (default)\n"); | 202 | "\t\t\t-1 = Autodetect (default)\n"); |
203 | MODULE_PARM_DESC(debug, | 203 | MODULE_PARM_DESC(debug, |
204 | "Debug level (bitmask). Default: 0\n" | 204 | "Debug level (bitmask). Default: 0\n" |
205 | "\t\t\t 1/0x0001: warning\n" | 205 | "\t\t\t 1/0x0001: warning\n" |
@@ -497,7 +497,7 @@ static v4l2_std_id ivtv_parse_std(struct ivtv *itv) | |||
497 | { | 497 | { |
498 | switch (pal[0]) { | 498 | switch (pal[0]) { |
499 | case '6': | 499 | case '6': |
500 | tunerhz = 60; | 500 | tunertype = 0; |
501 | return V4L2_STD_PAL_60; | 501 | return V4L2_STD_PAL_60; |
502 | case 'b': | 502 | case 'b': |
503 | case 'B': | 503 | case 'B': |
@@ -505,27 +505,27 @@ static v4l2_std_id ivtv_parse_std(struct ivtv *itv) | |||
505 | case 'G': | 505 | case 'G': |
506 | case 'h': | 506 | case 'h': |
507 | case 'H': | 507 | case 'H': |
508 | tunerhz = 50; | 508 | tunertype = 0; |
509 | return V4L2_STD_PAL_BG | V4L2_STD_PAL_H; | 509 | return V4L2_STD_PAL_BG | V4L2_STD_PAL_H; |
510 | case 'n': | 510 | case 'n': |
511 | case 'N': | 511 | case 'N': |
512 | tunerhz = 50; | 512 | tunertype = 1; |
513 | if (pal[1] == 'c' || pal[1] == 'C') | 513 | if (pal[1] == 'c' || pal[1] == 'C') |
514 | return V4L2_STD_PAL_Nc; | 514 | return V4L2_STD_PAL_Nc; |
515 | return V4L2_STD_PAL_N; | 515 | return V4L2_STD_PAL_N; |
516 | case 'i': | 516 | case 'i': |
517 | case 'I': | 517 | case 'I': |
518 | tunerhz = 50; | 518 | tunertype = 0; |
519 | return V4L2_STD_PAL_I; | 519 | return V4L2_STD_PAL_I; |
520 | case 'd': | 520 | case 'd': |
521 | case 'D': | 521 | case 'D': |
522 | case 'k': | 522 | case 'k': |
523 | case 'K': | 523 | case 'K': |
524 | tunerhz = 50; | 524 | tunertype = 0; |
525 | return V4L2_STD_PAL_DK; | 525 | return V4L2_STD_PAL_DK; |
526 | case 'M': | 526 | case 'M': |
527 | case 'm': | 527 | case 'm': |
528 | tunerhz = 60; | 528 | tunertype = 1; |
529 | return V4L2_STD_PAL_M; | 529 | return V4L2_STD_PAL_M; |
530 | case '-': | 530 | case '-': |
531 | break; | 531 | break; |
@@ -541,17 +541,17 @@ static v4l2_std_id ivtv_parse_std(struct ivtv *itv) | |||
541 | case 'G': | 541 | case 'G': |
542 | case 'h': | 542 | case 'h': |
543 | case 'H': | 543 | case 'H': |
544 | tunerhz = 50; | 544 | tunertype = 0; |
545 | return V4L2_STD_SECAM_B | V4L2_STD_SECAM_G | V4L2_STD_SECAM_H; | 545 | return V4L2_STD_SECAM_B | V4L2_STD_SECAM_G | V4L2_STD_SECAM_H; |
546 | case 'd': | 546 | case 'd': |
547 | case 'D': | 547 | case 'D': |
548 | case 'k': | 548 | case 'k': |
549 | case 'K': | 549 | case 'K': |
550 | tunerhz = 50; | 550 | tunertype = 0; |
551 | return V4L2_STD_SECAM_DK; | 551 | return V4L2_STD_SECAM_DK; |
552 | case 'l': | 552 | case 'l': |
553 | case 'L': | 553 | case 'L': |
554 | tunerhz = 50; | 554 | tunertype = 0; |
555 | if (secam[1] == 'C' || secam[1] == 'c') | 555 | if (secam[1] == 'C' || secam[1] == 'c') |
556 | return V4L2_STD_SECAM_LC; | 556 | return V4L2_STD_SECAM_LC; |
557 | return V4L2_STD_SECAM_L; | 557 | return V4L2_STD_SECAM_L; |
@@ -565,15 +565,15 @@ static v4l2_std_id ivtv_parse_std(struct ivtv *itv) | |||
565 | switch (ntsc[0]) { | 565 | switch (ntsc[0]) { |
566 | case 'm': | 566 | case 'm': |
567 | case 'M': | 567 | case 'M': |
568 | tunerhz = 60; | 568 | tunertype = 1; |
569 | return V4L2_STD_NTSC_M; | 569 | return V4L2_STD_NTSC_M; |
570 | case 'j': | 570 | case 'j': |
571 | case 'J': | 571 | case 'J': |
572 | tunerhz = 60; | 572 | tunertype = 1; |
573 | return V4L2_STD_NTSC_M_JP; | 573 | return V4L2_STD_NTSC_M_JP; |
574 | case 'k': | 574 | case 'k': |
575 | case 'K': | 575 | case 'K': |
576 | tunerhz = 60; | 576 | tunertype = 1; |
577 | return V4L2_STD_NTSC_M_KR; | 577 | return V4L2_STD_NTSC_M_KR; |
578 | case '-': | 578 | case '-': |
579 | break; | 579 | break; |
@@ -602,13 +602,13 @@ static void ivtv_process_options(struct ivtv *itv) | |||
602 | itv->options.tuner = tuner[itv->num]; | 602 | itv->options.tuner = tuner[itv->num]; |
603 | itv->options.radio = radio[itv->num]; | 603 | itv->options.radio = radio[itv->num]; |
604 | itv->options.newi2c = newi2c; | 604 | itv->options.newi2c = newi2c; |
605 | if (tunerhz != 0 && tunerhz != 50 && tunerhz != 60) { | 605 | if (tunertype < -1 || tunertype > 1) { |
606 | IVTV_WARN("Invalid tunerhz argument, will autodetect instead\n"); | 606 | IVTV_WARN("Invalid tunertype argument, will autodetect instead\n"); |
607 | tunerhz = 0; | 607 | tunertype = -1; |
608 | } | 608 | } |
609 | itv->std = ivtv_parse_std(itv); | 609 | itv->std = ivtv_parse_std(itv); |
610 | if (itv->std == 0 && tunerhz) | 610 | if (itv->std == 0 && tunertype >= 0) |
611 | itv->std = (tunerhz == 60) ? V4L2_STD_525_60 : V4L2_STD_625_50; | 611 | itv->std = tunertype ? V4L2_STD_MN : (V4L2_STD_ALL & ~V4L2_STD_MN); |
612 | itv->has_cx23415 = (itv->dev->device == PCI_DEVICE_ID_IVTV15); | 612 | itv->has_cx23415 = (itv->dev->device == PCI_DEVICE_ID_IVTV15); |
613 | chipname = itv->has_cx23415 ? "cx23415" : "cx23416"; | 613 | chipname = itv->has_cx23415 ? "cx23415" : "cx23416"; |
614 | if (itv->options.cardtype == -1) { | 614 | if (itv->options.cardtype == -1) { |