new tuner
Hi All.
How I can add new type of tuner to video4linux??
I add new definition into linux/include/media/tuner.h
#define TUNER_PHILIPS_FM1216MK5 79
add some data to
/linux/drivers/media/common/tuners/tuner-types.c
/* ------------ TUNER_PHILIPS_FM1216MK5 - Philips PAL ------------ */
static struct tuner_range tuner_fm1216mk5_pal_ranges[] = {
{ 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
{ 16 * 999.99 , 0x8e, 0x04, },
};static struct tuner_params tuner_fm1216mk5_params[] = {
{
.type = TUNER_PARAM_TYPE_PAL,
.ranges = tuner_fm1216mk5_pal_ranges,
.count = ARRAY_SIZE(tuner_fm1216mk5_pal_ranges),
.cb_first_if_lower_freq = 1,
.has_tda9887 = 1,
.port1_active = 1,
.initdata = tua603x_agc112,
.sleepdata = (u8[]){ 4, 0x9c, 0x60, 0x85, 0x54 },
},
[TUNER_PHILIPS_FM1216MK5] = { /* Philips PAL */
.name = "Philips PAL/SECAM multi (FM1216 MK5)",
.params = tuner_fm1216mk5_params,
.count = ARRAY_SIZE(tuner_fm1216mk5_params),
},But when I change type of tuner to new model build exit with error. Incorrect tuner name.
What is wrong??
With my best regards, Dmitry.
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
Hi Dmitry,
on a first look.
Am Dienstag, den 24.02.2009, 16:06 +0900 schrieb Dmitri Belimov:
Quoted 10 lines
Hi All.
How I can add new type of tuner to video4linux??
I add new definition into
linux/include/media/tuner.h
#defineTUNER_PHILIPS_FM1216MK579add some data to
/linux/drivers/media/common/tuners/tuner-types.c
Quoted 7 lines
/* ------------
TUNER_PHILIPS_FM1216MK5- Philips PAL ------------ */static struct tuner_range tuner_fm1216mk5_pal_ranges[] = { { 16 * 158.00 /*MHz*/, 0x8e, 0x01, }, { 16 * 442.00 /*MHz*/, 0x8e, 0x02, }, { 16 * 999.99 , 0x8e, 0x04, }, };
This is wrong, since you only duplicate fm1216me_mk3_pal_ranges which you should just use instead.
Review
Quoted 11 lines
static struct tuner_params tuner_fm1216mk5_params[] = { { .type = TUNER_PARAM_TYPE_PAL, .ranges = tuner_fm1216mk5_pal_ranges, .count = ARRAY_SIZE(tuner_fm1216mk5_pal_ranges),(quoted diff) +0
-0.cb_first_if_lower_freq = 1, .has_tda9887 = 1, .port1_active = 1, .initdata = tua603x_agc112, .sleepdata = (u8[]){ 4, 0x9c, 0x60, 0x85, 0x54 }, },
Since you do not send a diff, I assume you are not in struct tunertype tuners[] here. Also initdata and sleepdata should be there
Quoted 6 lines
[TUNER_PHILIPS_FM1216MK5] = { /* Philips PAL */
.name = "Philips PAL/SECAM multi (FM1216 MK5)",
.params = tuner_fm1216mk5_params,
.count = ARRAY_SIZE(tuner_fm1216mk5_params),
},Quoted 6 lines
But when I change type of tuner to new model build exit with error. Incorrect tuner name.
What is wrong??
With my best regards, Dmitry.
You also miss to set it up for the radio mode switch in tuner-simple and did not look into tveeprom.c, where you can see that we use the TUNER_PHILIPS_FM1216ME_MK3 for it since long without complaints. MK4 is also the same.
If you don't have the detailed programming tables for every supported TV standard and detailed instructions for radio mode, I would assume that you reduce the quality of support for that tuner a lot with your current attempt.
For example SECAM-L would not work without port2=0 and radio without high sensitivity set is also very poor.
Cheers,
Hermann
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
Hi hermann
Quoted 18 lines
Hi Dmitry,
on a first look.
Am Dienstag, den 24.02.2009, 16:06 +0900 schrieb Dmitri Belimov:
Quoted 13 lines
Hi All.
How I can add new type of tuner to video4linux??
I add new definition into
linux/include/media/tuner.h
#defineTUNER_PHILIPS_FM1216MK579add some data to
/linux/drivers/media/common/tuners/tuner-types.c/* ------------
TUNER_PHILIPS_FM1216MK5- Philips PAL ------------ */
Quoted 8 lines
Quoted 5 lines
static struct tuner_range tuner_fm1216mk5_pal_ranges[] = { { 16 * 158.00 /*MHz*/, 0x8e, 0x01, }, { 16 * 442.00 /*MHz*/, 0x8e, 0x02, }, { 16 * 999.99 , 0x8e, 0x04, }, };This is wrong, since you only duplicate
fm1216me_mk3_pal_rangeswhich you should just use instead.
Yes, I know. My first step is duplicate all function of mk3 in new tuner. When all is build done and work without regression I add special part for MK5.
Quoted 34 lines
Review
Quoted 11 lines
static struct tuner_params tuner_fm1216mk5_params[] = { { .type = TUNER_PARAM_TYPE_PAL, .ranges = tuner_fm1216mk5_pal_ranges, .count = ARRAY_SIZE(tuner_fm1216mk5_pal_ranges),(quoted diff) +0
-0.cb_first_if_lower_freq = 1, .has_tda9887 = 1, .port1_active = 1, .initdata = tua603x_agc112, .sleepdata = (u8[]){ 4, 0x9c, 0x60, 0x85, 0x54 }, },Since you do not send a diff, I assume you are not in struct tunertype tuners[] here. Also initdata and sleepdata should be there
Quoted 6 lines
[TUNER_PHILIPS_FM1216MK5] = { /* Philips PAL */ .name = "Philips PAL/SECAM multi (FM1216 MK5)", .params = tuner_fm1216mk5_params, .count = ARRAY_SIZE(tuner_fm1216mk5_params), },Quoted 7 lines
But when I change type of tuner to new model build exit with error. Incorrect tuner name.
What is wrong??
With my best regards, Dmitry.
You also miss to set it up for the radio mode switch in tuner-simple and did not look into
tveeprom.c, where you can see that we use theTUNER_PHILIPS_FM1216ME_MK3for it since long without complaints. MK4 is also the same.
Quoted 4 lines
If you don't have the detailed programming tables for every supported TV standard and detailed instructions for radio mode, I would assume that you reduce the quality of support for that tuner a lot with your current attempt.
I have all documentation to this tuner under NDA. I want add support of MK5 to v4l. MK3 and MK5 has some incompatible registers and control messages.
Some of our TV card has two different tuners: MK3 and MK5. Some customers can has some problem with one model of TV card with different tuners.
See attache. I split our card to different types and add new tuner.
Quoted 5 lines
For example SECAM-L would not work without port2=0 and radio without high sensitivity set is also very poor.
Cheers,
Hermann
With my best regards, Dmitry.
linux/drivers/media/common/tuners/tuner-simple.c +2 -0
@@ -140,6 +140,7 @@ {switch (type) {case TUNER_PHILIPS_FM1216ME_MK3 : +case TUNER_PHILIPS_FM1216MK5 :case TUNER_PHILIPS_FM1236_MK3 :case TUNER_PHILIPS_FM1256_IH3 :case TUNER_LG_NTSC_TAPE :
@@ -511,6 +512,7 @@ "Most cards have a TEA5767 for FM\n");return 0 ;case TUNER_PHILIPS_FM1216ME_MK3 : +case TUNER_PHILIPS_FM1216MK5 :case TUNER_PHILIPS_FM1236_MK3 :case TUNER_PHILIPS_FMD1216ME_MK3 :case TUNER_PHILIPS_FMD1216MEX_MK3 :
linux/drivers/media/common/tuners/tuner-types.c +30 -0
@@ -567,6 +567,31 @@ .type = TUNER_PARAM_TYPE_PAL, .ranges = tuner_fm1216me_mk3_pal_ranges, .count = ARRAY_SIZE(tuner_fm1216me_mk3_pal_ranges), + .cb_first_if_lower_freq = 1, + .has_tda9887 = 1, + .port1_active = 1, + .port2_active = 1, + .port2_invert_for_secam_lc = 1, + .port1_fm_high_sensitivity = 1, + .default_top_mid = -2, + .default_top_secam_mid = -2, + .default_top_secam_high = -2, + }, +}; + +/* ------------ TUNER_PHILIPS_FM1216MK5 - Philips PAL ------------ */ + +static struct tuner_range tuner_fm1216mk5_pal_ranges[] = { + {16 *158.00 /*MHz*/ ,0x8e ,0x01 , }, + {16 *442.00 /*MHz*/ ,0x8e ,0x02 , }, + {16 *999.99 ,0x8e ,0x04 , }, +}; + +static struct tuner_params tuner_fm1216mk5_params[] = { + { + .type =TUNER_PARAM_TYPE_PAL , + .ranges = tuner_fm1216mk5_pal_ranges, + .count =ARRAY_SIZE (tuner_fm1216mk5_pal_ranges), .cb_first_if_lower_freq =1 , .has_tda9887 =1 , .port1_active =1 ,
@@ -1695,6 +1720,11 @@ .initdata = tua603x_agc112, .sleepdata = (u8[]){ 4, 0x9c, 0x60, 0x85, 0x54 }, }, + [TUNER_PHILIPS_FM1216MK5] = { /* Philips PAL */ + .name = "Philips PAL/SECAM multi (FM1216 MK5)", + .params = tuner_fm1216mk5_params, + .count = ARRAY_SIZE(tuner_fm1216mk5_params), + }, };EXPORT_SYMBOL (tuners);
linux/drivers/media/video/saa7134/saa7134-cards.c +324 -25
459 lines not on this page · raw message
linux/drivers/media/video/saa7134/saa7134-input.c +11 -1
@@ -506,7 +506,10 @@case SAA7134_BOARD_BEHOLD_407FM :case SAA7134_BOARD_BEHOLD_409 :case SAA7134_BOARD_BEHOLD_505FM : +case SAA7134_BOARD_BEHOLD_505RDS :case SAA7134_BOARD_BEHOLD_507_9FM : +case SAA7134_BOARD_BEHOLD_507RDS_MK3 : +case SAA7134_BOARD_BEHOLD_507RDS_MK5 : ir_codes = ir_codes_manli; mask_keycode =0x003f00 ; mask_keyup =0x004000 ;
@@ -717,7 +720,14 @@ ir->get_key = get_key_hvr1110; ir->ir_codes = ir_codes_hauppauge_new;break ; -case SAA7134_BOARD_BEHOLD_607_9FM : +case SAA7134_BOARD_BEHOLD_607FM_MK3 : +case SAA7134_BOARD_BEHOLD_607FM_MK5 : +case SAA7134_BOARD_BEHOLD_609FM_MK3 : +case SAA7134_BOARD_BEHOLD_609FM_MK5 : +case SAA7134_BOARD_BEHOLD_607RDS_MK3 : +case SAA7134_BOARD_BEHOLD_607RDS_MK5 : +case SAA7134_BOARD_BEHOLD_609RDS_MK3 : +case SAA7134_BOARD_BEHOLD_609RDS_MK5 :case SAA7134_BOARD_BEHOLD_M6 :case SAA7134_BOARD_BEHOLD_M63 :case SAA7134_BOARD_BEHOLD_M6_EXTRA :
linux/drivers/media/video/saa7134/saa7134.h +11 -1
@@ -253,7 +253,7 @@#define SAA7134_BOARD_BEHOLD_505FM 126#define SAA7134_BOARD_BEHOLD_507_9FM 127#define SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM 128 -#define SAA7134_BOARD_BEHOLD_607_9FM 129 +#define SAA7134_BOARD_BEHOLD_607FM_MK3 129#define SAA7134_BOARD_BEHOLD_M6 130#define SAA7134_BOARD_TWINHAN_DTV_DVB_3056 131#define SAA7134_BOARD_GENIUS_TVGO_A11MCE 132
@@ -279,6 +279,16 @@#define SAA7134_BOARD_ASUSTeK_TIGER 152#define SAA7134_BOARD_KWORLD_PLUS_TV_ANALOG 153#define SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS 154 +#define SAA7134_BOARD_BEHOLD_505RDS 155 +#define SAA7134_BOARD_BEHOLD_507RDS_MK3 156 +#define SAA7134_BOARD_BEHOLD_507RDS_MK5 157 +#define SAA7134_BOARD_BEHOLD_607FM_MK5 158 +#define SAA7134_BOARD_BEHOLD_609FM_MK3 159 +#define SAA7134_BOARD_BEHOLD_609FM_MK5 160 +#define SAA7134_BOARD_BEHOLD_607RDS_MK3 161 +#define SAA7134_BOARD_BEHOLD_607RDS_MK5 162 +#define SAA7134_BOARD_BEHOLD_609RDS_MK3 163 +#define SAA7134_BOARD_BEHOLD_609RDS_MK5 164#define SAA7134_MAXBOARDS 32#define SAA7134_INPUT_MAX 8
linux/include/media/tuner.h +1 -0
@@ -124,6 +124,7 @@#define TUNER_XC5000 76/* Xceive Silicon Tuner */ #define TUNER_TCL_MF02GIP_5N 77/* TCL MF02GIP_5N */ #define TUNER_PHILIPS_FMD1216MEX_MK3 78 +#define TUNER_PHILIPS_FM1216MK5 79/* tv card specific */ #define TDA9887_PRESENT (1<<0)
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
Am Dienstag, den 24.02.2009, 21:30 +0900 schrieb Dmitri Belimov:
Quoted 66 lines
Hi hermann
Quoted 18 lines
Hi Dmitry,
on a first look.
Am Dienstag, den 24.02.2009, 16:06 +0900 schrieb Dmitri Belimov:
Quoted 13 lines
Hi All.
How I can add new type of tuner to video4linux??
I add new definition into
linux/include/media/tuner.h
#defineTUNER_PHILIPS_FM1216MK579add some data to
/linux/drivers/media/common/tuners/tuner-types.c/* ------------
TUNER_PHILIPS_FM1216MK5- Philips PAL ------------ */Quoted 8 lines
Quoted 5 lines
static struct tuner_range tuner_fm1216mk5_pal_ranges[] = { { 16 * 158.00 /*MHz*/, 0x8e, 0x01, }, { 16 * 442.00 /*MHz*/, 0x8e, 0x02, }, { 16 * 999.99 , 0x8e, 0x04, }, };This is wrong, since you only duplicate
fm1216me_mk3_pal_rangeswhich you should just use instead.Yes, I know. My first step is duplicate all function of mk3 in new tuner. When all is build done and work without regression I add special part for MK5.
Quoted 34 lines
linux/drivers/media/common/tuners/tuner-types.c
Quoted 11 lines
static struct tuner_params tuner_fm1216mk5_params[] = { { .type = TUNER_PARAM_TYPE_PAL, .ranges = tuner_fm1216mk5_pal_ranges, .count = ARRAY_SIZE(tuner_fm1216mk5_pal_ranges),linux/drivers/media/common/tuners/tuner-types.c +0
-0.cb_first_if_lower_freq = 1, .has_tda9887 = 1, .port1_active = 1, .initdata = tua603x_agc112, .sleepdata = (u8[]){ 4, 0x9c, 0x60, 0x85, 0x54 }, },Since you do not send a diff, I assume you are not in struct tunertype tuners[] here. Also initdata and sleepdata should be there
Quoted 6 lines
[TUNER_PHILIPS_FM1216MK5] = { /* Philips PAL */ .name = "Philips PAL/SECAM multi (FM1216 MK5)", .params = tuner_fm1216mk5_params, .count = ARRAY_SIZE(tuner_fm1216mk5_params), },Quoted 7 lines
But when I change type of tuner to new model build exit with error. Incorrect tuner name.
What is wrong??
With my best regards, Dmitry.
You also miss to set it up for the radio mode switch in tuner-simple and did not look into
tveeprom.c, where you can see that we use theTUNER_PHILIPS_FM1216ME_MK3for it since long without complaints. MK4 is also the same.
Quoted 7 lines
Quoted 4 lines
If you don't have the detailed programming tables for every supported TV standard and detailed instructions for radio mode, I would assume that you reduce the quality of support for that tuner a lot with your current attempt.
I have all documentation to this tuner under NDA. I want add support of MK5 to v4l. MK3 and MK5 has some incompatible registers and control messages.
OK, that's fine then, but for now it is all the same like FM1216ME MK3.
Quoted 5 lines
Some of our TV card has two different tuners: MK3 and MK5. Some customers can has some problem with one model of TV card with different tuners.
See attache. I split our card to different types and add new tuner.
Quoted 7 lines
Quoted 5 lines
For example SECAM-L would not work without port2=0 and radio without high sensitivity set is also very poor.
Cheers,
HermannWith my best regards, Dmitry.
It does compile here without errors.
There is an offset in tuner-simple.c and you must have something different there.
patch -p1 < mk5_01.diff
patching file linux/drivers/media/common/tuners/tuner-simple.c Hunk #2 succeeded at 510 (offset -2 lines).
patching file linux/drivers/media/common/tuners/tuner-types.c patching file linux/drivers/media/video/saa7134/saa7134-cards.c patching file linux/drivers/media/video/saa7134/saa7134-input.c patching file linux/drivers/media/video/saa7134/saa7134.h patching file linux/include/media/tuner.h
Run make checkpatch and add the commas, there is one tab too much at the end of tuner-types.c. Sorry, no time until weekend.
If you in the end really improve and change something for the FM1216ME MK5, it likely should be reflected in tveeprom.c too. Currently it is only duplication.
Cheers,
Hermann
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list