forked from Minki/linux
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>
This commit is contained in:
parent
cd9fa02660
commit
11305d5908
@ -132,7 +132,7 @@ static int ivtv_pci_latency = 1;
|
||||
|
||||
int ivtv_debug;
|
||||
|
||||
static int tunerhz;
|
||||
static int tunertype = -1;
|
||||
static int newi2c = -1;
|
||||
|
||||
module_param_array(tuner, int, &tuner_c, 0644);
|
||||
@ -155,7 +155,7 @@ module_param(dec_mpg_buffers, int, 0644);
|
||||
module_param(dec_yuv_buffers, int, 0644);
|
||||
module_param(dec_vbi_buffers, int, 0644);
|
||||
|
||||
module_param(tunerhz, int, 0644);
|
||||
module_param(tunertype, int, 0644);
|
||||
module_param(newi2c, int, 0644);
|
||||
|
||||
MODULE_PARM_DESC(tuner, "Tuner type selection,\n"
|
||||
@ -195,11 +195,11 @@ MODULE_PARM_DESC(cardtype,
|
||||
MODULE_PARM_DESC(pal, "Set PAL standard: BGH, DK, I, M, N, Nc, 60");
|
||||
MODULE_PARM_DESC(secam, "Set SECAM standard: BGH, DK, L, LC");
|
||||
MODULE_PARM_DESC(ntsc, "Set NTSC standard: M, J (Japan), K (South Korea)");
|
||||
MODULE_PARM_DESC(tunerhz,
|
||||
MODULE_PARM_DESC(tunertype,
|
||||
"Specify tuner type:\n"
|
||||
"\t\t\t50 = 50 Hz tuner (PAL-B/G/H/D/K/I, SECAM-B/G/H/D/K/L/Lc)\n"
|
||||
"\t\t\t60 = 60 Hz tuner (NTSC-M/J/K, PAL-M/N/Nc/60)\n"
|
||||
"\t\t\t 0 = Autodetect (default)\n");
|
||||
"\t\t\t 0 = tuner for PAL-B/G/H/D/K/I, SECAM-B/G/H/D/K/L/Lc\n"
|
||||
"\t\t\t 1 = tuner for NTSC-M/J/K, PAL-M/N/Nc\n"
|
||||
"\t\t\t-1 = Autodetect (default)\n");
|
||||
MODULE_PARM_DESC(debug,
|
||||
"Debug level (bitmask). Default: 0\n"
|
||||
"\t\t\t 1/0x0001: warning\n"
|
||||
@ -497,7 +497,7 @@ static v4l2_std_id ivtv_parse_std(struct ivtv *itv)
|
||||
{
|
||||
switch (pal[0]) {
|
||||
case '6':
|
||||
tunerhz = 60;
|
||||
tunertype = 0;
|
||||
return V4L2_STD_PAL_60;
|
||||
case 'b':
|
||||
case 'B':
|
||||
@ -505,27 +505,27 @@ static v4l2_std_id ivtv_parse_std(struct ivtv *itv)
|
||||
case 'G':
|
||||
case 'h':
|
||||
case 'H':
|
||||
tunerhz = 50;
|
||||
tunertype = 0;
|
||||
return V4L2_STD_PAL_BG | V4L2_STD_PAL_H;
|
||||
case 'n':
|
||||
case 'N':
|
||||
tunerhz = 50;
|
||||
tunertype = 1;
|
||||
if (pal[1] == 'c' || pal[1] == 'C')
|
||||
return V4L2_STD_PAL_Nc;
|
||||
return V4L2_STD_PAL_N;
|
||||
case 'i':
|
||||
case 'I':
|
||||
tunerhz = 50;
|
||||
tunertype = 0;
|
||||
return V4L2_STD_PAL_I;
|
||||
case 'd':
|
||||
case 'D':
|
||||
case 'k':
|
||||
case 'K':
|
||||
tunerhz = 50;
|
||||
tunertype = 0;
|
||||
return V4L2_STD_PAL_DK;
|
||||
case 'M':
|
||||
case 'm':
|
||||
tunerhz = 60;
|
||||
tunertype = 1;
|
||||
return V4L2_STD_PAL_M;
|
||||
case '-':
|
||||
break;
|
||||
@ -541,17 +541,17 @@ static v4l2_std_id ivtv_parse_std(struct ivtv *itv)
|
||||
case 'G':
|
||||
case 'h':
|
||||
case 'H':
|
||||
tunerhz = 50;
|
||||
tunertype = 0;
|
||||
return V4L2_STD_SECAM_B | V4L2_STD_SECAM_G | V4L2_STD_SECAM_H;
|
||||
case 'd':
|
||||
case 'D':
|
||||
case 'k':
|
||||
case 'K':
|
||||
tunerhz = 50;
|
||||
tunertype = 0;
|
||||
return V4L2_STD_SECAM_DK;
|
||||
case 'l':
|
||||
case 'L':
|
||||
tunerhz = 50;
|
||||
tunertype = 0;
|
||||
if (secam[1] == 'C' || secam[1] == 'c')
|
||||
return V4L2_STD_SECAM_LC;
|
||||
return V4L2_STD_SECAM_L;
|
||||
@ -565,15 +565,15 @@ static v4l2_std_id ivtv_parse_std(struct ivtv *itv)
|
||||
switch (ntsc[0]) {
|
||||
case 'm':
|
||||
case 'M':
|
||||
tunerhz = 60;
|
||||
tunertype = 1;
|
||||
return V4L2_STD_NTSC_M;
|
||||
case 'j':
|
||||
case 'J':
|
||||
tunerhz = 60;
|
||||
tunertype = 1;
|
||||
return V4L2_STD_NTSC_M_JP;
|
||||
case 'k':
|
||||
case 'K':
|
||||
tunerhz = 60;
|
||||
tunertype = 1;
|
||||
return V4L2_STD_NTSC_M_KR;
|
||||
case '-':
|
||||
break;
|
||||
@ -602,13 +602,13 @@ static void ivtv_process_options(struct ivtv *itv)
|
||||
itv->options.tuner = tuner[itv->num];
|
||||
itv->options.radio = radio[itv->num];
|
||||
itv->options.newi2c = newi2c;
|
||||
if (tunerhz != 0 && tunerhz != 50 && tunerhz != 60) {
|
||||
IVTV_WARN("Invalid tunerhz argument, will autodetect instead\n");
|
||||
tunerhz = 0;
|
||||
if (tunertype < -1 || tunertype > 1) {
|
||||
IVTV_WARN("Invalid tunertype argument, will autodetect instead\n");
|
||||
tunertype = -1;
|
||||
}
|
||||
itv->std = ivtv_parse_std(itv);
|
||||
if (itv->std == 0 && tunerhz)
|
||||
itv->std = (tunerhz == 60) ? V4L2_STD_525_60 : V4L2_STD_625_50;
|
||||
if (itv->std == 0 && tunertype >= 0)
|
||||
itv->std = tunertype ? V4L2_STD_MN : (V4L2_STD_ALL & ~V4L2_STD_MN);
|
||||
itv->has_cx23415 = (itv->dev->device == PCI_DEVICE_ID_IVTV15);
|
||||
chipname = itv->has_cx23415 ? "cx23415" : "cx23416";
|
||||
if (itv->options.cardtype == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user