tveeprom cannot autodetect tuner! (FQ1216LME MK5)
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 63 lines · Andy Walls
Quoted 39 lines · Martin Dauskardt
An owner of a PVR150 sent me the following dmesg:
[ 133.929892] ivtv: Start initialization, version 1.4.1 [ 133.929957] ivtv0: Initializing card 0 [ 133.929958] ivtv0: Autodetected Hauppauge card (cx23416 based) [ 133.930478] ivtv 0000:04:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16 [ 133.983973] tveeprom 3-0050: Hauppauge model 26709, rev F0C1, serial# 9585403 [ 133.983975] tveeprom 3-0050: tuner model is Philips FQ1216LME MK5 (idx 121, type 4) [ 133.983977] tveeprom 3-0050: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/D1/K) (eeprom 0x74) [ 133.983979] tveeprom 3-0050: audio processor is CX25843 (idx 37) [ 133.983981] tveeprom 3-0050: decoder processor is CX25843 (idx 30) [ 133.983982] tveeprom 3-0050: has no radio [ 133.983984] ivtv0: Autodetected Hauppauge WinTV PVR-150 [ 133.983985] ivtv0: tveeprom cannot autodetect tuner!<6>cx25840 3-0044: cx25843-24 found @ 0x88 (ivtv i2c driver #0) [ 134.017173] tuner 3-0043: chip found @ 0x86 (ivtv i2c driver #0) [ 134.017227] tda9887 3-0043: creating new instance [ 134.017229] tda9887 3-0043: tda988[5/6/7] found [ 134.027029] tuner 3-0061: chip found @ 0xc2 (ivtv i2c driver #0) [ 134.034810] wm8775 3-001b: chip found @ 0x36 (ivtv i2c driver #0) [ 134.043300] ivtv0: Registered device video0 for encoder MPG (4096 kB) [ 134.043325] ivtv0: Registered device video32 for encoder YUV (2048 kB) [ 134.043349] ivtv0: Registered device vbi0 for encoder VBI (1024 kB) [ 134.043373] ivtv0: Registered device video24 for encoder PCM (320 kB) [ 134.043375] ivtv0: Initialized card: Hauppauge WinTV PVR-150 [ 134.043389] ivtv: End initialization [ 134.059301] ivtvfb: no cards found [ 135.718015] ivtv 0000:04:00.0: firmware: requesting v4l-cx2341x-enc.fw [ 135.737552] ivtv0: Loaded v4l-cx2341x-enc.fw firmware (376836 bytes) [ 135.937153] ivtv0: Encoder revision: 0x02060039 [ 135.954204] cx25840 3-0044: firmware: requesting v4l-cx25840.fw [ 139.419227] cx25840 3-0044: loaded v4l-cx25840.fw firmware (16382 bytes) [ 139.601289] tuner 3-0061: tuner type not set [ 139.641404] tuner 3-0061: tuner type not set [ 139.828975] tuner 3-0061: tuner type not setQuoted 1 line
I never saw this.
We just had an identical problem on the ivtv lists with an HVR-1600 and a TCL MNM05-04 tuner with the cx18 driver.
Quoted 2 lines
Detection of the tuner model is o.k., so why does
autodetection fail?
tveeprom.ccan identify it, buttveeprom.cdoesn't know what parameters to tell the ivtv driver. It returnsTUNER_ABSENTinstead.Quoted 5 lines
What could be the problem?
I looked into
tveeprom.c:{ TUNER_ABSENT, "Philips FQ1216LME MK5"},This is the problem.
Quoted 6 lines
Quoted 2 lines
Does this mean the tuner is not supported? Should we try "modprobe ivtv tuner=81" (this is the FQ1216LME MK3) ?
Yes. If 81 is the the FQ1216LME MK3, then this will likely work. Let me know how the reception is, and I can get the entry changed in
tveeprom.c.
Martin,
I don't see tuner type 81 in the list in tuners.h. I do see:
#define TUNER_PHILIPS_FQ1216ME 24 /* you must actively select B/G/D/K, I, L, L` */ #define TUNER_PHILIPS_FQ1216AME_MK4 56 /* Hauppauge PVR-150 PAL */
#define TUNER_PHILIPS_FM1216ME_MK3 38
#define TUNER_PHILIPS_FMD1216ME_MK3 63 #define TUNER_PHILIPS_FMD1216MEX_MK3 78 #define TUNER_PHILIPS_FM1216MK5 79
Could the user try one of those, starting with the FQ1216 tuner numbers (24 and 56), to see if one of them works? For the FQ1261LME MK3, tveeprom has the FM1216ME_MK3 tuner number (38).
Quoted 5 lines
Quoted 5 lines
By the way: There is a small bug in
ivtv-driver.c.
I think instead of
Quoted 7 lines
Quoted 7 lines
if (tv.tuner_type == TUNER_ABSENT) IVTV_ERR("tveeprom cannot autodetect tuner!");it should be
if (tv.tuner_type == TUNER_ABSENT) IVTV_ERR("tveeprom cannot autodetect tuner!\n");
I'll commit a fix for this. I'm just waiting on which tuner # works best for the user with the problem.
Regards,
Andy
Quoted 2 lines
Quoted 2 lines
Greets,
Martin
Hi Andy,
Quoted 6 lines
Martin,
I don't see tuner type 81 in the list in
tuners.h. I do see:#define
TUNER_PHILIPS_FQ1216ME24 /* you must actively select
B/G/D/K, I, L, L` */
Quoted 7 lines
#define
TUNER_PHILIPS_FQ1216AME_MK456 /* Hauppauge PVR-150 PAL */#define
TUNER_PHILIPS_FM1216ME_MK338#define
TUNER_PHILIPS_FMD1216ME_MK363
#defineTUNER_PHILIPS_FMD1216MEX_MK378
#defineTUNER_PHILIPS_FM1216MK579
ah, sorry. I looked into hauppauge_tuner[] from tveeprom.c and also misread the internal number 80 as 81:
/* 80-89 */
{ TUNER_PHILIPS_FM1216ME_MK3, "Philips FQ1216LME MK3"},Quoted 4 lines
Could the user try one of those, starting with the FQ1216 tuner numbers (24 and 56), to see if one of them works? For the FQ1261LME MK3, tveeprom has the
FM1216ME_MK3tuner number (38).
I hope to get in contact with him this weekend. There is another problems with the application which must be solved before, but I am sure we will found out the right tuner type at the end.
Greets,
Martin
Quoted 1 line
#define
TUNER_PHILIPS_FQ1216ME24 /* you must actively select
B/G/D/K, I, L, L` */
Quoted 4 lines
#define
TUNER_PHILIPS_FQ1216AME_MK456 /* Hauppauge PVR-150 PAL */#define
TUNER_PHILIPS_FM1216ME_MK338
Quoted 8 lines
#define TUNER_PHILIPS_FMD1216ME_MK3 63 #define TUNER_PHILIPS_FMD1216MEX_MK3 78 #define TUNER_PHILIPS_FM1216MK5 79Could the user try one of those, starting with the FQ1216 tuner numbers (24 and 56), to see if one of them works? For the FQ1261LME MK3, tveeprom has the
FM1216ME_MK3tuner number (38).
I have this card now at home for testing. First results:
#define TUNER_PHILIPS_FQ1216ME 24 /* you must actively select B/G/D/K, I, L,
Result: only static
#define TUNER_PHILIPS_FM1216ME_MK3 38
result: picture + sound o.k.
#define TUNER_PHILIPS_FQ1216AME_MK4 56 /* Hauppauge PVR-150 PAL */
result: picture o.k., but no sound
#define TUNER_PHILIPS_FMD1216ME_MK3 63
result: picture + sound o.k.
#define TUNER_PHILIPS_FMD1216MEX_MK3 78
result: picture + sound o.k.
#define TUNER_PHILIPS_FM1216MK5 79
result: picture o.k. , but audio disappears every few seconds (for about 1-2 seconds, then comes back)
tuner type 63 and 79 are Hybrid tuners. This is fore sure an analogue-only tuner. The sticker says "Multi-PAL", and according to VIDIOC_ENUMSTD it supports PAL, PAL-BG and PAL-H.
So I think 38 is right. Any suggestions for further tests?
Am Montag, 25. Mai 2009 21:34:43 schrieb Martin Dauskardt:
Quoted 3 lines
#define
TUNER_PHILIPS_FM1216MK579
result: picture o.k. , but audio disappears every few seconds (for about 1-2 seconds, then comes back)
correction: This is not a problem of tuner type 79. It happens also with tuner type 38. Sometimes the audio is also muted after the start of the application. Only switching to another input and back brings the audio back.
I am beginning to wonder if this problem may be related to a similar problem with the PVRUSB2:
http://www.isely.net/pipermail/pvrusb2/2009-May/002331.html
If there is a problem with the new v4l2 sub-device mechanism, it seems to be more specific to some devices than to others. With my PVR350 I didn't notice such problems - although I remember that in **very** rare cases the audio fails after a channel switch.
Greets,
Martin
Hi,
Am Montag, den 25.05.2009, 22:04 +0200 schrieb Martin Dauskardt:
Quoted 14 lines
Am Montag, 25. Mai 2009 21:34:43 schrieb Martin Dauskardt:
Quoted 3 lines
#define
TUNER_PHILIPS_FM1216MK579
result: picture o.k. , but audio disappears every few seconds (for about 1-2 seconds, then comes back)correction: This is not a problem of tuner type 79. It happens also with tuner type 38. Sometimes the audio is also muted after the start of the application. Only switching to another input and back brings the audio back.
I am beginning to wonder if this problem may be related to a similar problem with the PVRUSB2:
http://www.isely.net/pipermail/pvrusb2/2009-May/002331.html
Quoted 8 lines
If there is a problem with the new v4l2 sub-device mechanism, it seems to be more specific to some devices than to others. With my PVR350 I didn't notice such problems - although I remember that in **very** rare cases the audio fails after a channel switch.
Greets,
Martin
Ah, good to know. You better stay around 2.6.28 for testing tuners then.
I have reported already difficult to debug bugs on 2.6.29 with _some_ devices and others on the same driver still work. I have again verified that they for sure do work on 2.6.30-rc2-git4 yesterday.
Cheers,
Hermann
(ivtv list removed, re-add if appropriate)
Hi,
Am Montag, den 25.05.2009, 21:34 +0200 schrieb Martin Dauskardt:
Quoted 36 lines
Quoted 1 line
#define
TUNER_PHILIPS_FQ1216ME24 /* you must actively selectB/G/D/K, I, L, L` */
Quoted 4 lines
#define
TUNER_PHILIPS_FQ1216AME_MK456 /* Hauppauge PVR-150 PAL */#define
TUNER_PHILIPS_FM1216ME_MK338Quoted 8 lines
#define TUNER_PHILIPS_FMD1216ME_MK3 63 #define TUNER_PHILIPS_FMD1216MEX_MK3 78 #define TUNER_PHILIPS_FM1216MK5 79Could the user try one of those, starting with the FQ1216 tuner numbers (24 and 56), to see if one of them works? For the FQ1261LME MK3, tveeprom has the
FM1216ME_MK3tuner number (38).I have this card now at home for testing. First results:
#define
TUNER_PHILIPS_FQ1216ME24 /* you must actively select B/G/D/K, I, L,
Result: only static#define
TUNER_PHILIPS_FM1216ME_MK338
result: picture + sound o.k.#define
TUNER_PHILIPS_FQ1216AME_MK456 /* Hauppauge PVR-150 PAL */
result: picture o.k., but no sound#define
TUNER_PHILIPS_FMD1216ME_MK363
result: picture + sound o.k.#define
TUNER_PHILIPS_FMD1216MEX_MK378
result: picture + sound o.k.#define
TUNER_PHILIPS_FM1216MK579
result: picture o.k. , but audio disappears every few seconds (for about 1-2 seconds, then comes back)
Quoted 5 lines
tuner type 63 and 79 are Hybrid tuners. This is fore sure an analogue-only tuner. The sticker says "Multi-PAL", and according to
VIDIOC_ENUMSTDit supports PAL, PAL-BG and PAL-H.So I think 38 is right. Any suggestions for further tests?
in my opinion the entry of tuner type 24 is buggy. I posted once about it, but it is long ago.
/* ------------ TUNER_PHILIPS_FQ1216ME - Philips PAL ------------ */
static struct tuner_params tuner_philips_fq1216me_params[] = {
{
.type = TUNER_PARAM_TYPE_PAL,
.ranges = tuner_lg_pal_ranges,
.count = ARRAY_SIZE(tuner_lg_pal_ranges),
.has_tda9887 = 1,
.port1_active = 1,
.port2_active = 1,
.port2_invert_for_secam_lc = 1,
},
};At least tuner_lg_pal_ranges must be wrong for an MK3 and UHF should fail, if you can test on that. Switch must be 0x04 and not 0x08.
The hybrid tuners are also not compatible to an FM1216ME/I MK3. They miss some frequencies when used for such an one and some low VHF channels are snowy. The tda9887 is also not visible on them without special initialization in tuner-core.c for them. Likely not the case on yours.
FQ types from Philips are without radio support. FM types have radio. Also the FMD1216MEX_MK3 has a different radio IF, BTW.
Previously I did recommend tuner 56 for them, but now with the more detailed tda988/5/6/7 settings it misses .port2_active = 1. Hans likely knows that it is right and else we would have reports from people using it I guess. Hm.
You could test with tda9887 port2=0, if you get sound on that one too.
If the entry is correct and can't be changed, we likely need a new tuner entry or the TUNER_PHILIPS_FQ1216ME must use mk3 ranges on UHF. But on that one I have some doubts at all. How could it happen, given how old it is and previously without tda9887 at all, that the wrong UHF switch is undiscovered until today?
Hm, the new MK5 has trouble with sound, FM anyway, but TUNER_PHILIPS_FM1216MK5 is a complete clone of the FM1216ME MK3, except for the discussed 1MHz change for UHF beginning and 0xce versus 0x8e. IIRC, 0xce should be even the better choice on tuners without radio, but I need to look it up again or Andy is more aware about the recent discussions. (faster tuning bit)
Maybe Dmitry has a datasheet for that one too.
One question, which might be interesting is the RF loop through. Is it enabled by default or even switchable?
The latter would be reason enough to create a new tuner type I think.
Just some quick ideas. (ivtv will bounce me, not subscribed)
Cheers,
Hermann
Hi,
Am Montag, den 25.05.2009, 23:45 +0200 schrieb hermann pitton:
Quoted 87 lines
Hi,
Am Montag, den 25.05.2009, 21:34 +0200 schrieb Martin Dauskardt:
Quoted 36 lines
Quoted 1 line
#define
TUNER_PHILIPS_FQ1216ME24 /* you must actively selectB/G/D/K, I, L, L` */
Quoted 4 lines
#define
TUNER_PHILIPS_FQ1216AME_MK456 /* Hauppauge PVR-150 PAL */#define
TUNER_PHILIPS_FM1216ME_MK338Quoted 8 lines
#define TUNER_PHILIPS_FMD1216ME_MK3 63 #define TUNER_PHILIPS_FMD1216MEX_MK3 78 #define TUNER_PHILIPS_FM1216MK5 79Could the user try one of those, starting with the FQ1216 tuner numbers (24 and 56), to see if one of them works? For the FQ1261LME MK3, tveeprom has the
FM1216ME_MK3tuner number (38).I have this card now at home for testing. First results:
#define
TUNER_PHILIPS_FQ1216ME24 /* you must actively select B/G/D/K, I, L,
Result: only static#define
TUNER_PHILIPS_FM1216ME_MK338
result: picture + sound o.k.#define
TUNER_PHILIPS_FQ1216AME_MK456 /* Hauppauge PVR-150 PAL */
result: picture o.k., but no sound#define
TUNER_PHILIPS_FMD1216ME_MK363
result: picture + sound o.k.#define
TUNER_PHILIPS_FMD1216MEX_MK378
result: picture + sound o.k.#define
TUNER_PHILIPS_FM1216MK579
result: picture o.k. , but audio disappears every few seconds (for about 1-2 seconds, then comes back)Quoted 5 lines
tuner type 63 and 79 are Hybrid tuners. This is fore sure an analogue-only tuner. The sticker says "Multi-PAL", and according to
VIDIOC_ENUMSTDit supports PAL, PAL-BG and PAL-H.So I think 38 is right. Any suggestions for further tests?
in my opinion the entry of tuner type 24 is buggy. I posted once about it, but it is long ago.
/* ------------
TUNER_PHILIPS_FQ1216ME- Philips PAL ------------ */static struct tuner_params tuner_philips_fq1216me_params[] = { { .type = TUNER_PARAM_TYPE_PAL, .ranges = tuner_lg_pal_ranges, .count = ARRAY_SIZE(tuner_lg_pal_ranges), .has_tda9887 = 1, .port1_active = 1, .port2_active = 1, .port2_invert_for_secam_lc = 1, }, };At least
tuner_lg_pal_rangesmust be wrong for an MK3 and UHF should fail, if you can test on that. Switch must be0x04and not0x08.The hybrid tuners are also not compatible to an FM1216ME/I MK3. They miss some frequencies when used for such an one and some low VHF channels are snowy. The tda9887 is also not visible on them without special initialization in
tuner-core.cfor them. Likely not the case on yours.FQ types from Philips are without radio support. FM types have radio. Also the
FMD1216MEX_MK3has a different radio IF, BTW.Previously I did recommend tuner 56 for them, but now with the more detailed tda988/5/6/7 settings it misses .port2_active = 1. Hans likely knows that it is right and else we would have reports from people using it I guess. Hm.
You could test with tda9887 port2=0, if you get sound on that one too.
If the entry is correct and can't be changed, we likely need a new tuner entry or the
TUNER_PHILIPS_FQ1216MEmust use mk3 ranges on UHF. But on that one I have some doubts at all. How could it happen, given how old it is and previously without tda9887 at all, that the wrong UHF switch is undiscovered until today?
Quoted 8 lines
Hm, the new MK5 has trouble with sound, FM anyway, but
TUNER_PHILIPS_FM1216MK5is a complete clone of the FM1216ME MK3, except for the discussed 1MHz change for UHF beginning and0xceversus0x8e. IIRC,0xceshould be even the better choice on tuners without radio, but I need to look it up again or Andy is more aware about the recent discussions. (faster tuning bit)Maybe Dmitry has a datasheet for that one too.
for that MK5, I suggest to remove it completely to stay at some old rules we did not ship with that bad so far.
We can change the UHF switch on the tuner 38 for that 1 MHz, it will not cause any trouble, but that new entry only causes confusion and 0xce should even be wrong for an FM tuner.
Dmitry, defend your stuff, if needed.
Quoted 6 lines
One question, which might be interesting is the RF loop through. Is it enabled by default or even switchable?
The latter would be reason enough to create a new tuner type I think.
Just some quick ideas. (ivtv will bounce me, not subscribed)
Cheers,
Hermann
I should add that the picture quality is with all tested tuner types worse than with my PVR250/350. I don't know if a PVR150 is in generally worse than a PVR250. I can't call it really noisy, but in german I would say the picture is a little bit "grobkörnig". It really needs a temporal filter setting of value 8 or more, while my other PVR cards have a nice quality even with value 0.
I will test whatever you guys want me to test :-) But I am not a programmer, so I need detailled instructions what to patch.
My next step will be testing an older v4l2 with an 2.6.27 kernel to see if the audio problem still exists.
Hi,
Am Dienstag, den 26.05.2009, 22:21 +0200 schrieb Martin Dauskardt:
Quoted 7 lines
I should add that the picture quality is with all tested tuner types worse than with my PVR250/350. I don't know if a PVR150 is in generally worse than a PVR250. I can't call it really noisy, but in german I would say the picture is a little bit "grobkörnig". It really needs a temporal filter setting of value 8 or more, while my other PVR cards have a nice quality even with value 0.
Quoted 5 lines
I will test whatever you guys want me to test :-) But I am not a programmer, so I need detailled instructions what to patch.
My next step will be testing an older v4l2 with an 2.6.27 kernel to see if the audio problem still exists.
Martin, that seems the right way to start and there is no need to hurry.
If nobody has a datasheet, and I can imagine that such an early RF loop through tuner has some specials, you are still in a difficult testing field, even if only on PAL BG for now. Is RF out is active would be still interesting to know.
If on the same RF signal quality, means no more passive RF splitter in between, I don't know what we can expect, but for example the FM1216ME and the FMD1216ME hybrid MK3s do perform excellent and don't have this "grobkörnige" (grainy?) picture, which you often see on cheaper tuners.
As far as I know, not any such complaints about the MK4s so far too.
Dmitry has some MK3 variant, where the first time on a Philips tuner Chinese SAW filters are employed instead of the original EPCOS filters.
The question, if that could cause performance/sensitivity losses, is not yet answered. Also if this is related to the SECAM DK tweaks he needs.
I would start testing for different sound quality between tuner 56 and
38. Beginning silence on old B/W mono broadcasts could make a difference I somehow have in mind.
If 56 still has no sound at all, that should indicate a major technical change compared to prior tuners.
Cheers,
Hermann
Quoted 16 lines · hermann pitton
Hi,
Am Dienstag, den 26.05.2009, 22:21 +0200 schrieb Martin Dauskardt:
Quoted 7 lines
I should add that the picture quality is with all tested tuner types worse than with my PVR250/350. I don't know if a PVR150 is in generally worse than a PVR250. I can't call it really noisy, but in german I would say the picture is a little bit "grobkörnig". It really needs a temporal filter setting of value 8 or more, while my other PVR cards have a nice quality even with value 0.
Quoted 5 lines
I will test whatever you guys want me to test :-) But I am not a programmer, so I need detailled instructions what to patch.
My next step will be testing an older v4l2 with an 2.6.27 kernel to see if the audio problem still exists.
Quoted 6 lines
Martin, that seems the right way to start and there is no need to hurry.
If nobody has a datasheet, and I can imagine that such an early RF loop through tuner has some specials, you are still in a difficult testing field, even if only on PAL BG for now. Is RF out is active would be still interesting to know.
Hermann,
There is an FQ1216LME MK3 data sheet here:
http://dl.ivtvdriver.org/datasheets/tuners/FQ1216LME%20Mk3.pdf
Is it safe to assume that the MK5 is not very different from the MK3?
I can build an entry for the FQ1216LME based on this datasheet (maybe on Friday night) and hope it works well enough for the MK5.
Regards,
Andy
Quoted 24 lines
If on the same RF signal quality, means no more passive RF splitter in between, I don't know what we can expect, but for example the FM1216ME and the FMD1216ME hybrid MK3s do perform excellent and don't have this "grobkörnige" (grainy?) picture, which you often see on cheaper tuners.
As far as I know, not any such complaints about the MK4s so far too.
Dmitry has some MK3 variant, where the first time on a Philips tuner Chinese SAW filters are employed instead of the original EPCOS filters.
The question, if that could cause performance/sensitivity losses, is not yet answered. Also if this is related to the SECAM DK tweaks he needs.
I would start testing for different sound quality between tuner 56 and
38. Beginning silence on old B/W mono broadcasts could make a difference I somehow have in mind.If 56 still has no sound at all, that should indicate a major technical change compared to prior tuners.
Cheers,
Hermann
Hi,
Am Dienstag, den 26.05.2009, 22:03 -0400 schrieb Andy Walls:
Quoted 24 lines · hermann pitton
Quoted 16 lines
Hi,
Am Dienstag, den 26.05.2009, 22:21 +0200 schrieb Martin Dauskardt:
Quoted 7 lines
I should add that the picture quality is with all tested tuner types worse than with my PVR250/350. I don't know if a PVR150 is in generally worse than a PVR250. I can't call it really noisy, but in german I would say the picture is a little bit "grobkörnig". It really needs a temporal filter setting of value 8 or more, while my other PVR cards have a nice quality even with value 0.
Quoted 5 lines
I will test whatever you guys want me to test :-) But I am not a programmer, so I need detailled instructions what to patch.
My next step will be testing an older v4l2 with an 2.6.27 kernel to see if the audio problem still exists.
Quoted 6 lines
Martin, that seems the right way to start and there is no need to hurry.
If nobody has a datasheet, and I can imagine that such an early RF loop through tuner has some specials, you are still in a difficult testing field, even if only on PAL BG for now. Is RF out is active would be still interesting to know.
Quoted 5 lines
Hermann,
There is an FQ1216LME MK3 data sheet here:
http://dl.ivtvdriver.org/datasheets/tuners/FQ1216LME%20Mk3.pdf
Something for the weekend I guess.
Quoted 1 line
Is it safe to assume that the MK5 is not very different from the MK3?
That is what we always did and did not fail so far.
That Chinese SAW filters cause my concern and Dmitry might have them even on a MK5. Needs Philips/NXP confirmation I think.
Quoted 5 lines
I can build an entry for the FQ1216LME based on this datasheet (maybe on Friday night) and hope it works well enough for the MK5.
Regards,
Andy
Best to proceed for now and then testing on PAL_BG as a start.
Cheers,
Hermann
Quoted 26 lines
Quoted 25 lines
If on the same RF signal quality, means no more passive RF splitter in between, I don't know what we can expect, but for example the FM1216ME and the FMD1216ME hybrid MK3s do perform excellent and don't have this "grobkörnige" (grainy?) picture, which you often see on cheaper tuners.
As far as I know, not any such complaints about the MK4s so far too.
Dmitry has some MK3 variant, where the first time on a Philips tuner Chinese SAW filters are employed instead of the original EPCOS filters.
The question, if that could cause performance/sensitivity losses, is not yet answered. Also if this is related to the SECAM DK tweaks he needs.
I would start testing for different sound quality between tuner 56 and
38. Beginning silence on old B/W mono broadcasts could make a difference I somehow have in mind.If 56 still has no sound at all, that should indicate a major technical change compared to prior tuners.
Cheers,
Hermann
Quoted 8 lines · Andy Walls
Hermann,
There is an FQ1216LME MK3 data sheet here:
http://dl.ivtvdriver.org/datasheets/tuners/FQ1216LME%20Mk3.pdf
Is it safe to assume that the MK5 is not very different from the MK3?
I am no expert on the subject, but I found this reference to the MK3 vs MK5:
http://www.nxp.com/acrobat_download/other/products/rf/fq_mk5.pdf
Where it says
"The FQ1200 MK5 family is identical in footprint to the FQ1200 MK3 series, ensuring a quick drop-in replacement."
If the MK5 family is designed as a drop in replacement for the MK3 family, I would think there is a good chance it functions exactly the same.
Anthony
Quoted 16 lines · On Wednesday 27 May 2009 05:28:19 Ant wrote:
Quoted 7 lines · Andy Walls
Hermann,
There is an FQ1216LME MK3 data sheet here:
http://dl.ivtvdriver.org/datasheets/tuners/FQ1216LME%20Mk3.pdf
Is it safe to assume that the MK5 is not very different from the MK3?
I am no expert on the subject, but I found this reference to the MK3 vs MK5:
http://www.nxp.com/acrobat_download/other/products/rf/fq_mk5.pdf
Where it says
Quoted 8 lines
"The FQ1200 MK5 family is identical in footprint to the FQ1200 MK3 series, ensuring a quick drop-in replacement."
If the MK5 family is designed as a drop in replacement for the MK3 family, I would think there is a good chance it functions exactly the same.
Anthony
And in addition I have the datasheets for the FM1216ME_MK3, FM1216ME_MK5 and FQ1236MK5. All combined should give enough information to deduce what if any the changes are between the FQ1216LME MK3 and MK5.
Please mail me who wants these datasheets and I'll send them to you.
Regards,
Hans
Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom
Hi,
Am Mittwoch, den 27.05.2009, 08:09 +0200 schrieb Hans Verkuil:
Quoted 30 lines · On Wednesday 27 May 2009 05:28:19 Ant wrote:
Quoted 16 lines
Quoted 7 lines · Andy Walls
Hermann,
There is an FQ1216LME MK3 data sheet here:
http://dl.ivtvdriver.org/datasheets/tuners/FQ1216LME%20Mk3.pdf
Is it safe to assume that the MK5 is not very different from the MK3?
I am no expert on the subject, but I found this reference to the MK3 vs MK5:
http://www.nxp.com/acrobat_download/other/products/rf/fq_mk5.pdf
Where it says
Quoted 8 lines
"The FQ1200 MK5 family is identical in footprint to the FQ1200 MK3 series, ensuring a quick drop-in replacement."
If the MK5 family is designed as a drop in replacement for the MK3 family, I would think there is a good chance it functions exactly the same.
Anthony
And in addition I have the datasheets for the
FM1216ME_MK3,FM1216ME_MK5and FQ1236MK5. All combined should give enough information to deduce what if any the changes are between the FQ1216LME MK3 and MK5.
Quoted 5 lines
Please mail me who wants these datasheets and I'll send them to you.
Regards,
Hans
on the FQ1216AME.pdf I read it has an on average 10dB LNA for extra high sensitivity and that there must be taken care not to apply to large signals.
This obviously results in this recommendation for IF TOP.
* For optimum setting between overall picture quality and signal handling to fulfill CISPR20/EN55020
requirements, we recommend to use these settings below .
However we recommend customers have the choice to make their own
setting based on their own
application. For example, for cable TV networks, the TOP has to be –4 dB or lower to prevent intermodulation problems.
Likely this is the same on the MK5 and with this background it is clear what Dmitry is talking about these tuners! Nobody mentioned the LNA so far.
Also, on a first look at the FQ1216LME MK3 pdf, loopthrough is active.
And on that one.
Important !!
The FQ1216LME uses the narrowband mode. So the internal AGC mode must be switched off. This
is done by setting the I AGC to 0 by setting AL2=1, AL1=1, AL0=0. At the same time the bits C0 to C6 (IF TOP) must be set according to the table on Pg16.
This disables the internal AGC detector and activates the narrowband AGC. The TOP is
recommended to be set to +4 dB in order to fulfil EN55020. See the programming examples on Pg 19.
So we have tuners needing at least the tda9887 "adjust option" and better have their own entry. Seeing now also port2=1 for the AME MK4 except for Secam L', all makes sense.
Cheers,
Hermann
PATCH 1/1 tuner-simple, tveeprom: Add support for the FQ1216LME MK3
Hi,
This patch:
1. adds explicit support for the FQ1216LME MK3
2. points the tveeprom module to the FQ1216LME MK3 entry for EEPROMs claiming FQ1216LME MK3 and MK5.
3. refactors some code in simple_post_tune() because
a. I needed to set the Auxillary Byte, as did TUNER_LG_TDVS_H06XF, so I could set the TUA6030 TOP to external AGC per the datasheet.
b. I wanted to do fast tuning while managing PLL phase noise, like the TUNER_MICROTUNE_4042FI5 was already doing.
Hermann & Dmitri,
I think what is done for setting the charge pump current for the TUNER_MICROTUNE_4042FI5 & FQ1216LME_MK3 in this patch is better than fixing the control byte to a constant value of 0xce.
Comments?
Regards,
Andy
linux/drivers/media/common/tuners/tuner-simple.c +76 -60
@@ -98,7 +98,6 @@#define TUNER_SIGNAL 0x07#define TUNER_STEREO 0x10 -#define TUNER_PLL_LOCKED 0x40#define TUNER_STEREO_MK3 0x04static DEFINE_MUTEX (tuner_simple_list_mutex);
@@ -386,6 +385,7 @@ *cb |=2 ;break ; +case TUNER_PHILIPS_FQ1216LME_MK3 :case TUNER_MICROTUNE_4042FI5 :/* Set the charge pump for fast tuning */ *config |=TUNER_CHARGE_PUMP ;
@@ -423,77 +423,88 @@return 0 ; } +static int simple_set_aux_byte (struct dvb_frontend *fe,u8 config,u8 aux) +{ +struct tuner_simple_priv *priv = fe->tuner_priv; +int rc; +u8 buffer[2 ]; + + buffer[0 ] = (config & ~0x38 ) |0x18 ; + buffer[1 ] = aux; + +tuner_dbg ("setting aux byte: 0x%02x 0x%02x\n" , buffer[0 ], buffer[1 ]); + + rc =tuner_i2c_xfer_send (&priv->i2c_props, buffer,2 ); +if (2 != rc) +tuner_warn ("i2c i/o error: rc == %d (should be 2)\n" , rc); + +return rc ==2 ?0 : rc; +} + +static int simple_wait_pll_lock (struct dvb_frontend *fe,unsigned int timeout, +unsigned long interval) +{ +unsigned long expire; +int locked =0 ; + +for (expire = jiffies +msecs_to_jiffies (timeout); + !time_after (jiffies, expire); +udelay (interval)) { + +if (tuner_islocked (tuner_read_status (fe))) { + locked =1 ; +break ; + } + } +return locked; +} + +static int simple_set_band_byte (struct dvb_frontend *fe,u8 config,u8 band) +{ +struct tuner_simple_priv *priv = fe->tuner_priv; +int rc; +u8 buffer[2 ]; + + buffer[0 ] = config; + buffer[1 ] = band; + +tuner_dbg ("setting band byte: 0x%02x 0x%02x\n" , buffer[0 ], buffer[1 ]); + + rc =tuner_i2c_xfer_send (&priv->i2c_props, buffer,2 ); +if (2 != rc) +tuner_warn ("i2c i/o error: rc == %d (should be 2)\n" , rc); + +return rc ==2 ?0 : rc; +} +static int simple_post_tune (struct dvb_frontend *fe,u8 *buffer,u16 div,u8 config,u8 cb) {struct tuner_simple_priv *priv = fe->tuner_priv; -int rc;switch (priv->type) {case TUNER_LG_TDVS_H06XF : -/* Set the Auxiliary Byte. */ -#if 0 - buffer[2 ] &= ~0x20 ; - buffer[2 ] |=0x18 ; - buffer[3 ] =0x20 ; -tuner_dbg ("tv 0x%02x 0x%02x 0x%02x 0x%02x\n" , - buffer[0 ], buffer[1 ], buffer[2 ], buffer[3 ]); - - rc =tuner_i2c_xfer_send (&priv->i2c_props, buffer,4 ); -if (4 != rc) -tuner_warn ("i2c i/o error: rc == %d " -"(should be 4)\n" , rc); -#else - buffer[0 ] = buffer[2 ]; - buffer[0 ] &= ~0x20 ; - buffer[0 ] |=0x18 ; - buffer[1 ] =0x20 ; -tuner_dbg ("tv 0x%02x 0x%02x\n" , buffer[0 ], buffer[1 ]); - - rc =tuner_i2c_xfer_send (&priv->i2c_props, buffer,2 ); -if (2 != rc) -tuner_warn ("i2c i/o error: rc == %d " -"(should be 2)\n" , rc); -#endif +simple_set_aux_byte (fe, config,0x20 ); +break ; +case TUNER_PHILIPS_FQ1216LME_MK3 : +simple_set_aux_byte (fe, config,0x60 );/* External AGC */ +/* +* "The loop must be phase-locked during at least 8 periods of +* the internal 7.8125 kHz reference-frequency (i.e. 1 msec) +* before the FL flag is internally set to 1." +* +* Wait 3 msec using a 128 usec poll interval +*/ +simple_wait_pll_lock (fe,3 ,128 ); +/* Set the charge pump for optimized phase noise figure */ +simple_set_band_byte (fe, config & ~TUNER_CHARGE_PUMP , cb);break ;case TUNER_MICROTUNE_4042FI5 : - { -/* FIXME - this may also work for other tuners */ -unsigned long timeout = jiffies +msecs_to_jiffies (1 ); -u8 status_byte =0 ; - -/* Wait until the PLL locks */ -for (;;) { -if (time_after (jiffies, timeout)) -return 0 ; - rc =tuner_i2c_xfer_recv (&priv->i2c_props, - &status_byte,1 ); -if (1 != rc) { -tuner_warn ("i2c i/o read error: rc == %d " -"(should be 1)\n" , rc); -break ; - } -if (status_byte &TUNER_PLL_LOCKED ) -break ; -udelay (10 ); - } - +simple_wait_pll_lock (fe,1 ,10 );/* Set the charge pump for optimized phase noise figure */ - config &= ~TUNER_CHARGE_PUMP ; - buffer[0 ] = (div>>8 ) &0x7f ; - buffer[1 ] = div &0xff ; - buffer[2 ] = config; - buffer[3 ] = cb; -tuner_dbg ("tv 0x%02x 0x%02x 0x%02x 0x%02x\n" , - buffer[0 ], buffer[1 ], buffer[2 ], buffer[3 ]); - - rc =tuner_i2c_xfer_send (&priv->i2c_props, buffer,4 ); -if (4 != rc) -tuner_warn ("i2c i/o error: rc == %d " -"(should be 4)\n" , rc); +simple_set_band_byte (fe, config & ~TUNER_CHARGE_PUMP , cb);break ; } - }return 0 ; }
@@ -526,6 +537,11 @@case TUNER_THOMSON_DTT761X : buffer[3 ] =0x39 ;break ; +case TUNER_PHILIPS_FQ1216LME_MK3 : +tuner_err ("This tuner doesn't have FM\n" ); +/* Set the low band for sanity, since it covers 88-108 MHz */ + buffer[3 ] =0x01 ; +break ;case TUNER_MICROTUNE_4049FM5 :default : buffer[3 ] =0xa4 ;
linux/drivers/media/common/tuners/tuner-types.c +29 -0
@@ -1280,6 +1280,28 @@ }, }; +/* 80-89 */ +/* --------- TUNER_PHILIPS_FQ1216LME_MK3 -- active loopthrough, no FM ------- */ + +static struct tuner_params tuner_fq1216lme_mk3_params[] = { + { + .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 ,/* not specified, but safe to do */ + .has_tda9887 =1 ,/* TDA9886 */ + .port1_active =1 , + .port2_active =1 , + .port2_invert_for_secam_lc =1 , + .default_top_low =4 , + .default_top_mid =4 , + .default_top_high =4 , + .default_top_secam_low =4 , + .default_top_secam_mid =4 , + .default_top_secam_high =4 , + }, +}; +/* --------------------------------------------------------------------- */ struct tunertype tuners[] = {
@@ -1725,6 +1747,13 @@ .params = tuner_fm1216mk5_params, .count = ARRAY_SIZE(tuner_fm1216mk5_params), }, + + /* 80-89 */ + [TUNER_PHILIPS_FQ1216LME_MK3] = { /* PAL/SECAM, Loop-thru, no FM */ + .name = "Philips FQ1216LME MK3 PAL/SECAM w/active loopthrough", + .params = tuner_fq1216lme_mk3_params, + .count = ARRAY_SIZE(tuner_fq1216lme_mk3_params), + }, };EXPORT_SYMBOL (tuners);
linux/drivers/media/video/tveeprom.c +2 -2
@@ -185,7 +185,7 @@ { TUNER_ABSENT, "Silicon TDA8275C1 8290 FM"}, { TUNER_ABSENT, "Thompson DTT757"},/* 80-89 */ - { TUNER_PHILIPS_FM1216ME_MK3, "Philips FQ1216LME MK3"}, + { TUNER_PHILIPS_FQ1216LME_MK3, "Philips FQ1216LME MK3"}, { TUNER_LG_PAL_NEW_TAPC, "LG TAPC G701D"}, { TUNER_LG_NTSC_NEW_TAPC, "LG TAPC H791F"}, { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MB 3"},
@@ -230,7 +230,7 @@ { TUNER_ABSENT, "Samsung THPD5222FG30A"},/* 120-129 */ { TUNER_XC2028, "Xceive XC3028"}, - { TUNER_ABSENT, "Philips FQ1216LME MK5"}, + { TUNER_PHILIPS_FQ1216LME_MK3, "Philips FQ1216LME MK5"}, { TUNER_ABSENT, "Philips FQD1216LME"}, { TUNER_ABSENT, "Conexant CX24118A"}, { TUNER_ABSENT, "TCL DMF11WIP"},
linux/include/media/tuner.h +1 -0
@@ -125,6 +125,7 @@#define TUNER_TCL_MF02GIP_5N 77/* TCL MF02GIP_5N */ #define TUNER_PHILIPS_FMD1216MEX_MK3 78#define TUNER_PHILIPS_FM1216MK5 79 +#define TUNER_PHILIPS_FQ1216LME_MK3 80/* Active loopthrough, no FM */ /* tv card specific */ #define TDA9887_PRESENT (1<<0)
Re: [PATCH] tuner-simple, tveeprom: Add support for the FQ1216LME MK3
Em Fri, 05 Jun 2009 17:52:12 -0400
Andy Walls <[email protected]> escreveu:
Quoted 18 lines
Hi,
This patch:
1. adds explicit support for the FQ1216LME MK3
2. points the tveeprom module to the FQ1216LME MK3 entry for EEPROMs claiming FQ1216LME MK3 and MK5.
3. refactors some code in
simple_post_tune()becausea. I needed to set the Auxillary Byte, as did
TUNER_LG_TDVS_H06XF, so I could set the TUA6030 TOP to external AGC per the datasheet.b. I wanted to do fast tuning while managing PLL phase noise, like the
TUNER_MICROTUNE_4042FI5was already doing.
Quoted 5 lines
Hermann & Dmitri,
I think what is done for setting the charge pump current for the
TUNER_MICROTUNE_4042FI5&FQ1216LME_MK3in this patch is better than fixing the control byte to a constant value of0xce.
The idea seems good, and it is probably interesting to do it also with other tuners.
On a quick view to see the code, however, one part of the code popped up on my eyes:
Quoted 7 lines
linux/drivers/media/common/tuners/tuner-simple.c +7
-0+static int simple_wait_pll_lock (struct dvb_frontend *fe,unsigned int timeout, +unsigned long interval) +{ +unsigned long expire; +int locked =0 ; + + for (expire = jiffies + msecs_to_jiffies(timeout);
linux/drivers/media/common/tuners/tuner-simple.c line 460
Quoted 10 lines
linux/drivers/media/common/tuners/tuner-simple.c +10
-0+ !time_after (jiffies, expire); + udelay(interval)) { + +if (tuner_islocked (tuner_read_status (fe))) { + locked =1 ; +break ; + } + } +return locked; +}
It is better to use a do {} while construct in situations like above, to make the loop easier to read.
Yet, I don't like the idea of using udelay to wait for up a long interval like on the above code - you can delay it up to max(unsigned int) with the above code.
Holding CPU for a long period of time is really a very bad idea. Instead, you should use, for example, a waitqueue for it, like:
static int simple_wait_pll_lock(struct dvb_frontend *fe, unsigned int timeout)
{
DEFINE_WAIT(wait);
wait_event_timeout(wait, tuner_islocked(tuner_read_status(fe)), timeout);
return (tuner_islocked(tuner_read_status(fe)));
}This is cleaner, and, as wait_event_timeout() will call schedule(), the CPU will be released to deal with other tasks or to go to low power consumption level, saving some power (especially important on notebooks) and causing penalty on machine's performance
Cheers,
Mauro
Re: [PATCH] tuner-simple, tveeprom: Add support for the FQ1216LME MK3
Quoted 45 lines · Mauro Carvalho Chehab
Em Fri, 05 Jun 2009 17:52:12 -0400
Andy Walls <[email protected]> escreveu:Quoted 18 lines
Hi,
This patch:
1. adds explicit support for the FQ1216LME MK3
2. points the tveeprom module to the FQ1216LME MK3 entry for EEPROMs claiming FQ1216LME MK3 and MK5.
3. refactors some code in
simple_post_tune()becausea. I needed to set the Auxillary Byte, as did
TUNER_LG_TDVS_H06XF, so I could set the TUA6030 TOP to external AGC per the datasheet.b. I wanted to do fast tuning while managing PLL phase noise, like the
TUNER_MICROTUNE_4042FI5was already doing.Quoted 5 lines
Hermann & Dmitri,
I think what is done for setting the charge pump current for the
TUNER_MICROTUNE_4042FI5&FQ1216LME_MK3in this patch is better than fixing the control byte to a constant value of0xce.The idea seems good, and it is probably interesting to do it also with other tuners.
On a quick view to see the code, however, one part of the code popped up on my eyes:
Quoted 13 lines
linux/drivers/media/common/tuners/tuner-simple.c +13
-0+static int simple_wait_pll_lock (struct dvb_frontend *fe,unsigned int timeout, +unsigned long interval) +{ +unsigned long expire; +int locked =0 ; + +for (expire = jiffies +msecs_to_jiffies (timeout); + !time_after (jiffies, expire); +udelay (interval)) { + +if (tuner_islocked (tuner_read_status (fe))) { + locked =1 ; +break ;
Quoted 8 lines
linux/drivers/media/common/tuners/tuner-simple.c line 460
Quoted 4 lines
linux/drivers/media/common/tuners/tuner-simple.c +4
-0+ } + } +return locked; +}It is better to use a do {} while construct in situations like above, to make the loop easier to read.
Ok. That's easy to change.
Quoted 5 lines
Yet, I don't like the idea of using udelay to wait for up a long interval like on the above code - you can delay it up to max(unsigned int) with the above code.
Holding CPU for a long period of time is really a very bad idea. Instead, you should use, for example, a waitqueue for it, like:
First: I agree busy waiting is simplistic and stupid - things could be done better.
However I essentially only reimplemented the loop that TUNER_MICROTUNE_4042FI5 used: it busy waited for 1 ms in intervals of 10 usecs.
Aside from assuming some sort of exploit, I'm not sure how the loop could wind up busy waiting for max(unsigned int) msecs as the two calls to it were:
simple_wait_pll_lock(fe, 3, 128); simple_wait_pll_lock(fe, 1, 10);
depending on the tuner type. I also though time_after() was supposed to handle jiffies wrapping around.
Quoted 11 lines
static int
simple_wait_pll_lock(struct dvb_frontend *fe, unsigned int timeout){ DEFINE_WAIT(wait); wait_event_timeout(wait, tuner_islocked(tuner_read_status(fe)), timeout); return (tuner_islocked(tuner_read_status(fe))); }This is cleaner, and, as
wait_event_timeout()will callschedule(), the CPU will be released to deal with other tasks or to go to low power consumption level, saving some power (especially important on notebooks) and causing penalty on machine's performance
Well, there's not a real event for which to wait. It's really just going to be a poll of the FL bit at an interval smaller than the minimum wait. Implementing something that schedule()s between the polls shouldn't be that hard.
Although, I'll defer doing something more complex right now though, until I test it with a tuner I have. My real goal was to get the FQ1216LME properly supported.
Over the air analog TV is disappearing for me in 7 days. I may not care about analog tuning perfomance in a week. ;)
Regards,
Andy
Quoted 2 lines
Cheers,
Mauro
PATCH v2 1/1 tuner-simple, tveeprom: Add support for the FQ1216LME MK3
In reply to Andy WallsHi,
This is version 2 of the patch that:
1. adds explicit support for the FQ1216LME MK3
2. points the tveeprom module to the FQ1216LME MK3 entry for EEPROMs claiming FQ1216LME MK3 and MK5.
3. refactors some code in simple_post_tune() because
I needed to set the Auxillary Byte, as did TUNER_LG_TDVS_H06XF, so I could set the TUA6030 TOP to external AGC per the datasheet.
The patch no longer twiddles the CP bit nor polls the FL bit for the FQ1216LME. That will be something for another patch.
Any other comments?
Regards,
Andy
linux/drivers/media/common/tuners/tuner-simple.c +27 -24
@@ -423,6 +423,24 @@return 0 ; } +static int simple_set_aux_byte (struct dvb_frontend *fe,u8 config,u8 aux) +{ +struct tuner_simple_priv *priv = fe->tuner_priv; +int rc; +u8 buffer[2 ]; + + buffer[0 ] = (config & ~0x38 ) |0x18 ; + buffer[1 ] = aux; + +tuner_dbg ("setting aux byte: 0x%02x 0x%02x\n" , buffer[0 ], buffer[1 ]); + + rc =tuner_i2c_xfer_send (&priv->i2c_props, buffer,2 ); +if (2 != rc) +tuner_warn ("i2c i/o error: rc == %d (should be 2)\n" , rc); + +return rc ==2 ?0 : rc; +} +static int simple_post_tune (struct dvb_frontend *fe,u8 *buffer,u16 div,u8 config,u8 cb) {
@@ -431,30 +449,10 @@switch (priv->type) {case TUNER_LG_TDVS_H06XF : -/* Set the Auxiliary Byte. */ -#if 0 - buffer[2 ] &= ~0x20 ; - buffer[2 ] |=0x18 ; - buffer[3 ] =0x20 ; -tuner_dbg ("tv 0x%02x 0x%02x 0x%02x 0x%02x\n" , - buffer[0 ], buffer[1 ], buffer[2 ], buffer[3 ]); - - rc =tuner_i2c_xfer_send (&priv->i2c_props, buffer,4 ); -if (4 != rc) -tuner_warn ("i2c i/o error: rc == %d " -"(should be 4)\n" , rc); -#else - buffer[0 ] = buffer[2 ]; - buffer[0 ] &= ~0x20 ; - buffer[0 ] |=0x18 ; - buffer[1 ] =0x20 ; -tuner_dbg ("tv 0x%02x 0x%02x\n" , buffer[0 ], buffer[1 ]); - - rc =tuner_i2c_xfer_send (&priv->i2c_props, buffer,2 ); -if (2 != rc) -tuner_warn ("i2c i/o error: rc == %d " -"(should be 2)\n" , rc); -#endif +simple_set_aux_byte (fe, config,0x20 ); +break ; +case TUNER_PHILIPS_FQ1216LME_MK3 : +simple_set_aux_byte (fe, config,0x60 );/* External AGC */ break ;case TUNER_MICROTUNE_4042FI5 : {
@@ -526,6 +524,11 @@case TUNER_THOMSON_DTT761X : buffer[3 ] =0x39 ;break ; +case TUNER_PHILIPS_FQ1216LME_MK3 : +tuner_err ("This tuner doesn't have FM\n" ); +/* Set the low band for sanity, since it covers 88-108 MHz */ + buffer[3 ] =0x01 ; +break ;case TUNER_MICROTUNE_4049FM5 :default : buffer[3 ] =0xa4 ;
linux/drivers/media/common/tuners/tuner-types.c +29 -0
@@ -1280,6 +1280,28 @@ }, }; +/* 80-89 */ +/* --------- TUNER_PHILIPS_FQ1216LME_MK3 -- active loopthrough, no FM ------- */ + +static struct tuner_params tuner_fq1216lme_mk3_params[] = { + { + .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 ,/* not specified, but safe to do */ + .has_tda9887 =1 ,/* TDA9886 */ + .port1_active =1 , + .port2_active =1 , + .port2_invert_for_secam_lc =1 , + .default_top_low =4 , + .default_top_mid =4 , + .default_top_high =4 , + .default_top_secam_low =4 , + .default_top_secam_mid =4 , + .default_top_secam_high =4 , + }, +}; +/* --------------------------------------------------------------------- */ struct tunertype tuners[] = {
@@ -1725,6 +1747,13 @@ .params = tuner_fm1216mk5_params, .count = ARRAY_SIZE(tuner_fm1216mk5_params), }, + + /* 80-89 */ + [TUNER_PHILIPS_FQ1216LME_MK3] = { /* PAL/SECAM, Loop-thru, no FM */ + .name = "Philips FQ1216LME MK3 PAL/SECAM w/active loopthrough", + .params = tuner_fq1216lme_mk3_params, + .count = ARRAY_SIZE(tuner_fq1216lme_mk3_params), + }, };EXPORT_SYMBOL (tuners);
linux/drivers/media/video/tveeprom.c +2 -2
@@ -185,7 +185,7 @@ { TUNER_ABSENT, "Silicon TDA8275C1 8290 FM"}, { TUNER_ABSENT, "Thompson DTT757"},/* 80-89 */ - { TUNER_PHILIPS_FM1216ME_MK3, "Philips FQ1216LME MK3"}, + { TUNER_PHILIPS_FQ1216LME_MK3, "Philips FQ1216LME MK3"}, { TUNER_LG_PAL_NEW_TAPC, "LG TAPC G701D"}, { TUNER_LG_NTSC_NEW_TAPC, "LG TAPC H791F"}, { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MB 3"},
@@ -230,7 +230,7 @@ { TUNER_ABSENT, "Samsung THPD5222FG30A"},/* 120-129 */ { TUNER_XC2028, "Xceive XC3028"}, - { TUNER_ABSENT, "Philips FQ1216LME MK5"}, + { TUNER_PHILIPS_FQ1216LME_MK3, "Philips FQ1216LME MK5"}, { TUNER_ABSENT, "Philips FQD1216LME"}, { TUNER_ABSENT, "Conexant CX24118A"}, { TUNER_ABSENT, "TCL DMF11WIP"},
linux/include/media/tuner.h +1 -0
@@ -125,6 +125,7 @@#define TUNER_TCL_MF02GIP_5N 77/* TCL MF02GIP_5N */ #define TUNER_PHILIPS_FMD1216MEX_MK3 78#define TUNER_PHILIPS_FM1216MK5 79 +#define TUNER_PHILIPS_FQ1216LME_MK3 80/* Active loopthrough, no FM */ /* tv card specific */ #define TDA9887_PRESENT (1<<0)
Re: [PATCH v2] tuner-simple, tveeprom: Add support for the FQ1216LME MK3
Am Samstag, 6. Juni 2009 03:59:41 schrieb Andy Walls:
Quoted 14 lines
Hi,
This is version 2 of the patch that:
1. adds explicit support for the FQ1216LME MK3
2. points the tveeprom module to the FQ1216LME MK3 entry for EEPROMs claiming FQ1216LME MK3 and MK5.
3. refactors some code in
simple_post_tune()because
I needed to set the Auxillary Byte, as didTUNER_LG_TDVS_H06XF, so I could set the TUA6030 TOP to external AGC per the datasheet.
Quoted 6 lines
The patch no longer twiddles the CP bit nor polls the FL bit for the FQ1216LME. That will be something for another patch.
Any other comments?
Hi Andy,
I have tested this with a current v4l-dvb hg and kernel 2.6.29 with my PVR 150 (FQ1216LME MK5).
It works like using tuner type 38, but unfortunately it does not solve the problem of ocassionally loosing audio. This happens even on the video inputs!
I need to do further testings with older drivers/kernels to verify if this may be an issue of the new i2c stuff. Testing is very difficult, because sometimes it works for an hour and more, maybe depending on the temperature or the moon phase.
The problem reminds me a little bit on this:
http://www.gossamer-threads.com/lists/ivtv/users/39029
This is what dmesg says:
[ 1864.639391] ivtv: Start initialization, version 1.4.1 [ 1864.639484] ivtv0: Initializing card 0 [ 1864.639489] ivtv0: Autodetected Hauppauge card (cx23416 based) [ 1864.641281] ivtv 0000:01:09.0: PCI INT A -> Link[APC4] -> GSI 19 (level, low) -> IRQ 19 [ 1864.694693] tveeprom 0-0050: Hauppauge model 26709, rev F0C1, serial# 9585403 [ 1864.694697] tveeprom 0-0050: tuner model is Philips FQ1216LME MK5 (idx 121, type 80) [ 1864.694700] tveeprom 0-0050: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/D1/K) (eeprom 0x74) [ 1864.694703] tveeprom 0-0050: audio processor is CX25843 (idx 37) [ 1864.694705] tveeprom 0-0050: decoder processor is CX25843 (idx 30) [ 1864.694707] tveeprom 0-0050: has no radio [ 1864.694709] ivtv0: Autodetected Hauppauge WinTV PVR-150 [ 1864.704531] cx25840 0-0044: cx25843-24 found @ 0x88 (ivtv i2c driver #0) [ 1864.723533] tuner 0-0043: chip found @ 0x86 (ivtv i2c driver #0) [ 1864.723613] tda9887 0-0043: creating new instance [ 1864.723615] tda9887 0-0043: tda988[5/6/7] found [ 1864.730824] tuner 0-0061: chip found @ 0xc2 (ivtv i2c driver #0) [ 1864.741408] wm8775 0-001b: chip found @ 0x36 (ivtv i2c driver #0) [ 1864.749596] tuner-simple 0-0061: creating new instance [ 1864.749599] tuner-simple 0-0061: type set to 80 (Philips FQ1216LME MK3 PAL/SECAM w/active loopthrough) [ 1864.752114] IRQ 19/ivtv0: IRQF_DISABLED is not guaranteed on shared IRQs [ 1864.753099] ivtv0: Registered device video0 for encoder MPG (4096 kB) [ 1864.756347] ivtv0: Registered device video32 for encoder YUV (2048 kB) [ 1864.760023] ivtv0: Registered device vbi1 for encoder VBI (1024 kB) [ 1864.764195] ivtv0: Registered device video24 for encoder PCM (320 kB) [ 1864.764199] ivtv0: Initialized card: Hauppauge WinTV PVR-150 [ 1864.770863] ivtv: End initialization [ 1864.797718] usbcore: registered new interface driver pvrusb2 [ 1864.797727] pvrusb2: V4L in-tree version:Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner [ 1864.797729] pvrusb2: Debug mask is 31 (0x1f) [ 1864.843601] saa7146: register extension 'budget_ci dvb'. [ 1864.862564] saa7146: register extension 'budget dvb'. [ 1864.891936] b2c2-flexcop: B2C2 FlexcopII/II(b)/III digital TV receiver chip loaded successfully [ 1865.423084] lirc_serial: auto-detected active low receiver [ 1865.423089] lirc_dev: lirc_register_driver: sample_rate: 0 [ 1865.424882] lirc_serial $Revision: 5.100 $ registered [ 1871.259020] ivtv 0000:01:09.0: firmware: requesting v4l-cx2341x-enc.fw [ 1871.298034] ivtv0: Loaded v4l-cx2341x-enc.fw firmware (376836 bytes) [ 1871.498142] ivtv0: Encoder revision: 0x02060039 [ 1871.514028] cx25840 0-0044: firmware: requesting v4l-cx25840.fw [ 1874.755988] cx25840 0-0044: loaded v4l-cx25840.fw firmware (16382 bytes) [ 4426.500017] Clocksource tsc unstable (delta = -62502716 ns)
Greets,
Martin
Quoted 6 lines · On Tuesday 26 May 2009 22:21:31 Martin Dauskardt wrote:
I should add that the picture quality is with all tested tuner types worse than with my PVR250/350. I don't know if a PVR150 is in generally worse than a PVR250. I can't call it really noisy, but in german I would say the picture is a little bit "grobkörnig". It really needs a temporal filter setting of value 8 or more, while my other PVR cards have a nice quality even with value 0.
It's always been my impression that the saa7115/msp3400 combo is superior to the cx2584x. I can't prove it, but the PVR150 picture quality is never as sharp as what I get with my PVR350.
Regards,
Hans
Quoted 5 lines
I will test whatever you guys want me to test :-) But I am not a programmer, so I need detailled instructions what to patch.
My next step will be testing an older v4l2 with an 2.6.27 kernel to see if the audio problem still exists.
Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom
Hi Martin,
For some reason, I'm not getting any of your replies to the lists. (I'm getting Hermann's posts though)
Quoted 42 lines · hermann pitton
Hi,
Am Montag, den 25.05.2009, 21:34 +0200 schrieb Martin Dauskardt:
Quoted 39 lines
Quoted 1 line
#define
TUNER_PHILIPS_FQ1216ME24 /* you must actively selectB/G/D/K, I, L, L` */
Quoted 4 lines
#define
TUNER_PHILIPS_FQ1216AME_MK456 /* Hauppauge PVR-150 PAL */#define
TUNER_PHILIPS_FM1216ME_MK338Quoted 8 lines
#define TUNER_PHILIPS_FMD1216ME_MK3 63 #define TUNER_PHILIPS_FMD1216MEX_MK3 78 #define TUNER_PHILIPS_FM1216MK5 79Could the user try one of those, starting with the FQ1216 tuner numbers (24 and 56), to see if one of them works? For the FQ1261LME MK3, tveeprom has the
FM1216ME_MK3tuner number (38).I have this card now at home for testing. First results:
#define
TUNER_PHILIPS_FQ1216ME24 /* you must actively select B/G/D/K, I, L,
Result: only static#define
TUNER_PHILIPS_FM1216ME_MK338
result: picture + sound o.k.#define
TUNER_PHILIPS_FQ1216AME_MK456 /* Hauppauge PVR-150 PAL */
result: picture o.k., but no sound#define
TUNER_PHILIPS_FMD1216ME_MK363
result: picture + sound o.k.#define
TUNER_PHILIPS_FMD1216MEX_MK378
result: picture + sound o.k.#define
TUNER_PHILIPS_FM1216MK579
result: picture o.k. , but audio disappears every few seconds (for about 1-2 seconds, then comes back)tuner type 63 and 79 are Hybrid tuners. This is fore sure an analogue-only tuner. The sticker says "Multi-PAL", and according to
VIDIOC_ENUMSTDit supports PAL, PAL-BG and PAL-H.
Yes, the hybrid tuners defintions obviously aren't right. Sorry I missed that with my initial suggestions. I'm not sure that I would believe what VIDIOC_ENUMSTD reports without a proper tuner definition (I haven't looked up the details on what the ioctl actually does though).
Quoted 1 line
Quoted 1 line
So I think 38 is right. Any suggestions for further tests?
When you don't specifiy a tuner number at all, does the driver loading detect a tda988x chip?
With tuner type 24, does setting the video standard explicitly with
v4l2-ctl -s pal-B
or something similar help?
Anyway, it looks like Hermann has already got a better idea of what the tuner definition might be. (I haven't been keeping up with the conversation. If you and Hermann can figure out something faster, off-list using German, I won't be offended by being left out of the conversation.)
Regards,
Andy
Quoted 60 lines
in my opinion the entry of tuner type 24 is buggy. I posted once about it, but it is long ago.
/* ------------
TUNER_PHILIPS_FQ1216ME- Philips PAL ------------ */static struct tuner_params tuner_philips_fq1216me_params[] = { { .type = TUNER_PARAM_TYPE_PAL, .ranges = tuner_lg_pal_ranges, .count = ARRAY_SIZE(tuner_lg_pal_ranges), .has_tda9887 = 1, .port1_active = 1, .port2_active = 1, .port2_invert_for_secam_lc = 1, }, };At least
tuner_lg_pal_rangesmust be wrong for an MK3 and UHF should fail, if you can test on that. Switch must be0x04and not0x08.The hybrid tuners are also not compatible to an FM1216ME/I MK3. They miss some frequencies when used for such an one and some low VHF channels are snowy. The tda9887 is also not visible on them without special initialization in
tuner-core.cfor them. Likely not the case on yours.FQ types from Philips are without radio support. FM types have radio. Also the
FMD1216MEX_MK3has a different radio IF, BTW.Previously I did recommend tuner 56 for them, but now with the more detailed tda988/5/6/7 settings it misses .port2_active = 1. Hans likely knows that it is right and else we would have reports from people using it I guess. Hm.
You could test with tda9887 port2=0, if you get sound on that one too.
If the entry is correct and can't be changed, we likely need a new tuner entry or the
TUNER_PHILIPS_FQ1216MEmust use mk3 ranges on UHF. But on that one I have some doubts at all. How could it happen, given how old it is and previously without tda9887 at all, that the wrong UHF switch is undiscovered until today?Hm, the new MK5 has trouble with sound, FM anyway, but
TUNER_PHILIPS_FM1216MK5is a complete clone of the FM1216ME MK3, except for the discussed 1MHz change for UHF beginning and0xceversus0x8e. IIRC,0xceshould be even the better choice on tuners without radio, but I need to look it up again or Andy is more aware about the recent discussions. (faster tuning bit)Maybe Dmitry has a datasheet for that one too.
One question, which might be interesting is the RF loop through. Is it enabled by default or even switchable?
The latter would be reason enough to create a new tuner type I think.
Just some quick ideas. (ivtv will bounce me, not subscribed)
Cheers,
Hermann
Hi Andy,
Am Dienstag, den 26.05.2009, 21:38 -0400 schrieb Andy Walls:
Quoted 4 lines
Hi Martin,
For some reason, I'm not getting any of your replies to the lists. (I'm getting Hermann's posts though)
that is something I have seen since the beginning of changing to vger too and it is very annoying.
Quoted 63 lines · hermann pitton
Quoted 42 lines
Hi,
Am Montag, den 25.05.2009, 21:34 +0200 schrieb Martin Dauskardt:
Quoted 39 lines
Quoted 1 line
#define
TUNER_PHILIPS_FQ1216ME24 /* you must actively selectB/G/D/K, I, L, L` */
Quoted 4 lines
#define
TUNER_PHILIPS_FQ1216AME_MK456 /* Hauppauge PVR-150 PAL */#define
TUNER_PHILIPS_FM1216ME_MK338Quoted 8 lines
#define TUNER_PHILIPS_FMD1216ME_MK3 63 #define TUNER_PHILIPS_FMD1216MEX_MK3 78 #define TUNER_PHILIPS_FM1216MK5 79Could the user try one of those, starting with the FQ1216 tuner numbers (24 and 56), to see if one of them works? For the FQ1261LME MK3, tveeprom has the
FM1216ME_MK3tuner number (38).I have this card now at home for testing. First results:
#define
TUNER_PHILIPS_FQ1216ME24 /* you must actively select B/G/D/K, I, L,
Result: only static#define
TUNER_PHILIPS_FM1216ME_MK338
result: picture + sound o.k.#define
TUNER_PHILIPS_FQ1216AME_MK456 /* Hauppauge PVR-150 PAL */
result: picture o.k., but no sound#define
TUNER_PHILIPS_FMD1216ME_MK363
result: picture + sound o.k.#define
TUNER_PHILIPS_FMD1216MEX_MK378
result: picture + sound o.k.#define
TUNER_PHILIPS_FM1216MK579
result: picture o.k. , but audio disappears every few seconds (for about 1-2 seconds, then comes back)tuner type 63 and 79 are Hybrid tuners. This is fore sure an analogue-only tuner. The sticker says "Multi-PAL", and according to
VIDIOC_ENUMSTDit supports PAL, PAL-BG and PAL-H.Yes, the hybrid tuners defintions obviously aren't right. Sorry I missed that with my initial suggestions. I'm not sure that I would believe what
VIDIOC_ENUMSTDreports without a proper tuner definition (I haven't looked up the details on what the ioctl actually does though).Quoted 1 line
Quoted 1 line
So I think 38 is right. Any suggestions for further tests?
When you don't specifiy a tuner number at all, does the driver loading detect a tda988x chip?
With tuner type 24, does setting the video standard explicitly with
v4l2-ctl -s pal-Bor something similar help?
Quoted 8 lines
Anyway, it looks like Hermann has already got a better idea of what the tuner definition might be. (I haven't been keeping up with the conversation. If you and Hermann can figure out something faster, off-list using German, I won't be offended by being left out of the conversation.)
Regards,
Andy
Andy, please stay. You are most welcome.
Sorry, always late looking at this, I don't care much about better English, but likely should do.
Cheers,
Hermann
Quoted 63 lines
Quoted 61 lines
in my opinion the entry of tuner type 24 is buggy. I posted once about it, but it is long ago.
/* ------------
TUNER_PHILIPS_FQ1216ME- Philips PAL ------------ */static struct tuner_params tuner_philips_fq1216me_params[] = { { .type = TUNER_PARAM_TYPE_PAL, .ranges = tuner_lg_pal_ranges, .count = ARRAY_SIZE(tuner_lg_pal_ranges), .has_tda9887 = 1, .port1_active = 1, .port2_active = 1, .port2_invert_for_secam_lc = 1, }, };At least
tuner_lg_pal_rangesmust be wrong for an MK3 and UHF should fail, if you can test on that. Switch must be0x04and not0x08.The hybrid tuners are also not compatible to an FM1216ME/I MK3. They miss some frequencies when used for such an one and some low VHF channels are snowy. The tda9887 is also not visible on them without special initialization in
tuner-core.cfor them. Likely not the case on yours.FQ types from Philips are without radio support. FM types have radio. Also the
FMD1216MEX_MK3has a different radio IF, BTW.Previously I did recommend tuner 56 for them, but now with the more detailed tda988/5/6/7 settings it misses .port2_active = 1. Hans likely knows that it is right and else we would have reports from people using it I guess. Hm.
You could test with tda9887 port2=0, if you get sound on that one too.
If the entry is correct and can't be changed, we likely need a new tuner entry or the
TUNER_PHILIPS_FQ1216MEmust use mk3 ranges on UHF. But on that one I have some doubts at all. How could it happen, given how old it is and previously without tda9887 at all, that the wrong UHF switch is undiscovered until today?Hm, the new MK5 has trouble with sound, FM anyway, but
TUNER_PHILIPS_FM1216MK5is a complete clone of the FM1216ME MK3, except for the discussed 1MHz change for UHF beginning and0xceversus0x8e. IIRC,0xceshould be even the better choice on tuners without radio, but I need to look it up again or Andy is more aware about the recent discussions. (faster tuning bit)Maybe Dmitry has a datasheet for that one too.
One question, which might be interesting is the RF loop through. Is it enabled by default or even switchable?
The latter would be reason enough to create a new tuner type I think.
Just some quick ideas. (ivtv will bounce me, not subscribed)
Cheers,
Hermann