All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] FM1216ME_MK3 some changes
@ 2009-04-22  7:48 Dmitri Belimov
  2009-04-23  2:08 ` Andy Walls
  0 siblings, 1 reply; 42+ messages in thread
From: Dmitri Belimov @ 2009-04-22  7:48 UTC (permalink / raw)
  To: video4linux-list

[-- Attachment #1: Type: text/plain, Size: 992 bytes --]

Hi All

1. Change middle band. In the end of the middle band the sensitivity of receiver not good.
If we switch to higher band, sensitivity more better. Hardware trick.

2. Set correct highest freq of the higher band.

3. Set charge pump bit

diff -r 43dbc8ebb5a2 linux/drivers/media/common/tuners/tuner-types.c
--- a/linux/drivers/media/common/tuners/tuner-types.c	Tue Jan 27 23:47:50 2009 -0200
+++ b/linux/drivers/media/common/tuners/tuner-types.c	Tue Apr 21 09:44:38 2009 +1000
@@ -557,9 +557,9 @@
 /* ------------ TUNER_PHILIPS_FM1216ME_MK3 - Philips PAL ------------ */
 
 static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = {
-	{ 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
-	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
-	{ 16 * 999.99        , 0x8e, 0x04, },
+	{ 16 * 158.00 /*MHz*/, 0xc6, 0x01, },
+	{ 16 * 441.00 /*MHz*/, 0xc6, 0x02, },
+	{ 16 * 864.00        , 0xc6, 0x04, },
 };
 


Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

With my best regards, Dmitry.

[-- Attachment #2: behold_mk3_range.diff --]
[-- Type: text/x-patch, Size: 717 bytes --]

diff -r 43dbc8ebb5a2 linux/drivers/media/common/tuners/tuner-types.c
--- a/linux/drivers/media/common/tuners/tuner-types.c	Tue Jan 27 23:47:50 2009 -0200
+++ b/linux/drivers/media/common/tuners/tuner-types.c	Tue Apr 21 09:44:38 2009 +1000
@@ -557,9 +557,9 @@
 /* ------------ TUNER_PHILIPS_FM1216ME_MK3 - Philips PAL ------------ */
 
 static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = {
-	{ 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
-	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
-	{ 16 * 999.99        , 0x8e, 0x04, },
+	{ 16 * 158.00 /*MHz*/, 0xc6, 0x01, },
+	{ 16 * 441.00 /*MHz*/, 0xc6, 0x02, },
+	{ 16 * 864.00        , 0xc6, 0x04, },
 };
 


Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-23  2:08 ` Andy Walls
@ 2009-04-23  1:52   ` hermann pitton
  2009-04-23 10:36   ` Dmitri Belimov
  1 sibling, 0 replies; 42+ messages in thread
From: hermann pitton @ 2009-04-23  1:52 UTC (permalink / raw)
  To: Andy Walls; +Cc: Dmitri Belimov, video4linux-list, linux-media


Hi Andy and Dmitry,

Am Mittwoch, den 22.04.2009, 22:08 -0400 schrieb Andy Walls:
> Dmitri,
> 
> 
> On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > Hi All
> > 
> > 1. Change middle band. In the end of the middle band the sensitivity of receiver not good.
> > If we switch to higher band, sensitivity more better. Hardware trick.

first of all, Dmitry, you need to send all your patches, also the prior
ones, to linux-media@vger.kernel.org. Only there "patchwork" will parse
for them and you might eventually find them here.
http://patchwork.kernel.org/project/linux-media/list
http://patchwork.kernel.org/project/linux-media/list/?state=*

You seem to have missed that completely and thanks to Andy to start to
comment on this one, even only on video4linux previously.

> This concerns me slightly as it does not match the datasheet (hence the
> design objectives) of the FM1236ME_MK3.
> 
> How are you measuring sensitivity?  Do you know if it really is the
> middle-band preselector filter (and PLL and Mixer) or is it a problem
> with the input signal?  How do you know it is not manufacturing
> variations in the preselector filters with the particular tuner assembly
> you are testing?

I did not look into the datasheet again, we did not have it at all for a
very long time, but we had a similar case already and that time we made
the decision like it can be found in this thread. No complaints ever
until today.

http://marc.info/?l=linux-video&m=112639247330257&w=2

Did not look up all frequency tables again, but if it is the same again,
I would say the risk of doing something wrong is close to zero.

For the rest I never noticed any difference and we have it on lots of
other tuners like that. And, that one still means a lot of _different_
tuners and different manufacturers, filters definitely differ! ...

> Also, as an alternative to using a different frequency for the
> bandswitch, have you considered setting the Auxillary Byte in the tuner
> chip (Infineon TUA6030?) to use external AGC and experimented with
> changing the tuner AGC take-over point (TOP) in the TDA9887?
> 
> By maximizing the gain in the tuner chip, but avoiding clipping, with
> the proper TOP setting, you minimize the contributions by the rest of
> the receive chain to the overall receiver Noise Figure:
> 
> http://en.wikipedia.org/wiki/Friis_formulas_for_noise
> 
> This may be a way to improve receiver sensitivity that does not conflict
> with the data sheet specification.
> 
> 
> 
> 
> > 2. Set correct highest freq of the higher band.
> 
> :)
> 
> This bothers me too; all the tuners in tuner-types.c have it set too
> high (999.0 MHz).  I think I rememeber at time when all the tuner_range
> definitions had a real value there.
> 
> It would be nice to have a real value there for all the tuners.  The
> function tuner-simple.c:simple_config_lookup() would then prevent
> attempts to tune to an unsupported frequnecy.
> 
> 
> 
> > 3. Set charge pump bit
> 
> This will improve the time to initially tune to a frequency, but will
> likely add some noise as the PLL continues to maintain lock on the
> signal.  If there is no way to turn off the CP after the lock bit is set
> in the tuner, it's probably better to leave it off for lower noise and
> just live with slower tuning.
> 
> Leaving the CP bit set should be especially noticable ad FM noise when
> set to tune to FM radio stations.  From the FM1236ME_MK3 datasheet:
> "It is recommended to set CP=0 in the FM mode at all times."
> But the VHF low band control byte is also used when setting FM radio
> (AFAICT with a quick look at the code.)
> 
> Regards,
> Andy
> 
> > diff -r 43dbc8ebb5a2 linux/drivers/media/common/tuners/tuner-types.c
> > --- a/linux/drivers/media/common/tuners/tuner-types.c	Tue Jan 27 23:47:50 2009 -0200
> > +++ b/linux/drivers/media/common/tuners/tuner-types.c	Tue Apr 21 09:44:38 2009 +1000
> > @@ -557,9 +557,9 @@
> >  /* ------------ TUNER_PHILIPS_FM1216ME_MK3 - Philips PAL ------------ */
> >  
> >  static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = {
> > -	{ 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
> > -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> > -	{ 16 * 999.99        , 0x8e, 0x04, },
> > +	{ 16 * 158.00 /*MHz*/, 0xc6, 0x01, },
> > +	{ 16 * 441.00 /*MHz*/, 0xc6, 0x02, },
> > +	{ 16 * 864.00        , 0xc6, 0x04, },
> >  };
> >  
> > 
> > 
> > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
> > 
> > With my best regards, Dmitry.

Cheers,
Hermann



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-22  7:48 [PATCH] FM1216ME_MK3 some changes Dmitri Belimov
@ 2009-04-23  2:08 ` Andy Walls
  2009-04-23  1:52   ` hermann pitton
  2009-04-23 10:36   ` Dmitri Belimov
  0 siblings, 2 replies; 42+ messages in thread
From: Andy Walls @ 2009-04-23  2:08 UTC (permalink / raw)
  To: Dmitri Belimov; +Cc: video4linux-list, linux-media

Dmitri,


On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> Hi All
> 
> 1. Change middle band. In the end of the middle band the sensitivity of receiver not good.
> If we switch to higher band, sensitivity more better. Hardware trick.

This concerns me slightly as it does not match the datasheet (hence the
design objectives) of the FM1236ME_MK3.

How are you measuring sensitivity?  Do you know if it really is the
middle-band preselector filter (and PLL and Mixer) or is it a problem
with the input signal?  How do you know it is not manufacturing
variations in the preselector filters with the particular tuner assembly
you are testing?

Also, as an alternative to using a different frequency for the
bandswitch, have you considered setting the Auxillary Byte in the tuner
chip (Infineon TUA6030?) to use external AGC and experimented with
changing the tuner AGC take-over point (TOP) in the TDA9887?

By maximizing the gain in the tuner chip, but avoiding clipping, with
the proper TOP setting, you minimize the contributions by the rest of
the receive chain to the overall receiver Noise Figure:

http://en.wikipedia.org/wiki/Friis_formulas_for_noise

This may be a way to improve receiver sensitivity that does not conflict
with the data sheet specification.




> 2. Set correct highest freq of the higher band.

:)

This bothers me too; all the tuners in tuner-types.c have it set too
high (999.0 MHz).  I think I rememeber at time when all the tuner_range
definitions had a real value there.

It would be nice to have a real value there for all the tuners.  The
function tuner-simple.c:simple_config_lookup() would then prevent
attempts to tune to an unsupported frequnecy.



> 3. Set charge pump bit

This will improve the time to initially tune to a frequency, but will
likely add some noise as the PLL continues to maintain lock on the
signal.  If there is no way to turn off the CP after the lock bit is set
in the tuner, it's probably better to leave it off for lower noise and
just live with slower tuning.

Leaving the CP bit set should be especially noticable ad FM noise when
set to tune to FM radio stations.  From the FM1236ME_MK3 datasheet:
"It is recommended to set CP=0 in the FM mode at all times."
But the VHF low band control byte is also used when setting FM radio
(AFAICT with a quick look at the code.)

Regards,
Andy

> diff -r 43dbc8ebb5a2 linux/drivers/media/common/tuners/tuner-types.c
> --- a/linux/drivers/media/common/tuners/tuner-types.c	Tue Jan 27 23:47:50 2009 -0200
> +++ b/linux/drivers/media/common/tuners/tuner-types.c	Tue Apr 21 09:44:38 2009 +1000
> @@ -557,9 +557,9 @@
>  /* ------------ TUNER_PHILIPS_FM1216ME_MK3 - Philips PAL ------------ */
>  
>  static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = {
> -	{ 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
> -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> -	{ 16 * 999.99        , 0x8e, 0x04, },
> +	{ 16 * 158.00 /*MHz*/, 0xc6, 0x01, },
> +	{ 16 * 441.00 /*MHz*/, 0xc6, 0x02, },
> +	{ 16 * 864.00        , 0xc6, 0x04, },
>  };
>  
> 
> 
> Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
> 
> With my best regards, Dmitry.
> --
> video4linux-list mailing list
> Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/video4linux-list


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-23  2:08 ` Andy Walls
  2009-04-23  1:52   ` hermann pitton
@ 2009-04-23 10:36   ` Dmitri Belimov
  2009-04-24  1:43     ` Andy Walls
  1 sibling, 1 reply; 42+ messages in thread
From: Dmitri Belimov @ 2009-04-23 10:36 UTC (permalink / raw)
  To: Andy Walls; +Cc: video4linux-list, linux-media

Hi Andy

> Dmitri,
> 
> 
> On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > Hi All
> > 
> > 1. Change middle band. In the end of the middle band the
> > sensitivity of receiver not good. If we switch to higher band,
> > sensitivity more better. Hardware trick.
> 
> This concerns me slightly as it does not match the datasheet (hence
> the design objectives) of the FM1236ME_MK3.

Yes, I know.

> How are you measuring sensitivity?  Do you know if it really is the
> middle-band preselector filter (and PLL and Mixer) or is it a problem
> with the input signal?  How do you know it is not manufacturing
> variations in the preselector filters with the particular tuner
> assembly you are testing?

Several years a go your customers write some messages about bad quality of TV
if frequency of TV is the end of band. It can be low band or middle. Our
hardware engeneer make some tests with hardware TV generator and our TV tuners.

If we set default frequency range for low and middle band, quality of TV signal 
on 159MHz and 442 MHz is bad. When we make our changes with moving end of bands
the quality of TV much better. And our system programmer for OS Windows use changed
bands for drivers. Customers be happy.

You can test it if in your placement available TV programm on 159MHz or 442MHz. This trick
can be usefull for other tuners.

> Also, as an alternative to using a different frequency for the
> bandswitch, have you considered setting the Auxillary Byte in the
> tuner chip (Infineon TUA6030?) to use external AGC and experimented
> with changing the tuner AGC take-over point (TOP) in the TDA9887?
> 
> By maximizing the gain in the tuner chip, but avoiding clipping, with
> the proper TOP setting, you minimize the contributions by the rest of
> the receive chain to the overall receiver Noise Figure:
> 
> http://en.wikipedia.org/wiki/Friis_formulas_for_noise
> 
> This may be a way to improve receiver sensitivity that does not
> conflict with the data sheet specification.
> 
> 
> 
> 
> > 2. Set correct highest freq of the higher band.
> 
> :)
> 
> This bothers me too; all the tuners in tuner-types.c have it set too
> high (999.0 MHz).  I think I rememeber at time when all the
> tuner_range definitions had a real value there.
> 
> It would be nice to have a real value there for all the tuners.  The
> function tuner-simple.c:simple_config_lookup() would then prevent
> attempts to tune to an unsupported frequnecy.
> 
> 
> 
> > 3. Set charge pump bit
> 
> This will improve the time to initially tune to a frequency, but will
> likely add some noise as the PLL continues to maintain lock on the
> signal.  If there is no way to turn off the CP after the lock bit is
> set in the tuner, it's probably better to leave it off for lower
> noise and just live with slower tuning.

We discuss with our windows system programmer about it. He sad that
in analog TV mode noise from PLL don't give any problem. But in digital TV mode
noise from PLL decreased BER.

> Leaving the CP bit set should be especially noticable ad FM noise when
> set to tune to FM radio stations.  From the FM1236ME_MK3 datasheet:
> "It is recommended to set CP=0 in the FM mode at all times."
> But the VHF low band control byte is also used when setting FM radio
> (AFAICT with a quick look at the code.)

Yes. You are right. We can swith CP off in FM mode.

With my best regards, Dmitry.

> 
> Regards,
> Andy
> 
> > diff -r 43dbc8ebb5a2 linux/drivers/media/common/tuners/tuner-types.c
> > --- a/linux/drivers/media/common/tuners/tuner-types.c	Tue
> > Jan 27 23:47:50 2009 -0200 +++
> > b/linux/drivers/media/common/tuners/tuner-types.c	Tue Apr 21
> > 09:44:38 2009 +1000 @@ -557,9 +557,9 @@ /* ------------
> > TUNER_PHILIPS_FM1216ME_MK3 - Philips PAL ------------ */ 
> >  static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = {
> > -	{ 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
> > -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> > -	{ 16 * 999.99        , 0x8e, 0x04, },
> > +	{ 16 * 158.00 /*MHz*/, 0xc6, 0x01, },
> > +	{ 16 * 441.00 /*MHz*/, 0xc6, 0x02, },
> > +	{ 16 * 864.00        , 0xc6, 0x04, },
> >  };
> >  
> > 
> > 
> > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
> > <d.belimov@gmail.com>
> > 
> > With my best regards, Dmitry.
> > --
> > video4linux-list mailing list
> > Unsubscribe
> > mailto:video4linux-list-request@redhat.com?subject=unsubscribe
> > https://www.redhat.com/mailman/listinfo/video4linux-list
> 

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-24  1:43     ` Andy Walls
@ 2009-04-24  1:06       ` hermann pitton
  2009-04-24  1:34         ` hermann pitton
  2009-04-26 13:58       ` Dmitri Belimov
  2009-04-27  9:29       ` Dmitri Belimov
  2 siblings, 1 reply; 42+ messages in thread
From: hermann pitton @ 2009-04-24  1:06 UTC (permalink / raw)
  To: Andy Walls; +Cc: Dmitri Belimov, video4linux-list, linux-media

Hi,

Am Donnerstag, den 23.04.2009, 21:43 -0400 schrieb Andy Walls:
> Hi Dmitri,
> 
> Thank you for you responses.
> 
> Just a few more comments...
> 
> On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > Hi Andy
> > 
> > > Dmitri,
> > > 
> > > 
> > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > > > Hi All
> > > > 
> > > > 1. Change middle band. In the end of the middle band the
> > > > sensitivity of receiver not good. If we switch to higher band,
> > > > sensitivity more better. Hardware trick.
> > > 
> 
> > Several years a go your customers write some messages about bad quality of TV
> > if frequency of TV is the end of band. It can be low band or middle. Our
> > hardware engeneer make some tests with hardware TV generator and our TV tuners.
> > 
> > If we set default frequency range for low and middle band, quality of TV signal 
> > on 159MHz and 442 MHz is bad. When we make our changes with moving end of bands
> > the quality of TV much better. And our system programmer for OS Windows use changed
> > bands for drivers. Customers be happy.
> 
> OK.  A properly run experiment wins over theory every time. :)
> 
> 
> 
> > You can test it if in your placement available TV programm on 159MHz or 442MHz. This trick
> > can be usefull for other tuners.
> 
> If you look at tveeprom.c, a number of other tuners are using that tuner
> definition:
> 
> $ grep FM1216ME_MK3 tveeprom.c
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216ME MK3"},
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216 ME MK3"},
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME MK3"},
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05 2"},
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME MK5"},
> 
> If your change makes things bad for the other tuners, we'll probably
> have to create an alternate entry for the other tuners instead of using
> the FM1216ME_MK3 defintion.  I suspect most of them are clones of the
> FM1216ME MK3 however, so it probably won't matter.
> 
> > > > 3. Set charge pump bit
> > > 
> > > This will improve the time to initially tune to a frequency, but will
> > > likely add some noise as the PLL continues to maintain lock on the
> > > signal.  If there is no way to turn off the CP after the lock bit is
> > > set in the tuner, it's probably better to leave it off for lower
> > > noise and just live with slower tuning.
> > 
> > We discuss with our windows system programmer about it. He sad that
> > in analog TV mode noise from PLL don't give any problem.
> 
> I would be concerned about phase noise affecting the colors or any FM
> sound carriers.  If the noise isn't noticably affecting colors to the
> human eye (do color bars look OK?), or sound to the human ear, then OK.
> 
> 
> >  But in digital TV mode
> > noise from PLL decreased BER.
> 
> I thought the FM1216ME MK3 was an analog only tuner.  I guess I don't
> know DVB-T or cable in Europe well enough.

that is for sure, analog only. 

Dmitry is preparing something for the MK5 too and the FMD1216ME/I MK3
hybrid. Hmm, I wonder if Hans and Jarod do have something to improve for
the MK4 too and the others.

As said, I don't care for changes within the freq. gap and accept
everything working better there ;)

> 
> > > Leaving the CP bit set should be especially noticable ad FM noise when
> > > set to tune to FM radio stations.  From the FM1236ME_MK3 datasheet:
> > > "It is recommended to set CP=0 in the FM mode at all times."
> > > But the VHF low band control byte is also used when setting FM radio
> > > (AFAICT with a quick look at the code.)
> > 
> > Yes. You are right. We can swith CP off in FM mode.
> 
> OK.  Thank you.
> 
> > With my best regards, Dmitry.
> 
> 
> Regards,
> Andy
> 

Cheers,
Hermann



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-24  1:06       ` hermann pitton
@ 2009-04-24  1:34         ` hermann pitton
  0 siblings, 0 replies; 42+ messages in thread
From: hermann pitton @ 2009-04-24  1:34 UTC (permalink / raw)
  To: Andy Walls; +Cc: Dmitri Belimov, video4linux-list, linux-media

If it should be unnoticed yet.

> > 
> > I thought the FM1216ME MK3 was an analog only tuner.  I guess I don't
> > know DVB-T or cable in Europe well enough.
> 
> that is for sure, analog only. 
> 
> Dmitry is preparing something for the MK5 too and the FMD1216ME/I MK3
> hybrid. Hmm, I wonder if Hans and Jarod do have something to improve for
> the MK4 too and the others.
> 
> As said, I don't care for changes within the freq. gap and accept
> everything working better there ;)

For some sort of completeness, we have quite some cardbus devices too,
originally hacked by Hans J. Koch, you might not recognize as MK3 stuff.

They come as ancient ALPS stuff.

Cheers,
Hermann





^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-23 10:36   ` Dmitri Belimov
@ 2009-04-24  1:43     ` Andy Walls
  2009-04-24  1:06       ` hermann pitton
                         ` (2 more replies)
  0 siblings, 3 replies; 42+ messages in thread
From: Andy Walls @ 2009-04-24  1:43 UTC (permalink / raw)
  To: Dmitri Belimov; +Cc: video4linux-list, linux-media

Hi Dmitri,

Thank you for you responses.

Just a few more comments...

On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> Hi Andy
> 
> > Dmitri,
> > 
> > 
> > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > > Hi All
> > > 
> > > 1. Change middle band. In the end of the middle band the
> > > sensitivity of receiver not good. If we switch to higher band,
> > > sensitivity more better. Hardware trick.
> > 

> Several years a go your customers write some messages about bad quality of TV
> if frequency of TV is the end of band. It can be low band or middle. Our
> hardware engeneer make some tests with hardware TV generator and our TV tuners.
> 
> If we set default frequency range for low and middle band, quality of TV signal 
> on 159MHz and 442 MHz is bad. When we make our changes with moving end of bands
> the quality of TV much better. And our system programmer for OS Windows use changed
> bands for drivers. Customers be happy.

OK.  A properly run experiment wins over theory every time. :)



> You can test it if in your placement available TV programm on 159MHz or 442MHz. This trick
> can be usefull for other tuners.

If you look at tveeprom.c, a number of other tuners are using that tuner
definition:

$ grep FM1216ME_MK3 tveeprom.c
	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216ME MK3"},
	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216 ME MK3"},
	{ TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
	{ TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME MK3"},
	{ TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05 2"},
	{ TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME MK5"},

If your change makes things bad for the other tuners, we'll probably
have to create an alternate entry for the other tuners instead of using
the FM1216ME_MK3 defintion.  I suspect most of them are clones of the
FM1216ME MK3 however, so it probably won't matter.

> > > 3. Set charge pump bit
> > 
> > This will improve the time to initially tune to a frequency, but will
> > likely add some noise as the PLL continues to maintain lock on the
> > signal.  If there is no way to turn off the CP after the lock bit is
> > set in the tuner, it's probably better to leave it off for lower
> > noise and just live with slower tuning.
> 
> We discuss with our windows system programmer about it. He sad that
> in analog TV mode noise from PLL don't give any problem.

I would be concerned about phase noise affecting the colors or any FM
sound carriers.  If the noise isn't noticably affecting colors to the
human eye (do color bars look OK?), or sound to the human ear, then OK.


>  But in digital TV mode
> noise from PLL decreased BER.

I thought the FM1216ME MK3 was an analog only tuner.  I guess I don't
know DVB-T or cable in Europe well enough.


> > Leaving the CP bit set should be especially noticable ad FM noise when
> > set to tune to FM radio stations.  From the FM1236ME_MK3 datasheet:
> > "It is recommended to set CP=0 in the FM mode at all times."
> > But the VHF low band control byte is also used when setting FM radio
> > (AFAICT with a quick look at the code.)
> 
> Yes. You are right. We can swith CP off in FM mode.

OK.  Thank you.

> With my best regards, Dmitry.


Regards,
Andy




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-24  1:43     ` Andy Walls
  2009-04-24  1:06       ` hermann pitton
@ 2009-04-26 13:58       ` Dmitri Belimov
  2009-04-27  4:45         ` hermann pitton
  2009-04-27  9:29       ` Dmitri Belimov
  2 siblings, 1 reply; 42+ messages in thread
From: Dmitri Belimov @ 2009-04-26 13:58 UTC (permalink / raw)
  To: Andy Walls; +Cc: video4linux-list, linux-media

Hi Andy 

> Hi Dmitri,
> 
> Thank you for you responses.
> 
> Just a few more comments...
> 
> On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > Hi Andy
> > 
> > > Dmitri,
> > > 
> > > 
> > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > > > Hi All
> > > > 
> > > > 1. Change middle band. In the end of the middle band the
> > > > sensitivity of receiver not good. If we switch to higher band,
> > > > sensitivity more better. Hardware trick.
> > > 
> 
> > Several years a go your customers write some messages about bad
> > quality of TV if frequency of TV is the end of band. It can be low
> > band or middle. Our hardware engeneer make some tests with hardware
> > TV generator and our TV tuners.
> > 
> > If we set default frequency range for low and middle band, quality
> > of TV signal on 159MHz and 442 MHz is bad. When we make our changes
> > with moving end of bands the quality of TV much better. And our
> > system programmer for OS Windows use changed bands for drivers.
> > Customers be happy.
> 
> OK.  A properly run experiment wins over theory every time. :)

;-) 
 
> > You can test it if in your placement available TV programm on
> > 159MHz or 442MHz. This trick can be usefull for other tuners.
> 
> If you look at tveeprom.c, a number of other tuners are using that
> tuner definition:
> 
> $ grep FM1216ME_MK3 tveeprom.c
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216ME MK3"},
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216 ME
> MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05 2"},
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME MK5"},
> 
> If your change makes things bad for the other tuners, we'll probably
> have to create an alternate entry for the other tuners instead of
> using the FM1216ME_MK3 defintion.  I suspect most of them are clones
> of the FM1216ME MK3 however, so it probably won't matter.

We can make fake FM1216ME_MK3 compatible tuner for clones. And move clones to it.
After testing each clone with real compatibility with FM1216ME_MK3 we can move to real tuner.

> > > > 3. Set charge pump bit
> > > 
> > > This will improve the time to initially tune to a frequency, but
> > > will likely add some noise as the PLL continues to maintain lock
> > > on the signal.  If there is no way to turn off the CP after the
> > > lock bit is set in the tuner, it's probably better to leave it
> > > off for lower noise and just live with slower tuning.
> > 
> > We discuss with our windows system programmer about it. He sad that
> > in analog TV mode noise from PLL don't give any problem.
> 
> I would be concerned about phase noise affecting the colors or any FM
> sound carriers.  If the noise isn't noticably affecting colors to the
> human eye (do color bars look OK?), or sound to the human ear, then
> OK.

Ok. I'll discuss about it with our system programmer.
 
> >  But in digital TV mode
> > noise from PLL decreased BER.
> 
> I thought the FM1216ME MK3 was an analog only tuner.  I guess I don't
> know DVB-T or cable in Europe well enough.

Yes, you are right. This solutions used for hybrid tuners too.

> > > Leaving the CP bit set should be especially noticable ad FM noise
> > > when set to tune to FM radio stations.  From the FM1236ME_MK3
> > > datasheet: "It is recommended to set CP=0 in the FM mode at all
> > > times." But the VHF low band control byte is also used when
> > > setting FM radio (AFAICT with a quick look at the code.)
> > 
> > Yes. You are right. We can swith CP off in FM mode.
> 
> OK.  Thank you.
> 
> > 
> 
> 
> Regards,
> Andy

With my best regards, Dmitry.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-26 13:58       ` Dmitri Belimov
@ 2009-04-27  4:45         ` hermann pitton
  0 siblings, 0 replies; 42+ messages in thread
From: hermann pitton @ 2009-04-27  4:45 UTC (permalink / raw)
  To: Dmitri Belimov; +Cc: Andy Walls, video4linux-list, linux-media

Hi,

Am Sonntag, den 26.04.2009, 23:58 +1000 schrieb Dmitri Belimov:
> Hi Andy 
> 
> > Hi Dmitri,
> > 
> > Thank you for you responses.
> > 
> > Just a few more comments...
> > 
> > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > > Hi Andy
> > > 
> > > > Dmitri,
> > > > 
> > > > 
> > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > > > > Hi All
> > > > > 
> > > > > 1. Change middle band. In the end of the middle band the
> > > > > sensitivity of receiver not good. If we switch to higher band,
> > > > > sensitivity more better. Hardware trick.
> > > > 
> > 
> > > Several years a go your customers write some messages about bad
> > > quality of TV if frequency of TV is the end of band. It can be low
> > > band or middle. Our hardware engeneer make some tests with hardware
> > > TV generator and our TV tuners.
> > > 
> > > If we set default frequency range for low and middle band, quality
> > > of TV signal on 159MHz and 442 MHz is bad. When we make our changes
> > > with moving end of bands the quality of TV much better. And our
> > > system programmer for OS Windows use changed bands for drivers.
> > > Customers be happy.
> > 
> > OK.  A properly run experiment wins over theory every time. :)
> 
> ;-) 
>  
> > > You can test it if in your placement available TV programm on
> > > 159MHz or 442MHz. This trick can be usefull for other tuners.
> > 
> > If you look at tveeprom.c, a number of other tuners are using that
> > tuner definition:
> > 
> > $ grep FM1216ME_MK3 tveeprom.c
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216ME MK3"},
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216 ME
> > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05 2"},
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME MK5"},
> > 
> > If your change makes things bad for the other tuners, we'll probably
> > have to create an alternate entry for the other tuners instead of
> > using the FM1216ME_MK3 defintion.  I suspect most of them are clones
> > of the FM1216ME MK3 however, so it probably won't matter.
> 
> We can make fake FM1216ME_MK3 compatible tuner for clones. And move clones to it.
> After testing each clone with real compatibility with FM1216ME_MK3 we can move to real tuner.
> 
> > > > > 3. Set charge pump bit
> > > > 
> > > > This will improve the time to initially tune to a frequency, but
> > > > will likely add some noise as the PLL continues to maintain lock
> > > > on the signal.  If there is no way to turn off the CP after the
> > > > lock bit is set in the tuner, it's probably better to leave it
> > > > off for lower noise and just live with slower tuning.
> > > 
> > > We discuss with our windows system programmer about it. He sad that
> > > in analog TV mode noise from PLL don't give any problem.

Some confusion probably started here.

You were talking about one more different tuner ...

> > I would be concerned about phase noise affecting the colors or any FM
> > sound carriers.  If the noise isn't noticably affecting colors to the
> > human eye (do color bars look OK?), or sound to the human ear, then
> > OK.
> 
> Ok. I'll discuss about it with our system programmer.
>  
> > >  But in digital TV mode
> > > noise from PLL decreased BER.
> > 
> > I thought the FM1216ME MK3 was an analog only tuner.  I guess I don't
> > know DVB-T or cable in Europe well enough.
> 
> Yes, you are right. This solutions used for hybrid tuners too.
> 
> > > > Leaving the CP bit set should be especially noticable ad FM noise
> > > > when set to tune to FM radio stations.  From the FM1236ME_MK3
> > > > datasheet: "It is recommended to set CP=0 in the FM mode at all
> > > > times." But the VHF low band control byte is also used when
> > > > setting FM radio (AFAICT with a quick look at the code.)
> > > 
> > > Yes. You are right. We can swith CP off in FM mode.
> > 
> > OK.  Thank you.
> > 
> > > 
> > 
> > 
> > Regards,
> > Andy
> 
> With my best regards, Dmitry.
> --
Cheers,
Hermann



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-24  1:43     ` Andy Walls
  2009-04-24  1:06       ` hermann pitton
  2009-04-26 13:58       ` Dmitri Belimov
@ 2009-04-27  9:29       ` Dmitri Belimov
  2009-04-28  0:11         ` hermann pitton
  2009-04-28 18:18         ` Mauro Carvalho Chehab
  2 siblings, 2 replies; 42+ messages in thread
From: Dmitri Belimov @ 2009-04-27  9:29 UTC (permalink / raw)
  To: Andy Walls; +Cc: video4linux-list, linux-media

[-- Attachment #1: Type: text/plain, Size: 4309 bytes --]

Hi All

Step by step.

This is patch for change only range of FM1216ME_MK3. Slow tunning is not a big problem.

diff -r b40d628f830d linux/drivers/media/common/tuners/tuner-types.c
--- a/linux/drivers/media/common/tuners/tuner-types.c	Fri Apr 24 01:46:41 2009 -0300
+++ b/linux/drivers/media/common/tuners/tuner-types.c	Tue Apr 28 03:35:42 2009 +1000
@@ -558,8 +558,8 @@
 
 static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = {
 	{ 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
-	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
-	{ 16 * 999.99        , 0x8e, 0x04, },
+	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
+	{ 16 * 864.00        , 0x8e, 0x04, },
 };
 
 static struct tuner_params tuner_fm1216me_mk3_params[] = {

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>


With my best regards, Dmitry.

> Hi Dmitri,
> 
> Thank you for you responses.
> 
> Just a few more comments...
> 
> On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > Hi Andy
> > 
> > > Dmitri,
> > > 
> > > 
> > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > > > Hi All
> > > > 
> > > > 1. Change middle band. In the end of the middle band the
> > > > sensitivity of receiver not good. If we switch to higher band,
> > > > sensitivity more better. Hardware trick.
> > > 
> 
> > Several years a go your customers write some messages about bad
> > quality of TV if frequency of TV is the end of band. It can be low
> > band or middle. Our hardware engeneer make some tests with hardware
> > TV generator and our TV tuners.
> > 
> > If we set default frequency range for low and middle band, quality
> > of TV signal on 159MHz and 442 MHz is bad. When we make our changes
> > with moving end of bands the quality of TV much better. And our
> > system programmer for OS Windows use changed bands for drivers.
> > Customers be happy.
> 
> OK.  A properly run experiment wins over theory every time. :)
> 
> 
> 
> > You can test it if in your placement available TV programm on
> > 159MHz or 442MHz. This trick can be usefull for other tuners.
> 
> If you look at tveeprom.c, a number of other tuners are using that
> tuner definition:
> 
> $ grep FM1216ME_MK3 tveeprom.c
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216ME MK3"},
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216 ME
> MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05 2"},
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME MK5"},
> 
> If your change makes things bad for the other tuners, we'll probably
> have to create an alternate entry for the other tuners instead of
> using the FM1216ME_MK3 defintion.  I suspect most of them are clones
> of the FM1216ME MK3 however, so it probably won't matter.
> 
> > > > 3. Set charge pump bit
> > > 
> > > This will improve the time to initially tune to a frequency, but
> > > will likely add some noise as the PLL continues to maintain lock
> > > on the signal.  If there is no way to turn off the CP after the
> > > lock bit is set in the tuner, it's probably better to leave it
> > > off for lower noise and just live with slower tuning.
> > 
> > We discuss with our windows system programmer about it. He sad that
> > in analog TV mode noise from PLL don't give any problem.
> 
> I would be concerned about phase noise affecting the colors or any FM
> sound carriers.  If the noise isn't noticably affecting colors to the
> human eye (do color bars look OK?), or sound to the human ear, then
> OK.
> 
> 
> >  But in digital TV mode
> > noise from PLL decreased BER.
> 
> I thought the FM1216ME MK3 was an analog only tuner.  I guess I don't
> know DVB-T or cable in Europe well enough.
> 
> 
> > > Leaving the CP bit set should be especially noticable ad FM noise
> > > when set to tune to FM radio stations.  From the FM1236ME_MK3
> > > datasheet: "It is recommended to set CP=0 in the FM mode at all
> > > times." But the VHF low band control byte is also used when
> > > setting FM radio (AFAICT with a quick look at the code.)
> > 
> > Yes. You are right. We can swith CP off in FM mode.
> 
> OK.  Thank you.
> 
> > With my best regards, Dmitry.
> 
> 
> Regards,
> Andy
> 
> 
> 

[-- Attachment #2: behold_mk3_range.patch --]
[-- Type: text/x-patch, Size: 663 bytes --]

diff -r b40d628f830d linux/drivers/media/common/tuners/tuner-types.c
--- a/linux/drivers/media/common/tuners/tuner-types.c	Fri Apr 24 01:46:41 2009 -0300
+++ b/linux/drivers/media/common/tuners/tuner-types.c	Tue Apr 28 03:35:42 2009 +1000
@@ -558,8 +558,8 @@
 
 static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = {
 	{ 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
-	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
-	{ 16 * 999.99        , 0x8e, 0x04, },
+	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
+	{ 16 * 864.00        , 0x8e, 0x04, },
 };
 
 static struct tuner_params tuner_fm1216me_mk3_params[] = {

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-28  0:11         ` hermann pitton
@ 2009-04-27 10:42           ` Dmitri Belimov
  2009-04-28  0:57             ` hermann pitton
  2009-04-28  0:20           ` hermann pitton
  1 sibling, 1 reply; 42+ messages in thread
From: Dmitri Belimov @ 2009-04-27 10:42 UTC (permalink / raw)
  To: hermann pitton; +Cc: Andy Walls, video4linux-list, linux-media

Hi,
 
> Am Montag, den 27.04.2009, 19:29 +1000 schrieb Dmitri Belimov:
> > Hi All
> > 
> > Step by step.
> > 
> > This is patch for change only range of FM1216ME_MK3. Slow tunning
> > is not a big problem.
> > 
> > diff -r b40d628f830d linux/drivers/media/common/tuners/tuner-types.c
> > --- a/linux/drivers/media/common/tuners/tuner-types.c	Fri
> > Apr 24 01:46:41 2009 -0300 +++
> > b/linux/drivers/media/common/tuners/tuner-types.c	Tue Apr 28
> > 03:35:42 2009 +1000 @@ -558,8 +558,8 @@ 
> >  static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = {
> >  	{ 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
> > -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> > -	{ 16 * 999.99        , 0x8e, 0x04, },
> > +	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
> > +	{ 16 * 864.00        , 0x8e, 0x04, },
> >  };
> >  
> >  static struct tuner_params tuner_fm1216me_mk3_params[] = {
> > 
> > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
> > <d.belimov@gmail.com>
> 
> if it does help anything for having all above 441 MHz in UHF ranges.
> 
> Acked-by: Hermann Pitton <hermann-pitton@arcor.de>
> 
> There is simply no known broadcast in that gap on other freq. tables.
> 
> Can you please enlighten us who/what broadcasts there?

I don't know. This trick for solve problem with low sensitivity the tuners on end of band.
We get it from measuments.

> > 
> > With my best regards, Dmitry.
> > 
> > > Hi Dmitri,
> 
> Cheers,
> Hermann

With my best regards, Dmitry.

> > > Thank you for you responses.
> > > 
> > > Just a few more comments...
> > > 
> > > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > > > Hi Andy
> > > > 
> > > > > Dmitri,
> > > > > 
> > > > > 
> > > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > > > > > Hi All
> > > > > > 
> > > > > > 1. Change middle band. In the end of the middle band the
> > > > > > sensitivity of receiver not good. If we switch to higher
> > > > > > band, sensitivity more better. Hardware trick.
> > > > > 
> > > 
> > > > Several years a go your customers write some messages about bad
> > > > quality of TV if frequency of TV is the end of band. It can be
> > > > low band or middle. Our hardware engeneer make some tests with
> > > > hardware TV generator and our TV tuners.
> > > > 
> > > > If we set default frequency range for low and middle band,
> > > > quality of TV signal on 159MHz and 442 MHz is bad. When we make
> > > > our changes with moving end of bands the quality of TV much
> > > > better. And our system programmer for OS Windows use changed
> > > > bands for drivers. Customers be happy.
> > > 
> > > OK.  A properly run experiment wins over theory every time. :)
> > > 
> > > 
> > > 
> > > > You can test it if in your placement available TV programm on
> > > > 159MHz or 442MHz. This trick can be usefull for other tuners.
> > > 
> > > If you look at tveeprom.c, a number of other tuners are using that
> > > tuner definition:
> > > 
> > > $ grep FM1216ME_MK3 tveeprom.c
> > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216ME
> > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216 ME
> > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05 2"},
> > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME
> > > MK5"},
> > > 
> > > If your change makes things bad for the other tuners, we'll
> > > probably have to create an alternate entry for the other tuners
> > > instead of using the FM1216ME_MK3 defintion.  I suspect most of
> > > them are clones of the FM1216ME MK3 however, so it probably won't
> > > matter.
> > > 
> > > > > > 3. Set charge pump bit
> > > > > 
> > > > > This will improve the time to initially tune to a frequency,
> > > > > but will likely add some noise as the PLL continues to
> > > > > maintain lock on the signal.  If there is no way to turn off
> > > > > the CP after the lock bit is set in the tuner, it's probably
> > > > > better to leave it off for lower noise and just live with
> > > > > slower tuning.
> > > > 
> > > > We discuss with our windows system programmer about it. He sad
> > > > that in analog TV mode noise from PLL don't give any problem.
> > > 
> > > I would be concerned about phase noise affecting the colors or
> > > any FM sound carriers.  If the noise isn't noticably affecting
> > > colors to the human eye (do color bars look OK?), or sound to the
> > > human ear, then OK.
> > > 
> > > 
> > > >  But in digital TV mode
> > > > noise from PLL decreased BER.
> > > 
> > > I thought the FM1216ME MK3 was an analog only tuner.  I guess I
> > > don't know DVB-T or cable in Europe well enough.
> > > 
> > > 
> > > > > Leaving the CP bit set should be especially noticable ad FM
> > > > > noise when set to tune to FM radio stations.  From the
> > > > > FM1236ME_MK3 datasheet: "It is recommended to set CP=0 in the
> > > > > FM mode at all times." But the VHF low band control byte is
> > > > > also used when setting FM radio (AFAICT with a quick look at
> > > > > the code.)
> > > > 
> > > > Yes. You are right. We can swith CP off in FM mode.
> > > 
> > > OK.  Thank you.
> > > 
> > > > With my best regards, Dmitry.
> > > 
> > > 
> > > Regards,
> > > Andy
> > > 
> > > 
> > > 
> 

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-27  9:29       ` Dmitri Belimov
@ 2009-04-28  0:11         ` hermann pitton
  2009-04-27 10:42           ` Dmitri Belimov
  2009-04-28  0:20           ` hermann pitton
  2009-04-28 18:18         ` Mauro Carvalho Chehab
  1 sibling, 2 replies; 42+ messages in thread
From: hermann pitton @ 2009-04-28  0:11 UTC (permalink / raw)
  To: Dmitri Belimov; +Cc: Andy Walls, video4linux-list, linux-media

Hi,

Am Montag, den 27.04.2009, 19:29 +1000 schrieb Dmitri Belimov:
> Hi All
> 
> Step by step.
> 
> This is patch for change only range of FM1216ME_MK3. Slow tunning is not a big problem.
> 
> diff -r b40d628f830d linux/drivers/media/common/tuners/tuner-types.c
> --- a/linux/drivers/media/common/tuners/tuner-types.c	Fri Apr 24 01:46:41 2009 -0300
> +++ b/linux/drivers/media/common/tuners/tuner-types.c	Tue Apr 28 03:35:42 2009 +1000
> @@ -558,8 +558,8 @@
>  
>  static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = {
>  	{ 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
> -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> -	{ 16 * 999.99        , 0x8e, 0x04, },
> +	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
> +	{ 16 * 864.00        , 0x8e, 0x04, },
>  };
>  
>  static struct tuner_params tuner_fm1216me_mk3_params[] = {
> 
> Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

if it does help anything for having all above 441 MHz in UHF ranges.

Acked-by: Hermann Pitton <hermann-pitton@arcor.de>

There is simply no known broadcast in that gap on other freq. tables.

Can you please enlighten us who/what broadcasts there?

> 
> With my best regards, Dmitry.
> 
> > Hi Dmitri,

Cheers,
Hermann

> > Thank you for you responses.
> > 
> > Just a few more comments...
> > 
> > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > > Hi Andy
> > > 
> > > > Dmitri,
> > > > 
> > > > 
> > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > > > > Hi All
> > > > > 
> > > > > 1. Change middle band. In the end of the middle band the
> > > > > sensitivity of receiver not good. If we switch to higher band,
> > > > > sensitivity more better. Hardware trick.
> > > > 
> > 
> > > Several years a go your customers write some messages about bad
> > > quality of TV if frequency of TV is the end of band. It can be low
> > > band or middle. Our hardware engeneer make some tests with hardware
> > > TV generator and our TV tuners.
> > > 
> > > If we set default frequency range for low and middle band, quality
> > > of TV signal on 159MHz and 442 MHz is bad. When we make our changes
> > > with moving end of bands the quality of TV much better. And our
> > > system programmer for OS Windows use changed bands for drivers.
> > > Customers be happy.
> > 
> > OK.  A properly run experiment wins over theory every time. :)
> > 
> > 
> > 
> > > You can test it if in your placement available TV programm on
> > > 159MHz or 442MHz. This trick can be usefull for other tuners.
> > 
> > If you look at tveeprom.c, a number of other tuners are using that
> > tuner definition:
> > 
> > $ grep FM1216ME_MK3 tveeprom.c
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216ME MK3"},
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216 ME
> > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05 2"},
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME MK5"},
> > 
> > If your change makes things bad for the other tuners, we'll probably
> > have to create an alternate entry for the other tuners instead of
> > using the FM1216ME_MK3 defintion.  I suspect most of them are clones
> > of the FM1216ME MK3 however, so it probably won't matter.
> > 
> > > > > 3. Set charge pump bit
> > > > 
> > > > This will improve the time to initially tune to a frequency, but
> > > > will likely add some noise as the PLL continues to maintain lock
> > > > on the signal.  If there is no way to turn off the CP after the
> > > > lock bit is set in the tuner, it's probably better to leave it
> > > > off for lower noise and just live with slower tuning.
> > > 
> > > We discuss with our windows system programmer about it. He sad that
> > > in analog TV mode noise from PLL don't give any problem.
> > 
> > I would be concerned about phase noise affecting the colors or any FM
> > sound carriers.  If the noise isn't noticably affecting colors to the
> > human eye (do color bars look OK?), or sound to the human ear, then
> > OK.
> > 
> > 
> > >  But in digital TV mode
> > > noise from PLL decreased BER.
> > 
> > I thought the FM1216ME MK3 was an analog only tuner.  I guess I don't
> > know DVB-T or cable in Europe well enough.
> > 
> > 
> > > > Leaving the CP bit set should be especially noticable ad FM noise
> > > > when set to tune to FM radio stations.  From the FM1236ME_MK3
> > > > datasheet: "It is recommended to set CP=0 in the FM mode at all
> > > > times." But the VHF low band control byte is also used when
> > > > setting FM radio (AFAICT with a quick look at the code.)
> > > 
> > > Yes. You are right. We can swith CP off in FM mode.
> > 
> > OK.  Thank you.
> > 
> > > With my best regards, Dmitry.
> > 
> > 
> > Regards,
> > Andy
> > 
> > 
> > 


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-28  0:11         ` hermann pitton
  2009-04-27 10:42           ` Dmitri Belimov
@ 2009-04-28  0:20           ` hermann pitton
  1 sibling, 0 replies; 42+ messages in thread
From: hermann pitton @ 2009-04-28  0:20 UTC (permalink / raw)
  To: Dmitri Belimov; +Cc: Andy Walls, video4linux-list, linux-media


Am Dienstag, den 28.04.2009, 02:11 +0200 schrieb hermann pitton:
> Hi,
> 
> Am Montag, den 27.04.2009, 19:29 +1000 schrieb Dmitri Belimov:
> > Hi All
> > 
> > Step by step.
> > 
> > This is patch for change only range of FM1216ME_MK3. Slow tunning is not a big problem.
> > 
> > diff -r b40d628f830d linux/drivers/media/common/tuners/tuner-types.c
> > --- a/linux/drivers/media/common/tuners/tuner-types.c	Fri Apr 24 01:46:41 2009 -0300
> > +++ b/linux/drivers/media/common/tuners/tuner-types.c	Tue Apr 28 03:35:42 2009 +1000
> > @@ -558,8 +558,8 @@
> >  
> >  static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = {
> >  	{ 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
> > -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> > -	{ 16 * 999.99        , 0x8e, 0x04, },
> > +	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
> > +	{ 16 * 864.00        , 0x8e, 0x04, },
> >  };
> >  
> >  static struct tuner_params tuner_fm1216me_mk3_params[] = {
> > 
> > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
> 
> if it does help anything for having all above 441 MHz in UHF ranges.

for the record: from 441 MHz on ...

> Acked-by: Hermann Pitton <hermann-pitton@arcor.de>
> 
> There is simply no known broadcast in that gap on other freq. tables.
> 
> Can you please enlighten us who/what broadcasts there?
> 
> > 
> > With my best regards, Dmitry.
> > 
> > > Hi Dmitri,
> 
> Cheers,
> Hermann
> 
> > > Thank you for you responses.
> > > 
> > > Just a few more comments...
> > > 
> > > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > > > Hi Andy
> > > > 
> > > > > Dmitri,
> > > > > 
> > > > > 
> > > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > > > > > Hi All
> > > > > > 
> > > > > > 1. Change middle band. In the end of the middle band the
> > > > > > sensitivity of receiver not good. If we switch to higher band,
> > > > > > sensitivity more better. Hardware trick.
> > > > > 
> > > 
> > > > Several years a go your customers write some messages about bad
> > > > quality of TV if frequency of TV is the end of band. It can be low
> > > > band or middle. Our hardware engeneer make some tests with hardware
> > > > TV generator and our TV tuners.
> > > > 
> > > > If we set default frequency range for low and middle band, quality
> > > > of TV signal on 159MHz and 442 MHz is bad. When we make our changes
> > > > with moving end of bands the quality of TV much better. And our
> > > > system programmer for OS Windows use changed bands for drivers.
> > > > Customers be happy.
> > > 
> > > OK.  A properly run experiment wins over theory every time. :)
> > > 
> > > 
> > > 
> > > > You can test it if in your placement available TV programm on
> > > > 159MHz or 442MHz. This trick can be usefull for other tuners.
> > > 
> > > If you look at tveeprom.c, a number of other tuners are using that
> > > tuner definition:
> > > 
> > > $ grep FM1216ME_MK3 tveeprom.c
> > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216ME MK3"},
> > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216 ME
> > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05 2"},
> > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME MK5"},
> > > 
> > > If your change makes things bad for the other tuners, we'll probably
> > > have to create an alternate entry for the other tuners instead of
> > > using the FM1216ME_MK3 defintion.  I suspect most of them are clones
> > > of the FM1216ME MK3 however, so it probably won't matter.
> > > 
> > > > > > 3. Set charge pump bit
> > > > > 
> > > > > This will improve the time to initially tune to a frequency, but
> > > > > will likely add some noise as the PLL continues to maintain lock
> > > > > on the signal.  If there is no way to turn off the CP after the
> > > > > lock bit is set in the tuner, it's probably better to leave it
> > > > > off for lower noise and just live with slower tuning.
> > > > 
> > > > We discuss with our windows system programmer about it. He sad that
> > > > in analog TV mode noise from PLL don't give any problem.
> > > 
> > > I would be concerned about phase noise affecting the colors or any FM
> > > sound carriers.  If the noise isn't noticably affecting colors to the
> > > human eye (do color bars look OK?), or sound to the human ear, then
> > > OK.
> > > 
> > > 
> > > >  But in digital TV mode
> > > > noise from PLL decreased BER.
> > > 
> > > I thought the FM1216ME MK3 was an analog only tuner.  I guess I don't
> > > know DVB-T or cable in Europe well enough.
> > > 
> > > 
> > > > > Leaving the CP bit set should be especially noticable ad FM noise
> > > > > when set to tune to FM radio stations.  From the FM1236ME_MK3
> > > > > datasheet: "It is recommended to set CP=0 in the FM mode at all
> > > > > times." But the VHF low band control byte is also used when
> > > > > setting FM radio (AFAICT with a quick look at the code.)
> > > > 
> > > > Yes. You are right. We can swith CP off in FM mode.
> > > 
> > > OK.  Thank you.
> > > 
> > > > With my best regards, Dmitry.
> > > 
> > > 
> > > Regards,
> > > Andy
> > > 
> > > 
> > > 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-27 10:42           ` Dmitri Belimov
@ 2009-04-28  0:57             ` hermann pitton
  0 siblings, 0 replies; 42+ messages in thread
From: hermann pitton @ 2009-04-28  0:57 UTC (permalink / raw)
  To: Dmitri Belimov; +Cc: Andy Walls, video4linux-list, linux-media

Hi,

Am Montag, den 27.04.2009, 20:42 +1000 schrieb Dmitri Belimov:
> Hi,
>  
> > Am Montag, den 27.04.2009, 19:29 +1000 schrieb Dmitri Belimov:
> > > Hi All
> > > 
> > > Step by step.
> > > 
> > > This is patch for change only range of FM1216ME_MK3. Slow tunning
> > > is not a big problem.
> > > 
> > > diff -r b40d628f830d linux/drivers/media/common/tuners/tuner-types.c
> > > --- a/linux/drivers/media/common/tuners/tuner-types.c	Fri
> > > Apr 24 01:46:41 2009 -0300 +++
> > > b/linux/drivers/media/common/tuners/tuner-types.c	Tue Apr 28
> > > 03:35:42 2009 +1000 @@ -558,8 +558,8 @@ 
> > >  static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = {
> > >  	{ 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
> > > -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> > > -	{ 16 * 999.99        , 0x8e, 0x04, },
> > > +	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
> > > +	{ 16 * 864.00        , 0x8e, 0x04, },
> > >  };
> > >  
> > >  static struct tuner_params tuner_fm1216me_mk3_params[] = {
> > > 
> > > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
> > > <d.belimov@gmail.com>
> > 
> > if it does help anything for having all above 441 MHz in UHF ranges.
> > 
> > Acked-by: Hermann Pitton <hermann-pitton@arcor.de>
> > 
> > There is simply no known broadcast in that gap on other freq. tables.
> > 
> > Can you please enlighten us who/what broadcasts there?
> 
> I don't know. This trick for solve problem with low sensitivity the tuners on end of band.
> We get it from measuments.

I believe that, since seen before on real broadcast in the VHF low/high
gap.

But if there is no real broadcast at all, what it is all about for now?

You can find this "problem" in theory on almost all "new" tuners, on
every TCL, TENA, YMEC and what the hell else we have melt down to be in
fact only _very few_ new ones.

Get out of the lab, until it is a real problem, but keep in mind.

Cheers,
Hermann

> > > 
> > > With my best regards, Dmitry.
> > > 
> > > > Hi Dmitri,
> > 
> > Cheers,
> > Hermann
> 
> With my best regards, Dmitry.
> 
> > > > Thank you for you responses.
> > > > 
> > > > Just a few more comments...
> > > > 
> > > > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > > > > Hi Andy
> > > > > 
> > > > > > Dmitri,
> > > > > > 
> > > > > > 
> > > > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > > > > > > Hi All
> > > > > > > 
> > > > > > > 1. Change middle band. In the end of the middle band the
> > > > > > > sensitivity of receiver not good. If we switch to higher
> > > > > > > band, sensitivity more better. Hardware trick.
> > > > > > 
> > > > 
> > > > > Several years a go your customers write some messages about bad
> > > > > quality of TV if frequency of TV is the end of band. It can be
> > > > > low band or middle. Our hardware engeneer make some tests with
> > > > > hardware TV generator and our TV tuners.
> > > > > 
> > > > > If we set default frequency range for low and middle band,
> > > > > quality of TV signal on 159MHz and 442 MHz is bad. When we make
> > > > > our changes with moving end of bands the quality of TV much
> > > > > better. And our system programmer for OS Windows use changed
> > > > > bands for drivers. Customers be happy.
> > > > 
> > > > OK.  A properly run experiment wins over theory every time. :)
> > > > 
> > > > 
> > > > 
> > > > > You can test it if in your placement available TV programm on
> > > > > 159MHz or 442MHz. This trick can be usefull for other tuners.
> > > > 
> > > > If you look at tveeprom.c, a number of other tuners are using that
> > > > tuner definition:
> > > > 
> > > > $ grep FM1216ME_MK3 tveeprom.c
> > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216ME
> > > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216 ME
> > > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> > > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05 2"},
> > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME
> > > > MK5"},
> > > > 
> > > > If your change makes things bad for the other tuners, we'll
> > > > probably have to create an alternate entry for the other tuners
> > > > instead of using the FM1216ME_MK3 defintion.  I suspect most of
> > > > them are clones of the FM1216ME MK3 however, so it probably won't
> > > > matter.
> > > > 
> > > > > > > 3. Set charge pump bit
> > > > > > 
> > > > > > This will improve the time to initially tune to a frequency,
> > > > > > but will likely add some noise as the PLL continues to
> > > > > > maintain lock on the signal.  If there is no way to turn off
> > > > > > the CP after the lock bit is set in the tuner, it's probably
> > > > > > better to leave it off for lower noise and just live with
> > > > > > slower tuning.
> > > > > 
> > > > > We discuss with our windows system programmer about it. He sad
> > > > > that in analog TV mode noise from PLL don't give any problem.
> > > > 
> > > > I would be concerned about phase noise affecting the colors or
> > > > any FM sound carriers.  If the noise isn't noticably affecting
> > > > colors to the human eye (do color bars look OK?), or sound to the
> > > > human ear, then OK.
> > > > 
> > > > 
> > > > >  But in digital TV mode
> > > > > noise from PLL decreased BER.
> > > > 
> > > > I thought the FM1216ME MK3 was an analog only tuner.  I guess I
> > > > don't know DVB-T or cable in Europe well enough.
> > > > 
> > > > 
> > > > > > Leaving the CP bit set should be especially noticable ad FM
> > > > > > noise when set to tune to FM radio stations.  From the
> > > > > > FM1236ME_MK3 datasheet: "It is recommended to set CP=0 in the
> > > > > > FM mode at all times." But the VHF low band control byte is
> > > > > > also used when setting FM radio (AFAICT with a quick look at
> > > > > > the code.)
> > > > > 
> > > > > Yes. You are right. We can swith CP off in FM mode.
> > > > 
> > > > OK.  Thank you.
> > > > 
> > > > > With my best regards, Dmitry.
> > > > 
> > > > 
> > > > Regards,
> > > > Andy
> > > > 
> > > > 
> > > > 
> > 


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-28 18:18         ` Mauro Carvalho Chehab
@ 2009-04-28  9:59           ` Dmitri Belimov
  2009-04-29  3:10             ` hermann pitton
  0 siblings, 1 reply; 42+ messages in thread
From: Dmitri Belimov @ 2009-04-28  9:59 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Andy Walls, video4linux-list, linux-media

On Tue, 28 Apr 2009 15:18:32 -0300
Mauro Carvalho Chehab <mchehab@infradead.org> wrote:

> On Mon, 27 Apr 2009 19:29:05 +1000
> Dmitri Belimov <d.belimov@gmail.com> wrote:
> 
> > Hi All
> > 
> > Step by step.
> > 
> > This is patch for change only range of FM1216ME_MK3. Slow tunning
> > is not a big problem.
> 
> Dmitri,
> 
> I'll mark those patches as RFC at patchwork until the end of those
> discussions. After that, please send it again into a new thread.

You mark patch with TOP AGC not this.

I think need discuss about FM1216ME_MK3 because I'll have a big patch for support
control TOP AGC (sensitivity) of this tuner. It can be bad for compatible tuners.

With my best regards, Dmitry.

> 
> Cheers,
> Mauro.
> 
> > 
> > diff -r b40d628f830d linux/drivers/media/common/tuners/tuner-types.c
> > --- a/linux/drivers/media/common/tuners/tuner-types.c	Fri
> > Apr 24 01:46:41 2009 -0300 +++
> > b/linux/drivers/media/common/tuners/tuner-types.c	Tue Apr 28
> > 03:35:42 2009 +1000 @@ -558,8 +558,8 @@ 
> >  static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = {
> >  	{ 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
> > -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> > -	{ 16 * 999.99        , 0x8e, 0x04, },
> > +	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
> > +	{ 16 * 864.00        , 0x8e, 0x04, },
> >  };
> >  
> >  static struct tuner_params tuner_fm1216me_mk3_params[] = {
> > 
> > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
> > <d.belimov@gmail.com>
> > 
> > 
> > With my best regards, Dmitry.
> > 
> > > Hi Dmitri,
> > > 
> > > Thank you for you responses.
> > > 
> > > Just a few more comments...
> > > 
> > > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > > > Hi Andy
> > > > 
> > > > > Dmitri,
> > > > > 
> > > > > 
> > > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > > > > > Hi All
> > > > > > 
> > > > > > 1. Change middle band. In the end of the middle band the
> > > > > > sensitivity of receiver not good. If we switch to higher
> > > > > > band, sensitivity more better. Hardware trick.
> > > > > 
> > > 
> > > > Several years a go your customers write some messages about bad
> > > > quality of TV if frequency of TV is the end of band. It can be
> > > > low band or middle. Our hardware engeneer make some tests with
> > > > hardware TV generator and our TV tuners.
> > > > 
> > > > If we set default frequency range for low and middle band,
> > > > quality of TV signal on 159MHz and 442 MHz is bad. When we make
> > > > our changes with moving end of bands the quality of TV much
> > > > better. And our system programmer for OS Windows use changed
> > > > bands for drivers. Customers be happy.
> > > 
> > > OK.  A properly run experiment wins over theory every time. :)
> > > 
> > > 
> > > 
> > > > You can test it if in your placement available TV programm on
> > > > 159MHz or 442MHz. This trick can be usefull for other tuners.
> > > 
> > > If you look at tveeprom.c, a number of other tuners are using that
> > > tuner definition:
> > > 
> > > $ grep FM1216ME_MK3 tveeprom.c
> > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216ME
> > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216 ME
> > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05 2"},
> > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME
> > > MK5"},
> > > 
> > > If your change makes things bad for the other tuners, we'll
> > > probably have to create an alternate entry for the other tuners
> > > instead of using the FM1216ME_MK3 defintion.  I suspect most of
> > > them are clones of the FM1216ME MK3 however, so it probably won't
> > > matter.
> > > 
> > > > > > 3. Set charge pump bit
> > > > > 
> > > > > This will improve the time to initially tune to a frequency,
> > > > > but will likely add some noise as the PLL continues to
> > > > > maintain lock on the signal.  If there is no way to turn off
> > > > > the CP after the lock bit is set in the tuner, it's probably
> > > > > better to leave it off for lower noise and just live with
> > > > > slower tuning.
> > > > 
> > > > We discuss with our windows system programmer about it. He sad
> > > > that in analog TV mode noise from PLL don't give any problem.
> > > 
> > > I would be concerned about phase noise affecting the colors or
> > > any FM sound carriers.  If the noise isn't noticably affecting
> > > colors to the human eye (do color bars look OK?), or sound to the
> > > human ear, then OK.
> > > 
> > > 
> > > >  But in digital TV mode
> > > > noise from PLL decreased BER.
> > > 
> > > I thought the FM1216ME MK3 was an analog only tuner.  I guess I
> > > don't know DVB-T or cable in Europe well enough.
> > > 
> > > 
> > > > > Leaving the CP bit set should be especially noticable ad FM
> > > > > noise when set to tune to FM radio stations.  From the
> > > > > FM1236ME_MK3 datasheet: "It is recommended to set CP=0 in the
> > > > > FM mode at all times." But the VHF low band control byte is
> > > > > also used when setting FM radio (AFAICT with a quick look at
> > > > > the code.)
> > > > 
> > > > Yes. You are right. We can swith CP off in FM mode.
> > > 
> > > OK.  Thank you.
> > > 
> > > > With my best regards, Dmitry.
> > > 
> > > 
> > > Regards,
> > > Andy
> > > 
> > > 
> > > 
> 
> 
> 
> 
> Cheers,
> Mauro

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-27  9:29       ` Dmitri Belimov
  2009-04-28  0:11         ` hermann pitton
@ 2009-04-28 18:18         ` Mauro Carvalho Chehab
  2009-04-28  9:59           ` Dmitri Belimov
  1 sibling, 1 reply; 42+ messages in thread
From: Mauro Carvalho Chehab @ 2009-04-28 18:18 UTC (permalink / raw)
  To: Dmitri Belimov; +Cc: Andy Walls, video4linux-list, linux-media

On Mon, 27 Apr 2009 19:29:05 +1000
Dmitri Belimov <d.belimov@gmail.com> wrote:

> Hi All
> 
> Step by step.
> 
> This is patch for change only range of FM1216ME_MK3. Slow tunning is not a big problem.

Dmitri,

I'll mark those patches as RFC at patchwork until the end of those discussions. After that,
please send it again into a new thread.

Cheers,
Mauro.

> 
> diff -r b40d628f830d linux/drivers/media/common/tuners/tuner-types.c
> --- a/linux/drivers/media/common/tuners/tuner-types.c	Fri Apr 24 01:46:41 2009 -0300
> +++ b/linux/drivers/media/common/tuners/tuner-types.c	Tue Apr 28 03:35:42 2009 +1000
> @@ -558,8 +558,8 @@
>  
>  static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = {
>  	{ 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
> -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> -	{ 16 * 999.99        , 0x8e, 0x04, },
> +	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
> +	{ 16 * 864.00        , 0x8e, 0x04, },
>  };
>  
>  static struct tuner_params tuner_fm1216me_mk3_params[] = {
> 
> Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
> 
> 
> With my best regards, Dmitry.
> 
> > Hi Dmitri,
> > 
> > Thank you for you responses.
> > 
> > Just a few more comments...
> > 
> > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > > Hi Andy
> > > 
> > > > Dmitri,
> > > > 
> > > > 
> > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > > > > Hi All
> > > > > 
> > > > > 1. Change middle band. In the end of the middle band the
> > > > > sensitivity of receiver not good. If we switch to higher band,
> > > > > sensitivity more better. Hardware trick.
> > > > 
> > 
> > > Several years a go your customers write some messages about bad
> > > quality of TV if frequency of TV is the end of band. It can be low
> > > band or middle. Our hardware engeneer make some tests with hardware
> > > TV generator and our TV tuners.
> > > 
> > > If we set default frequency range for low and middle band, quality
> > > of TV signal on 159MHz and 442 MHz is bad. When we make our changes
> > > with moving end of bands the quality of TV much better. And our
> > > system programmer for OS Windows use changed bands for drivers.
> > > Customers be happy.
> > 
> > OK.  A properly run experiment wins over theory every time. :)
> > 
> > 
> > 
> > > You can test it if in your placement available TV programm on
> > > 159MHz or 442MHz. This trick can be usefull for other tuners.
> > 
> > If you look at tveeprom.c, a number of other tuners are using that
> > tuner definition:
> > 
> > $ grep FM1216ME_MK3 tveeprom.c
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216ME MK3"},
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216 ME
> > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05 2"},
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME MK5"},
> > 
> > If your change makes things bad for the other tuners, we'll probably
> > have to create an alternate entry for the other tuners instead of
> > using the FM1216ME_MK3 defintion.  I suspect most of them are clones
> > of the FM1216ME MK3 however, so it probably won't matter.
> > 
> > > > > 3. Set charge pump bit
> > > > 
> > > > This will improve the time to initially tune to a frequency, but
> > > > will likely add some noise as the PLL continues to maintain lock
> > > > on the signal.  If there is no way to turn off the CP after the
> > > > lock bit is set in the tuner, it's probably better to leave it
> > > > off for lower noise and just live with slower tuning.
> > > 
> > > We discuss with our windows system programmer about it. He sad that
> > > in analog TV mode noise from PLL don't give any problem.
> > 
> > I would be concerned about phase noise affecting the colors or any FM
> > sound carriers.  If the noise isn't noticably affecting colors to the
> > human eye (do color bars look OK?), or sound to the human ear, then
> > OK.
> > 
> > 
> > >  But in digital TV mode
> > > noise from PLL decreased BER.
> > 
> > I thought the FM1216ME MK3 was an analog only tuner.  I guess I don't
> > know DVB-T or cable in Europe well enough.
> > 
> > 
> > > > Leaving the CP bit set should be especially noticable ad FM noise
> > > > when set to tune to FM radio stations.  From the FM1236ME_MK3
> > > > datasheet: "It is recommended to set CP=0 in the FM mode at all
> > > > times." But the VHF low band control byte is also used when
> > > > setting FM radio (AFAICT with a quick look at the code.)
> > > 
> > > Yes. You are right. We can swith CP off in FM mode.
> > 
> > OK.  Thank you.
> > 
> > > With my best regards, Dmitry.
> > 
> > 
> > Regards,
> > Andy
> > 
> > 
> > 




Cheers,
Mauro

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-28  9:59           ` Dmitri Belimov
@ 2009-04-29  3:10             ` hermann pitton
  2009-04-29 10:12               ` Dmitri Belimov
  0 siblings, 1 reply; 42+ messages in thread
From: hermann pitton @ 2009-04-29  3:10 UTC (permalink / raw)
  To: Dmitri Belimov
  Cc: Mauro Carvalho Chehab, Andy Walls, video4linux-list, linux-media

Hi,

Am Dienstag, den 28.04.2009, 19:59 +1000 schrieb Dmitri Belimov:
> On Tue, 28 Apr 2009 15:18:32 -0300
> Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
> 
> > On Mon, 27 Apr 2009 19:29:05 +1000
> > Dmitri Belimov <d.belimov@gmail.com> wrote:
> > 
> > > Hi All
> > > 
> > > Step by step.
> > > 
> > > This is patch for change only range of FM1216ME_MK3. Slow tunning
> > > is not a big problem.
> > 
> > Dmitri,
> > 
> > I'll mark those patches as RFC at patchwork until the end of those
> > discussions. After that, please send it again into a new thread.
> 
> You mark patch with TOP AGC not this.
> 
> I think need discuss about FM1216ME_MK3 because I'll have a big patch for support
> control TOP AGC (sensitivity) of this tuner. It can be bad for compatible tuners.

hmm, in Europe, that TOP AGC did not ever made much difference and it is
an insmod option since ever.

I can't tell for Sibiria and initially that tuner had no SECAM-DK
support officially at all. There are no good/much_better tuners for FTA
at all and never have been ;)

Some examples, user success reports, to make it more easily to
understand? I think it can only change some _very little_ under already
worst conditions.

Cheers,
Hermann

> With my best regards, Dmitry.
> 
> > 
> > Cheers,
> > Mauro.
> > 
> > > 
> > > diff -r b40d628f830d linux/drivers/media/common/tuners/tuner-types.c
> > > --- a/linux/drivers/media/common/tuners/tuner-types.c	Fri
> > > Apr 24 01:46:41 2009 -0300 +++
> > > b/linux/drivers/media/common/tuners/tuner-types.c	Tue Apr 28
> > > 03:35:42 2009 +1000 @@ -558,8 +558,8 @@ 
> > >  static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = {
> > >  	{ 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
> > > -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> > > -	{ 16 * 999.99        , 0x8e, 0x04, },
> > > +	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
> > > +	{ 16 * 864.00        , 0x8e, 0x04, },
> > >  };
> > >  
> > >  static struct tuner_params tuner_fm1216me_mk3_params[] = {
> > > 
> > > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
> > > <d.belimov@gmail.com>
> > > 
> > > 
> > > With my best regards, Dmitry.
> > > 
> > > > Hi Dmitri,
> > > > 
> > > > Thank you for you responses.
> > > > 
> > > > Just a few more comments...
> > > > 
> > > > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > > > > Hi Andy
> > > > > 
> > > > > > Dmitri,
> > > > > > 
> > > > > > 
> > > > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > > > > > > Hi All
> > > > > > > 
> > > > > > > 1. Change middle band. In the end of the middle band the
> > > > > > > sensitivity of receiver not good. If we switch to higher
> > > > > > > band, sensitivity more better. Hardware trick.
> > > > > > 
> > > > 
> > > > > Several years a go your customers write some messages about bad
> > > > > quality of TV if frequency of TV is the end of band. It can be
> > > > > low band or middle. Our hardware engeneer make some tests with
> > > > > hardware TV generator and our TV tuners.
> > > > > 
> > > > > If we set default frequency range for low and middle band,
> > > > > quality of TV signal on 159MHz and 442 MHz is bad. When we make
> > > > > our changes with moving end of bands the quality of TV much
> > > > > better. And our system programmer for OS Windows use changed
> > > > > bands for drivers. Customers be happy.
> > > > 
> > > > OK.  A properly run experiment wins over theory every time. :)
> > > > 
> > > > 
> > > > 
> > > > > You can test it if in your placement available TV programm on
> > > > > 159MHz or 442MHz. This trick can be usefull for other tuners.
> > > > 
> > > > If you look at tveeprom.c, a number of other tuners are using that
> > > > tuner definition:
> > > > 
> > > > $ grep FM1216ME_MK3 tveeprom.c
> > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216ME
> > > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216 ME
> > > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> > > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05 2"},
> > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME
> > > > MK5"},
> > > > 
> > > > If your change makes things bad for the other tuners, we'll
> > > > probably have to create an alternate entry for the other tuners
> > > > instead of using the FM1216ME_MK3 defintion.  I suspect most of
> > > > them are clones of the FM1216ME MK3 however, so it probably won't
> > > > matter.
> > > > 
> > > > > > > 3. Set charge pump bit
> > > > > > 
> > > > > > This will improve the time to initially tune to a frequency,
> > > > > > but will likely add some noise as the PLL continues to
> > > > > > maintain lock on the signal.  If there is no way to turn off
> > > > > > the CP after the lock bit is set in the tuner, it's probably
> > > > > > better to leave it off for lower noise and just live with
> > > > > > slower tuning.
> > > > > 
> > > > > We discuss with our windows system programmer about it. He sad
> > > > > that in analog TV mode noise from PLL don't give any problem.
> > > > 
> > > > I would be concerned about phase noise affecting the colors or
> > > > any FM sound carriers.  If the noise isn't noticably affecting
> > > > colors to the human eye (do color bars look OK?), or sound to the
> > > > human ear, then OK.
> > > > 
> > > > 
> > > > >  But in digital TV mode
> > > > > noise from PLL decreased BER.
> > > > 
> > > > I thought the FM1216ME MK3 was an analog only tuner.  I guess I
> > > > don't know DVB-T or cable in Europe well enough.
> > > > 
> > > > 
> > > > > > Leaving the CP bit set should be especially noticable ad FM
> > > > > > noise when set to tune to FM radio stations.  From the
> > > > > > FM1236ME_MK3 datasheet: "It is recommended to set CP=0 in the
> > > > > > FM mode at all times." But the VHF low band control byte is
> > > > > > also used when setting FM radio (AFAICT with a quick look at
> > > > > > the code.)
> > > > > 
> > > > > Yes. You are right. We can swith CP off in FM mode.
> > > > 
> > > > OK.  Thank you.
> > > > 
> > > > > With my best regards, Dmitry.
> > > > 
> > > > 
> > > > Regards,
> > > > Andy
> > > > 
> > > > 
> > > > 
> > 
> > 
> > 
> > 
> > Cheers,
> > Mauro



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-29  3:10             ` hermann pitton
@ 2009-04-29 10:12               ` Dmitri Belimov
  2009-04-30  0:15                 ` hermann pitton
  2009-04-30  1:14                 ` Andy Walls
  0 siblings, 2 replies; 42+ messages in thread
From: Dmitri Belimov @ 2009-04-29 10:12 UTC (permalink / raw)
  To: hermann pitton
  Cc: Mauro Carvalho Chehab, Andy Walls, video4linux-list, linux-media

Hi,
 
> Am Dienstag, den 28.04.2009, 19:59 +1000 schrieb Dmitri Belimov:
> > On Tue, 28 Apr 2009 15:18:32 -0300
> > Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
> > 
> > > On Mon, 27 Apr 2009 19:29:05 +1000
> > > Dmitri Belimov <d.belimov@gmail.com> wrote:
> > > 
> > > > Hi All
> > > > 
> > > > Step by step.
> > > > 
> > > > This is patch for change only range of FM1216ME_MK3. Slow
> > > > tunning is not a big problem.
> > > 
> > > Dmitri,
> > > 
> > > I'll mark those patches as RFC at patchwork until the end of those
> > > discussions. After that, please send it again into a new thread.
> > 
> > You mark patch with TOP AGC not this.
> > 
> > I think need discuss about FM1216ME_MK3 because I'll have a big
> > patch for support control TOP AGC (sensitivity) of this tuner. It
> > can be bad for compatible tuners.
> 
> hmm, in Europe, that TOP AGC did not ever made much difference and it
> is an insmod option since ever.
> 
> I can't tell for Sibiria and initially that tuner had no SECAM-DK
> support officially at all. There are no good/much_better tuners for
> FTA at all and never have been ;)
> 
> Some examples, user success reports, to make it more easily to
> understand? I think it can only change some _very little_ under
> already worst conditions.

This is my idea for RFC about TOP AGC:

1. Add gain variable to tuner structure.
2. Add V4L2_CID_GAIN control to saa7134 and disable this control.
3. Add workaround to simple_post_tune function for write sensitivity level to the tuner.
4. Enable V4L2_CID_GAIN control when module load if card is right.

My expirience not so good, step 4 segfault the kernel. How to we can make it?

Our windows end-user programm control the sensitivity of each TV channel and change when
channel changed.

What you think about it??

If TV card is not touch V4L2_CTRL_FLAG_DISABLED in this control. The programm can't change AGC TOP.
And write default value to AGC TOP like now.

diff -r 43dbc8ebb5a2 linux/drivers/media/common/tuners/tuner-simple.c
--- a/linux/drivers/media/common/tuners/tuner-simple.c	Tue Jan 27 23:47:50 2009 -0200
+++ b/linux/drivers/media/common/tuners/tuner-simple.c	Tue Apr 21 09:44:38 2009 +1000
@@ -116,6 +116,7 @@
 
 	u32 frequency;
 	u32 bandwidth;
+	signed int gain;
 };
 
 /* ---------------------------------------------------------------------- */
@@ -495,15 +507,57 @@
 				   "(should be 4)\n", rc);
 		break;
 	}
+	case TUNER_PHILIPS_FM1216ME_MK3:
+	{
+		buffer[2] = 0xDE; /* T2 = 0, T1 = 1 and T0 = 1 */
+		switch (priv->gain) {
+		case 0:
+			/* TOP = External AGC, ATC = OFF */
+			buffer[3] = 0x60;
+			break;
+		case 1:
+			/* TOP = 118 dB, ATC = OFF */
+			buffer[3] = 0x00;
+			break;
+		case 2:
+			/* TOP = 115 dB, ATC = OFF */
+			buffer[3] = 0x10;
+			break;
+		case 3:
+			/* TOP = 112 dB, ATC = OFF */
+			buffer[3] = 0x20;
+			break;
+		case 4:
+			/* TOP = 109 dB, ATC = OFF */
+			buffer[3] = 0x30;
+			break;
+		case 5:
+			/* TOP = 106 dB, ATC = OFF */
+			buffer[3] = 0x40;
+			break;
+		case 6:
+			/* TOP = 103 dB, ATC = OFF */
+			buffer[3] = 0x50;
+			break;
+		default:
+			/* TOP = 112 dB, ATC = OFF */
+			buffer[3] = 0x20;
+			break;
+		}
+
+		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);
+
+		break;
 	}
-
+	}
 	return 0;
 }
 
diff -r 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Jan 27 23:47:50 2009 -0200
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Apr 21 09:44:38 2009 +1000
@@ -6506,6 +6806,20 @@
 		saa_call_all(dev, tuner, s_config, &tea5767_cfg);
 		break;
 	}
+	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
+	{
+		struct v4l2_queryctrl *ctl;
+		struct saa7134_fh *fh;
+		struct file *fl;
+
+		ctl->id = V4L2_CID_GAIN;
+		if (saa7134_queryctrl(fl, fh, ctl) == 0) {                /* BUG here */
+			/* enable this control */
+			ctl->flags &= ~(V4L2_CTRL_FLAG_DISABLED);
+		}
+	}
 	} /* switch() */
 
 	saa7134_tuner_setup(dev);
diff -r 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134-video.c
--- a/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Jan 27 23:47:50 2009 -0200
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Apr 21 09:44:38 2009 +1000
@@ -417,6 +417,15 @@
 		.step          = 1,
 		.default_value = 0,
 		.type          = V4L2_CTRL_TYPE_INTEGER,
+	}, {
+		.id 		= V4L2_CID_GAIN,
+		.name 		= "Gain",
+		.minimum 	= 0,
+		.maximum 	= 6,
+		.step 		= 1,
+		.default_value 	= 3,
+		.type 		= V4L2_CTRL_TYPE_INTEGER,
+		.flags 		= V4L2_CTRL_FLAG_DISABLED,
 	},{
 		.id            = V4L2_CID_HFLIP,
 		.name          = "Mirror",
@@ -1129,6 +1138,9 @@
 	case V4L2_CID_HUE:
 		c->value = dev->ctl_hue;
 		break;
+	case V4L2_CID_GAIN:
+		c->value = dev->ctl_gain;
+		break;
 	case V4L2_CID_CONTRAST:
 		c->value = dev->ctl_contrast;
 		break;
@@ -1214,6 +1226,10 @@
 	case V4L2_CID_HUE:
 		dev->ctl_hue = c->value;
 		saa_writeb(SAA7134_DEC_CHROMA_HUE, dev->ctl_hue);
+		break;
+	case V4L2_CID_GAIN:
+		dev->ctl_gain = c->value;
+
 		break;
 	case V4L2_CID_CONTRAST:
 		dev->ctl_contrast = c->value;
@@ -2502,6 +2518,7 @@
 	dev->ctl_bright     = ctrl_by_id(V4L2_CID_BRIGHTNESS)->default_value;
 	dev->ctl_contrast   = ctrl_by_id(V4L2_CID_CONTRAST)->default_value;
 	dev->ctl_hue        = ctrl_by_id(V4L2_CID_HUE)->default_value;
+	dev->ctl_gain       = ctrl_by_id(V4L2_CID_GAIN)->default_value;
 	dev->ctl_saturation = ctrl_by_id(V4L2_CID_SATURATION)->default_value;
 	dev->ctl_volume     = ctrl_by_id(V4L2_CID_AUDIO_VOLUME)->default_value;
 	dev->ctl_mute       = 1; // ctrl_by_id(V4L2_CID_AUDIO_MUTE)->default_value;
diff -r 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134.h
--- a/linux/drivers/media/video/saa7134/saa7134.h	Tue Jan 27 23:47:50 2009 -0200
+++ b/linux/drivers/media/video/saa7134/saa7134.h	Tue Apr 21 09:44:38 2009 +1000
@@ -548,6 +558,7 @@
 	int                        ctl_bright;
 	int                        ctl_contrast;
 	int                        ctl_hue;
+	int                        ctl_gain;             /* gain */
 	int                        ctl_saturation;
 	int                        ctl_freq;
 	int                        ctl_mute;             /* audio */


With my best regards, Dmitry.

> Cheers,
> Hermann
> 
> > With my best regards, Dmitry.
> > 
> > > 
> > > Cheers,
> > > Mauro.
> > > 
> > > > 
> > > > diff -r b40d628f830d
> > > > linux/drivers/media/common/tuners/tuner-types.c ---
> > > > a/linux/drivers/media/common/tuners/tuner-types.c	Fri
> > > > Apr 24 01:46:41 2009 -0300 +++
> > > > b/linux/drivers/media/common/tuners/tuner-types.c	Tue
> > > > Apr 28 03:35:42 2009 +1000 @@ -558,8 +558,8 @@ static struct
> > > > tuner_range tuner_fm1216me_mk3_pal_ranges[] = { { 16 *
> > > > 158.00 /*MHz*/, 0x8e, 0x01, },
> > > > -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> > > > -	{ 16 * 999.99        , 0x8e, 0x04, },
> > > > +	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
> > > > +	{ 16 * 864.00        , 0x8e, 0x04, },
> > > >  };
> > > >  
> > > >  static struct tuner_params tuner_fm1216me_mk3_params[] = {
> > > > 
> > > > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
> > > > <d.belimov@gmail.com>
> > > > 
> > > > 
> > > > With my best regards, Dmitry.
> > > > 
> > > > > Hi Dmitri,
> > > > > 
> > > > > Thank you for you responses.
> > > > > 
> > > > > Just a few more comments...
> > > > > 
> > > > > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > > > > > Hi Andy
> > > > > > 
> > > > > > > Dmitri,
> > > > > > > 
> > > > > > > 
> > > > > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > > > > > > > Hi All
> > > > > > > > 
> > > > > > > > 1. Change middle band. In the end of the middle band the
> > > > > > > > sensitivity of receiver not good. If we switch to higher
> > > > > > > > band, sensitivity more better. Hardware trick.
> > > > > > > 
> > > > > 
> > > > > > Several years a go your customers write some messages about
> > > > > > bad quality of TV if frequency of TV is the end of band. It
> > > > > > can be low band or middle. Our hardware engeneer make some
> > > > > > tests with hardware TV generator and our TV tuners.
> > > > > > 
> > > > > > If we set default frequency range for low and middle band,
> > > > > > quality of TV signal on 159MHz and 442 MHz is bad. When we
> > > > > > make our changes with moving end of bands the quality of TV
> > > > > > much better. And our system programmer for OS Windows use
> > > > > > changed bands for drivers. Customers be happy.
> > > > > 
> > > > > OK.  A properly run experiment wins over theory every time. :)
> > > > > 
> > > > > 
> > > > > 
> > > > > > You can test it if in your placement available TV programm
> > > > > > on 159MHz or 442MHz. This trick can be usefull for other
> > > > > > tuners.
> > > > > 
> > > > > If you look at tveeprom.c, a number of other tuners are using
> > > > > that tuner definition:
> > > > > 
> > > > > $ grep FM1216ME_MK3 tveeprom.c
> > > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips
> > > > > FQ1216ME MK3"}, { TUNER_PHILIPS_FM1216ME_MK3,
> > > > > 	"Philips FM1216 ME MK3"},
> > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> > > > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05 2"},
> > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME MK5"},
> > > > > 
> > > > > If your change makes things bad for the other tuners, we'll
> > > > > probably have to create an alternate entry for the other
> > > > > tuners instead of using the FM1216ME_MK3 defintion.  I
> > > > > suspect most of them are clones of the FM1216ME MK3 however,
> > > > > so it probably won't matter.
> > > > > 
> > > > > > > > 3. Set charge pump bit
> > > > > > > 
> > > > > > > This will improve the time to initially tune to a
> > > > > > > frequency, but will likely add some noise as the PLL
> > > > > > > continues to maintain lock on the signal.  If there is no
> > > > > > > way to turn off the CP after the lock bit is set in the
> > > > > > > tuner, it's probably better to leave it off for lower
> > > > > > > noise and just live with slower tuning.
> > > > > > 
> > > > > > We discuss with our windows system programmer about it. He
> > > > > > sad that in analog TV mode noise from PLL don't give any
> > > > > > problem.
> > > > > 
> > > > > I would be concerned about phase noise affecting the colors or
> > > > > any FM sound carriers.  If the noise isn't noticably affecting
> > > > > colors to the human eye (do color bars look OK?), or sound to
> > > > > the human ear, then OK.
> > > > > 
> > > > > 
> > > > > >  But in digital TV mode
> > > > > > noise from PLL decreased BER.
> > > > > 
> > > > > I thought the FM1216ME MK3 was an analog only tuner.  I guess
> > > > > I don't know DVB-T or cable in Europe well enough.
> > > > > 
> > > > > 
> > > > > > > Leaving the CP bit set should be especially noticable ad
> > > > > > > FM noise when set to tune to FM radio stations.  From the
> > > > > > > FM1236ME_MK3 datasheet: "It is recommended to set CP=0 in
> > > > > > > the FM mode at all times." But the VHF low band control
> > > > > > > byte is also used when setting FM radio (AFAICT with a
> > > > > > > quick look at the code.)
> > > > > > 
> > > > > > Yes. You are right. We can swith CP off in FM mode.
> > > > > 
> > > > > OK.  Thank you.
> > > > > 
> > > > > > With my best regards, Dmitry.
> > > > > 
> > > > > 
> > > > > Regards,
> > > > > Andy
> > > > > 
> > > > > 
> > > > > 
> > > 
> > > 
> > > 
> > > 
> > > Cheers,
> > > Mauro
> 
> 

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-29 10:12               ` Dmitri Belimov
@ 2009-04-30  0:15                 ` hermann pitton
  2009-05-05 18:42                   ` Dmitri Belimov
  2009-04-30  1:14                 ` Andy Walls
  1 sibling, 1 reply; 42+ messages in thread
From: hermann pitton @ 2009-04-30  0:15 UTC (permalink / raw)
  To: Dmitri Belimov
  Cc: Mauro Carvalho Chehab, Andy Walls, video4linux-list, linux-media

Hi Dmitry,

Am Mittwoch, den 29.04.2009, 20:12 +1000 schrieb Dmitri Belimov:
> Hi,
>  
> > Am Dienstag, den 28.04.2009, 19:59 +1000 schrieb Dmitri Belimov:
> > > On Tue, 28 Apr 2009 15:18:32 -0300
> > > Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
> > > 
> > > > On Mon, 27 Apr 2009 19:29:05 +1000
> > > > Dmitri Belimov <d.belimov@gmail.com> wrote:
> > > > 
> > > > > Hi All
> > > > > 
> > > > > Step by step.
> > > > > 
> > > > > This is patch for change only range of FM1216ME_MK3. Slow
> > > > > tunning is not a big problem.
> > > > 
> > > > Dmitri,
> > > > 
> > > > I'll mark those patches as RFC at patchwork until the end of those
> > > > discussions. After that, please send it again into a new thread.
> > > 
> > > You mark patch with TOP AGC not this.
> > > 
> > > I think need discuss about FM1216ME_MK3 because I'll have a big
> > > patch for support control TOP AGC (sensitivity) of this tuner. It
> > > can be bad for compatible tuners.
> > 
> > hmm, in Europe, that TOP AGC did not ever made much difference and it
> > is an insmod option since ever.
> > 
> > I can't tell for Sibiria and initially that tuner had no SECAM-DK
> > support officially at all. There are no good/much_better tuners for
> > FTA at all and never have been ;)
> > 
> > Some examples, user success reports, to make it more easily to
> > understand? I think it can only change some _very little_ under
> > already worst conditions.
> 
> This is my idea for RFC about TOP AGC:

what about to create a new FM1216ME MK3 tuner type for testing?

It is for sure maybe the best tuner around and likely is also the best
for tweaks in countries with huge lands to cover, not restricted to
Russia, Australia or Canada.

I would like to have also Hans' opinion on it, since he did some final
steps to get them right.

Cheers,
Hermann

> 1. Add gain variable to tuner structure.
> 2. Add V4L2_CID_GAIN control to saa7134 and disable this control.
> 3. Add workaround to simple_post_tune function for write sensitivity level to the tuner.
> 4. Enable V4L2_CID_GAIN control when module load if card is right.
> 
> My expirience not so good, step 4 segfault the kernel. How to we can make it?
> 
> Our windows end-user programm control the sensitivity of each TV channel and change when
> channel changed.
> 
> What you think about it??
> 
> If TV card is not touch V4L2_CTRL_FLAG_DISABLED in this control. The programm can't change AGC TOP.
> And write default value to AGC TOP like now.
> 
> diff -r 43dbc8ebb5a2 linux/drivers/media/common/tuners/tuner-simple.c
> --- a/linux/drivers/media/common/tuners/tuner-simple.c	Tue Jan 27 23:47:50 2009 -0200
> +++ b/linux/drivers/media/common/tuners/tuner-simple.c	Tue Apr 21 09:44:38 2009 +1000
> @@ -116,6 +116,7 @@
>  
>  	u32 frequency;
>  	u32 bandwidth;
> +	signed int gain;
>  };
>  
>  /* ---------------------------------------------------------------------- */
> @@ -495,15 +507,57 @@
>  				   "(should be 4)\n", rc);
>  		break;
>  	}
> +	case TUNER_PHILIPS_FM1216ME_MK3:
> +	{
> +		buffer[2] = 0xDE; /* T2 = 0, T1 = 1 and T0 = 1 */
> +		switch (priv->gain) {
> +		case 0:
> +			/* TOP = External AGC, ATC = OFF */
> +			buffer[3] = 0x60;
> +			break;
> +		case 1:
> +			/* TOP = 118 dB, ATC = OFF */
> +			buffer[3] = 0x00;
> +			break;
> +		case 2:
> +			/* TOP = 115 dB, ATC = OFF */
> +			buffer[3] = 0x10;
> +			break;
> +		case 3:
> +			/* TOP = 112 dB, ATC = OFF */
> +			buffer[3] = 0x20;
> +			break;
> +		case 4:
> +			/* TOP = 109 dB, ATC = OFF */
> +			buffer[3] = 0x30;
> +			break;
> +		case 5:
> +			/* TOP = 106 dB, ATC = OFF */
> +			buffer[3] = 0x40;
> +			break;
> +		case 6:
> +			/* TOP = 103 dB, ATC = OFF */
> +			buffer[3] = 0x50;
> +			break;
> +		default:
> +			/* TOP = 112 dB, ATC = OFF */
> +			buffer[3] = 0x20;
> +			break;
> +		}
> +
> +		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);
> +
> +		break;
>  	}
> -
> +	}
>  	return 0;
>  }
>  
> diff -r 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134-cards.c
> --- a/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Jan 27 23:47:50 2009 -0200
> +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Apr 21 09:44:38 2009 +1000
> @@ -6506,6 +6806,20 @@
>  		saa_call_all(dev, tuner, s_config, &tea5767_cfg);
>  		break;
>  	}
> +	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
> +	{
> +		struct v4l2_queryctrl *ctl;
> +		struct saa7134_fh *fh;
> +		struct file *fl;
> +
> +		ctl->id = V4L2_CID_GAIN;
> +		if (saa7134_queryctrl(fl, fh, ctl) == 0) {                /* BUG here */
> +			/* enable this control */
> +			ctl->flags &= ~(V4L2_CTRL_FLAG_DISABLED);
> +		}
> +	}
>  	} /* switch() */
>  
>  	saa7134_tuner_setup(dev);
> diff -r 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134-video.c
> --- a/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Jan 27 23:47:50 2009 -0200
> +++ b/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Apr 21 09:44:38 2009 +1000
> @@ -417,6 +417,15 @@
>  		.step          = 1,
>  		.default_value = 0,
>  		.type          = V4L2_CTRL_TYPE_INTEGER,
> +	}, {
> +		.id 		= V4L2_CID_GAIN,
> +		.name 		= "Gain",
> +		.minimum 	= 0,
> +		.maximum 	= 6,
> +		.step 		= 1,
> +		.default_value 	= 3,
> +		.type 		= V4L2_CTRL_TYPE_INTEGER,
> +		.flags 		= V4L2_CTRL_FLAG_DISABLED,
>  	},{
>  		.id            = V4L2_CID_HFLIP,
>  		.name          = "Mirror",
> @@ -1129,6 +1138,9 @@
>  	case V4L2_CID_HUE:
>  		c->value = dev->ctl_hue;
>  		break;
> +	case V4L2_CID_GAIN:
> +		c->value = dev->ctl_gain;
> +		break;
>  	case V4L2_CID_CONTRAST:
>  		c->value = dev->ctl_contrast;
>  		break;
> @@ -1214,6 +1226,10 @@
>  	case V4L2_CID_HUE:
>  		dev->ctl_hue = c->value;
>  		saa_writeb(SAA7134_DEC_CHROMA_HUE, dev->ctl_hue);
> +		break;
> +	case V4L2_CID_GAIN:
> +		dev->ctl_gain = c->value;
> +
>  		break;
>  	case V4L2_CID_CONTRAST:
>  		dev->ctl_contrast = c->value;
> @@ -2502,6 +2518,7 @@
>  	dev->ctl_bright     = ctrl_by_id(V4L2_CID_BRIGHTNESS)->default_value;
>  	dev->ctl_contrast   = ctrl_by_id(V4L2_CID_CONTRAST)->default_value;
>  	dev->ctl_hue        = ctrl_by_id(V4L2_CID_HUE)->default_value;
> +	dev->ctl_gain       = ctrl_by_id(V4L2_CID_GAIN)->default_value;
>  	dev->ctl_saturation = ctrl_by_id(V4L2_CID_SATURATION)->default_value;
>  	dev->ctl_volume     = ctrl_by_id(V4L2_CID_AUDIO_VOLUME)->default_value;
>  	dev->ctl_mute       = 1; // ctrl_by_id(V4L2_CID_AUDIO_MUTE)->default_value;
> diff -r 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134.h
> --- a/linux/drivers/media/video/saa7134/saa7134.h	Tue Jan 27 23:47:50 2009 -0200
> +++ b/linux/drivers/media/video/saa7134/saa7134.h	Tue Apr 21 09:44:38 2009 +1000
> @@ -548,6 +558,7 @@
>  	int                        ctl_bright;
>  	int                        ctl_contrast;
>  	int                        ctl_hue;
> +	int                        ctl_gain;             /* gain */
>  	int                        ctl_saturation;
>  	int                        ctl_freq;
>  	int                        ctl_mute;             /* audio */
> 
> 
> With my best regards, Dmitry.
> 
> > Cheers,
> > Hermann
> > 
> > > With my best regards, Dmitry.
> > > 
> > > > 
> > > > Cheers,
> > > > Mauro.
> > > > 
> > > > > 
> > > > > diff -r b40d628f830d
> > > > > linux/drivers/media/common/tuners/tuner-types.c ---
> > > > > a/linux/drivers/media/common/tuners/tuner-types.c	Fri
> > > > > Apr 24 01:46:41 2009 -0300 +++
> > > > > b/linux/drivers/media/common/tuners/tuner-types.c	Tue
> > > > > Apr 28 03:35:42 2009 +1000 @@ -558,8 +558,8 @@ static struct
> > > > > tuner_range tuner_fm1216me_mk3_pal_ranges[] = { { 16 *
> > > > > 158.00 /*MHz*/, 0x8e, 0x01, },
> > > > > -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> > > > > -	{ 16 * 999.99        , 0x8e, 0x04, },
> > > > > +	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
> > > > > +	{ 16 * 864.00        , 0x8e, 0x04, },
> > > > >  };
> > > > >  
> > > > >  static struct tuner_params tuner_fm1216me_mk3_params[] = {
> > > > > 
> > > > > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
> > > > > <d.belimov@gmail.com>
> > > > > 
> > > > > 
> > > > > With my best regards, Dmitry.
> > > > > 
> > > > > > Hi Dmitri,
> > > > > > 
> > > > > > Thank you for you responses.
> > > > > > 
> > > > > > Just a few more comments...
> > > > > > 
> > > > > > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > > > > > > Hi Andy
> > > > > > > 
> > > > > > > > Dmitri,
> > > > > > > > 
> > > > > > > > 
> > > > > > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > > > > > > > > Hi All
> > > > > > > > > 
> > > > > > > > > 1. Change middle band. In the end of the middle band the
> > > > > > > > > sensitivity of receiver not good. If we switch to higher
> > > > > > > > > band, sensitivity more better. Hardware trick.
> > > > > > > > 
> > > > > > 
> > > > > > > Several years a go your customers write some messages about
> > > > > > > bad quality of TV if frequency of TV is the end of band. It
> > > > > > > can be low band or middle. Our hardware engeneer make some
> > > > > > > tests with hardware TV generator and our TV tuners.
> > > > > > > 
> > > > > > > If we set default frequency range for low and middle band,
> > > > > > > quality of TV signal on 159MHz and 442 MHz is bad. When we
> > > > > > > make our changes with moving end of bands the quality of TV
> > > > > > > much better. And our system programmer for OS Windows use
> > > > > > > changed bands for drivers. Customers be happy.
> > > > > > 
> > > > > > OK.  A properly run experiment wins over theory every time. :)
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > > You can test it if in your placement available TV programm
> > > > > > > on 159MHz or 442MHz. This trick can be usefull for other
> > > > > > > tuners.
> > > > > > 
> > > > > > If you look at tveeprom.c, a number of other tuners are using
> > > > > > that tuner definition:
> > > > > > 
> > > > > > $ grep FM1216ME_MK3 tveeprom.c
> > > > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips
> > > > > > FQ1216ME MK3"}, { TUNER_PHILIPS_FM1216ME_MK3,
> > > > > > 	"Philips FM1216 ME MK3"},
> > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> > > > > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05 2"},
> > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME MK5"},
> > > > > > 
> > > > > > If your change makes things bad for the other tuners, we'll
> > > > > > probably have to create an alternate entry for the other
> > > > > > tuners instead of using the FM1216ME_MK3 defintion.  I
> > > > > > suspect most of them are clones of the FM1216ME MK3 however,
> > > > > > so it probably won't matter.
> > > > > > 
> > > > > > > > > 3. Set charge pump bit
> > > > > > > > 
> > > > > > > > This will improve the time to initially tune to a
> > > > > > > > frequency, but will likely add some noise as the PLL
> > > > > > > > continues to maintain lock on the signal.  If there is no
> > > > > > > > way to turn off the CP after the lock bit is set in the
> > > > > > > > tuner, it's probably better to leave it off for lower
> > > > > > > > noise and just live with slower tuning.
> > > > > > > 
> > > > > > > We discuss with our windows system programmer about it. He
> > > > > > > sad that in analog TV mode noise from PLL don't give any
> > > > > > > problem.
> > > > > > 
> > > > > > I would be concerned about phase noise affecting the colors or
> > > > > > any FM sound carriers.  If the noise isn't noticably affecting
> > > > > > colors to the human eye (do color bars look OK?), or sound to
> > > > > > the human ear, then OK.
> > > > > > 
> > > > > > 
> > > > > > >  But in digital TV mode
> > > > > > > noise from PLL decreased BER.
> > > > > > 
> > > > > > I thought the FM1216ME MK3 was an analog only tuner.  I guess
> > > > > > I don't know DVB-T or cable in Europe well enough.
> > > > > > 
> > > > > > 
> > > > > > > > Leaving the CP bit set should be especially noticable ad
> > > > > > > > FM noise when set to tune to FM radio stations.  From the
> > > > > > > > FM1236ME_MK3 datasheet: "It is recommended to set CP=0 in
> > > > > > > > the FM mode at all times." But the VHF low band control
> > > > > > > > byte is also used when setting FM radio (AFAICT with a
> > > > > > > > quick look at the code.)
> > > > > > > 
> > > > > > > Yes. You are right. We can swith CP off in FM mode.
> > > > > > 
> > > > > > OK.  Thank you.
> > > > > > 
> > > > > > > With my best regards, Dmitry.
> > > > > > 
> > > > > > 
> > > > > > Regards,
> > > > > > Andy
> > > > > > 
> > > > > > 
> > > > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Cheers,
> > > > Mauro
> > 
> > 


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-29 10:12               ` Dmitri Belimov
  2009-04-30  0:15                 ` hermann pitton
@ 2009-04-30  1:14                 ` Andy Walls
  2009-05-01  5:18                   ` hermann pitton
  2009-05-06 22:58                   ` Dmitri Belimov
  1 sibling, 2 replies; 42+ messages in thread
From: Andy Walls @ 2009-04-30  1:14 UTC (permalink / raw)
  To: Dmitri Belimov
  Cc: hermann pitton, Mauro Carvalho Chehab, video4linux-list, linux-media

On Wed, 2009-04-29 at 20:12 +1000, Dmitri Belimov wrote:
> Hi,
>  
> > Am Dienstag, den 28.04.2009, 19:59 +1000 schrieb Dmitri Belimov:
> > > On Tue, 28 Apr 2009 15:18:32 -0300
> > > Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
> > > 
> > > > On Mon, 27 Apr 2009 19:29:05 +1000
> > > > Dmitri Belimov <d.belimov@gmail.com> wrote:
> > > > 
> > > > > Hi All
> > > > > 
> > > > > Step by step.
> > > > > 
> > > > > This is patch for change only range of FM1216ME_MK3. Slow
> > > > > tunning is not a big problem.
> > > > 
> > > > Dmitri,
> > > > 
> > > > I'll mark those patches as RFC at patchwork until the end of those
> > > > discussions. After that, please send it again into a new thread.
> > > 
> > > You mark patch with TOP AGC not this.
> > > 
> > > I think need discuss about FM1216ME_MK3 because I'll have a big
> > > patch for support control TOP AGC (sensitivity) of this tuner. It
> > > can be bad for compatible tuners.
> > 
> > hmm, in Europe, that TOP AGC did not ever made much difference and it
> > is an insmod option since ever.
> > 
> > I can't tell for Sibiria and initially that tuner had no SECAM-DK
> > support officially at all. There are no good/much_better tuners for
> > FTA at all and never have been ;)
> > 
> > Some examples, user success reports, to make it more easily to
> > understand? I think it can only change some _very little_ under
> > already worst conditions.
> 
> This is my idea for RFC about TOP AGC:
> 
> 1. Add gain variable to tuner structure.
> 2. Add V4L2_CID_GAIN control to saa7134 and disable this control.
> 3. Add workaround to simple_post_tune function for write sensitivity level to the tuner.
> 4. Enable V4L2_CID_GAIN control when module load if card is right.
> 
> My expirience not so good, step 4 segfault the kernel. How to we can make it?
> 
> Our windows end-user programm control the sensitivity of each TV channel and change when
> channel changed.
> 
> What you think about it??

Dmitri,

>From my understanding the take over point is the signal strength level
that you want the second stage (an IF demod chip like the TDA9887) to
take over automatic gain control from the first stage (a tuner chip like
the TUA6030).  The objective is to set the TOP to achieve maximum gain
in the first stage while avoiding clipping in the first stage.  When the
input signal level is smaller than the TOP, the first stage gain is at a
maximum, and the second stage is performing automatic gain control
internally.  When the input signal level becomes greater than the TOP,
the first stage gain needs to be reduced by an AGC, and the second stage
gain remains constant.


As I understand it, it would be best to set the first stage (TUA6030 or
similar) to "External AGC" and set the take over point in the second
stage (the TDA9887), if the pins between the chips are wired up properly
inside the tuner.  This should coordinate the AGC in both the first
stage and second stage of the tuner, as the second stage will be
providing the gain control to the first stage as needed when the signal
reaches the TOP.

http://www.comsec.com/usrp/microtune/NF_tutorial.pdf

It allows you to achieve maximum gain in the first stage to minimize
overall receiver noise figure, and avoid clipping the input signal in
the first stage (TUA6030) with a proper TOP setting in the second stage
(TDA9887).  The TOP setting in the second stage needs to take into
account IF SAW filter attenuation of course.

Do the circuit board traces in the FM1216ME_MK3 support the TDA9887
controlling the gain of the first stage?  (I've never opened an
equivalent NTSC tuner assembly to take a look.)

If not, then, if I understand things correctly, you need to set the
first stage and second stage TOP settings so that they refer to about
the same signal level before the IF SAW filter.  


I would think AGC TOP settings, for both stages of the tuner, are
tuner-dependent and relatively constant once you figure out what they
should be.

Do you have a different understanding or insight?

Regards,
Andy




> If TV card is not touch V4L2_CTRL_FLAG_DISABLED in this control. The programm can't change AGC TOP.
> And write default value to AGC TOP like now.
> 
> diff -r 43dbc8ebb5a2 linux/drivers/media/common/tuners/tuner-simple.c
> --- a/linux/drivers/media/common/tuners/tuner-simple.c	Tue Jan 27 23:47:50 2009 -0200
> +++ b/linux/drivers/media/common/tuners/tuner-simple.c	Tue Apr 21 09:44:38 2009 +1000
> @@ -116,6 +116,7 @@
>  
>  	u32 frequency;
>  	u32 bandwidth;
> +	signed int gain;
>  };
>  
>  /* ---------------------------------------------------------------------- */
> @@ -495,15 +507,57 @@
>  				   "(should be 4)\n", rc);
>  		break;
>  	}
> +	case TUNER_PHILIPS_FM1216ME_MK3:
> +	{
> +		buffer[2] = 0xDE; /* T2 = 0, T1 = 1 and T0 = 1 */
> +		switch (priv->gain) {
> +		case 0:
> +			/* TOP = External AGC, ATC = OFF */
> +			buffer[3] = 0x60;
> +			break;
> +		case 1:
> +			/* TOP = 118 dB, ATC = OFF */
> +			buffer[3] = 0x00;
> +			break;
> +		case 2:
> +			/* TOP = 115 dB, ATC = OFF */
> +			buffer[3] = 0x10;
> +			break;
> +		case 3:
> +			/* TOP = 112 dB, ATC = OFF */
> +			buffer[3] = 0x20;
> +			break;
> +		case 4:
> +			/* TOP = 109 dB, ATC = OFF */
> +			buffer[3] = 0x30;
> +			break;
> +		case 5:
> +			/* TOP = 106 dB, ATC = OFF */
> +			buffer[3] = 0x40;
> +			break;
> +		case 6:
> +			/* TOP = 103 dB, ATC = OFF */
> +			buffer[3] = 0x50;
> +			break;
> +		default:
> +			/* TOP = 112 dB, ATC = OFF */
> +			buffer[3] = 0x20;
> +			break;
> +		}
> +
> +		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);
> +
> +		break;
>  	}
> -
> +	}
>  	return 0;
>  }
>  
> diff -r 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134-cards.c
> --- a/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Jan 27 23:47:50 2009 -0200
> +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Apr 21 09:44:38 2009 +1000
> @@ -6506,6 +6806,20 @@
>  		saa_call_all(dev, tuner, s_config, &tea5767_cfg);
>  		break;
>  	}
> +	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
> +	{
> +		struct v4l2_queryctrl *ctl;
> +		struct saa7134_fh *fh;
> +		struct file *fl;
> +
> +		ctl->id = V4L2_CID_GAIN;
> +		if (saa7134_queryctrl(fl, fh, ctl) == 0) {                /* BUG here */
> +			/* enable this control */
> +			ctl->flags &= ~(V4L2_CTRL_FLAG_DISABLED);
> +		}
> +	}
>  	} /* switch() */
>  
>  	saa7134_tuner_setup(dev);
> diff -r 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134-video.c
> --- a/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Jan 27 23:47:50 2009 -0200
> +++ b/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Apr 21 09:44:38 2009 +1000
> @@ -417,6 +417,15 @@
>  		.step          = 1,
>  		.default_value = 0,
>  		.type          = V4L2_CTRL_TYPE_INTEGER,
> +	}, {
> +		.id 		= V4L2_CID_GAIN,
> +		.name 		= "Gain",
> +		.minimum 	= 0,
> +		.maximum 	= 6,
> +		.step 		= 1,
> +		.default_value 	= 3,
> +		.type 		= V4L2_CTRL_TYPE_INTEGER,
> +		.flags 		= V4L2_CTRL_FLAG_DISABLED,
>  	},{
>  		.id            = V4L2_CID_HFLIP,
>  		.name          = "Mirror",
> @@ -1129,6 +1138,9 @@
>  	case V4L2_CID_HUE:
>  		c->value = dev->ctl_hue;
>  		break;
> +	case V4L2_CID_GAIN:
> +		c->value = dev->ctl_gain;
> +		break;
>  	case V4L2_CID_CONTRAST:
>  		c->value = dev->ctl_contrast;
>  		break;
> @@ -1214,6 +1226,10 @@
>  	case V4L2_CID_HUE:
>  		dev->ctl_hue = c->value;
>  		saa_writeb(SAA7134_DEC_CHROMA_HUE, dev->ctl_hue);
> +		break;
> +	case V4L2_CID_GAIN:
> +		dev->ctl_gain = c->value;
> +
>  		break;
>  	case V4L2_CID_CONTRAST:
>  		dev->ctl_contrast = c->value;
> @@ -2502,6 +2518,7 @@
>  	dev->ctl_bright     = ctrl_by_id(V4L2_CID_BRIGHTNESS)->default_value;
>  	dev->ctl_contrast   = ctrl_by_id(V4L2_CID_CONTRAST)->default_value;
>  	dev->ctl_hue        = ctrl_by_id(V4L2_CID_HUE)->default_value;
> +	dev->ctl_gain       = ctrl_by_id(V4L2_CID_GAIN)->default_value;
>  	dev->ctl_saturation = ctrl_by_id(V4L2_CID_SATURATION)->default_value;
>  	dev->ctl_volume     = ctrl_by_id(V4L2_CID_AUDIO_VOLUME)->default_value;
>  	dev->ctl_mute       = 1; // ctrl_by_id(V4L2_CID_AUDIO_MUTE)->default_value;
> diff -r 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134.h
> --- a/linux/drivers/media/video/saa7134/saa7134.h	Tue Jan 27 23:47:50 2009 -0200
> +++ b/linux/drivers/media/video/saa7134/saa7134.h	Tue Apr 21 09:44:38 2009 +1000
> @@ -548,6 +558,7 @@
>  	int                        ctl_bright;
>  	int                        ctl_contrast;
>  	int                        ctl_hue;
> +	int                        ctl_gain;             /* gain */
>  	int                        ctl_saturation;
>  	int                        ctl_freq;
>  	int                        ctl_mute;             /* audio */
> 
> 
> With my best regards, Dmitry.
> 
> > Cheers,
> > Hermann
> > 
> > > With my best regards, Dmitry.
> > > 
> > > > 
> > > > Cheers,
> > > > Mauro.
> > > > 
> > > > > 
> > > > > diff -r b40d628f830d
> > > > > linux/drivers/media/common/tuners/tuner-types.c ---
> > > > > a/linux/drivers/media/common/tuners/tuner-types.c	Fri
> > > > > Apr 24 01:46:41 2009 -0300 +++
> > > > > b/linux/drivers/media/common/tuners/tuner-types.c	Tue
> > > > > Apr 28 03:35:42 2009 +1000 @@ -558,8 +558,8 @@ static struct
> > > > > tuner_range tuner_fm1216me_mk3_pal_ranges[] = { { 16 *
> > > > > 158.00 /*MHz*/, 0x8e, 0x01, },
> > > > > -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> > > > > -	{ 16 * 999.99        , 0x8e, 0x04, },
> > > > > +	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
> > > > > +	{ 16 * 864.00        , 0x8e, 0x04, },
> > > > >  };
> > > > >  
> > > > >  static struct tuner_params tuner_fm1216me_mk3_params[] = {
> > > > > 
> > > > > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
> > > > > <d.belimov@gmail.com>
> > > > > 
> > > > > 
> > > > > With my best regards, Dmitry.
> > > > > 
> > > > > > Hi Dmitri,
> > > > > > 
> > > > > > Thank you for you responses.
> > > > > > 
> > > > > > Just a few more comments...
> > > > > > 
> > > > > > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > > > > > > Hi Andy
> > > > > > > 
> > > > > > > > Dmitri,
> > > > > > > > 
> > > > > > > > 
> > > > > > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > > > > > > > > Hi All
> > > > > > > > > 
> > > > > > > > > 1. Change middle band. In the end of the middle band the
> > > > > > > > > sensitivity of receiver not good. If we switch to higher
> > > > > > > > > band, sensitivity more better. Hardware trick.
> > > > > > > > 
> > > > > > 
> > > > > > > Several years a go your customers write some messages about
> > > > > > > bad quality of TV if frequency of TV is the end of band. It
> > > > > > > can be low band or middle. Our hardware engeneer make some
> > > > > > > tests with hardware TV generator and our TV tuners.
> > > > > > > 
> > > > > > > If we set default frequency range for low and middle band,
> > > > > > > quality of TV signal on 159MHz and 442 MHz is bad. When we
> > > > > > > make our changes with moving end of bands the quality of TV
> > > > > > > much better. And our system programmer for OS Windows use
> > > > > > > changed bands for drivers. Customers be happy.
> > > > > > 
> > > > > > OK.  A properly run experiment wins over theory every time. :)
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > > You can test it if in your placement available TV programm
> > > > > > > on 159MHz or 442MHz. This trick can be usefull for other
> > > > > > > tuners.
> > > > > > 
> > > > > > If you look at tveeprom.c, a number of other tuners are using
> > > > > > that tuner definition:
> > > > > > 
> > > > > > $ grep FM1216ME_MK3 tveeprom.c
> > > > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips
> > > > > > FQ1216ME MK3"}, { TUNER_PHILIPS_FM1216ME_MK3,
> > > > > > 	"Philips FM1216 ME MK3"},
> > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> > > > > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05 2"},
> > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME MK5"},
> > > > > > 
> > > > > > If your change makes things bad for the other tuners, we'll
> > > > > > probably have to create an alternate entry for the other
> > > > > > tuners instead of using the FM1216ME_MK3 defintion.  I
> > > > > > suspect most of them are clones of the FM1216ME MK3 however,
> > > > > > so it probably won't matter.
> > > > > > 
> > > > > > > > > 3. Set charge pump bit
> > > > > > > > 
> > > > > > > > This will improve the time to initially tune to a
> > > > > > > > frequency, but will likely add some noise as the PLL
> > > > > > > > continues to maintain lock on the signal.  If there is no
> > > > > > > > way to turn off the CP after the lock bit is set in the
> > > > > > > > tuner, it's probably better to leave it off for lower
> > > > > > > > noise and just live with slower tuning.
> > > > > > > 
> > > > > > > We discuss with our windows system programmer about it. He
> > > > > > > sad that in analog TV mode noise from PLL don't give any
> > > > > > > problem.
> > > > > > 
> > > > > > I would be concerned about phase noise affecting the colors or
> > > > > > any FM sound carriers.  If the noise isn't noticably affecting
> > > > > > colors to the human eye (do color bars look OK?), or sound to
> > > > > > the human ear, then OK.
> > > > > > 
> > > > > > 
> > > > > > >  But in digital TV mode
> > > > > > > noise from PLL decreased BER.
> > > > > > 
> > > > > > I thought the FM1216ME MK3 was an analog only tuner.  I guess
> > > > > > I don't know DVB-T or cable in Europe well enough.
> > > > > > 
> > > > > > 
> > > > > > > > Leaving the CP bit set should be especially noticable ad
> > > > > > > > FM noise when set to tune to FM radio stations.  From the
> > > > > > > > FM1236ME_MK3 datasheet: "It is recommended to set CP=0 in
> > > > > > > > the FM mode at all times." But the VHF low band control
> > > > > > > > byte is also used when setting FM radio (AFAICT with a
> > > > > > > > quick look at the code.)
> > > > > > > 
> > > > > > > Yes. You are right. We can swith CP off in FM mode.
> > > > > > 
> > > > > > OK.  Thank you.
> > > > > > 
> > > > > > > With my best regards, Dmitry.
> > > > > > 
> > > > > > 
> > > > > > Regards,
> > > > > > Andy
> > > > > > 
> > > > > > 
> > > > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Cheers,
> > > > Mauro
> > 
> > 
> 


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-30  1:14                 ` Andy Walls
@ 2009-05-01  5:18                   ` hermann pitton
  2009-05-01 23:55                     ` hermann pitton
  2009-05-06 22:58                   ` Dmitri Belimov
  1 sibling, 1 reply; 42+ messages in thread
From: hermann pitton @ 2009-05-01  5:18 UTC (permalink / raw)
  To: Andy Walls
  Cc: Dmitri Belimov, Mauro Carvalho Chehab, video4linux-list, linux-media


Am Mittwoch, den 29.04.2009, 21:14 -0400 schrieb Andy Walls:
> On Wed, 2009-04-29 at 20:12 +1000, Dmitri Belimov wrote:
> > Hi,
> >  
> > > Am Dienstag, den 28.04.2009, 19:59 +1000 schrieb Dmitri Belimov:
> > > > On Tue, 28 Apr 2009 15:18:32 -0300
> > > > Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
> > > > 
> > > > > On Mon, 27 Apr 2009 19:29:05 +1000
> > > > > Dmitri Belimov <d.belimov@gmail.com> wrote:
> > > > > 
> > > > > > Hi All
> > > > > > 
> > > > > > Step by step.
> > > > > > 
> > > > > > This is patch for change only range of FM1216ME_MK3. Slow
> > > > > > tunning is not a big problem.
> > > > > 
> > > > > Dmitri,
> > > > > 
> > > > > I'll mark those patches as RFC at patchwork until the end of those
> > > > > discussions. After that, please send it again into a new thread.
> > > > 
> > > > You mark patch with TOP AGC not this.
> > > > 
> > > > I think need discuss about FM1216ME_MK3 because I'll have a big
> > > > patch for support control TOP AGC (sensitivity) of this tuner. It
> > > > can be bad for compatible tuners.
> > > 
> > > hmm, in Europe, that TOP AGC did not ever made much difference and it
> > > is an insmod option since ever.
> > > 
> > > I can't tell for Sibiria and initially that tuner had no SECAM-DK
> > > support officially at all. There are no good/much_better tuners for
> > > FTA at all and never have been ;)
> > > 
> > > Some examples, user success reports, to make it more easily to
> > > understand? I think it can only change some _very little_ under
> > > already worst conditions.
> > 
> > This is my idea for RFC about TOP AGC:
> > 
> > 1. Add gain variable to tuner structure.
> > 2. Add V4L2_CID_GAIN control to saa7134 and disable this control.
> > 3. Add workaround to simple_post_tune function for write sensitivity level to the tuner.
> > 4. Enable V4L2_CID_GAIN control when module load if card is right.
> > 
> > My expirience not so good, step 4 segfault the kernel. How to we can make it?
> > 
> > Our windows end-user programm control the sensitivity of each TV channel and change when
> > channel changed.
> > 
> > What you think about it??
> 
> Dmitri,
> 
> >From my understanding the take over point is the signal strength level
> that you want the second stage (an IF demod chip like the TDA9887) to
> take over automatic gain control from the first stage (a tuner chip like
> the TUA6030).  The objective is to set the TOP to achieve maximum gain
> in the first stage while avoiding clipping in the first stage.  When the
> input signal level is smaller than the TOP, the first stage gain is at a
> maximum, and the second stage is performing automatic gain control
> internally.  When the input signal level becomes greater than the TOP,
> the first stage gain needs to be reduced by an AGC, and the second stage
> gain remains constant.
> 
> 
> As I understand it, it would be best to set the first stage (TUA6030 or
> similar) to "External AGC" and set the take over point in the second
> stage (the TDA9887), if the pins between the chips are wired up properly
> inside the tuner.  This should coordinate the AGC in both the first
> stage and second stage of the tuner, as the second stage will be
> providing the gain control to the first stage as needed when the signal
> reaches the TOP.
> 
> http://www.comsec.com/usrp/microtune/NF_tutorial.pdf
> 
> It allows you to achieve maximum gain in the first stage to minimize
> overall receiver noise figure, and avoid clipping the input signal in
> the first stage (TUA6030) with a proper TOP setting in the second stage
> (TDA9887).  The TOP setting in the second stage needs to take into
> account IF SAW filter attenuation of course.
> 
> Do the circuit board traces in the FM1216ME_MK3 support the TDA9887
> controlling the gain of the first stage?  (I've never opened an
> equivalent NTSC tuner assembly to take a look.)

"equivalent" NTSC tuners _do not_ exist at all.

I don't forget all the time we spend to find out that some of them are
Intercarrier only!

Also, the tda988x stuff is underneath the tuner PCB.

I cut one off for those interested in line tracing ...

Without port2=0 you don't get any SECAM-L into the sound trap.

It needs amplification from minus 40 dB AM for the first sound carrier,
and then of course you prefer the second with NICAM.

> If not, then, if I understand things correctly, you need to set the
> first stage and second stage TOP settings so that they refer to about
> the same signal level before the IF SAW filter.  
> 
> 
> I would think AGC TOP settings, for both stages of the tuner, are
> tuner-dependent and relatively constant once you figure out what they
> should be.
> 
> Do you have a different understanding or insight?
> 
> Regards,
> Andy

Since I have some m$ system again after 9 years, not used within the
last three months, I would prefer to get it demonstrated there at first.

I leave on the first BSOD.

Cheers,
Hermann

> 
> 
> 
> > If TV card is not touch V4L2_CTRL_FLAG_DISABLED in this control. The programm can't change AGC TOP.
> > And write default value to AGC TOP like now.
> > 
> > diff -r 43dbc8ebb5a2 linux/drivers/media/common/tuners/tuner-simple.c
> > --- a/linux/drivers/media/common/tuners/tuner-simple.c	Tue Jan 27 23:47:50 2009 -0200
> > +++ b/linux/drivers/media/common/tuners/tuner-simple.c	Tue Apr 21 09:44:38 2009 +1000
> > @@ -116,6 +116,7 @@
> >  
> >  	u32 frequency;
> >  	u32 bandwidth;
> > +	signed int gain;
> >  };
> >  
> >  /* ---------------------------------------------------------------------- */
> > @@ -495,15 +507,57 @@
> >  				   "(should be 4)\n", rc);
> >  		break;
> >  	}
> > +	case TUNER_PHILIPS_FM1216ME_MK3:
> > +	{
> > +		buffer[2] = 0xDE; /* T2 = 0, T1 = 1 and T0 = 1 */
> > +		switch (priv->gain) {
> > +		case 0:
> > +			/* TOP = External AGC, ATC = OFF */
> > +			buffer[3] = 0x60;
> > +			break;
> > +		case 1:
> > +			/* TOP = 118 dB, ATC = OFF */
> > +			buffer[3] = 0x00;
> > +			break;
> > +		case 2:
> > +			/* TOP = 115 dB, ATC = OFF */
> > +			buffer[3] = 0x10;
> > +			break;
> > +		case 3:
> > +			/* TOP = 112 dB, ATC = OFF */
> > +			buffer[3] = 0x20;
> > +			break;
> > +		case 4:
> > +			/* TOP = 109 dB, ATC = OFF */
> > +			buffer[3] = 0x30;
> > +			break;
> > +		case 5:
> > +			/* TOP = 106 dB, ATC = OFF */
> > +			buffer[3] = 0x40;
> > +			break;
> > +		case 6:
> > +			/* TOP = 103 dB, ATC = OFF */
> > +			buffer[3] = 0x50;
> > +			break;
> > +		default:
> > +			/* TOP = 112 dB, ATC = OFF */
> > +			buffer[3] = 0x20;
> > +			break;
> > +		}
> > +
> > +		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);
> > +
> > +		break;
> >  	}
> > -
> > +	}
> >  	return 0;
> >  }
> >  
> > diff -r 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134-cards.c
> > --- a/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Jan 27 23:47:50 2009 -0200
> > +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Apr 21 09:44:38 2009 +1000
> > @@ -6506,6 +6806,20 @@
> >  		saa_call_all(dev, tuner, s_config, &tea5767_cfg);
> >  		break;
> >  	}
> > +	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
> > +	{
> > +		struct v4l2_queryctrl *ctl;
> > +		struct saa7134_fh *fh;
> > +		struct file *fl;
> > +
> > +		ctl->id = V4L2_CID_GAIN;
> > +		if (saa7134_queryctrl(fl, fh, ctl) == 0) {                /* BUG here */
> > +			/* enable this control */
> > +			ctl->flags &= ~(V4L2_CTRL_FLAG_DISABLED);
> > +		}
> > +	}
> >  	} /* switch() */
> >  
> >  	saa7134_tuner_setup(dev);
> > diff -r 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134-video.c
> > --- a/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Jan 27 23:47:50 2009 -0200
> > +++ b/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Apr 21 09:44:38 2009 +1000
> > @@ -417,6 +417,15 @@
> >  		.step          = 1,
> >  		.default_value = 0,
> >  		.type          = V4L2_CTRL_TYPE_INTEGER,
> > +	}, {
> > +		.id 		= V4L2_CID_GAIN,
> > +		.name 		= "Gain",
> > +		.minimum 	= 0,
> > +		.maximum 	= 6,
> > +		.step 		= 1,
> > +		.default_value 	= 3,
> > +		.type 		= V4L2_CTRL_TYPE_INTEGER,
> > +		.flags 		= V4L2_CTRL_FLAG_DISABLED,
> >  	},{
> >  		.id            = V4L2_CID_HFLIP,
> >  		.name          = "Mirror",
> > @@ -1129,6 +1138,9 @@
> >  	case V4L2_CID_HUE:
> >  		c->value = dev->ctl_hue;
> >  		break;
> > +	case V4L2_CID_GAIN:
> > +		c->value = dev->ctl_gain;
> > +		break;
> >  	case V4L2_CID_CONTRAST:
> >  		c->value = dev->ctl_contrast;
> >  		break;
> > @@ -1214,6 +1226,10 @@
> >  	case V4L2_CID_HUE:
> >  		dev->ctl_hue = c->value;
> >  		saa_writeb(SAA7134_DEC_CHROMA_HUE, dev->ctl_hue);
> > +		break;
> > +	case V4L2_CID_GAIN:
> > +		dev->ctl_gain = c->value;
> > +
> >  		break;
> >  	case V4L2_CID_CONTRAST:
> >  		dev->ctl_contrast = c->value;
> > @@ -2502,6 +2518,7 @@
> >  	dev->ctl_bright     = ctrl_by_id(V4L2_CID_BRIGHTNESS)->default_value;
> >  	dev->ctl_contrast   = ctrl_by_id(V4L2_CID_CONTRAST)->default_value;
> >  	dev->ctl_hue        = ctrl_by_id(V4L2_CID_HUE)->default_value;
> > +	dev->ctl_gain       = ctrl_by_id(V4L2_CID_GAIN)->default_value;
> >  	dev->ctl_saturation = ctrl_by_id(V4L2_CID_SATURATION)->default_value;
> >  	dev->ctl_volume     = ctrl_by_id(V4L2_CID_AUDIO_VOLUME)->default_value;
> >  	dev->ctl_mute       = 1; // ctrl_by_id(V4L2_CID_AUDIO_MUTE)->default_value;
> > diff -r 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134.h
> > --- a/linux/drivers/media/video/saa7134/saa7134.h	Tue Jan 27 23:47:50 2009 -0200
> > +++ b/linux/drivers/media/video/saa7134/saa7134.h	Tue Apr 21 09:44:38 2009 +1000
> > @@ -548,6 +558,7 @@
> >  	int                        ctl_bright;
> >  	int                        ctl_contrast;
> >  	int                        ctl_hue;
> > +	int                        ctl_gain;             /* gain */
> >  	int                        ctl_saturation;
> >  	int                        ctl_freq;
> >  	int                        ctl_mute;             /* audio */
> > 
> > 
> > With my best regards, Dmitry.
> > 
> > > Cheers,
> > > Hermann
> > > 
> > > > With my best regards, Dmitry.
> > > > 
> > > > > 
> > > > > Cheers,
> > > > > Mauro.
> > > > > 
> > > > > > 
> > > > > > diff -r b40d628f830d
> > > > > > linux/drivers/media/common/tuners/tuner-types.c ---
> > > > > > a/linux/drivers/media/common/tuners/tuner-types.c	Fri
> > > > > > Apr 24 01:46:41 2009 -0300 +++
> > > > > > b/linux/drivers/media/common/tuners/tuner-types.c	Tue
> > > > > > Apr 28 03:35:42 2009 +1000 @@ -558,8 +558,8 @@ static struct
> > > > > > tuner_range tuner_fm1216me_mk3_pal_ranges[] = { { 16 *
> > > > > > 158.00 /*MHz*/, 0x8e, 0x01, },
> > > > > > -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> > > > > > -	{ 16 * 999.99        , 0x8e, 0x04, },
> > > > > > +	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
> > > > > > +	{ 16 * 864.00        , 0x8e, 0x04, },
> > > > > >  };
> > > > > >  
> > > > > >  static struct tuner_params tuner_fm1216me_mk3_params[] = {
> > > > > > 
> > > > > > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
> > > > > > <d.belimov@gmail.com>
> > > > > > 
> > > > > > 
> > > > > > With my best regards, Dmitry.
> > > > > > 
> > > > > > > Hi Dmitri,
> > > > > > > 
> > > > > > > Thank you for you responses.
> > > > > > > 
> > > > > > > Just a few more comments...
> > > > > > > 
> > > > > > > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > > > > > > > Hi Andy
> > > > > > > > 
> > > > > > > > > Dmitri,
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov wrote:
> > > > > > > > > > Hi All
> > > > > > > > > > 
> > > > > > > > > > 1. Change middle band. In the end of the middle band the
> > > > > > > > > > sensitivity of receiver not good. If we switch to higher
> > > > > > > > > > band, sensitivity more better. Hardware trick.
> > > > > > > > > 
> > > > > > > 
> > > > > > > > Several years a go your customers write some messages about
> > > > > > > > bad quality of TV if frequency of TV is the end of band. It
> > > > > > > > can be low band or middle. Our hardware engeneer make some
> > > > > > > > tests with hardware TV generator and our TV tuners.
> > > > > > > > 
> > > > > > > > If we set default frequency range for low and middle band,
> > > > > > > > quality of TV signal on 159MHz and 442 MHz is bad. When we
> > > > > > > > make our changes with moving end of bands the quality of TV
> > > > > > > > much better. And our system programmer for OS Windows use
> > > > > > > > changed bands for drivers. Customers be happy.
> > > > > > > 
> > > > > > > OK.  A properly run experiment wins over theory every time. :)
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > > You can test it if in your placement available TV programm
> > > > > > > > on 159MHz or 442MHz. This trick can be usefull for other
> > > > > > > > tuners.
> > > > > > > 
> > > > > > > If you look at tveeprom.c, a number of other tuners are using
> > > > > > > that tuner definition:
> > > > > > > 
> > > > > > > $ grep FM1216ME_MK3 tveeprom.c
> > > > > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips
> > > > > > > FQ1216ME MK3"}, { TUNER_PHILIPS_FM1216ME_MK3,
> > > > > > > 	"Philips FM1216 ME MK3"},
> > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> > > > > > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05 2"},
> > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME MK5"},
> > > > > > > 
> > > > > > > If your change makes things bad for the other tuners, we'll
> > > > > > > probably have to create an alternate entry for the other
> > > > > > > tuners instead of using the FM1216ME_MK3 defintion.  I
> > > > > > > suspect most of them are clones of the FM1216ME MK3 however,
> > > > > > > so it probably won't matter.
> > > > > > > 
> > > > > > > > > > 3. Set charge pump bit
> > > > > > > > > 
> > > > > > > > > This will improve the time to initially tune to a
> > > > > > > > > frequency, but will likely add some noise as the PLL
> > > > > > > > > continues to maintain lock on the signal.  If there is no
> > > > > > > > > way to turn off the CP after the lock bit is set in the
> > > > > > > > > tuner, it's probably better to leave it off for lower
> > > > > > > > > noise and just live with slower tuning.
> > > > > > > > 
> > > > > > > > We discuss with our windows system programmer about it. He
> > > > > > > > sad that in analog TV mode noise from PLL don't give any
> > > > > > > > problem.
> > > > > > > 
> > > > > > > I would be concerned about phase noise affecting the colors or
> > > > > > > any FM sound carriers.  If the noise isn't noticably affecting
> > > > > > > colors to the human eye (do color bars look OK?), or sound to
> > > > > > > the human ear, then OK.
> > > > > > > 
> > > > > > > 
> > > > > > > >  But in digital TV mode
> > > > > > > > noise from PLL decreased BER.
> > > > > > > 
> > > > > > > I thought the FM1216ME MK3 was an analog only tuner.  I guess
> > > > > > > I don't know DVB-T or cable in Europe well enough.
> > > > > > > 
> > > > > > > 
> > > > > > > > > Leaving the CP bit set should be especially noticable ad
> > > > > > > > > FM noise when set to tune to FM radio stations.  From the
> > > > > > > > > FM1236ME_MK3 datasheet: "It is recommended to set CP=0 in
> > > > > > > > > the FM mode at all times." But the VHF low band control
> > > > > > > > > byte is also used when setting FM radio (AFAICT with a
> > > > > > > > > quick look at the code.)
> > > > > > > > 
> > > > > > > > Yes. You are right. We can swith CP off in FM mode.
> > > > > > > 
> > > > > > > OK.  Thank you.
> > > > > > > 
> > > > > > > > With my best regards, Dmitry.
> > > > > > > 
> > > > > > > 
> > > > > > > Regards,
> > > > > > > Andy
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > Cheers,
> > > > > Mauro
> > > 
> > > 
> > 
> 


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-05-01  5:18                   ` hermann pitton
@ 2009-05-01 23:55                     ` hermann pitton
  2009-05-02  0:52                       ` Andy Walls
  0 siblings, 1 reply; 42+ messages in thread
From: hermann pitton @ 2009-05-01 23:55 UTC (permalink / raw)
  To: Andy Walls, Hartmut Hackmann
  Cc: Dmitri Belimov, Mauro Carvalho Chehab, video4linux-list, linux-media

Guys,

[snip]

> > 
> > Do the circuit board traces in the FM1216ME_MK3 support the TDA9887
> > controlling the gain of the first stage?  (I've never opened an
> > equivalent NTSC tuner assembly to take a look.)
> 
> "equivalent" NTSC tuners _do not_ exist at all.
> 
> I don't forget all the time we spend to find out that some of them are
> Intercarrier only!
> 
> Also, the tda988x stuff is underneath the tuner PCB.
> 
> I cut one off for those interested in line tracing ...

still on the to do list ;)

> Without port2=0 you don't get any SECAM-L into the sound trap.
> 
> It needs amplification from minus 40 dB AM for the first sound carrier,
> and then of course you prefer the second with NICAM.
> 
> > If not, then, if I understand things correctly, you need to set the
> > first stage and second stage TOP settings so that they refer to about
> > the same signal level before the IF SAW filter.  
> > 
> > 
> > I would think AGC TOP settings, for both stages of the tuner, are
> > tuner-dependent and relatively constant once you figure out what they
> > should be.
> > 
> > Do you have a different understanding or insight?
> > 
> > Regards,
> > Andy

Hartmut once offered to make contacts with colleagues at Philips Hamburg
for such tuners and related tda9887 stuff.

Unfortunately he is not active on the lists currently.

If I see, how easily someone can get a patch to Andrew and disables all
other SECAM stuff, again from Russia, I'm not convinced on anything from
there.

I seriously doubt that those tuners are meant for fumbling on TOP RF/IF
settings from user space.

Cheers,
Hermann





^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-05-01 23:55                     ` hermann pitton
@ 2009-05-02  0:52                       ` Andy Walls
  2009-05-02  2:05                         ` hermann pitton
  0 siblings, 1 reply; 42+ messages in thread
From: Andy Walls @ 2009-05-02  0:52 UTC (permalink / raw)
  To: hermann pitton
  Cc: Hartmut Hackmann, Dmitri Belimov, Mauro Carvalho Chehab,
	video4linux-list, linux-media

On Sat, 2009-05-02 at 01:55 +0200, hermann pitton wrote:
> Guys,
> 
> [snip]
> 
> > > 
> > > Do the circuit board traces in the FM1216ME_MK3 support the TDA9887
> > > controlling the gain of the first stage?  (I've never opened an
> > > equivalent NTSC tuner assembly to take a look.)
> > 
> > "equivalent" NTSC tuners _do not_ exist at all.
> > 
> > I don't forget all the time we spend to find out that some of them are
> > Intercarrier only!
> > 
> > Also, the tda988x stuff is underneath the tuner PCB.
> > 
> > I cut one off for those interested in line tracing ...
> 
> still on the to do list ;)

Thanks.  I hope it doesn't cost you too many wasted Euros...

> > Without port2=0 you don't get any SECAM-L into the sound trap.
> > 
> > It needs amplification from minus 40 dB AM for the first sound carrier,
> > and then of course you prefer the second with NICAM.
> > 
> > > If not, then, if I understand things correctly, you need to set the
> > > first stage and second stage TOP settings so that they refer to about
> > > the same signal level before the IF SAW filter.  
> > > 
> > > 
> > > I would think AGC TOP settings, for both stages of the tuner, are
> > > tuner-dependent and relatively constant once you figure out what they
> > > should be.
> > > 
> > > Do you have a different understanding or insight?
> > > 
> > > Regards,
> > > Andy
> 
> Hartmut once offered to make contacts with colleagues at Philips Hamburg
> for such tuners and related tda9887 stuff.
> 
> Unfortunately he is not active on the lists currently.
> 
> If I see, how easily someone can get a patch to Andrew and disables all
> other SECAM stuff, again from Russia, I'm not convinced on anything from
> there.
> 
> I seriously doubt that those tuners are meant for fumbling on TOP RF/IF
> settings from user space.

The proper TOP settings should be a function of the input signal TV
standard (positive modulation vs. negative modulation vs. FM radio) and
the components in the tuner assembly (the IF filter for sure).  Setting
TOP settings from user space only makes sense for laboratory
experimentation.


Linux is kind of funny in the way it breaks up the integrated assembly
of an analog tuner to be handled by separate drivers: preselector and
mixer/osc chip by tuner-simple; IF filter and IF demod by another module
like tda9887.  Really the two chips should be set with coordinated
settings, taking into account the TV standard the tuner is being set to
demodulate and the properties of the IF filter and external components
to the IF demodulator.


The linux analog tuner drivers mostly appear to make some safe, default
settings, and don't attempt to get the best performance.  I'm assuming
that is due to lack of data on the tuners and the tuners working well
enough.

I'm glad to see Dmitri working at trying to improve analog performance.

I wish I had the proper equpment to experiment wih NTSC tiners.  If I
had a lab with a decent signal generator, oscilliscope, etc. I'd
probably have lots of fun playing around with these tuners. :)

Regards,
Andy


> Cheers,
> Hermann



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-05-02  0:52                       ` Andy Walls
@ 2009-05-02  2:05                         ` hermann pitton
  2009-05-03  0:29                           ` hermann pitton
  0 siblings, 1 reply; 42+ messages in thread
From: hermann pitton @ 2009-05-02  2:05 UTC (permalink / raw)
  To: Andy Walls
  Cc: Hartmut Hackmann, Dmitri Belimov, Mauro Carvalho Chehab,
	video4linux-list, linux-media


Am Freitag, den 01.05.2009, 20:52 -0400 schrieb Andy Walls:
> On Sat, 2009-05-02 at 01:55 +0200, hermann pitton wrote:
> > Guys,
> > 
> > [snip]
> > 
> > > > 
> > > > Do the circuit board traces in the FM1216ME_MK3 support the TDA9887
> > > > controlling the gain of the first stage?  (I've never opened an
> > > > equivalent NTSC tuner assembly to take a look.)
> > > 
> > > "equivalent" NTSC tuners _do not_ exist at all.
> > > 
> > > I don't forget all the time we spend to find out that some of them are
> > > Intercarrier only!
> > > 
> > > Also, the tda988x stuff is underneath the tuner PCB.
> > > 
> > > I cut one off for those interested in line tracing ...
> > 
> > still on the to do list ;)
> 
> Thanks.  I hope it doesn't cost you too many wasted Euros...

Seven years later it is just trash and i hope to provide enough for
everyone ;)

Cheers,
Hermann


> 
> > > Without port2=0 you don't get any SECAM-L into the sound trap.
> > > 
> > > It needs amplification from minus 40 dB AM for the first sound carrier,
> > > and then of course you prefer the second with NICAM.
> > > 
> > > > If not, then, if I understand things correctly, you need to set the
> > > > first stage and second stage TOP settings so that they refer to about
> > > > the same signal level before the IF SAW filter.  
> > > > 
> > > > 
> > > > I would think AGC TOP settings, for both stages of the tuner, are
> > > > tuner-dependent and relatively constant once you figure out what they
> > > > should be.
> > > > 
> > > > Do you have a different understanding or insight?
> > > > 
> > > > Regards,
> > > > Andy
> > 
> > Hartmut once offered to make contacts with colleagues at Philips Hamburg
> > for such tuners and related tda9887 stuff.
> > 
> > Unfortunately he is not active on the lists currently.
> > 
> > If I see, how easily someone can get a patch to Andrew and disables all
> > other SECAM stuff, again from Russia, I'm not convinced on anything from
> > there.
> > 
> > I seriously doubt that those tuners are meant for fumbling on TOP RF/IF
> > settings from user space.
> 
> The proper TOP settings should be a function of the input signal TV
> standard (positive modulation vs. negative modulation vs. FM radio) and
> the components in the tuner assembly (the IF filter for sure).  Setting
> TOP settings from user space only makes sense for laboratory
> experimentation.
> 
> 
> Linux is kind of funny in the way it breaks up the integrated assembly
> of an analog tuner to be handled by separate drivers: preselector and
> mixer/osc chip by tuner-simple; IF filter and IF demod by another module
> like tda9887.  Really the two chips should be set with coordinated
> settings, taking into account the TV standard the tuner is being set to
> demodulate and the properties of the IF filter and external components
> to the IF demodulator.
> 
> 
> The linux analog tuner drivers mostly appear to make some safe, default
> settings, and don't attempt to get the best performance.  I'm assuming
> that is due to lack of data on the tuners and the tuners working well
> enough.
> 
> I'm glad to see Dmitri working at trying to improve analog performance.
> 
> I wish I had the proper equpment to experiment wih NTSC tiners.  If I
> had a lab with a decent signal generator, oscilliscope, etc. I'd
> probably have lots of fun playing around with these tuners. :)
> 
> Regards,
> Andy
> 
> 
> > Cheers,
> > Hermann
> 
> 


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-05-02  2:05                         ` hermann pitton
@ 2009-05-03  0:29                           ` hermann pitton
  0 siblings, 0 replies; 42+ messages in thread
From: hermann pitton @ 2009-05-03  0:29 UTC (permalink / raw)
  To: Andy Walls
  Cc: Hartmut Hackmann, Dmitri Belimov, Mauro Carvalho Chehab,
	video4linux-list, linux-media


Am Samstag, den 02.05.2009, 04:05 +0200 schrieb hermann pitton:
> Am Freitag, den 01.05.2009, 20:52 -0400 schrieb Andy Walls:
> > On Sat, 2009-05-02 at 01:55 +0200, hermann pitton wrote:
> > > Guys,
> > > 
> > > [snip]
> > > 
> > > > > 
> > > > > Do the circuit board traces in the FM1216ME_MK3 support the TDA9887
> > > > > controlling the gain of the first stage?  (I've never opened an
> > > > > equivalent NTSC tuner assembly to take a look.)
> > > > 
> > > > "equivalent" NTSC tuners _do not_ exist at all.
> > > > 
> > > > I don't forget all the time we spend to find out that some of them are
> > > > Intercarrier only!
> > > > 
> > > > Also, the tda988x stuff is underneath the tuner PCB.
> > > > 
> > > > I cut one off for those interested in line tracing ...
> > > 
> > > still on the to do list ;)
> > 
> > Thanks.  I hope it doesn't cost you too many wasted Euros...
> 
> Seven years later it is just trash and i hope to provide enough for
> everyone ;)

Andy,

did cut out my old one after lunch and have already acceptable picture
quality under daylight conditions for the not yet seen backside.

For the surface with the tin compartments I must either find my old
pictures sent to Gunther again or make some new with setting some lights
to avoid harsh shadows.

If I'm done, and nobody has objections, I plan to send to you, Mauro,
Hans and Hartmut off list.
Also to Dmitri, maybe he has a newer revision, and to CityK and Gunther
for documentation.

Cheers,
Hermann


> > 
> > > > Without port2=0 you don't get any SECAM-L into the sound trap.
> > > > 
> > > > It needs amplification from minus 40 dB AM for the first sound carrier,
> > > > and then of course you prefer the second with NICAM.
> > > > 
> > > > > If not, then, if I understand things correctly, you need to set the
> > > > > first stage and second stage TOP settings so that they refer to about
> > > > > the same signal level before the IF SAW filter.  
> > > > > 
> > > > > 
> > > > > I would think AGC TOP settings, for both stages of the tuner, are
> > > > > tuner-dependent and relatively constant once you figure out what they
> > > > > should be.
> > > > > 
> > > > > Do you have a different understanding or insight?
> > > > > 
> > > > > Regards,
> > > > > Andy
> > > 
> > > Hartmut once offered to make contacts with colleagues at Philips Hamburg
> > > for such tuners and related tda9887 stuff.
> > > 
> > > Unfortunately he is not active on the lists currently.
> > > 
> > > If I see, how easily someone can get a patch to Andrew and disables all
> > > other SECAM stuff, again from Russia, I'm not convinced on anything from
> > > there.
> > > 
> > > I seriously doubt that those tuners are meant for fumbling on TOP RF/IF
> > > settings from user space.
> > 
> > The proper TOP settings should be a function of the input signal TV
> > standard (positive modulation vs. negative modulation vs. FM radio) and
> > the components in the tuner assembly (the IF filter for sure).  Setting
> > TOP settings from user space only makes sense for laboratory
> > experimentation.
> > 
> > 
> > Linux is kind of funny in the way it breaks up the integrated assembly
> > of an analog tuner to be handled by separate drivers: preselector and
> > mixer/osc chip by tuner-simple; IF filter and IF demod by another module
> > like tda9887.  Really the two chips should be set with coordinated
> > settings, taking into account the TV standard the tuner is being set to
> > demodulate and the properties of the IF filter and external components
> > to the IF demodulator.
> > 
> > 
> > The linux analog tuner drivers mostly appear to make some safe, default
> > settings, and don't attempt to get the best performance.  I'm assuming
> > that is due to lack of data on the tuners and the tuners working well
> > enough.
> > 
> > I'm glad to see Dmitri working at trying to improve analog performance.
> > 
> > I wish I had the proper equpment to experiment wih NTSC tiners.  If I
> > had a lab with a decent signal generator, oscilliscope, etc. I'd
> > probably have lots of fun playing around with these tuners. :)
> > 
> > Regards,
> > Andy
> > 



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-30  0:15                 ` hermann pitton
@ 2009-05-05 18:42                   ` Dmitri Belimov
  2009-05-07  0:01                     ` hermann pitton
  0 siblings, 1 reply; 42+ messages in thread
From: Dmitri Belimov @ 2009-05-05 18:42 UTC (permalink / raw)
  To: hermann pitton
  Cc: Mauro Carvalho Chehab, Andy Walls, video4linux-list, linux-media

Hi Hermann

> Hi Dmitry,
> 
> Am Mittwoch, den 29.04.2009, 20:12 +1000 schrieb Dmitri Belimov:
> > Hi,
> >  
> > > Am Dienstag, den 28.04.2009, 19:59 +1000 schrieb Dmitri Belimov:
> > > > On Tue, 28 Apr 2009 15:18:32 -0300
> > > > Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
> > > > 
> > > > > On Mon, 27 Apr 2009 19:29:05 +1000
> > > > > Dmitri Belimov <d.belimov@gmail.com> wrote:
> > > > > 
> > > > > > Hi All
> > > > > > 
> > > > > > Step by step.
> > > > > > 
> > > > > > This is patch for change only range of FM1216ME_MK3. Slow
> > > > > > tunning is not a big problem.
> > > > > 
> > > > > Dmitri,
> > > > > 
> > > > > I'll mark those patches as RFC at patchwork until the end of
> > > > > those discussions. After that, please send it again into a
> > > > > new thread.
> > > > 
> > > > You mark patch with TOP AGC not this.
> > > > 
> > > > I think need discuss about FM1216ME_MK3 because I'll have a big
> > > > patch for support control TOP AGC (sensitivity) of this tuner.
> > > > It can be bad for compatible tuners.
> > > 
> > > hmm, in Europe, that TOP AGC did not ever made much difference
> > > and it is an insmod option since ever.
> > > 
> > > I can't tell for Sibiria and initially that tuner had no SECAM-DK
> > > support officially at all. There are no good/much_better tuners
> > > for FTA at all and never have been ;)
> > > 
> > > Some examples, user success reports, to make it more easily to
> > > understand? I think it can only change some _very little_ under
> > > already worst conditions.
> > 
> > This is my idea for RFC about TOP AGC:
> 
> what about to create a new FM1216ME MK3 tuner type for testing?

Yes. Can you do it?

I start add MK5 tuner.

> It is for sure maybe the best tuner around and likely is also the best
> for tweaks in countries with huge lands to cover, not restricted to
> Russia, Australia or Canada.

All our tuners tested with all standarts SECAM, PAL, NTSC because
big country, some people want receive TV from Korea and Japan.
For tests, our hardware engineer has hardware TV generator.

With my best regards, Dmitry.

> I would like to have also Hans' opinion on it, since he did some final
> steps to get them right.
> 
> Cheers,
> Hermann
> 
> > 1. Add gain variable to tuner structure.
> > 2. Add V4L2_CID_GAIN control to saa7134 and disable this control.
> > 3. Add workaround to simple_post_tune function for write
> > sensitivity level to the tuner. 4. Enable V4L2_CID_GAIN control
> > when module load if card is right.
> > 
> > My expirience not so good, step 4 segfault the kernel. How to we
> > can make it?
> > 
> > Our windows end-user programm control the sensitivity of each TV
> > channel and change when channel changed.
> > 
> > What you think about it??
> > 
> > If TV card is not touch V4L2_CTRL_FLAG_DISABLED in this control.
> > The programm can't change AGC TOP. And write default value to AGC
> > TOP like now.
> > 
> > diff -r 43dbc8ebb5a2
> > linux/drivers/media/common/tuners/tuner-simple.c ---
> > a/linux/drivers/media/common/tuners/tuner-simple.c	Tue Jan
> > 27 23:47:50 2009 -0200 +++
> > b/linux/drivers/media/common/tuners/tuner-simple.c	Tue Apr
> > 21 09:44:38 2009 +1000 @@ -116,6 +116,7 @@ u32 frequency;
> >  	u32 bandwidth;
> > +	signed int gain;
> >  };
> >  
> >  /*
> > ----------------------------------------------------------------------
> > */ @@ -495,15 +507,57 @@ "(should be 4)\n", rc);
> >  		break;
> >  	}
> > +	case TUNER_PHILIPS_FM1216ME_MK3:
> > +	{
> > +		buffer[2] = 0xDE; /* T2 = 0, T1 = 1 and T0 = 1 */
> > +		switch (priv->gain) {
> > +		case 0:
> > +			/* TOP = External AGC, ATC = OFF */
> > +			buffer[3] = 0x60;
> > +			break;
> > +		case 1:
> > +			/* TOP = 118 dB, ATC = OFF */
> > +			buffer[3] = 0x00;
> > +			break;
> > +		case 2:
> > +			/* TOP = 115 dB, ATC = OFF */
> > +			buffer[3] = 0x10;
> > +			break;
> > +		case 3:
> > +			/* TOP = 112 dB, ATC = OFF */
> > +			buffer[3] = 0x20;
> > +			break;
> > +		case 4:
> > +			/* TOP = 109 dB, ATC = OFF */
> > +			buffer[3] = 0x30;
> > +			break;
> > +		case 5:
> > +			/* TOP = 106 dB, ATC = OFF */
> > +			buffer[3] = 0x40;
> > +			break;
> > +		case 6:
> > +			/* TOP = 103 dB, ATC = OFF */
> > +			buffer[3] = 0x50;
> > +			break;
> > +		default:
> > +			/* TOP = 112 dB, ATC = OFF */
> > +			buffer[3] = 0x20;
> > +			break;
> > +		}
> > +
> > +		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);
> > +
> > +		break;
> >  	}
> > -
> > +	}
> >  	return 0;
> >  }
> >  
> > diff -r 43dbc8ebb5a2
> > linux/drivers/media/video/saa7134/saa7134-cards.c ---
> > a/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Jan
> > 27 23:47:50 2009 -0200 +++
> > b/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Apr
> > 21 09:44:38 2009 +1000 @@ -6506,6 +6806,20 @@ saa_call_all(dev,
> > tuner, s_config, &tea5767_cfg); break; }
> > +	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
> > +	{
> > +		struct v4l2_queryctrl *ctl;
> > +		struct saa7134_fh *fh;
> > +		struct file *fl;
> > +
> > +		ctl->id = V4L2_CID_GAIN;
> > +		if (saa7134_queryctrl(fl, fh, ctl) == 0)
> > {                /* BUG here */
> > +			/* enable this control */
> > +			ctl->flags &= ~(V4L2_CTRL_FLAG_DISABLED);
> > +		}
> > +	}
> >  	} /* switch() */
> >  
> >  	saa7134_tuner_setup(dev);
> > diff -r 43dbc8ebb5a2
> > linux/drivers/media/video/saa7134/saa7134-video.c ---
> > a/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Jan
> > 27 23:47:50 2009 -0200 +++
> > b/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Apr
> > 21 09:44:38 2009 +1000 @@ -417,6 +417,15 @@ .step          =
> > 1, .default_value = 0, .type          = V4L2_CTRL_TYPE_INTEGER,
> > +	}, {
> > +		.id 		= V4L2_CID_GAIN,
> > +		.name 		= "Gain",
> > +		.minimum 	= 0,
> > +		.maximum 	= 6,
> > +		.step 		= 1,
> > +		.default_value 	= 3,
> > +		.type 		= V4L2_CTRL_TYPE_INTEGER,
> > +		.flags 		= V4L2_CTRL_FLAG_DISABLED,
> >  	},{
> >  		.id            = V4L2_CID_HFLIP,
> >  		.name          = "Mirror",
> > @@ -1129,6 +1138,9 @@
> >  	case V4L2_CID_HUE:
> >  		c->value = dev->ctl_hue;
> >  		break;
> > +	case V4L2_CID_GAIN:
> > +		c->value = dev->ctl_gain;
> > +		break;
> >  	case V4L2_CID_CONTRAST:
> >  		c->value = dev->ctl_contrast;
> >  		break;
> > @@ -1214,6 +1226,10 @@
> >  	case V4L2_CID_HUE:
> >  		dev->ctl_hue = c->value;
> >  		saa_writeb(SAA7134_DEC_CHROMA_HUE, dev->ctl_hue);
> > +		break;
> > +	case V4L2_CID_GAIN:
> > +		dev->ctl_gain = c->value;
> > +
> >  		break;
> >  	case V4L2_CID_CONTRAST:
> >  		dev->ctl_contrast = c->value;
> > @@ -2502,6 +2518,7 @@
> >  	dev->ctl_bright     =
> > ctrl_by_id(V4L2_CID_BRIGHTNESS)->default_value; dev->ctl_contrast
> > = ctrl_by_id(V4L2_CID_CONTRAST)->default_value; dev->ctl_hue
> > = ctrl_by_id(V4L2_CID_HUE)->default_value;
> > +	dev->ctl_gain       =
> > ctrl_by_id(V4L2_CID_GAIN)->default_value; dev->ctl_saturation =
> > ctrl_by_id(V4L2_CID_SATURATION)->default_value; dev->ctl_volume
> > = ctrl_by_id(V4L2_CID_AUDIO_VOLUME)->default_value;
> > dev->ctl_mute       = 1; //
> > ctrl_by_id(V4L2_CID_AUDIO_MUTE)->default_value; diff -r
> > 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134.h ---
> > a/linux/drivers/media/video/saa7134/saa7134.h	Tue Jan 27
> > 23:47:50 2009 -0200 +++
> > b/linux/drivers/media/video/saa7134/saa7134.h	Tue Apr 21
> > 09:44:38 2009 +1000 @@ -548,6 +558,7 @@ int
> > ctl_bright; int                        ctl_contrast;
> > int                        ctl_hue;
> > +	int                        ctl_gain;             /* gain */
> >  	int                        ctl_saturation;
> >  	int                        ctl_freq;
> >  	int                        ctl_mute;             /* audio
> > */
> > 
> > 
> > With my best regards, Dmitry.
> > 
> > > Cheers,
> > > Hermann
> > > 
> > > > With my best regards, Dmitry.
> > > > 
> > > > > 
> > > > > Cheers,
> > > > > Mauro.
> > > > > 
> > > > > > 
> > > > > > diff -r b40d628f830d
> > > > > > linux/drivers/media/common/tuners/tuner-types.c ---
> > > > > > a/linux/drivers/media/common/tuners/tuner-types.c	Fri
> > > > > > Apr 24 01:46:41 2009 -0300 +++
> > > > > > b/linux/drivers/media/common/tuners/tuner-types.c	Tue
> > > > > > Apr 28 03:35:42 2009 +1000 @@ -558,8 +558,8 @@ static struct
> > > > > > tuner_range tuner_fm1216me_mk3_pal_ranges[] = { { 16 *
> > > > > > 158.00 /*MHz*/, 0x8e, 0x01, },
> > > > > > -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> > > > > > -	{ 16 * 999.99        , 0x8e, 0x04, },
> > > > > > +	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
> > > > > > +	{ 16 * 864.00        , 0x8e, 0x04, },
> > > > > >  };
> > > > > >  
> > > > > >  static struct tuner_params tuner_fm1216me_mk3_params[] = {
> > > > > > 
> > > > > > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
> > > > > > <d.belimov@gmail.com>
> > > > > > 
> > > > > > 
> > > > > > With my best regards, Dmitry.
> > > > > > 
> > > > > > > Hi Dmitri,
> > > > > > > 
> > > > > > > Thank you for you responses.
> > > > > > > 
> > > > > > > Just a few more comments...
> > > > > > > 
> > > > > > > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > > > > > > > Hi Andy
> > > > > > > > 
> > > > > > > > > Dmitri,
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov
> > > > > > > > > wrote:
> > > > > > > > > > Hi All
> > > > > > > > > > 
> > > > > > > > > > 1. Change middle band. In the end of the middle
> > > > > > > > > > band the sensitivity of receiver not good. If we
> > > > > > > > > > switch to higher band, sensitivity more better.
> > > > > > > > > > Hardware trick.
> > > > > > > > > 
> > > > > > > 
> > > > > > > > Several years a go your customers write some messages
> > > > > > > > about bad quality of TV if frequency of TV is the end
> > > > > > > > of band. It can be low band or middle. Our hardware
> > > > > > > > engeneer make some tests with hardware TV generator and
> > > > > > > > our TV tuners.
> > > > > > > > 
> > > > > > > > If we set default frequency range for low and middle
> > > > > > > > band, quality of TV signal on 159MHz and 442 MHz is
> > > > > > > > bad. When we make our changes with moving end of bands
> > > > > > > > the quality of TV much better. And our system
> > > > > > > > programmer for OS Windows use changed bands for
> > > > > > > > drivers. Customers be happy.
> > > > > > > 
> > > > > > > OK.  A properly run experiment wins over theory every
> > > > > > > time. :)
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > > You can test it if in your placement available TV
> > > > > > > > programm on 159MHz or 442MHz. This trick can be usefull
> > > > > > > > for other tuners.
> > > > > > > 
> > > > > > > If you look at tveeprom.c, a number of other tuners are
> > > > > > > using that tuner definition:
> > > > > > > 
> > > > > > > $ grep FM1216ME_MK3 tveeprom.c
> > > > > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips
> > > > > > > FQ1216ME MK3"}, { TUNER_PHILIPS_FM1216ME_MK3,
> > > > > > > 	"Philips FM1216 ME MK3"},
> > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> > > > > > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05
> > > > > > > 2"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME
> > > > > > > MK5"},
> > > > > > > 
> > > > > > > If your change makes things bad for the other tuners,
> > > > > > > we'll probably have to create an alternate entry for the
> > > > > > > other tuners instead of using the FM1216ME_MK3
> > > > > > > defintion.  I suspect most of them are clones of the
> > > > > > > FM1216ME MK3 however, so it probably won't matter.
> > > > > > > 
> > > > > > > > > > 3. Set charge pump bit
> > > > > > > > > 
> > > > > > > > > This will improve the time to initially tune to a
> > > > > > > > > frequency, but will likely add some noise as the PLL
> > > > > > > > > continues to maintain lock on the signal.  If there
> > > > > > > > > is no way to turn off the CP after the lock bit is
> > > > > > > > > set in the tuner, it's probably better to leave it
> > > > > > > > > off for lower noise and just live with slower tuning.
> > > > > > > > 
> > > > > > > > We discuss with our windows system programmer about it.
> > > > > > > > He sad that in analog TV mode noise from PLL don't give
> > > > > > > > any problem.
> > > > > > > 
> > > > > > > I would be concerned about phase noise affecting the
> > > > > > > colors or any FM sound carriers.  If the noise isn't
> > > > > > > noticably affecting colors to the human eye (do color
> > > > > > > bars look OK?), or sound to the human ear, then OK.
> > > > > > > 
> > > > > > > 
> > > > > > > >  But in digital TV mode
> > > > > > > > noise from PLL decreased BER.
> > > > > > > 
> > > > > > > I thought the FM1216ME MK3 was an analog only tuner.  I
> > > > > > > guess I don't know DVB-T or cable in Europe well enough.
> > > > > > > 
> > > > > > > 
> > > > > > > > > Leaving the CP bit set should be especially noticable
> > > > > > > > > ad FM noise when set to tune to FM radio stations.
> > > > > > > > > From the FM1236ME_MK3 datasheet: "It is recommended
> > > > > > > > > to set CP=0 in the FM mode at all times." But the VHF
> > > > > > > > > low band control byte is also used when setting FM
> > > > > > > > > radio (AFAICT with a quick look at the code.)
> > > > > > > > 
> > > > > > > > Yes. You are right. We can swith CP off in FM mode.
> > > > > > > 
> > > > > > > OK.  Thank you.
> > > > > > > 
> > > > > > > > With my best regards, Dmitry.
> > > > > > > 
> > > > > > > 
> > > > > > > Regards,
> > > > > > > Andy
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > Cheers,
> > > > > Mauro
> > > 
> > > 
> 

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-04-30  1:14                 ` Andy Walls
  2009-05-01  5:18                   ` hermann pitton
@ 2009-05-06 22:58                   ` Dmitri Belimov
  1 sibling, 0 replies; 42+ messages in thread
From: Dmitri Belimov @ 2009-05-06 22:58 UTC (permalink / raw)
  To: Andy Walls
  Cc: hermann pitton, Mauro Carvalho Chehab, video4linux-list, linux-media

Hi Andy

Sorry me delay. I discuss about it with our programmer.

> On Wed, 2009-04-29 at 20:12 +1000, Dmitri Belimov wrote:
> > Hi,
> >  
> > > Am Dienstag, den 28.04.2009, 19:59 +1000 schrieb Dmitri Belimov:
> > > > On Tue, 28 Apr 2009 15:18:32 -0300
> > > > Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
> > > > 
> > > > > On Mon, 27 Apr 2009 19:29:05 +1000
> > > > > Dmitri Belimov <d.belimov@gmail.com> wrote:
> > > > > 
> > > > > > Hi All
> > > > > > 
> > > > > > Step by step.
> > > > > > 
> > > > > > This is patch for change only range of FM1216ME_MK3. Slow
> > > > > > tunning is not a big problem.
> > > > > 
> > > > > Dmitri,
> > > > > 
> > > > > I'll mark those patches as RFC at patchwork until the end of
> > > > > those discussions. After that, please send it again into a
> > > > > new thread.
> > > > 
> > > > You mark patch with TOP AGC not this.
> > > > 
> > > > I think need discuss about FM1216ME_MK3 because I'll have a big
> > > > patch for support control TOP AGC (sensitivity) of this tuner.
> > > > It can be bad for compatible tuners.
> > > 
> > > hmm, in Europe, that TOP AGC did not ever made much difference
> > > and it is an insmod option since ever.
> > > 
> > > I can't tell for Sibiria and initially that tuner had no SECAM-DK
> > > support officially at all. There are no good/much_better tuners
> > > for FTA at all and never have been ;)
> > > 
> > > Some examples, user success reports, to make it more easily to
> > > understand? I think it can only change some _very little_ under
> > > already worst conditions.
> > 
> > This is my idea for RFC about TOP AGC:
> > 
> > 1. Add gain variable to tuner structure.
> > 2. Add V4L2_CID_GAIN control to saa7134 and disable this control.
> > 3. Add workaround to simple_post_tune function for write
> > sensitivity level to the tuner. 4. Enable V4L2_CID_GAIN control
> > when module load if card is right.
> > 
> > My expirience not so good, step 4 segfault the kernel. How to we
> > can make it?
> > 
> > Our windows end-user programm control the sensitivity of each TV
> > channel and change when channel changed.
> > 
> > What you think about it??
> 
> Dmitri,
> 
> >From my understanding the take over point is the signal strength
> >level
> that you want the second stage (an IF demod chip like the TDA9887) to
> take over automatic gain control from the first stage (a tuner chip
> like the TUA6030).  The objective is to set the TOP to achieve
> maximum gain in the first stage while avoiding clipping in the first
> stage.  When the input signal level is smaller than the TOP, the
> first stage gain is at a maximum, and the second stage is performing
> automatic gain control internally.  When the input signal level
> becomes greater than the TOP, the first stage gain needs to be
> reduced by an AGC, and the second stage gain remains constant.
> 
> 
> As I understand it, it would be best to set the first stage (TUA6030
> or similar) to "External AGC" and set the take over point in the
> second stage (the TDA9887), if the pins between the chips are wired
> up properly inside the tuner.  This should coordinate the AGC in both
> the first stage and second stage of the tuner, as the second stage
> will be providing the gain control to the first stage as needed when
> the signal reaches the TOP.
> 
> http://www.comsec.com/usrp/microtune/NF_tutorial.pdf
> 
> It allows you to achieve maximum gain in the first stage to minimize
> overall receiver noise figure, and avoid clipping the input signal in
> the first stage (TUA6030) with a proper TOP setting in the second
> stage (TDA9887).  The TOP setting in the second stage needs to take
> into account IF SAW filter attenuation of course.
> 
> Do the circuit board traces in the FM1216ME_MK3 support the TDA9887
> controlling the gain of the first stage?  (I've never opened an
> equivalent NTSC tuner assembly to take a look.)
> 
> If not, then, if I understand things correctly, you need to set the
> first stage and second stage TOP settings so that they refer to about
> the same signal level before the IF SAW filter.  

You are right. My patch set AGC TOP level for RF signal in TUA6030. 
The TOP of TDA9887 control only IF signal.
If set high level of AGC TOP for RF and RF signal is strengh, we can see white horizontal junk on TV image.
For removing this junk need reduce AGC TOP RF for this channel. It can be only with Secam channels.

With my best regards, Dmitry.

> 
> I would think AGC TOP settings, for both stages of the tuner, are
> tuner-dependent and relatively constant once you figure out what they
> should be.
> 
> Do you have a different understanding or insight?
> 
> Regards,
> Andy
> 
> 
> 
> 
> > If TV card is not touch V4L2_CTRL_FLAG_DISABLED in this control.
> > The programm can't change AGC TOP. And write default value to AGC
> > TOP like now.
> > 
> > diff -r 43dbc8ebb5a2
> > linux/drivers/media/common/tuners/tuner-simple.c ---
> > a/linux/drivers/media/common/tuners/tuner-simple.c	Tue Jan
> > 27 23:47:50 2009 -0200 +++
> > b/linux/drivers/media/common/tuners/tuner-simple.c	Tue Apr
> > 21 09:44:38 2009 +1000 @@ -116,6 +116,7 @@ u32 frequency;
> >  	u32 bandwidth;
> > +	signed int gain;
> >  };
> >  
> >  /*
> > ----------------------------------------------------------------------
> > */ @@ -495,15 +507,57 @@ "(should be 4)\n", rc);
> >  		break;
> >  	}
> > +	case TUNER_PHILIPS_FM1216ME_MK3:
> > +	{
> > +		buffer[2] = 0xDE; /* T2 = 0, T1 = 1 and T0 = 1 */
> > +		switch (priv->gain) {
> > +		case 0:
> > +			/* TOP = External AGC, ATC = OFF */
> > +			buffer[3] = 0x60;
> > +			break;
> > +		case 1:
> > +			/* TOP = 118 dB, ATC = OFF */
> > +			buffer[3] = 0x00;
> > +			break;
> > +		case 2:
> > +			/* TOP = 115 dB, ATC = OFF */
> > +			buffer[3] = 0x10;
> > +			break;
> > +		case 3:
> > +			/* TOP = 112 dB, ATC = OFF */
> > +			buffer[3] = 0x20;
> > +			break;
> > +		case 4:
> > +			/* TOP = 109 dB, ATC = OFF */
> > +			buffer[3] = 0x30;
> > +			break;
> > +		case 5:
> > +			/* TOP = 106 dB, ATC = OFF */
> > +			buffer[3] = 0x40;
> > +			break;
> > +		case 6:
> > +			/* TOP = 103 dB, ATC = OFF */
> > +			buffer[3] = 0x50;
> > +			break;
> > +		default:
> > +			/* TOP = 112 dB, ATC = OFF */
> > +			buffer[3] = 0x20;
> > +			break;
> > +		}
> > +
> > +		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);
> > +
> > +		break;
> >  	}
> > -
> > +	}
> >  	return 0;
> >  }
> >  
> > diff -r 43dbc8ebb5a2
> > linux/drivers/media/video/saa7134/saa7134-cards.c ---
> > a/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Jan
> > 27 23:47:50 2009 -0200 +++
> > b/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Apr
> > 21 09:44:38 2009 +1000 @@ -6506,6 +6806,20 @@ saa_call_all(dev,
> > tuner, s_config, &tea5767_cfg); break; }
> > +	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
> > +	{
> > +		struct v4l2_queryctrl *ctl;
> > +		struct saa7134_fh *fh;
> > +		struct file *fl;
> > +
> > +		ctl->id = V4L2_CID_GAIN;
> > +		if (saa7134_queryctrl(fl, fh, ctl) == 0)
> > {                /* BUG here */
> > +			/* enable this control */
> > +			ctl->flags &= ~(V4L2_CTRL_FLAG_DISABLED);
> > +		}
> > +	}
> >  	} /* switch() */
> >  
> >  	saa7134_tuner_setup(dev);
> > diff -r 43dbc8ebb5a2
> > linux/drivers/media/video/saa7134/saa7134-video.c ---
> > a/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Jan
> > 27 23:47:50 2009 -0200 +++
> > b/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Apr
> > 21 09:44:38 2009 +1000 @@ -417,6 +417,15 @@ .step          =
> > 1, .default_value = 0, .type          = V4L2_CTRL_TYPE_INTEGER,
> > +	}, {
> > +		.id 		= V4L2_CID_GAIN,
> > +		.name 		= "Gain",
> > +		.minimum 	= 0,
> > +		.maximum 	= 6,
> > +		.step 		= 1,
> > +		.default_value 	= 3,
> > +		.type 		= V4L2_CTRL_TYPE_INTEGER,
> > +		.flags 		= V4L2_CTRL_FLAG_DISABLED,
> >  	},{
> >  		.id            = V4L2_CID_HFLIP,
> >  		.name          = "Mirror",
> > @@ -1129,6 +1138,9 @@
> >  	case V4L2_CID_HUE:
> >  		c->value = dev->ctl_hue;
> >  		break;
> > +	case V4L2_CID_GAIN:
> > +		c->value = dev->ctl_gain;
> > +		break;
> >  	case V4L2_CID_CONTRAST:
> >  		c->value = dev->ctl_contrast;
> >  		break;
> > @@ -1214,6 +1226,10 @@
> >  	case V4L2_CID_HUE:
> >  		dev->ctl_hue = c->value;
> >  		saa_writeb(SAA7134_DEC_CHROMA_HUE, dev->ctl_hue);
> > +		break;
> > +	case V4L2_CID_GAIN:
> > +		dev->ctl_gain = c->value;
> > +
> >  		break;
> >  	case V4L2_CID_CONTRAST:
> >  		dev->ctl_contrast = c->value;
> > @@ -2502,6 +2518,7 @@
> >  	dev->ctl_bright     =
> > ctrl_by_id(V4L2_CID_BRIGHTNESS)->default_value; dev->ctl_contrast
> > = ctrl_by_id(V4L2_CID_CONTRAST)->default_value; dev->ctl_hue
> > = ctrl_by_id(V4L2_CID_HUE)->default_value;
> > +	dev->ctl_gain       =
> > ctrl_by_id(V4L2_CID_GAIN)->default_value; dev->ctl_saturation =
> > ctrl_by_id(V4L2_CID_SATURATION)->default_value; dev->ctl_volume
> > = ctrl_by_id(V4L2_CID_AUDIO_VOLUME)->default_value;
> > dev->ctl_mute       = 1; //
> > ctrl_by_id(V4L2_CID_AUDIO_MUTE)->default_value; diff -r
> > 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134.h ---
> > a/linux/drivers/media/video/saa7134/saa7134.h	Tue Jan 27
> > 23:47:50 2009 -0200 +++
> > b/linux/drivers/media/video/saa7134/saa7134.h	Tue Apr 21
> > 09:44:38 2009 +1000 @@ -548,6 +558,7 @@ int
> > ctl_bright; int                        ctl_contrast;
> > int                        ctl_hue;
> > +	int                        ctl_gain;             /* gain */
> >  	int                        ctl_saturation;
> >  	int                        ctl_freq;
> >  	int                        ctl_mute;             /* audio
> > */
> > 
> > 
> > With my best regards, Dmitry.
> > 
> > > Cheers,
> > > Hermann
> > > 
> > > > With my best regards, Dmitry.
> > > > 
> > > > > 
> > > > > Cheers,
> > > > > Mauro.
> > > > > 
> > > > > > 
> > > > > > diff -r b40d628f830d
> > > > > > linux/drivers/media/common/tuners/tuner-types.c ---
> > > > > > a/linux/drivers/media/common/tuners/tuner-types.c	Fri
> > > > > > Apr 24 01:46:41 2009 -0300 +++
> > > > > > b/linux/drivers/media/common/tuners/tuner-types.c	Tue
> > > > > > Apr 28 03:35:42 2009 +1000 @@ -558,8 +558,8 @@ static struct
> > > > > > tuner_range tuner_fm1216me_mk3_pal_ranges[] = { { 16 *
> > > > > > 158.00 /*MHz*/, 0x8e, 0x01, },
> > > > > > -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> > > > > > -	{ 16 * 999.99        , 0x8e, 0x04, },
> > > > > > +	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
> > > > > > +	{ 16 * 864.00        , 0x8e, 0x04, },
> > > > > >  };
> > > > > >  
> > > > > >  static struct tuner_params tuner_fm1216me_mk3_params[] = {
> > > > > > 
> > > > > > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
> > > > > > <d.belimov@gmail.com>
> > > > > > 
> > > > > > 
> > > > > > With my best regards, Dmitry.
> > > > > > 
> > > > > > > Hi Dmitri,
> > > > > > > 
> > > > > > > Thank you for you responses.
> > > > > > > 
> > > > > > > Just a few more comments...
> > > > > > > 
> > > > > > > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > > > > > > > Hi Andy
> > > > > > > > 
> > > > > > > > > Dmitri,
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov
> > > > > > > > > wrote:
> > > > > > > > > > Hi All
> > > > > > > > > > 
> > > > > > > > > > 1. Change middle band. In the end of the middle
> > > > > > > > > > band the sensitivity of receiver not good. If we
> > > > > > > > > > switch to higher band, sensitivity more better.
> > > > > > > > > > Hardware trick.
> > > > > > > > > 
> > > > > > > 
> > > > > > > > Several years a go your customers write some messages
> > > > > > > > about bad quality of TV if frequency of TV is the end
> > > > > > > > of band. It can be low band or middle. Our hardware
> > > > > > > > engeneer make some tests with hardware TV generator and
> > > > > > > > our TV tuners.
> > > > > > > > 
> > > > > > > > If we set default frequency range for low and middle
> > > > > > > > band, quality of TV signal on 159MHz and 442 MHz is
> > > > > > > > bad. When we make our changes with moving end of bands
> > > > > > > > the quality of TV much better. And our system
> > > > > > > > programmer for OS Windows use changed bands for
> > > > > > > > drivers. Customers be happy.
> > > > > > > 
> > > > > > > OK.  A properly run experiment wins over theory every
> > > > > > > time. :)
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > > You can test it if in your placement available TV
> > > > > > > > programm on 159MHz or 442MHz. This trick can be usefull
> > > > > > > > for other tuners.
> > > > > > > 
> > > > > > > If you look at tveeprom.c, a number of other tuners are
> > > > > > > using that tuner definition:
> > > > > > > 
> > > > > > > $ grep FM1216ME_MK3 tveeprom.c
> > > > > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips
> > > > > > > FQ1216ME MK3"}, { TUNER_PHILIPS_FM1216ME_MK3,
> > > > > > > 	"Philips FM1216 ME MK3"},
> > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> > > > > > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05
> > > > > > > 2"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME
> > > > > > > MK5"},
> > > > > > > 
> > > > > > > If your change makes things bad for the other tuners,
> > > > > > > we'll probably have to create an alternate entry for the
> > > > > > > other tuners instead of using the FM1216ME_MK3
> > > > > > > defintion.  I suspect most of them are clones of the
> > > > > > > FM1216ME MK3 however, so it probably won't matter.
> > > > > > > 
> > > > > > > > > > 3. Set charge pump bit
> > > > > > > > > 
> > > > > > > > > This will improve the time to initially tune to a
> > > > > > > > > frequency, but will likely add some noise as the PLL
> > > > > > > > > continues to maintain lock on the signal.  If there
> > > > > > > > > is no way to turn off the CP after the lock bit is
> > > > > > > > > set in the tuner, it's probably better to leave it
> > > > > > > > > off for lower noise and just live with slower tuning.
> > > > > > > > 
> > > > > > > > We discuss with our windows system programmer about it.
> > > > > > > > He sad that in analog TV mode noise from PLL don't give
> > > > > > > > any problem.
> > > > > > > 
> > > > > > > I would be concerned about phase noise affecting the
> > > > > > > colors or any FM sound carriers.  If the noise isn't
> > > > > > > noticably affecting colors to the human eye (do color
> > > > > > > bars look OK?), or sound to the human ear, then OK.
> > > > > > > 
> > > > > > > 
> > > > > > > >  But in digital TV mode
> > > > > > > > noise from PLL decreased BER.
> > > > > > > 
> > > > > > > I thought the FM1216ME MK3 was an analog only tuner.  I
> > > > > > > guess I don't know DVB-T or cable in Europe well enough.
> > > > > > > 
> > > > > > > 
> > > > > > > > > Leaving the CP bit set should be especially noticable
> > > > > > > > > ad FM noise when set to tune to FM radio stations.
> > > > > > > > > From the FM1236ME_MK3 datasheet: "It is recommended
> > > > > > > > > to set CP=0 in the FM mode at all times." But the VHF
> > > > > > > > > low band control byte is also used when setting FM
> > > > > > > > > radio (AFAICT with a quick look at the code.)
> > > > > > > > 
> > > > > > > > Yes. You are right. We can swith CP off in FM mode.
> > > > > > > 
> > > > > > > OK.  Thank you.
> > > > > > > 
> > > > > > > > With my best regards, Dmitry.
> > > > > > > 
> > > > > > > 
> > > > > > > Regards,
> > > > > > > Andy
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > Cheers,
> > > > > Mauro
> > > 
> > > 
> > 
> 

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-05-07  3:03                       ` Andy Walls
@ 2009-05-06 23:05                         ` Dmitri Belimov
  2009-05-08  0:08                         ` hermann pitton
  1 sibling, 0 replies; 42+ messages in thread
From: Dmitri Belimov @ 2009-05-06 23:05 UTC (permalink / raw)
  To: Andy Walls
  Cc: hermann pitton, Mauro Carvalho Chehab, video4linux-list, linux-media

Hi Andy

> On Thu, 2009-05-07 at 02:01 +0200, hermann pitton wrote:
> > Hi,
> > 
> > Am Mittwoch, den 06.05.2009, 04:42 +1000 schrieb Dmitri Belimov:
> > > Hi Hermann
> > > 
> > > > Hi Dmitry,
> > > > 
> > > > Am Mittwoch, den 29.04.2009, 20:12 +1000 schrieb Dmitri Belimov:
> > > > > Hi,
> > > > >  
> > > > > > Am Dienstag, den 28.04.2009, 19:59 +1000 schrieb Dmitri
> > > > > > Belimov:
> > > > > > > On Tue, 28 Apr 2009 15:18:32 -0300
> > > > > > > Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
> > > > > > > 
> > > > > > > > On Mon, 27 Apr 2009 19:29:05 +1000
> > > > > > > > Dmitri Belimov <d.belimov@gmail.com> wrote:
> > > > > > > > 
> > > > > > > > > Hi All
> > > > > > > > > 
> > > > > > > > > Step by step.
> > > > > > > > > 
> > > > > > > > > This is patch for change only range of FM1216ME_MK3.
> > > > > > > > > Slow tunning is not a big problem.
> > > > > > > > 
> > > > > > > > Dmitri,
> > > > > > > > 
> > > > > > > > I'll mark those patches as RFC at patchwork until the
> > > > > > > > end of those discussions. After that, please send it
> > > > > > > > again into a new thread.
> > > > > > > 
> > > > > > > You mark patch with TOP AGC not this.
> > > > > > > 
> > > > > > > I think need discuss about FM1216ME_MK3 because I'll have
> > > > > > > a big patch for support control TOP AGC (sensitivity) of
> > > > > > > this tuner. It can be bad for compatible tuners.
> > > > > > 
> > > > > > hmm, in Europe, that TOP AGC did not ever made much
> > > > > > difference and it is an insmod option since ever.
> > 
> > >From the tda9887_3 datasheet.
> > 
> > 8.2  Tuner AGC and VIF-AGC
> > 
> > This block adapts the voltages, generated at the VIF-AGC
> > and SIF-AGC detectors, to the internal signal processing
> > at the VIF and SIF amplifiers and performs the tuner AGC
> > control current generation. The onset of the tuner AGC
> > control current generation can be set either via the I2C-bus
> > (see Table 13) or optionally by a potentiometer at pin TOP
> > (in case that the I2C-bus information cannot be stored).
> > The presence of a potentiometer is automatically detected
> > and the I2C-bus setting is disabled.
> > 
> > Reads for me that on some tuners, like NTSC only, the tuner AGC is
> > fix.
> > 
> > To change it per channel is not needed at all.
> 
> I've started looking at the photographs of the tuner that Hermann
> sent. Looking at the TDA9887 v4 datasheet, I can see how the TOP
> related pins are (not) wired to the 1st stage oscillator/mixer chip.
> 
> Pin 9 (TOP) is supposed to either be tied to ground through a resistor
> or left open.  This design has the pin connected to a white SMT
> capacitor(?) which I will assume the TDA9887 will see as an open
> circuit.  This means the TOP in the TDA9887 should be programmable via
> I2C.
> 
> Pin 14 (TAGC) looks like it is unconnected.  This means the TDA9887
> TAGC output is not actively taking over gain control of the 1st stage
> RF mixer/oscialltor chip.
> 
> 
> So this answers a question I had posed to Dmitry: Is this tuner wired
> up so the TDA9887 can adjust the gain of the 1st stage?  That answer
> is no.
> 
> 
> That means, that in this tuner, the AGC's in the two chips are
> operating independently and need their TOP's set in a coordinated
> manner that takes into account the IF filter losses and the
> modulation.  Since the FM1216ME data sheet makes recommendations for
> TOP values for both chips:
> 
> 
> RF mixer/osc chip:
>   109 dBμV Recommended for negative modulation
>   106 dBμV Recommended for positive modulation
> 
>   It is recommended to set the TOP at 109 dBμV for PAL B/G, D/K, I 
>   For system L/L’, it is recommended to set the TOP at 106 dBμV.
>   For FM radio, it is also recommended to set the TOP to 109 dBμV
> 
> IF demod chip:
>   C4-C0 = 10000 [0 dB, 17 mV (RMS) according to the TDA9887 datasheet]
>     for all FM modes and B/G D/K I L and L' systems
> 
> 
> it is probably best to use those.  I can try and look at the IF filter
> from the picutres Hermann sent, but I'm not sure I'd be able to figure
> out the loss and come up with better TOP setting recommendations than
> the manufacturer's datasheet.
> 
> 
> > > > > > 
> > > > > > I can't tell for Sibiria and initially that tuner had no
> > > > > > SECAM-DK support officially at all. There are no
> > > > > > good/much_better tuners for FTA at all and never have
> > > > > > been ;)
> > > > > > 
> > > > > > Some examples, user success reports, to make it more easily
> > > > > > to understand? I think it can only change some _very
> > > > > > little_ under already worst conditions.
> > > > > 
> > > > > This is my idea for RFC about TOP AGC:
> > > > 
> > > > what about to create a new FM1216ME MK3 tuner type for testing?
> > > 
> > > Yes. Can you do it?
> > > 
> > > I start add MK5 tuner.
> > 
> > Yes, if really needed, but I see no hint anywhere that it should be
> > useful to have TOP settings per channel for user applications and
> > will stay away from it.
> 
> 
> Right now, I don't think the tuner-simple.c code adjusts the TOP value
> based on the video system or FM mode.  It probably should.
> 
> I don't think a user control will be very useful.
> 
> 
> > For the change of UHF start I don't see any problem.
> 
> If you're talking about the frequency for the bandswitch, I don't see
> a problem either in general.  It may cause a problem for clones of the
> FM1216ME MK3 that don't have the same filter performance near the
> cutover, but use the same tuner defintion as the FM1216ME MK3 in
> tuner-types.c.
> 
> It may be best to point any clones to a new entry that looks like the
> current FM1216ME MK3 entry unmodified.
> 
> Regards,
> Andy
> 
> > SECAM_DK is never mentioned explicitly in the old datasheet we have
> > at ivtvdriver.org. Maybe we miss something here, but you try to
> > change over the full range and simply 109 dB is recommended for
> > negative demodulation. (page 13 for recommended TOP settings)
> > http://dl.ivtvdriver.org/datasheets/tuners
> > 
> > Maybe we are really talking about different tuner
> > versions/revisions.
> > 
> > Can you have a look at the tuner pictures I did send?
> > 
> > > > It is for sure maybe the best tuner around and likely is also
> > > > the best for tweaks in countries with huge lands to cover, not
> > > > restricted to Russia, Australia or Canada.
> > > 
> > > All our tuners tested with all standarts SECAM, PAL, NTSC because
> > > big country, some people want receive TV from Korea and Japan.
> > > For tests, our hardware engineer has hardware TV generator.
> > 
> > That confuses me a lot :)
> > 
> > You mean you test that tuner with its PAL/SECAM SAW filters on
> > NTSC_KR and NTSC_JP ?

The has 1216 3 SAW - 5.5, 6.0 and 6.5 (BG, I, DK)
The has 1236/1286 1 SAW - 4.5 (M/N)

This is one more trick.
1. Set SAW to 5.5MHz
2. Decode sound via SIF. The saa713x can decode M sound channel.

Of course need make a workaround for this.

With my best regards, Dmitry.

> > > 
> > > > I would like to have also Hans' opinion on it, since he did
> > > > some final steps to get them right.
> > > > 
> > 
> > Andy might have a look too. Please wait a little for more opinions.
> > 
> > Cheers,
> > Hermann
> > 
> > > > 
> > > > > 1. Add gain variable to tuner structure.
> > > > > 2. Add V4L2_CID_GAIN control to saa7134 and disable this
> > > > > control. 3. Add workaround to simple_post_tune function for
> > > > > write sensitivity level to the tuner. 4. Enable V4L2_CID_GAIN
> > > > > control when module load if card is right.
> > > > > 
> > > > > My expirience not so good, step 4 segfault the kernel. How to
> > > > > we can make it?
> > > > > 
> > > > > Our windows end-user programm control the sensitivity of each
> > > > > TV channel and change when channel changed.
> > > > > 
> > > > > What you think about it??
> > > > > 
> > > > > If TV card is not touch V4L2_CTRL_FLAG_DISABLED in this
> > > > > control. The programm can't change AGC TOP. And write default
> > > > > value to AGC TOP like now.
> > > > > 
> > > > > diff -r 43dbc8ebb5a2
> > > > > linux/drivers/media/common/tuners/tuner-simple.c ---
> > > > > a/linux/drivers/media/common/tuners/tuner-simple.c	Tue
> > > > > Jan 27 23:47:50 2009 -0200 +++
> > > > > b/linux/drivers/media/common/tuners/tuner-simple.c	Tue
> > > > > Apr 21 09:44:38 2009 +1000 @@ -116,6 +116,7 @@ u32 frequency;
> > > > >  	u32 bandwidth;
> > > > > +	signed int gain;
> > > > >  };
> > > > >  
> > > > >  /*
> > > > > ----------------------------------------------------------------------
> > > > > */ @@ -495,15 +507,57 @@ "(should be 4)\n", rc);
> > > > >  		break;
> > > > >  	}
> > > > > +	case TUNER_PHILIPS_FM1216ME_MK3:
> > > > > +	{
> > > > > +		buffer[2] = 0xDE; /* T2 = 0, T1 = 1 and T0 =
> > > > > 1 */
> > > > > +		switch (priv->gain) {
> > > > > +		case 0:
> > > > > +			/* TOP = External AGC, ATC = OFF */
> > > > > +			buffer[3] = 0x60;
> > > > > +			break;
> > > > > +		case 1:
> > > > > +			/* TOP = 118 dB, ATC = OFF */
> > > > > +			buffer[3] = 0x00;
> > > > > +			break;
> > > > > +		case 2:
> > > > > +			/* TOP = 115 dB, ATC = OFF */
> > > > > +			buffer[3] = 0x10;
> > > > > +			break;
> > > > > +		case 3:
> > > > > +			/* TOP = 112 dB, ATC = OFF */
> > > > > +			buffer[3] = 0x20;
> > > > > +			break;
> > > > > +		case 4:
> > > > > +			/* TOP = 109 dB, ATC = OFF */
> > > > > +			buffer[3] = 0x30;
> > > > > +			break;
> > > > > +		case 5:
> > > > > +			/* TOP = 106 dB, ATC = OFF */
> > > > > +			buffer[3] = 0x40;
> > > > > +			break;
> > > > > +		case 6:
> > > > > +			/* TOP = 103 dB, ATC = OFF */
> > > > > +			buffer[3] = 0x50;
> > > > > +			break;
> > > > > +		default:
> > > > > +			/* TOP = 112 dB, ATC = OFF */
> > > > > +			buffer[3] = 0x20;
> > > > > +			break;
> > > > > +		}
> > > > > +
> > > > > +		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);
> > > > > +
> > > > > +		break;
> > > > >  	}
> > > > > -
> > > > > +	}
> > > > >  	return 0;
> > > > >  }
> > > > >  
> > > > > diff -r 43dbc8ebb5a2
> > > > > linux/drivers/media/video/saa7134/saa7134-cards.c ---
> > > > > a/linux/drivers/media/video/saa7134/saa7134-cards.c
> > > > > Tue Jan 27 23:47:50 2009 -0200 +++
> > > > > b/linux/drivers/media/video/saa7134/saa7134-cards.c
> > > > > Tue Apr 21 09:44:38 2009 +1000 @@ -6506,6 +6806,20 @@
> > > > > saa_call_all(dev, tuner, s_config, &tea5767_cfg); break; }
> > > > > +	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
> > > > > +	{
> > > > > +		struct v4l2_queryctrl *ctl;
> > > > > +		struct saa7134_fh *fh;
> > > > > +		struct file *fl;
> > > > > +
> > > > > +		ctl->id = V4L2_CID_GAIN;
> > > > > +		if (saa7134_queryctrl(fl, fh, ctl) == 0)
> > > > > {                /* BUG here */
> > > > > +			/* enable this control */
> > > > > +			ctl->flags &=
> > > > > ~(V4L2_CTRL_FLAG_DISABLED);
> > > > > +		}
> > > > > +	}
> > > > >  	} /* switch() */
> > > > >  
> > > > >  	saa7134_tuner_setup(dev);
> > > > > diff -r 43dbc8ebb5a2
> > > > > linux/drivers/media/video/saa7134/saa7134-video.c ---
> > > > > a/linux/drivers/media/video/saa7134/saa7134-video.c
> > > > > Tue Jan 27 23:47:50 2009 -0200 +++
> > > > > b/linux/drivers/media/video/saa7134/saa7134-video.c
> > > > > Tue Apr 21 09:44:38 2009 +1000 @@ -417,6 +417,15
> > > > > @@ .step          = 1, .default_value = 0, .type          =
> > > > > V4L2_CTRL_TYPE_INTEGER,
> > > > > +	}, {
> > > > > +		.id 		= V4L2_CID_GAIN,
> > > > > +		.name 		= "Gain",
> > > > > +		.minimum 	= 0,
> > > > > +		.maximum 	= 6,
> > > > > +		.step 		= 1,
> > > > > +		.default_value 	= 3,
> > > > > +		.type 		=
> > > > > V4L2_CTRL_TYPE_INTEGER,
> > > > > +		.flags 		=
> > > > > V4L2_CTRL_FLAG_DISABLED, },{
> > > > >  		.id            = V4L2_CID_HFLIP,
> > > > >  		.name          = "Mirror",
> > > > > @@ -1129,6 +1138,9 @@
> > > > >  	case V4L2_CID_HUE:
> > > > >  		c->value = dev->ctl_hue;
> > > > >  		break;
> > > > > +	case V4L2_CID_GAIN:
> > > > > +		c->value = dev->ctl_gain;
> > > > > +		break;
> > > > >  	case V4L2_CID_CONTRAST:
> > > > >  		c->value = dev->ctl_contrast;
> > > > >  		break;
> > > > > @@ -1214,6 +1226,10 @@
> > > > >  	case V4L2_CID_HUE:
> > > > >  		dev->ctl_hue = c->value;
> > > > >  		saa_writeb(SAA7134_DEC_CHROMA_HUE,
> > > > > dev->ctl_hue);
> > > > > +		break;
> > > > > +	case V4L2_CID_GAIN:
> > > > > +		dev->ctl_gain = c->value;
> > > > > +
> > > > >  		break;
> > > > >  	case V4L2_CID_CONTRAST:
> > > > >  		dev->ctl_contrast = c->value;
> > > > > @@ -2502,6 +2518,7 @@
> > > > >  	dev->ctl_bright     =
> > > > > ctrl_by_id(V4L2_CID_BRIGHTNESS)->default_value;
> > > > > dev->ctl_contrast =
> > > > > ctrl_by_id(V4L2_CID_CONTRAST)->default_value; dev->ctl_hue =
> > > > > ctrl_by_id(V4L2_CID_HUE)->default_value;
> > > > > +	dev->ctl_gain       =
> > > > > ctrl_by_id(V4L2_CID_GAIN)->default_value; dev->ctl_saturation
> > > > > = ctrl_by_id(V4L2_CID_SATURATION)->default_value;
> > > > > dev->ctl_volume =
> > > > > ctrl_by_id(V4L2_CID_AUDIO_VOLUME)->default_value;
> > > > > dev->ctl_mute       = 1; //
> > > > > ctrl_by_id(V4L2_CID_AUDIO_MUTE)->default_value; diff -r
> > > > > 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134.h ---
> > > > > a/linux/drivers/media/video/saa7134/saa7134.h	Tue Jan
> > > > > 27 23:47:50 2009 -0200 +++
> > > > > b/linux/drivers/media/video/saa7134/saa7134.h	Tue Apr
> > > > > 21 09:44:38 2009 +1000 @@ -548,6 +558,7 @@ int ctl_bright;
> > > > > int                        ctl_contrast;
> > > > > int                        ctl_hue;
> > > > > +	int                        ctl_gain;             /*
> > > > > gain */ int                        ctl_saturation;
> > > > >  	int                        ctl_freq;
> > > > >  	int                        ctl_mute;             /*
> > > > > audio */
> > > > > 
> > > > > 
> > > > > With my best regards, Dmitry.
> > > > > 
> > > > > > Cheers,
> > > > > > Hermann
> > > > > > 
> > > > > > > With my best regards, Dmitry.
> > > > > > > 
> > > > > > > > 
> > > > > > > > Cheers,
> > > > > > > > Mauro.
> > > > > > > > 
> > > > > > > > > 
> > > > > > > > > diff -r b40d628f830d
> > > > > > > > > linux/drivers/media/common/tuners/tuner-types.c ---
> > > > > > > > > a/linux/drivers/media/common/tuners/tuner-types.c
> > > > > > > > > Fri Apr 24 01:46:41 2009 -0300 +++
> > > > > > > > > b/linux/drivers/media/common/tuners/tuner-types.c
> > > > > > > > > Tue Apr 28 03:35:42 2009 +1000 @@ -558,8 +558,8 @@
> > > > > > > > > static struct tuner_range
> > > > > > > > > tuner_fm1216me_mk3_pal_ranges[] = { { 16 *
> > > > > > > > > 158.00 /*MHz*/, 0x8e, 0x01, },
> > > > > > > > > -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> > > > > > > > > -	{ 16 * 999.99        , 0x8e, 0x04, },
> > > > > > > > > +	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
> > > > > > > > > +	{ 16 * 864.00        , 0x8e, 0x04, },
> > > > > > > > >  };
> > > > > > > > >  
> > > > > > > > >  static struct tuner_params
> > > > > > > > > tuner_fm1216me_mk3_params[] = {
> > > > > > > > > 
> > > > > > > > > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
> > > > > > > > > <d.belimov@gmail.com>
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > With my best regards, Dmitry.
> > > > > > > > > 
> > > > > > > > > > Hi Dmitri,
> > > > > > > > > > 
> > > > > > > > > > Thank you for you responses.
> > > > > > > > > > 
> > > > > > > > > > Just a few more comments...
> > > > > > > > > > 
> > > > > > > > > > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov
> > > > > > > > > > wrote:
> > > > > > > > > > > Hi Andy
> > > > > > > > > > > 
> > > > > > > > > > > > Dmitri,
> > > > > > > > > > > > 
> > > > > > > > > > > > 
> > > > > > > > > > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri
> > > > > > > > > > > > Belimov wrote:
> > > > > > > > > > > > > Hi All
> > > > > > > > > > > > > 
> > > > > > > > > > > > > 1. Change middle band. In the end of the
> > > > > > > > > > > > > middle band the sensitivity of receiver not
> > > > > > > > > > > > > good. If we switch to higher band,
> > > > > > > > > > > > > sensitivity more better. Hardware trick.
> > > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > > Several years a go your customers write some
> > > > > > > > > > > messages about bad quality of TV if frequency of
> > > > > > > > > > > TV is the end of band. It can be low band or
> > > > > > > > > > > middle. Our hardware engeneer make some tests
> > > > > > > > > > > with hardware TV generator and our TV tuners.
> > > > > > > > > > > 
> > > > > > > > > > > If we set default frequency range for low and
> > > > > > > > > > > middle band, quality of TV signal on 159MHz and
> > > > > > > > > > > 442 MHz is bad. When we make our changes with
> > > > > > > > > > > moving end of bands the quality of TV much
> > > > > > > > > > > better. And our system programmer for OS Windows
> > > > > > > > > > > use changed bands for drivers. Customers be happy.
> > > > > > > > > > 
> > > > > > > > > > OK.  A properly run experiment wins over theory
> > > > > > > > > > every time. :)
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > > You can test it if in your placement available TV
> > > > > > > > > > > programm on 159MHz or 442MHz. This trick can be
> > > > > > > > > > > usefull for other tuners.
> > > > > > > > > > 
> > > > > > > > > > If you look at tveeprom.c, a number of other tuners
> > > > > > > > > > are using that tuner definition:
> > > > > > > > > > 
> > > > > > > > > > $ grep FM1216ME_MK3 tveeprom.c
> > > > > > > > > > 	{ TUNER_PHILIPS_FM1216ME_MK3,
> > > > > > > > > > 	"Philips FQ1216ME MK3"},
> > > > > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, "Philips FM1216 ME
> > > > > > > > > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"LG
> > > > > > > > > > S001D MK3"}, { TUNER_PHILIPS_FM1216ME_MK3,
> > > > > > > > > > 	"LG S701D MK3"},
> > > > > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips
> > > > > > > > > > FQ1216LME MK3"}, { TUNER_PHILIPS_FM1216ME_MK3,
> > > > > > > > > > 	"TCL MFPE05 2"},
> > > > > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL
> > > > > > > > > > MPE05-2"}, { TUNER_PHILIPS_FM1216ME_MK3,
> > > > > > > > > > 	"Philips FM1216ME MK5"},
> > > > > > > > > > 
> > > > > > > > > > If your change makes things bad for the other
> > > > > > > > > > tuners, we'll probably have to create an alternate
> > > > > > > > > > entry for the other tuners instead of using the
> > > > > > > > > > FM1216ME_MK3 defintion.  I suspect most of them are
> > > > > > > > > > clones of the FM1216ME MK3 however, so it probably
> > > > > > > > > > won't matter.
> > > > > > > > > > 
> > > > > > > > > > > > > 3. Set charge pump bit
> > > > > > > > > > > > 
> > > > > > > > > > > > This will improve the time to initially tune to
> > > > > > > > > > > > a frequency, but will likely add some noise as
> > > > > > > > > > > > the PLL continues to maintain lock on the
> > > > > > > > > > > > signal.  If there is no way to turn off the CP
> > > > > > > > > > > > after the lock bit is set in the tuner, it's
> > > > > > > > > > > > probably better to leave it off for lower noise
> > > > > > > > > > > > and just live with slower tuning.
> > > > > > > > > > > 
> > > > > > > > > > > We discuss with our windows system programmer
> > > > > > > > > > > about it. He sad that in analog TV mode noise
> > > > > > > > > > > from PLL don't give any problem.
> > > > > > > > > > 
> > > > > > > > > > I would be concerned about phase noise affecting the
> > > > > > > > > > colors or any FM sound carriers.  If the noise isn't
> > > > > > > > > > noticably affecting colors to the human eye (do
> > > > > > > > > > color bars look OK?), or sound to the human ear,
> > > > > > > > > > then OK.
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > >  But in digital TV mode
> > > > > > > > > > > noise from PLL decreased BER.
> > > > > > > > > > 
> > > > > > > > > > I thought the FM1216ME MK3 was an analog only
> > > > > > > > > > tuner.  I guess I don't know DVB-T or cable in
> > > > > > > > > > Europe well enough.
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > > > Leaving the CP bit set should be especially
> > > > > > > > > > > > noticable ad FM noise when set to tune to FM
> > > > > > > > > > > > radio stations. From the FM1236ME_MK3
> > > > > > > > > > > > datasheet: "It is recommended to set CP=0 in
> > > > > > > > > > > > the FM mode at all times." But the VHF low band
> > > > > > > > > > > > control byte is also used when setting FM radio
> > > > > > > > > > > > (AFAICT with a quick look at the code.)
> > > > > > > > > > > 
> > > > > > > > > > > Yes. You are right. We can swith CP off in FM
> > > > > > > > > > > mode.
> > > > > > > > > > 
> > > > > > > > > > OK.  Thank you.
> > > > > > > > > > 
> > > > > > > > > > > With my best regards, Dmitry.
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > Regards,
> > > > > > > > > > Andy
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Cheers,
> > > > > > > > Mauro
> > > > > > 
> > > > > > 
> > > > 
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe
> > linux-media" in the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> 

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-05-05 18:42                   ` Dmitri Belimov
@ 2009-05-07  0:01                     ` hermann pitton
  2009-05-07  3:03                       ` Andy Walls
  0 siblings, 1 reply; 42+ messages in thread
From: hermann pitton @ 2009-05-07  0:01 UTC (permalink / raw)
  To: Dmitri Belimov
  Cc: Mauro Carvalho Chehab, Andy Walls, video4linux-list, linux-media

Hi,

Am Mittwoch, den 06.05.2009, 04:42 +1000 schrieb Dmitri Belimov:
> Hi Hermann
> 
> > Hi Dmitry,
> > 
> > Am Mittwoch, den 29.04.2009, 20:12 +1000 schrieb Dmitri Belimov:
> > > Hi,
> > >  
> > > > Am Dienstag, den 28.04.2009, 19:59 +1000 schrieb Dmitri Belimov:
> > > > > On Tue, 28 Apr 2009 15:18:32 -0300
> > > > > Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
> > > > > 
> > > > > > On Mon, 27 Apr 2009 19:29:05 +1000
> > > > > > Dmitri Belimov <d.belimov@gmail.com> wrote:
> > > > > > 
> > > > > > > Hi All
> > > > > > > 
> > > > > > > Step by step.
> > > > > > > 
> > > > > > > This is patch for change only range of FM1216ME_MK3. Slow
> > > > > > > tunning is not a big problem.
> > > > > > 
> > > > > > Dmitri,
> > > > > > 
> > > > > > I'll mark those patches as RFC at patchwork until the end of
> > > > > > those discussions. After that, please send it again into a
> > > > > > new thread.
> > > > > 
> > > > > You mark patch with TOP AGC not this.
> > > > > 
> > > > > I think need discuss about FM1216ME_MK3 because I'll have a big
> > > > > patch for support control TOP AGC (sensitivity) of this tuner.
> > > > > It can be bad for compatible tuners.
> > > > 
> > > > hmm, in Europe, that TOP AGC did not ever made much difference
> > > > and it is an insmod option since ever.

>From the tda9887_3 datasheet.

8.2  Tuner AGC and VIF-AGC

This block adapts the voltages, generated at the VIF-AGC
and SIF-AGC detectors, to the internal signal processing
at the VIF and SIF amplifiers and performs the tuner AGC
control current generation. The onset of the tuner AGC
control current generation can be set either via the I2C-bus
(see Table 13) or optionally by a potentiometer at pin TOP
(in case that the I2C-bus information cannot be stored).
The presence of a potentiometer is automatically detected
and the I2C-bus setting is disabled.

Reads for me that on some tuners, like NTSC only, the tuner AGC is fix.

To change it per channel is not needed at all.

> > > > 
> > > > I can't tell for Sibiria and initially that tuner had no SECAM-DK
> > > > support officially at all. There are no good/much_better tuners
> > > > for FTA at all and never have been ;)
> > > > 
> > > > Some examples, user success reports, to make it more easily to
> > > > understand? I think it can only change some _very little_ under
> > > > already worst conditions.
> > > 
> > > This is my idea for RFC about TOP AGC:
> > 
> > what about to create a new FM1216ME MK3 tuner type for testing?
> 
> Yes. Can you do it?
> 
> I start add MK5 tuner.

Yes, if really needed, but I see no hint anywhere that it should be
useful to have TOP settings per channel for user applications and will
stay away from it.

For the change of UHF start I don't see any problem.

SECAM_DK is never mentioned explicitly in the old datasheet we have at
ivtvdriver.org. Maybe we miss something here, but you try to change over
the full range and simply 109 dB is recommended for negative
demodulation. (page 13 for recommended TOP settings)
http://dl.ivtvdriver.org/datasheets/tuners

Maybe we are really talking about different tuner versions/revisions.

Can you have a look at the tuner pictures I did send?

> > It is for sure maybe the best tuner around and likely is also the best
> > for tweaks in countries with huge lands to cover, not restricted to
> > Russia, Australia or Canada.
> 
> All our tuners tested with all standarts SECAM, PAL, NTSC because
> big country, some people want receive TV from Korea and Japan.
> For tests, our hardware engineer has hardware TV generator.

That confuses me a lot :)

You mean you test that tuner with its PAL/SECAM SAW filters on NTSC_KR
and NTSC_JP ?

> With my best regards, Dmitry.
> 
> > I would like to have also Hans' opinion on it, since he did some final
> > steps to get them right.
> > 

Andy might have a look too. Please wait a little for more opinions.

Cheers,
Hermann

> > 
> > > 1. Add gain variable to tuner structure.
> > > 2. Add V4L2_CID_GAIN control to saa7134 and disable this control.
> > > 3. Add workaround to simple_post_tune function for write
> > > sensitivity level to the tuner. 4. Enable V4L2_CID_GAIN control
> > > when module load if card is right.
> > > 
> > > My expirience not so good, step 4 segfault the kernel. How to we
> > > can make it?
> > > 
> > > Our windows end-user programm control the sensitivity of each TV
> > > channel and change when channel changed.
> > > 
> > > What you think about it??
> > > 
> > > If TV card is not touch V4L2_CTRL_FLAG_DISABLED in this control.
> > > The programm can't change AGC TOP. And write default value to AGC
> > > TOP like now.
> > > 
> > > diff -r 43dbc8ebb5a2
> > > linux/drivers/media/common/tuners/tuner-simple.c ---
> > > a/linux/drivers/media/common/tuners/tuner-simple.c	Tue Jan
> > > 27 23:47:50 2009 -0200 +++
> > > b/linux/drivers/media/common/tuners/tuner-simple.c	Tue Apr
> > > 21 09:44:38 2009 +1000 @@ -116,6 +116,7 @@ u32 frequency;
> > >  	u32 bandwidth;
> > > +	signed int gain;
> > >  };
> > >  
> > >  /*
> > > ----------------------------------------------------------------------
> > > */ @@ -495,15 +507,57 @@ "(should be 4)\n", rc);
> > >  		break;
> > >  	}
> > > +	case TUNER_PHILIPS_FM1216ME_MK3:
> > > +	{
> > > +		buffer[2] = 0xDE; /* T2 = 0, T1 = 1 and T0 = 1 */
> > > +		switch (priv->gain) {
> > > +		case 0:
> > > +			/* TOP = External AGC, ATC = OFF */
> > > +			buffer[3] = 0x60;
> > > +			break;
> > > +		case 1:
> > > +			/* TOP = 118 dB, ATC = OFF */
> > > +			buffer[3] = 0x00;
> > > +			break;
> > > +		case 2:
> > > +			/* TOP = 115 dB, ATC = OFF */
> > > +			buffer[3] = 0x10;
> > > +			break;
> > > +		case 3:
> > > +			/* TOP = 112 dB, ATC = OFF */
> > > +			buffer[3] = 0x20;
> > > +			break;
> > > +		case 4:
> > > +			/* TOP = 109 dB, ATC = OFF */
> > > +			buffer[3] = 0x30;
> > > +			break;
> > > +		case 5:
> > > +			/* TOP = 106 dB, ATC = OFF */
> > > +			buffer[3] = 0x40;
> > > +			break;
> > > +		case 6:
> > > +			/* TOP = 103 dB, ATC = OFF */
> > > +			buffer[3] = 0x50;
> > > +			break;
> > > +		default:
> > > +			/* TOP = 112 dB, ATC = OFF */
> > > +			buffer[3] = 0x20;
> > > +			break;
> > > +		}
> > > +
> > > +		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);
> > > +
> > > +		break;
> > >  	}
> > > -
> > > +	}
> > >  	return 0;
> > >  }
> > >  
> > > diff -r 43dbc8ebb5a2
> > > linux/drivers/media/video/saa7134/saa7134-cards.c ---
> > > a/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Jan
> > > 27 23:47:50 2009 -0200 +++
> > > b/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Apr
> > > 21 09:44:38 2009 +1000 @@ -6506,6 +6806,20 @@ saa_call_all(dev,
> > > tuner, s_config, &tea5767_cfg); break; }
> > > +	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
> > > +	{
> > > +		struct v4l2_queryctrl *ctl;
> > > +		struct saa7134_fh *fh;
> > > +		struct file *fl;
> > > +
> > > +		ctl->id = V4L2_CID_GAIN;
> > > +		if (saa7134_queryctrl(fl, fh, ctl) == 0)
> > > {                /* BUG here */
> > > +			/* enable this control */
> > > +			ctl->flags &= ~(V4L2_CTRL_FLAG_DISABLED);
> > > +		}
> > > +	}
> > >  	} /* switch() */
> > >  
> > >  	saa7134_tuner_setup(dev);
> > > diff -r 43dbc8ebb5a2
> > > linux/drivers/media/video/saa7134/saa7134-video.c ---
> > > a/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Jan
> > > 27 23:47:50 2009 -0200 +++
> > > b/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Apr
> > > 21 09:44:38 2009 +1000 @@ -417,6 +417,15 @@ .step          =
> > > 1, .default_value = 0, .type          = V4L2_CTRL_TYPE_INTEGER,
> > > +	}, {
> > > +		.id 		= V4L2_CID_GAIN,
> > > +		.name 		= "Gain",
> > > +		.minimum 	= 0,
> > > +		.maximum 	= 6,
> > > +		.step 		= 1,
> > > +		.default_value 	= 3,
> > > +		.type 		= V4L2_CTRL_TYPE_INTEGER,
> > > +		.flags 		= V4L2_CTRL_FLAG_DISABLED,
> > >  	},{
> > >  		.id            = V4L2_CID_HFLIP,
> > >  		.name          = "Mirror",
> > > @@ -1129,6 +1138,9 @@
> > >  	case V4L2_CID_HUE:
> > >  		c->value = dev->ctl_hue;
> > >  		break;
> > > +	case V4L2_CID_GAIN:
> > > +		c->value = dev->ctl_gain;
> > > +		break;
> > >  	case V4L2_CID_CONTRAST:
> > >  		c->value = dev->ctl_contrast;
> > >  		break;
> > > @@ -1214,6 +1226,10 @@
> > >  	case V4L2_CID_HUE:
> > >  		dev->ctl_hue = c->value;
> > >  		saa_writeb(SAA7134_DEC_CHROMA_HUE, dev->ctl_hue);
> > > +		break;
> > > +	case V4L2_CID_GAIN:
> > > +		dev->ctl_gain = c->value;
> > > +
> > >  		break;
> > >  	case V4L2_CID_CONTRAST:
> > >  		dev->ctl_contrast = c->value;
> > > @@ -2502,6 +2518,7 @@
> > >  	dev->ctl_bright     =
> > > ctrl_by_id(V4L2_CID_BRIGHTNESS)->default_value; dev->ctl_contrast
> > > = ctrl_by_id(V4L2_CID_CONTRAST)->default_value; dev->ctl_hue
> > > = ctrl_by_id(V4L2_CID_HUE)->default_value;
> > > +	dev->ctl_gain       =
> > > ctrl_by_id(V4L2_CID_GAIN)->default_value; dev->ctl_saturation =
> > > ctrl_by_id(V4L2_CID_SATURATION)->default_value; dev->ctl_volume
> > > = ctrl_by_id(V4L2_CID_AUDIO_VOLUME)->default_value;
> > > dev->ctl_mute       = 1; //
> > > ctrl_by_id(V4L2_CID_AUDIO_MUTE)->default_value; diff -r
> > > 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134.h ---
> > > a/linux/drivers/media/video/saa7134/saa7134.h	Tue Jan 27
> > > 23:47:50 2009 -0200 +++
> > > b/linux/drivers/media/video/saa7134/saa7134.h	Tue Apr 21
> > > 09:44:38 2009 +1000 @@ -548,6 +558,7 @@ int
> > > ctl_bright; int                        ctl_contrast;
> > > int                        ctl_hue;
> > > +	int                        ctl_gain;             /* gain */
> > >  	int                        ctl_saturation;
> > >  	int                        ctl_freq;
> > >  	int                        ctl_mute;             /* audio
> > > */
> > > 
> > > 
> > > With my best regards, Dmitry.
> > > 
> > > > Cheers,
> > > > Hermann
> > > > 
> > > > > With my best regards, Dmitry.
> > > > > 
> > > > > > 
> > > > > > Cheers,
> > > > > > Mauro.
> > > > > > 
> > > > > > > 
> > > > > > > diff -r b40d628f830d
> > > > > > > linux/drivers/media/common/tuners/tuner-types.c ---
> > > > > > > a/linux/drivers/media/common/tuners/tuner-types.c	Fri
> > > > > > > Apr 24 01:46:41 2009 -0300 +++
> > > > > > > b/linux/drivers/media/common/tuners/tuner-types.c	Tue
> > > > > > > Apr 28 03:35:42 2009 +1000 @@ -558,8 +558,8 @@ static struct
> > > > > > > tuner_range tuner_fm1216me_mk3_pal_ranges[] = { { 16 *
> > > > > > > 158.00 /*MHz*/, 0x8e, 0x01, },
> > > > > > > -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> > > > > > > -	{ 16 * 999.99        , 0x8e, 0x04, },
> > > > > > > +	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
> > > > > > > +	{ 16 * 864.00        , 0x8e, 0x04, },
> > > > > > >  };
> > > > > > >  
> > > > > > >  static struct tuner_params tuner_fm1216me_mk3_params[] = {
> > > > > > > 
> > > > > > > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
> > > > > > > <d.belimov@gmail.com>
> > > > > > > 
> > > > > > > 
> > > > > > > With my best regards, Dmitry.
> > > > > > > 
> > > > > > > > Hi Dmitri,
> > > > > > > > 
> > > > > > > > Thank you for you responses.
> > > > > > > > 
> > > > > > > > Just a few more comments...
> > > > > > > > 
> > > > > > > > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > > > > > > > > Hi Andy
> > > > > > > > > 
> > > > > > > > > > Dmitri,
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov
> > > > > > > > > > wrote:
> > > > > > > > > > > Hi All
> > > > > > > > > > > 
> > > > > > > > > > > 1. Change middle band. In the end of the middle
> > > > > > > > > > > band the sensitivity of receiver not good. If we
> > > > > > > > > > > switch to higher band, sensitivity more better.
> > > > > > > > > > > Hardware trick.
> > > > > > > > > > 
> > > > > > > > 
> > > > > > > > > Several years a go your customers write some messages
> > > > > > > > > about bad quality of TV if frequency of TV is the end
> > > > > > > > > of band. It can be low band or middle. Our hardware
> > > > > > > > > engeneer make some tests with hardware TV generator and
> > > > > > > > > our TV tuners.
> > > > > > > > > 
> > > > > > > > > If we set default frequency range for low and middle
> > > > > > > > > band, quality of TV signal on 159MHz and 442 MHz is
> > > > > > > > > bad. When we make our changes with moving end of bands
> > > > > > > > > the quality of TV much better. And our system
> > > > > > > > > programmer for OS Windows use changed bands for
> > > > > > > > > drivers. Customers be happy.
> > > > > > > > 
> > > > > > > > OK.  A properly run experiment wins over theory every
> > > > > > > > time. :)
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > > You can test it if in your placement available TV
> > > > > > > > > programm on 159MHz or 442MHz. This trick can be usefull
> > > > > > > > > for other tuners.
> > > > > > > > 
> > > > > > > > If you look at tveeprom.c, a number of other tuners are
> > > > > > > > using that tuner definition:
> > > > > > > > 
> > > > > > > > $ grep FM1216ME_MK3 tveeprom.c
> > > > > > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips
> > > > > > > > FQ1216ME MK3"}, { TUNER_PHILIPS_FM1216ME_MK3,
> > > > > > > > 	"Philips FM1216 ME MK3"},
> > > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> > > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> > > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> > > > > > > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05
> > > > > > > > 2"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> > > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME
> > > > > > > > MK5"},
> > > > > > > > 
> > > > > > > > If your change makes things bad for the other tuners,
> > > > > > > > we'll probably have to create an alternate entry for the
> > > > > > > > other tuners instead of using the FM1216ME_MK3
> > > > > > > > defintion.  I suspect most of them are clones of the
> > > > > > > > FM1216ME MK3 however, so it probably won't matter.
> > > > > > > > 
> > > > > > > > > > > 3. Set charge pump bit
> > > > > > > > > > 
> > > > > > > > > > This will improve the time to initially tune to a
> > > > > > > > > > frequency, but will likely add some noise as the PLL
> > > > > > > > > > continues to maintain lock on the signal.  If there
> > > > > > > > > > is no way to turn off the CP after the lock bit is
> > > > > > > > > > set in the tuner, it's probably better to leave it
> > > > > > > > > > off for lower noise and just live with slower tuning.
> > > > > > > > > 
> > > > > > > > > We discuss with our windows system programmer about it.
> > > > > > > > > He sad that in analog TV mode noise from PLL don't give
> > > > > > > > > any problem.
> > > > > > > > 
> > > > > > > > I would be concerned about phase noise affecting the
> > > > > > > > colors or any FM sound carriers.  If the noise isn't
> > > > > > > > noticably affecting colors to the human eye (do color
> > > > > > > > bars look OK?), or sound to the human ear, then OK.
> > > > > > > > 
> > > > > > > > 
> > > > > > > > >  But in digital TV mode
> > > > > > > > > noise from PLL decreased BER.
> > > > > > > > 
> > > > > > > > I thought the FM1216ME MK3 was an analog only tuner.  I
> > > > > > > > guess I don't know DVB-T or cable in Europe well enough.
> > > > > > > > 
> > > > > > > > 
> > > > > > > > > > Leaving the CP bit set should be especially noticable
> > > > > > > > > > ad FM noise when set to tune to FM radio stations.
> > > > > > > > > > From the FM1236ME_MK3 datasheet: "It is recommended
> > > > > > > > > > to set CP=0 in the FM mode at all times." But the VHF
> > > > > > > > > > low band control byte is also used when setting FM
> > > > > > > > > > radio (AFAICT with a quick look at the code.)
> > > > > > > > > 
> > > > > > > > > Yes. You are right. We can swith CP off in FM mode.
> > > > > > > > 
> > > > > > > > OK.  Thank you.
> > > > > > > > 
> > > > > > > > > With my best regards, Dmitry.
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Regards,
> > > > > > > > Andy
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > Cheers,
> > > > > > Mauro
> > > > 
> > > > 
> > 


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-05-07  0:01                     ` hermann pitton
@ 2009-05-07  3:03                       ` Andy Walls
  2009-05-06 23:05                         ` Dmitri Belimov
  2009-05-08  0:08                         ` hermann pitton
  0 siblings, 2 replies; 42+ messages in thread
From: Andy Walls @ 2009-05-07  3:03 UTC (permalink / raw)
  To: hermann pitton
  Cc: Dmitri Belimov, Mauro Carvalho Chehab, video4linux-list, linux-media

On Thu, 2009-05-07 at 02:01 +0200, hermann pitton wrote:
> Hi,
> 
> Am Mittwoch, den 06.05.2009, 04:42 +1000 schrieb Dmitri Belimov:
> > Hi Hermann
> > 
> > > Hi Dmitry,
> > > 
> > > Am Mittwoch, den 29.04.2009, 20:12 +1000 schrieb Dmitri Belimov:
> > > > Hi,
> > > >  
> > > > > Am Dienstag, den 28.04.2009, 19:59 +1000 schrieb Dmitri Belimov:
> > > > > > On Tue, 28 Apr 2009 15:18:32 -0300
> > > > > > Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
> > > > > > 
> > > > > > > On Mon, 27 Apr 2009 19:29:05 +1000
> > > > > > > Dmitri Belimov <d.belimov@gmail.com> wrote:
> > > > > > > 
> > > > > > > > Hi All
> > > > > > > > 
> > > > > > > > Step by step.
> > > > > > > > 
> > > > > > > > This is patch for change only range of FM1216ME_MK3. Slow
> > > > > > > > tunning is not a big problem.
> > > > > > > 
> > > > > > > Dmitri,
> > > > > > > 
> > > > > > > I'll mark those patches as RFC at patchwork until the end of
> > > > > > > those discussions. After that, please send it again into a
> > > > > > > new thread.
> > > > > > 
> > > > > > You mark patch with TOP AGC not this.
> > > > > > 
> > > > > > I think need discuss about FM1216ME_MK3 because I'll have a big
> > > > > > patch for support control TOP AGC (sensitivity) of this tuner.
> > > > > > It can be bad for compatible tuners.
> > > > > 
> > > > > hmm, in Europe, that TOP AGC did not ever made much difference
> > > > > and it is an insmod option since ever.
> 
> >From the tda9887_3 datasheet.
> 
> 8.2  Tuner AGC and VIF-AGC
> 
> This block adapts the voltages, generated at the VIF-AGC
> and SIF-AGC detectors, to the internal signal processing
> at the VIF and SIF amplifiers and performs the tuner AGC
> control current generation. The onset of the tuner AGC
> control current generation can be set either via the I2C-bus
> (see Table 13) or optionally by a potentiometer at pin TOP
> (in case that the I2C-bus information cannot be stored).
> The presence of a potentiometer is automatically detected
> and the I2C-bus setting is disabled.
> 
> Reads for me that on some tuners, like NTSC only, the tuner AGC is fix.
> 
> To change it per channel is not needed at all.

I've started looking at the photographs of the tuner that Hermann sent.
Looking at the TDA9887 v4 datasheet, I can see how the TOP related pins
are (not) wired to the 1st stage oscillator/mixer chip.

Pin 9 (TOP) is supposed to either be tied to ground through a resistor
or left open.  This design has the pin connected to a white SMT
capacitor(?) which I will assume the TDA9887 will see as an open
circuit.  This means the TOP in the TDA9887 should be programmable via
I2C.

Pin 14 (TAGC) looks like it is unconnected.  This means the TDA9887 TAGC
output is not actively taking over gain control of the 1st stage RF
mixer/oscialltor chip.


So this answers a question I had posed to Dmitry: Is this tuner wired up
so the TDA9887 can adjust the gain of the 1st stage?  That answer is no.


That means, that in this tuner, the AGC's in the two chips are operating
independently and need their TOP's set in a coordinated manner that
takes into account the IF filter losses and the modulation.  Since the
FM1216ME data sheet makes recommendations for TOP values for both chips:


RF mixer/osc chip:
  109 dBμV Recommended for negative modulation
  106 dBμV Recommended for positive modulation

  It is recommended to set the TOP at 109 dBμV for PAL B/G, D/K, I 
  For system L/L’, it is recommended to set the TOP at 106 dBμV.
  For FM radio, it is also recommended to set the TOP to 109 dBμV

IF demod chip:
  C4-C0 = 10000 [0 dB, 17 mV (RMS) according to the TDA9887 datasheet]
    for all FM modes and B/G D/K I L and L' systems


it is probably best to use those.  I can try and look at the IF filter
from the picutres Hermann sent, but I'm not sure I'd be able to figure
out the loss and come up with better TOP setting recommendations than
the manufacturer's datasheet.


> > > > > 
> > > > > I can't tell for Sibiria and initially that tuner had no SECAM-DK
> > > > > support officially at all. There are no good/much_better tuners
> > > > > for FTA at all and never have been ;)
> > > > > 
> > > > > Some examples, user success reports, to make it more easily to
> > > > > understand? I think it can only change some _very little_ under
> > > > > already worst conditions.
> > > > 
> > > > This is my idea for RFC about TOP AGC:
> > > 
> > > what about to create a new FM1216ME MK3 tuner type for testing?
> > 
> > Yes. Can you do it?
> > 
> > I start add MK5 tuner.
> 
> Yes, if really needed, but I see no hint anywhere that it should be
> useful to have TOP settings per channel for user applications and will
> stay away from it.


Right now, I don't think the tuner-simple.c code adjusts the TOP value
based on the video system or FM mode.  It probably should.

I don't think a user control will be very useful.


> For the change of UHF start I don't see any problem.

If you're talking about the frequency for the bandswitch, I don't see a
problem either in general.  It may cause a problem for clones of the
FM1216ME MK3 that don't have the same filter performance near the
cutover, but use the same tuner defintion as the FM1216ME MK3 in
tuner-types.c.

It may be best to point any clones to a new entry that looks like the
current FM1216ME MK3 entry unmodified.

Regards,
Andy

> SECAM_DK is never mentioned explicitly in the old datasheet we have at
> ivtvdriver.org. Maybe we miss something here, but you try to change over
> the full range and simply 109 dB is recommended for negative
> demodulation. (page 13 for recommended TOP settings)
> http://dl.ivtvdriver.org/datasheets/tuners
> 
> Maybe we are really talking about different tuner versions/revisions.
> 
> Can you have a look at the tuner pictures I did send?
> 
> > > It is for sure maybe the best tuner around and likely is also the best
> > > for tweaks in countries with huge lands to cover, not restricted to
> > > Russia, Australia or Canada.
> > 
> > All our tuners tested with all standarts SECAM, PAL, NTSC because
> > big country, some people want receive TV from Korea and Japan.
> > For tests, our hardware engineer has hardware TV generator.
> 
> That confuses me a lot :)
> 
> You mean you test that tuner with its PAL/SECAM SAW filters on NTSC_KR
> and NTSC_JP ?
> 
> > With my best regards, Dmitry.
> > 
> > > I would like to have also Hans' opinion on it, since he did some final
> > > steps to get them right.
> > > 
> 
> Andy might have a look too. Please wait a little for more opinions.
> 
> Cheers,
> Hermann
> 
> > > 
> > > > 1. Add gain variable to tuner structure.
> > > > 2. Add V4L2_CID_GAIN control to saa7134 and disable this control.
> > > > 3. Add workaround to simple_post_tune function for write
> > > > sensitivity level to the tuner. 4. Enable V4L2_CID_GAIN control
> > > > when module load if card is right.
> > > > 
> > > > My expirience not so good, step 4 segfault the kernel. How to we
> > > > can make it?
> > > > 
> > > > Our windows end-user programm control the sensitivity of each TV
> > > > channel and change when channel changed.
> > > > 
> > > > What you think about it??
> > > > 
> > > > If TV card is not touch V4L2_CTRL_FLAG_DISABLED in this control.
> > > > The programm can't change AGC TOP. And write default value to AGC
> > > > TOP like now.
> > > > 
> > > > diff -r 43dbc8ebb5a2
> > > > linux/drivers/media/common/tuners/tuner-simple.c ---
> > > > a/linux/drivers/media/common/tuners/tuner-simple.c	Tue Jan
> > > > 27 23:47:50 2009 -0200 +++
> > > > b/linux/drivers/media/common/tuners/tuner-simple.c	Tue Apr
> > > > 21 09:44:38 2009 +1000 @@ -116,6 +116,7 @@ u32 frequency;
> > > >  	u32 bandwidth;
> > > > +	signed int gain;
> > > >  };
> > > >  
> > > >  /*
> > > > ----------------------------------------------------------------------
> > > > */ @@ -495,15 +507,57 @@ "(should be 4)\n", rc);
> > > >  		break;
> > > >  	}
> > > > +	case TUNER_PHILIPS_FM1216ME_MK3:
> > > > +	{
> > > > +		buffer[2] = 0xDE; /* T2 = 0, T1 = 1 and T0 = 1 */
> > > > +		switch (priv->gain) {
> > > > +		case 0:
> > > > +			/* TOP = External AGC, ATC = OFF */
> > > > +			buffer[3] = 0x60;
> > > > +			break;
> > > > +		case 1:
> > > > +			/* TOP = 118 dB, ATC = OFF */
> > > > +			buffer[3] = 0x00;
> > > > +			break;
> > > > +		case 2:
> > > > +			/* TOP = 115 dB, ATC = OFF */
> > > > +			buffer[3] = 0x10;
> > > > +			break;
> > > > +		case 3:
> > > > +			/* TOP = 112 dB, ATC = OFF */
> > > > +			buffer[3] = 0x20;
> > > > +			break;
> > > > +		case 4:
> > > > +			/* TOP = 109 dB, ATC = OFF */
> > > > +			buffer[3] = 0x30;
> > > > +			break;
> > > > +		case 5:
> > > > +			/* TOP = 106 dB, ATC = OFF */
> > > > +			buffer[3] = 0x40;
> > > > +			break;
> > > > +		case 6:
> > > > +			/* TOP = 103 dB, ATC = OFF */
> > > > +			buffer[3] = 0x50;
> > > > +			break;
> > > > +		default:
> > > > +			/* TOP = 112 dB, ATC = OFF */
> > > > +			buffer[3] = 0x20;
> > > > +			break;
> > > > +		}
> > > > +
> > > > +		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);
> > > > +
> > > > +		break;
> > > >  	}
> > > > -
> > > > +	}
> > > >  	return 0;
> > > >  }
> > > >  
> > > > diff -r 43dbc8ebb5a2
> > > > linux/drivers/media/video/saa7134/saa7134-cards.c ---
> > > > a/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Jan
> > > > 27 23:47:50 2009 -0200 +++
> > > > b/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Apr
> > > > 21 09:44:38 2009 +1000 @@ -6506,6 +6806,20 @@ saa_call_all(dev,
> > > > tuner, s_config, &tea5767_cfg); break; }
> > > > +	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
> > > > +	{
> > > > +		struct v4l2_queryctrl *ctl;
> > > > +		struct saa7134_fh *fh;
> > > > +		struct file *fl;
> > > > +
> > > > +		ctl->id = V4L2_CID_GAIN;
> > > > +		if (saa7134_queryctrl(fl, fh, ctl) == 0)
> > > > {                /* BUG here */
> > > > +			/* enable this control */
> > > > +			ctl->flags &= ~(V4L2_CTRL_FLAG_DISABLED);
> > > > +		}
> > > > +	}
> > > >  	} /* switch() */
> > > >  
> > > >  	saa7134_tuner_setup(dev);
> > > > diff -r 43dbc8ebb5a2
> > > > linux/drivers/media/video/saa7134/saa7134-video.c ---
> > > > a/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Jan
> > > > 27 23:47:50 2009 -0200 +++
> > > > b/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Apr
> > > > 21 09:44:38 2009 +1000 @@ -417,6 +417,15 @@ .step          =
> > > > 1, .default_value = 0, .type          = V4L2_CTRL_TYPE_INTEGER,
> > > > +	}, {
> > > > +		.id 		= V4L2_CID_GAIN,
> > > > +		.name 		= "Gain",
> > > > +		.minimum 	= 0,
> > > > +		.maximum 	= 6,
> > > > +		.step 		= 1,
> > > > +		.default_value 	= 3,
> > > > +		.type 		= V4L2_CTRL_TYPE_INTEGER,
> > > > +		.flags 		= V4L2_CTRL_FLAG_DISABLED,
> > > >  	},{
> > > >  		.id            = V4L2_CID_HFLIP,
> > > >  		.name          = "Mirror",
> > > > @@ -1129,6 +1138,9 @@
> > > >  	case V4L2_CID_HUE:
> > > >  		c->value = dev->ctl_hue;
> > > >  		break;
> > > > +	case V4L2_CID_GAIN:
> > > > +		c->value = dev->ctl_gain;
> > > > +		break;
> > > >  	case V4L2_CID_CONTRAST:
> > > >  		c->value = dev->ctl_contrast;
> > > >  		break;
> > > > @@ -1214,6 +1226,10 @@
> > > >  	case V4L2_CID_HUE:
> > > >  		dev->ctl_hue = c->value;
> > > >  		saa_writeb(SAA7134_DEC_CHROMA_HUE, dev->ctl_hue);
> > > > +		break;
> > > > +	case V4L2_CID_GAIN:
> > > > +		dev->ctl_gain = c->value;
> > > > +
> > > >  		break;
> > > >  	case V4L2_CID_CONTRAST:
> > > >  		dev->ctl_contrast = c->value;
> > > > @@ -2502,6 +2518,7 @@
> > > >  	dev->ctl_bright     =
> > > > ctrl_by_id(V4L2_CID_BRIGHTNESS)->default_value; dev->ctl_contrast
> > > > = ctrl_by_id(V4L2_CID_CONTRAST)->default_value; dev->ctl_hue
> > > > = ctrl_by_id(V4L2_CID_HUE)->default_value;
> > > > +	dev->ctl_gain       =
> > > > ctrl_by_id(V4L2_CID_GAIN)->default_value; dev->ctl_saturation =
> > > > ctrl_by_id(V4L2_CID_SATURATION)->default_value; dev->ctl_volume
> > > > = ctrl_by_id(V4L2_CID_AUDIO_VOLUME)->default_value;
> > > > dev->ctl_mute       = 1; //
> > > > ctrl_by_id(V4L2_CID_AUDIO_MUTE)->default_value; diff -r
> > > > 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134.h ---
> > > > a/linux/drivers/media/video/saa7134/saa7134.h	Tue Jan 27
> > > > 23:47:50 2009 -0200 +++
> > > > b/linux/drivers/media/video/saa7134/saa7134.h	Tue Apr 21
> > > > 09:44:38 2009 +1000 @@ -548,6 +558,7 @@ int
> > > > ctl_bright; int                        ctl_contrast;
> > > > int                        ctl_hue;
> > > > +	int                        ctl_gain;             /* gain */
> > > >  	int                        ctl_saturation;
> > > >  	int                        ctl_freq;
> > > >  	int                        ctl_mute;             /* audio
> > > > */
> > > > 
> > > > 
> > > > With my best regards, Dmitry.
> > > > 
> > > > > Cheers,
> > > > > Hermann
> > > > > 
> > > > > > With my best regards, Dmitry.
> > > > > > 
> > > > > > > 
> > > > > > > Cheers,
> > > > > > > Mauro.
> > > > > > > 
> > > > > > > > 
> > > > > > > > diff -r b40d628f830d
> > > > > > > > linux/drivers/media/common/tuners/tuner-types.c ---
> > > > > > > > a/linux/drivers/media/common/tuners/tuner-types.c	Fri
> > > > > > > > Apr 24 01:46:41 2009 -0300 +++
> > > > > > > > b/linux/drivers/media/common/tuners/tuner-types.c	Tue
> > > > > > > > Apr 28 03:35:42 2009 +1000 @@ -558,8 +558,8 @@ static struct
> > > > > > > > tuner_range tuner_fm1216me_mk3_pal_ranges[] = { { 16 *
> > > > > > > > 158.00 /*MHz*/, 0x8e, 0x01, },
> > > > > > > > -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> > > > > > > > -	{ 16 * 999.99        , 0x8e, 0x04, },
> > > > > > > > +	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
> > > > > > > > +	{ 16 * 864.00        , 0x8e, 0x04, },
> > > > > > > >  };
> > > > > > > >  
> > > > > > > >  static struct tuner_params tuner_fm1216me_mk3_params[] = {
> > > > > > > > 
> > > > > > > > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
> > > > > > > > <d.belimov@gmail.com>
> > > > > > > > 
> > > > > > > > 
> > > > > > > > With my best regards, Dmitry.
> > > > > > > > 
> > > > > > > > > Hi Dmitri,
> > > > > > > > > 
> > > > > > > > > Thank you for you responses.
> > > > > > > > > 
> > > > > > > > > Just a few more comments...
> > > > > > > > > 
> > > > > > > > > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > > > > > > > > > Hi Andy
> > > > > > > > > > 
> > > > > > > > > > > Dmitri,
> > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov
> > > > > > > > > > > wrote:
> > > > > > > > > > > > Hi All
> > > > > > > > > > > > 
> > > > > > > > > > > > 1. Change middle band. In the end of the middle
> > > > > > > > > > > > band the sensitivity of receiver not good. If we
> > > > > > > > > > > > switch to higher band, sensitivity more better.
> > > > > > > > > > > > Hardware trick.
> > > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > > Several years a go your customers write some messages
> > > > > > > > > > about bad quality of TV if frequency of TV is the end
> > > > > > > > > > of band. It can be low band or middle. Our hardware
> > > > > > > > > > engeneer make some tests with hardware TV generator and
> > > > > > > > > > our TV tuners.
> > > > > > > > > > 
> > > > > > > > > > If we set default frequency range for low and middle
> > > > > > > > > > band, quality of TV signal on 159MHz and 442 MHz is
> > > > > > > > > > bad. When we make our changes with moving end of bands
> > > > > > > > > > the quality of TV much better. And our system
> > > > > > > > > > programmer for OS Windows use changed bands for
> > > > > > > > > > drivers. Customers be happy.
> > > > > > > > > 
> > > > > > > > > OK.  A properly run experiment wins over theory every
> > > > > > > > > time. :)
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > > You can test it if in your placement available TV
> > > > > > > > > > programm on 159MHz or 442MHz. This trick can be usefull
> > > > > > > > > > for other tuners.
> > > > > > > > > 
> > > > > > > > > If you look at tveeprom.c, a number of other tuners are
> > > > > > > > > using that tuner definition:
> > > > > > > > > 
> > > > > > > > > $ grep FM1216ME_MK3 tveeprom.c
> > > > > > > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips
> > > > > > > > > FQ1216ME MK3"}, { TUNER_PHILIPS_FM1216ME_MK3,
> > > > > > > > > 	"Philips FM1216 ME MK3"},
> > > > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> > > > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> > > > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> > > > > > > > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05
> > > > > > > > > 2"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> > > > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME
> > > > > > > > > MK5"},
> > > > > > > > > 
> > > > > > > > > If your change makes things bad for the other tuners,
> > > > > > > > > we'll probably have to create an alternate entry for the
> > > > > > > > > other tuners instead of using the FM1216ME_MK3
> > > > > > > > > defintion.  I suspect most of them are clones of the
> > > > > > > > > FM1216ME MK3 however, so it probably won't matter.
> > > > > > > > > 
> > > > > > > > > > > > 3. Set charge pump bit
> > > > > > > > > > > 
> > > > > > > > > > > This will improve the time to initially tune to a
> > > > > > > > > > > frequency, but will likely add some noise as the PLL
> > > > > > > > > > > continues to maintain lock on the signal.  If there
> > > > > > > > > > > is no way to turn off the CP after the lock bit is
> > > > > > > > > > > set in the tuner, it's probably better to leave it
> > > > > > > > > > > off for lower noise and just live with slower tuning.
> > > > > > > > > > 
> > > > > > > > > > We discuss with our windows system programmer about it.
> > > > > > > > > > He sad that in analog TV mode noise from PLL don't give
> > > > > > > > > > any problem.
> > > > > > > > > 
> > > > > > > > > I would be concerned about phase noise affecting the
> > > > > > > > > colors or any FM sound carriers.  If the noise isn't
> > > > > > > > > noticably affecting colors to the human eye (do color
> > > > > > > > > bars look OK?), or sound to the human ear, then OK.
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > >  But in digital TV mode
> > > > > > > > > > noise from PLL decreased BER.
> > > > > > > > > 
> > > > > > > > > I thought the FM1216ME MK3 was an analog only tuner.  I
> > > > > > > > > guess I don't know DVB-T or cable in Europe well enough.
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > > > Leaving the CP bit set should be especially noticable
> > > > > > > > > > > ad FM noise when set to tune to FM radio stations.
> > > > > > > > > > > From the FM1236ME_MK3 datasheet: "It is recommended
> > > > > > > > > > > to set CP=0 in the FM mode at all times." But the VHF
> > > > > > > > > > > low band control byte is also used when setting FM
> > > > > > > > > > > radio (AFAICT with a quick look at the code.)
> > > > > > > > > > 
> > > > > > > > > > Yes. You are right. We can swith CP off in FM mode.
> > > > > > > > > 
> > > > > > > > > OK.  Thank you.
> > > > > > > > > 
> > > > > > > > > > With my best regards, Dmitry.
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > Regards,
> > > > > > > > > Andy
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > Cheers,
> > > > > > > Mauro
> > > > > 
> > > > > 
> > > 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-05-07  3:03                       ` Andy Walls
  2009-05-06 23:05                         ` Dmitri Belimov
@ 2009-05-08  0:08                         ` hermann pitton
  2009-05-09  2:01                           ` Andy Walls
  1 sibling, 1 reply; 42+ messages in thread
From: hermann pitton @ 2009-05-08  0:08 UTC (permalink / raw)
  To: Andy Walls
  Cc: Dmitri Belimov, Mauro Carvalho Chehab, video4linux-list, linux-media


Am Mittwoch, den 06.05.2009, 23:03 -0400 schrieb Andy Walls:
> On Thu, 2009-05-07 at 02:01 +0200, hermann pitton wrote:
> > Hi,
> > 
> > Am Mittwoch, den 06.05.2009, 04:42 +1000 schrieb Dmitri Belimov:
> > > Hi Hermann
> > > 
> > > > Hi Dmitry,
> > > > 
> > > > Am Mittwoch, den 29.04.2009, 20:12 +1000 schrieb Dmitri Belimov:
> > > > > Hi,
> > > > >  
> > > > > > Am Dienstag, den 28.04.2009, 19:59 +1000 schrieb Dmitri Belimov:
> > > > > > > On Tue, 28 Apr 2009 15:18:32 -0300
> > > > > > > Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
> > > > > > > 
> > > > > > > > On Mon, 27 Apr 2009 19:29:05 +1000
> > > > > > > > Dmitri Belimov <d.belimov@gmail.com> wrote:
> > > > > > > > 
> > > > > > > > > Hi All
> > > > > > > > > 
> > > > > > > > > Step by step.
> > > > > > > > > 
> > > > > > > > > This is patch for change only range of FM1216ME_MK3. Slow
> > > > > > > > > tunning is not a big problem.
> > > > > > > > 
> > > > > > > > Dmitri,
> > > > > > > > 
> > > > > > > > I'll mark those patches as RFC at patchwork until the end of
> > > > > > > > those discussions. After that, please send it again into a
> > > > > > > > new thread.
> > > > > > > 
> > > > > > > You mark patch with TOP AGC not this.
> > > > > > > 
> > > > > > > I think need discuss about FM1216ME_MK3 because I'll have a big
> > > > > > > patch for support control TOP AGC (sensitivity) of this tuner.
> > > > > > > It can be bad for compatible tuners.
> > > > > > 
> > > > > > hmm, in Europe, that TOP AGC did not ever made much difference
> > > > > > and it is an insmod option since ever.
> > 
> > >From the tda9887_3 datasheet.
> > 
> > 8.2  Tuner AGC and VIF-AGC
> > 
> > This block adapts the voltages, generated at the VIF-AGC
> > and SIF-AGC detectors, to the internal signal processing
> > at the VIF and SIF amplifiers and performs the tuner AGC
> > control current generation. The onset of the tuner AGC
> > control current generation can be set either via the I2C-bus
> > (see Table 13) or optionally by a potentiometer at pin TOP
> > (in case that the I2C-bus information cannot be stored).
> > The presence of a potentiometer is automatically detected
> > and the I2C-bus setting is disabled.
> > 
> > Reads for me that on some tuners, like NTSC only, the tuner AGC is fix.
> > 
> > To change it per channel is not needed at all.
> 
> I've started looking at the photographs of the tuner that Hermann sent.
> Looking at the TDA9887 v4 datasheet, I can see how the TOP related pins
> are (not) wired to the 1st stage oscillator/mixer chip.
> 
> Pin 9 (TOP) is supposed to either be tied to ground through a resistor
> or left open.  This design has the pin connected to a white SMT
> capacitor(?) which I will assume the TDA9887 will see as an open
> circuit.  This means the TOP in the TDA9887 should be programmable via
> I2C.
> 
> Pin 14 (TAGC) looks like it is unconnected.  This means the TDA9887 TAGC
> output is not actively taking over gain control of the 1st stage RF
> mixer/oscialltor chip.
> 
> 
> So this answers a question I had posed to Dmitry: Is this tuner wired up
> so the TDA9887 can adjust the gain of the 1st stage?  That answer is no.
> 
> 
> That means, that in this tuner, the AGC's in the two chips are operating
> independently and need their TOP's set in a coordinated manner that
> takes into account the IF filter losses and the modulation.  Since the
> FM1216ME data sheet makes recommendations for TOP values for both chips:
> 
> 
> RF mixer/osc chip:
>   109 dBμV Recommended for negative modulation
>   106 dBμV Recommended for positive modulation
> 
>   It is recommended to set the TOP at 109 dBμV for PAL B/G, D/K, I 
>   For system L/L’, it is recommended to set the TOP at 106 dBμV.
>   For FM radio, it is also recommended to set the TOP to 109 dBμV
> 
> IF demod chip:
>   C4-C0 = 10000 [0 dB, 17 mV (RMS) according to the TDA9887 datasheet]
>     for all FM modes and B/G D/K I L and L' systems
> 
> 
> it is probably best to use those.  I can try and look at the IF filter
> from the picutres Hermann sent, but I'm not sure I'd be able to figure
> out the loss and come up with better TOP setting recommendations than
> the manufacturer's datasheet.
> 
> 
> > > > > > 
> > > > > > I can't tell for Sibiria and initially that tuner had no SECAM-DK
> > > > > > support officially at all. There are no good/much_better tuners
> > > > > > for FTA at all and never have been ;)
> > > > > > 
> > > > > > Some examples, user success reports, to make it more easily to
> > > > > > understand? I think it can only change some _very little_ under
> > > > > > already worst conditions.
> > > > > 
> > > > > This is my idea for RFC about TOP AGC:
> > > > 
> > > > what about to create a new FM1216ME MK3 tuner type for testing?
> > > 
> > > Yes. Can you do it?
> > > 
> > > I start add MK5 tuner.
> > 
> > Yes, if really needed, but I see no hint anywhere that it should be
> > useful to have TOP settings per channel for user applications and will
> > stay away from it.
> 
> 
> Right now, I don't think the tuner-simple.c code adjusts the TOP value
> based on the video system or FM mode.  It probably should.
> 
> I don't think a user control will be very useful.
> 
> 
> > For the change of UHF start I don't see any problem.
> 
> If you're talking about the frequency for the bandswitch, I don't see a
> problem either in general.  It may cause a problem for clones of the
> FM1216ME MK3 that don't have the same filter performance near the
> cutover, but use the same tuner defintion as the FM1216ME MK3 in
> tuner-types.c.
> 
> It may be best to point any clones to a new entry that looks like the
> current FM1216ME MK3 entry unmodified.

Andy, thanks a lot for participating in such stuff and I think your
diagnosis is right.

Just a small question in between, already late here and not trying to
cover the whole scope.

What ever should be the effect of Dmitri's trick one, changing beginning
of UHF a little. We did that for midband and there was real broadcast
and it improved one single channel there indeed.

But here, it is plain theory. I honor the lab results they have, no
problem anyway, but to change something for not at all existing
broadcast does exactly nothing, except for awaiting it in the future.

No problem with that change, but do I miss something?

Also, after hundreds of "new" tuners did appear, in the beginning not
even known from where, I suggested to not allow a new tuner entry for
all of them, only duplicate code, until they really need it and show off
their difference.

I would like to keep it especially for this one the same. ;)

Such subsumed under it have done nothing for Linux so far and have to
face their faith :) And show off, if _not_ compatible.

And not the other way round.

Dmitri, if we are talking about the same tuner and filters, we should
try to get Secam D/K improvements into the original tuner entry.

That NTSC hack stuff might go elsewhere I guess.

Cheers,
Hermann

> Regards,
> Andy
> 
> > SECAM_DK is never mentioned explicitly in the old datasheet we have at
> > ivtvdriver.org. Maybe we miss something here, but you try to change over
> > the full range and simply 109 dB is recommended for negative
> > demodulation. (page 13 for recommended TOP settings)
> > http://dl.ivtvdriver.org/datasheets/tuners
> > 
> > Maybe we are really talking about different tuner versions/revisions.
> > 
> > Can you have a look at the tuner pictures I did send?
> > 
> > > > It is for sure maybe the best tuner around and likely is also the best
> > > > for tweaks in countries with huge lands to cover, not restricted to
> > > > Russia, Australia or Canada.
> > > 
> > > All our tuners tested with all standarts SECAM, PAL, NTSC because
> > > big country, some people want receive TV from Korea and Japan.
> > > For tests, our hardware engineer has hardware TV generator.
> > 
> > That confuses me a lot :)
> > 
> > You mean you test that tuner with its PAL/SECAM SAW filters on NTSC_KR
> > and NTSC_JP ?
> > 
> > > With my best regards, Dmitry.
> > > 
> > > > I would like to have also Hans' opinion on it, since he did some final
> > > > steps to get them right.
> > > > 
> > 
> > Andy might have a look too. Please wait a little for more opinions.
> > 
> > Cheers,
> > Hermann
> > 
> > > > 
> > > > > 1. Add gain variable to tuner structure.
> > > > > 2. Add V4L2_CID_GAIN control to saa7134 and disable this control.
> > > > > 3. Add workaround to simple_post_tune function for write
> > > > > sensitivity level to the tuner. 4. Enable V4L2_CID_GAIN control
> > > > > when module load if card is right.
> > > > > 
> > > > > My expirience not so good, step 4 segfault the kernel. How to we
> > > > > can make it?
> > > > > 
> > > > > Our windows end-user programm control the sensitivity of each TV
> > > > > channel and change when channel changed.
> > > > > 
> > > > > What you think about it??
> > > > > 
> > > > > If TV card is not touch V4L2_CTRL_FLAG_DISABLED in this control.
> > > > > The programm can't change AGC TOP. And write default value to AGC
> > > > > TOP like now.
> > > > > 
> > > > > diff -r 43dbc8ebb5a2
> > > > > linux/drivers/media/common/tuners/tuner-simple.c ---
> > > > > a/linux/drivers/media/common/tuners/tuner-simple.c	Tue Jan
> > > > > 27 23:47:50 2009 -0200 +++
> > > > > b/linux/drivers/media/common/tuners/tuner-simple.c	Tue Apr
> > > > > 21 09:44:38 2009 +1000 @@ -116,6 +116,7 @@ u32 frequency;
> > > > >  	u32 bandwidth;
> > > > > +	signed int gain;
> > > > >  };
> > > > >  
> > > > >  /*
> > > > > ----------------------------------------------------------------------
> > > > > */ @@ -495,15 +507,57 @@ "(should be 4)\n", rc);
> > > > >  		break;
> > > > >  	}
> > > > > +	case TUNER_PHILIPS_FM1216ME_MK3:
> > > > > +	{
> > > > > +		buffer[2] = 0xDE; /* T2 = 0, T1 = 1 and T0 = 1 */
> > > > > +		switch (priv->gain) {
> > > > > +		case 0:
> > > > > +			/* TOP = External AGC, ATC = OFF */
> > > > > +			buffer[3] = 0x60;
> > > > > +			break;
> > > > > +		case 1:
> > > > > +			/* TOP = 118 dB, ATC = OFF */
> > > > > +			buffer[3] = 0x00;
> > > > > +			break;
> > > > > +		case 2:
> > > > > +			/* TOP = 115 dB, ATC = OFF */
> > > > > +			buffer[3] = 0x10;
> > > > > +			break;
> > > > > +		case 3:
> > > > > +			/* TOP = 112 dB, ATC = OFF */
> > > > > +			buffer[3] = 0x20;
> > > > > +			break;
> > > > > +		case 4:
> > > > > +			/* TOP = 109 dB, ATC = OFF */
> > > > > +			buffer[3] = 0x30;
> > > > > +			break;
> > > > > +		case 5:
> > > > > +			/* TOP = 106 dB, ATC = OFF */
> > > > > +			buffer[3] = 0x40;
> > > > > +			break;
> > > > > +		case 6:
> > > > > +			/* TOP = 103 dB, ATC = OFF */
> > > > > +			buffer[3] = 0x50;
> > > > > +			break;
> > > > > +		default:
> > > > > +			/* TOP = 112 dB, ATC = OFF */
> > > > > +			buffer[3] = 0x20;
> > > > > +			break;
> > > > > +		}
> > > > > +
> > > > > +		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);
> > > > > +
> > > > > +		break;
> > > > >  	}
> > > > > -
> > > > > +	}
> > > > >  	return 0;
> > > > >  }
> > > > >  
> > > > > diff -r 43dbc8ebb5a2
> > > > > linux/drivers/media/video/saa7134/saa7134-cards.c ---
> > > > > a/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Jan
> > > > > 27 23:47:50 2009 -0200 +++
> > > > > b/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Apr
> > > > > 21 09:44:38 2009 +1000 @@ -6506,6 +6806,20 @@ saa_call_all(dev,
> > > > > tuner, s_config, &tea5767_cfg); break; }
> > > > > +	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
> > > > > +	{
> > > > > +		struct v4l2_queryctrl *ctl;
> > > > > +		struct saa7134_fh *fh;
> > > > > +		struct file *fl;
> > > > > +
> > > > > +		ctl->id = V4L2_CID_GAIN;
> > > > > +		if (saa7134_queryctrl(fl, fh, ctl) == 0)
> > > > > {                /* BUG here */
> > > > > +			/* enable this control */
> > > > > +			ctl->flags &= ~(V4L2_CTRL_FLAG_DISABLED);
> > > > > +		}
> > > > > +	}
> > > > >  	} /* switch() */
> > > > >  
> > > > >  	saa7134_tuner_setup(dev);
> > > > > diff -r 43dbc8ebb5a2
> > > > > linux/drivers/media/video/saa7134/saa7134-video.c ---
> > > > > a/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Jan
> > > > > 27 23:47:50 2009 -0200 +++
> > > > > b/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Apr
> > > > > 21 09:44:38 2009 +1000 @@ -417,6 +417,15 @@ .step          =
> > > > > 1, .default_value = 0, .type          = V4L2_CTRL_TYPE_INTEGER,
> > > > > +	}, {
> > > > > +		.id 		= V4L2_CID_GAIN,
> > > > > +		.name 		= "Gain",
> > > > > +		.minimum 	= 0,
> > > > > +		.maximum 	= 6,
> > > > > +		.step 		= 1,
> > > > > +		.default_value 	= 3,
> > > > > +		.type 		= V4L2_CTRL_TYPE_INTEGER,
> > > > > +		.flags 		= V4L2_CTRL_FLAG_DISABLED,
> > > > >  	},{
> > > > >  		.id            = V4L2_CID_HFLIP,
> > > > >  		.name          = "Mirror",
> > > > > @@ -1129,6 +1138,9 @@
> > > > >  	case V4L2_CID_HUE:
> > > > >  		c->value = dev->ctl_hue;
> > > > >  		break;
> > > > > +	case V4L2_CID_GAIN:
> > > > > +		c->value = dev->ctl_gain;
> > > > > +		break;
> > > > >  	case V4L2_CID_CONTRAST:
> > > > >  		c->value = dev->ctl_contrast;
> > > > >  		break;
> > > > > @@ -1214,6 +1226,10 @@
> > > > >  	case V4L2_CID_HUE:
> > > > >  		dev->ctl_hue = c->value;
> > > > >  		saa_writeb(SAA7134_DEC_CHROMA_HUE, dev->ctl_hue);
> > > > > +		break;
> > > > > +	case V4L2_CID_GAIN:
> > > > > +		dev->ctl_gain = c->value;
> > > > > +
> > > > >  		break;
> > > > >  	case V4L2_CID_CONTRAST:
> > > > >  		dev->ctl_contrast = c->value;
> > > > > @@ -2502,6 +2518,7 @@
> > > > >  	dev->ctl_bright     =
> > > > > ctrl_by_id(V4L2_CID_BRIGHTNESS)->default_value; dev->ctl_contrast
> > > > > = ctrl_by_id(V4L2_CID_CONTRAST)->default_value; dev->ctl_hue
> > > > > = ctrl_by_id(V4L2_CID_HUE)->default_value;
> > > > > +	dev->ctl_gain       =
> > > > > ctrl_by_id(V4L2_CID_GAIN)->default_value; dev->ctl_saturation =
> > > > > ctrl_by_id(V4L2_CID_SATURATION)->default_value; dev->ctl_volume
> > > > > = ctrl_by_id(V4L2_CID_AUDIO_VOLUME)->default_value;
> > > > > dev->ctl_mute       = 1; //
> > > > > ctrl_by_id(V4L2_CID_AUDIO_MUTE)->default_value; diff -r
> > > > > 43dbc8ebb5a2 linux/drivers/media/video/saa7134/saa7134.h ---
> > > > > a/linux/drivers/media/video/saa7134/saa7134.h	Tue Jan 27
> > > > > 23:47:50 2009 -0200 +++
> > > > > b/linux/drivers/media/video/saa7134/saa7134.h	Tue Apr 21
> > > > > 09:44:38 2009 +1000 @@ -548,6 +558,7 @@ int
> > > > > ctl_bright; int                        ctl_contrast;
> > > > > int                        ctl_hue;
> > > > > +	int                        ctl_gain;             /* gain */
> > > > >  	int                        ctl_saturation;
> > > > >  	int                        ctl_freq;
> > > > >  	int                        ctl_mute;             /* audio
> > > > > */
> > > > > 
> > > > > 
> > > > > With my best regards, Dmitry.
> > > > > 
> > > > > > Cheers,
> > > > > > Hermann
> > > > > > 
> > > > > > > With my best regards, Dmitry.
> > > > > > > 
> > > > > > > > 
> > > > > > > > Cheers,
> > > > > > > > Mauro.
> > > > > > > > 
> > > > > > > > > 
> > > > > > > > > diff -r b40d628f830d
> > > > > > > > > linux/drivers/media/common/tuners/tuner-types.c ---
> > > > > > > > > a/linux/drivers/media/common/tuners/tuner-types.c	Fri
> > > > > > > > > Apr 24 01:46:41 2009 -0300 +++
> > > > > > > > > b/linux/drivers/media/common/tuners/tuner-types.c	Tue
> > > > > > > > > Apr 28 03:35:42 2009 +1000 @@ -558,8 +558,8 @@ static struct
> > > > > > > > > tuner_range tuner_fm1216me_mk3_pal_ranges[] = { { 16 *
> > > > > > > > > 158.00 /*MHz*/, 0x8e, 0x01, },
> > > > > > > > > -	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
> > > > > > > > > -	{ 16 * 999.99        , 0x8e, 0x04, },
> > > > > > > > > +	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
> > > > > > > > > +	{ 16 * 864.00        , 0x8e, 0x04, },
> > > > > > > > >  };
> > > > > > > > >  
> > > > > > > > >  static struct tuner_params tuner_fm1216me_mk3_params[] = {
> > > > > > > > > 
> > > > > > > > > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
> > > > > > > > > <d.belimov@gmail.com>
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > With my best regards, Dmitry.
> > > > > > > > > 
> > > > > > > > > > Hi Dmitri,
> > > > > > > > > > 
> > > > > > > > > > Thank you for you responses.
> > > > > > > > > > 
> > > > > > > > > > Just a few more comments...
> > > > > > > > > > 
> > > > > > > > > > On Thu, 2009-04-23 at 20:36 +1000, Dmitri Belimov wrote:
> > > > > > > > > > > Hi Andy
> > > > > > > > > > > 
> > > > > > > > > > > > Dmitri,
> > > > > > > > > > > > 
> > > > > > > > > > > > 
> > > > > > > > > > > > On Wed, 2009-04-22 at 17:48 +1000, Dmitri Belimov
> > > > > > > > > > > > wrote:
> > > > > > > > > > > > > Hi All
> > > > > > > > > > > > > 
> > > > > > > > > > > > > 1. Change middle band. In the end of the middle
> > > > > > > > > > > > > band the sensitivity of receiver not good. If we
> > > > > > > > > > > > > switch to higher band, sensitivity more better.
> > > > > > > > > > > > > Hardware trick.
> > > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > > Several years a go your customers write some messages
> > > > > > > > > > > about bad quality of TV if frequency of TV is the end
> > > > > > > > > > > of band. It can be low band or middle. Our hardware
> > > > > > > > > > > engeneer make some tests with hardware TV generator and
> > > > > > > > > > > our TV tuners.
> > > > > > > > > > > 
> > > > > > > > > > > If we set default frequency range for low and middle
> > > > > > > > > > > band, quality of TV signal on 159MHz and 442 MHz is
> > > > > > > > > > > bad. When we make our changes with moving end of bands
> > > > > > > > > > > the quality of TV much better. And our system
> > > > > > > > > > > programmer for OS Windows use changed bands for
> > > > > > > > > > > drivers. Customers be happy.
> > > > > > > > > > 
> > > > > > > > > > OK.  A properly run experiment wins over theory every
> > > > > > > > > > time. :)
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > > You can test it if in your placement available TV
> > > > > > > > > > > programm on 159MHz or 442MHz. This trick can be usefull
> > > > > > > > > > > for other tuners.
> > > > > > > > > > 
> > > > > > > > > > If you look at tveeprom.c, a number of other tuners are
> > > > > > > > > > using that tuner definition:
> > > > > > > > > > 
> > > > > > > > > > $ grep FM1216ME_MK3 tveeprom.c
> > > > > > > > > > 	{ TUNER_PHILIPS_FM1216ME_MK3, 	"Philips
> > > > > > > > > > FQ1216ME MK3"}, { TUNER_PHILIPS_FM1216ME_MK3,
> > > > > > > > > > 	"Philips FM1216 ME MK3"},
> > > > > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S001D MK3"},
> > > > > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"LG S701D MK3"},
> > > > > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FQ1216LME
> > > > > > > > > > MK3"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MFPE05
> > > > > > > > > > 2"}, { TUNER_PHILIPS_FM1216ME_MK3, 	"TCL MPE05-2"},
> > > > > > > > > > { TUNER_PHILIPS_FM1216ME_MK3, 	"Philips FM1216ME
> > > > > > > > > > MK5"},
> > > > > > > > > > 
> > > > > > > > > > If your change makes things bad for the other tuners,
> > > > > > > > > > we'll probably have to create an alternate entry for the
> > > > > > > > > > other tuners instead of using the FM1216ME_MK3
> > > > > > > > > > defintion.  I suspect most of them are clones of the
> > > > > > > > > > FM1216ME MK3 however, so it probably won't matter.
> > > > > > > > > > 
> > > > > > > > > > > > > 3. Set charge pump bit
> > > > > > > > > > > > 
> > > > > > > > > > > > This will improve the time to initially tune to a
> > > > > > > > > > > > frequency, but will likely add some noise as the PLL
> > > > > > > > > > > > continues to maintain lock on the signal.  If there
> > > > > > > > > > > > is no way to turn off the CP after the lock bit is
> > > > > > > > > > > > set in the tuner, it's probably better to leave it
> > > > > > > > > > > > off for lower noise and just live with slower tuning.
> > > > > > > > > > > 
> > > > > > > > > > > We discuss with our windows system programmer about it.
> > > > > > > > > > > He sad that in analog TV mode noise from PLL don't give
> > > > > > > > > > > any problem.
> > > > > > > > > > 
> > > > > > > > > > I would be concerned about phase noise affecting the
> > > > > > > > > > colors or any FM sound carriers.  If the noise isn't
> > > > > > > > > > noticably affecting colors to the human eye (do color
> > > > > > > > > > bars look OK?), or sound to the human ear, then OK.
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > >  But in digital TV mode
> > > > > > > > > > > noise from PLL decreased BER.
> > > > > > > > > > 
> > > > > > > > > > I thought the FM1216ME MK3 was an analog only tuner.  I
> > > > > > > > > > guess I don't know DVB-T or cable in Europe well enough.
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > > > Leaving the CP bit set should be especially noticable
> > > > > > > > > > > > ad FM noise when set to tune to FM radio stations.
> > > > > > > > > > > > From the FM1236ME_MK3 datasheet: "It is recommended
> > > > > > > > > > > > to set CP=0 in the FM mode at all times." But the VHF
> > > > > > > > > > > > low band control byte is also used when setting FM
> > > > > > > > > > > > radio (AFAICT with a quick look at the code.)
> > > > > > > > > > > 
> > > > > > > > > > > Yes. You are right. We can swith CP off in FM mode.
> > > > > > > > > > 
> > > > > > > > > > OK.  Thank you.
> > > > > > > > > > 
> > > > > > > > > > > With my best regards, Dmitry.
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > Regards,
> > > > > > > > > > Andy
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Cheers,
> > > > > > > > Mauro
> > > > > > 
> > > > > > 
> > > > 
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-media" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> 


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-05-08  0:08                         ` hermann pitton
@ 2009-05-09  2:01                           ` Andy Walls
  2009-05-09  2:27                             ` hermann pitton
  0 siblings, 1 reply; 42+ messages in thread
From: Andy Walls @ 2009-05-09  2:01 UTC (permalink / raw)
  To: hermann pitton
  Cc: Dmitri Belimov, Mauro Carvalho Chehab, video4linux-list, linux-media

On Fri, 2009-05-08 at 02:08 +0200, hermann pitton wrote:
> Am Mittwoch, den 06.05.2009, 23:03 -0400 schrieb Andy Walls:

> > > For the change of UHF start I don't see any problem.
> > 
> > If you're talking about the frequency for the bandswitch, I don't see a
> > problem either in general.  It may cause a problem for clones of the
> > FM1216ME MK3 that don't have the same filter performance near the
> > cutover, but use the same tuner defintion as the FM1216ME MK3 in
> > tuner-types.c.
> > 
> > It may be best to point any clones to a new entry that looks like the
> > current FM1216ME MK3 entry unmodified.
> 
> Andy, thanks a lot for participating in such stuff and I think your
> diagnosis is right.
> 
> Just a small question in between, already late here and not trying to
> cover the whole scope.
> 
> What ever should be the effect of Dmitri's trick one, changing beginning
> of UHF a little. We did that for midband and there was real broadcast
> and it improved one single channel there indeed.
> 
> But here, it is plain theory. I honor the lab results they have, no
> problem anyway, but to change something for not at all existing
> broadcast does exactly nothing, except for awaiting it in the future.
> 
> No problem with that change, but do I miss something?

Now that you ask, maybe.

It first depends on whether there is a station at 441 MHz that normally
would have used the VHF-High filter and VCO, but now uses the UHF filter
and VCO.

Channel designations I dug out of ivtv-tune:

S38 439.250 MHz (European cable)
H18 439.250 MHz (SECAM France)
47  440.250 MHz (PAL China)
059 440.250 MHz (PAL Argentina)

come close, but are unaffected by the change from 442 to 441 as the
bandswitch cutover point.  These channels fall right on top of the
cutover, but are not affected by the proposed change in any meaningful
way.  The VHF-High filter and VCO would still be used.  Dmitri's
proposed change is a "don't care" unless the cutover point is changed to
440 MHz. 


Let's pretend that the proposed cutover point is 440 MHz.  The high
frequencies in the channel (~ 447 MHz) may have perhaps been in the
roll-off of the VHF-High preselector filter.  At the edges of filters,
amplitude ripple and especially group delay variation - two aspects of
filters that cause distortion - would have been at their worst,
affecting the high frequencies of the channel (sound and color
sub-carriers).  (I assume PAL is VSB with the carrier towards the low
end, similar to NTSC.)  Now instead, the low frequencies of the channel
(~ 440 MHz) may be in the roll-off of the UHF preselector filter.  Thus
the vestigal sideband and carrier could be affected most by ripple and
group delay variation of the UHF filter.

Either way, a channel at 440 MHz could face distortion by this tuner.
It really depends on the preselector filter design.


I also checked the MID and HIGH band oscillator spec's in the TUA6030
datasheet.  Both of them can cover 440 MHz, but it looks like the MID
band VCO may be preferred since it doesn't drift as badly as the HIGH
band VCO.  Since I don't know the component values used in the loop
filters for the VCO's, I can't do any real analysis to see which VCO
would be better at handling 440 MHz.  I suspect the difference may not
be significant anyway.


> Also, after hundreds of "new" tuners did appear, in the beginning not
> even known from where, I suggested to not allow a new tuner entry for
> all of them, only duplicate code, until they really need it and show off
> their difference.
> 
> I would like to keep it especially for this one the same. ;)

OK.

> Such subsumed under it have done nothing for Linux so far and have to
> face their faith :) And show off, if _not_ compatible.
> 
> And not the other way round.

Wait until people complain? :)

Regards,
Andy

> Dmitri, if we are talking about the same tuner and filters, we should
> try to get Secam D/K improvements into the original tuner entry.
> 
> That NTSC hack stuff might go elsewhere I guess.
> 
> Cheers,
> Hermann



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-05-09  2:01                           ` Andy Walls
@ 2009-05-09  2:27                             ` hermann pitton
  2009-05-10  0:43                               ` hermann pitton
  0 siblings, 1 reply; 42+ messages in thread
From: hermann pitton @ 2009-05-09  2:27 UTC (permalink / raw)
  To: Andy Walls
  Cc: Dmitri Belimov, Mauro Carvalho Chehab, video4linux-list, linux-media


Am Freitag, den 08.05.2009, 22:01 -0400 schrieb Andy Walls:
> On Fri, 2009-05-08 at 02:08 +0200, hermann pitton wrote:
> > Am Mittwoch, den 06.05.2009, 23:03 -0400 schrieb Andy Walls:
> 
> > > > For the change of UHF start I don't see any problem.
> > > 
> > > If you're talking about the frequency for the bandswitch, I don't see a
> > > problem either in general.  It may cause a problem for clones of the
> > > FM1216ME MK3 that don't have the same filter performance near the
> > > cutover, but use the same tuner defintion as the FM1216ME MK3 in
> > > tuner-types.c.
> > > 
> > > It may be best to point any clones to a new entry that looks like the
> > > current FM1216ME MK3 entry unmodified.
> > 
> > Andy, thanks a lot for participating in such stuff and I think your
> > diagnosis is right.
> > 
> > Just a small question in between, already late here and not trying to
> > cover the whole scope.
> > 
> > What ever should be the effect of Dmitri's trick one, changing beginning
> > of UHF a little. We did that for midband and there was real broadcast
> > and it improved one single channel there indeed.
> > 
> > But here, it is plain theory. I honor the lab results they have, no
> > problem anyway, but to change something for not at all existing
> > broadcast does exactly nothing, except for awaiting it in the future.
> > 
> > No problem with that change, but do I miss something?
> 
> Now that you ask, maybe.
> 
> It first depends on whether there is a station at 441 MHz that normally
> would have used the VHF-High filter and VCO, but now uses the UHF filter
> and VCO.
> 
> Channel designations I dug out of ivtv-tune:
> 
> S38 439.250 MHz (European cable)
> H18 439.250 MHz (SECAM France)
> 47  440.250 MHz (PAL China)
> 059 440.250 MHz (PAL Argentina)
> 
> come close, but are unaffected by the change from 442 to 441 as the
> bandswitch cutover point.  These channels fall right on top of the
> cutover, but are not affected by the proposed change in any meaningful
> way.  The VHF-High filter and VCO would still be used.  Dmitri's
> proposed change is a "don't care" unless the cutover point is changed to
> 440 MHz. 
> 
> 
> Let's pretend that the proposed cutover point is 440 MHz.  The high
> frequencies in the channel (~ 447 MHz) may have perhaps been in the
> roll-off of the VHF-High preselector filter.  At the edges of filters,
> amplitude ripple and especially group delay variation - two aspects of
> filters that cause distortion - would have been at their worst,
> affecting the high frequencies of the channel (sound and color
> sub-carriers).  (I assume PAL is VSB with the carrier towards the low
> end, similar to NTSC.)  Now instead, the low frequencies of the channel
> (~ 440 MHz) may be in the roll-off of the UHF preselector filter.  Thus
> the vestigal sideband and carrier could be affected most by ripple and
> group delay variation of the UHF filter.
> 
> Either way, a channel at 440 MHz could face distortion by this tuner.
> It really depends on the preselector filter design.
> 
> 
> I also checked the MID and HIGH band oscillator spec's in the TUA6030
> datasheet.  Both of them can cover 440 MHz, but it looks like the MID
> band VCO may be preferred since it doesn't drift as badly as the HIGH
> band VCO.  Since I don't know the component values used in the loop
> filters for the VCO's, I can't do any real analysis to see which VCO
> would be better at handling 440 MHz.  I suspect the difference may not
> be significant anyway.
> 
> 
> > Also, after hundreds of "new" tuners did appear, in the beginning not
> > even known from where, I suggested to not allow a new tuner entry for
> > all of them, only duplicate code, until they really need it and show off
> > their difference.
> > 
> > I would like to keep it especially for this one the same. ;)
> 
> OK.
> 
> > Such subsumed under it have done nothing for Linux so far and have to
> > face their faith :) And show off, if _not_ compatible.
> > 
> > And not the other way round.
> 
> Wait until people complain? :)

Yes, of course. They had it for free and that is the trap.

Again, don't try to start it the other way round.

I still wait for Dmitri, to show really off what he has.

And, unfortunately, I don't have anything to test on currently :)

Cheers,
Hermann

> 
> Regards,
> Andy
> 
> > Dmitri, if we are talking about the same tuner and filters, we should
> > try to get Secam D/K improvements into the original tuner entry.
> > 
> > That NTSC hack stuff might go elsewhere I guess.
> > 
> > Cheers,
> > Hermann
> 
> 


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-05-10  0:43                               ` hermann pitton
@ 2009-05-09 22:52                                 ` Dmitri Belimov
  2009-05-11  3:35                                   ` hermann pitton
  0 siblings, 1 reply; 42+ messages in thread
From: Dmitri Belimov @ 2009-05-09 22:52 UTC (permalink / raw)
  To: hermann pitton
  Cc: Andy Walls, Mauro Carvalho Chehab, video4linux-list, linux-media

Hi All.

> [snip]
> > > 
> > > Channel designations I dug out of ivtv-tune:
> > > 
> > > S38 439.250 MHz (European cable)
> > > H18 439.250 MHz (SECAM France)
> > > 47  440.250 MHz (PAL China)
> > > 059 440.250 MHz (PAL Argentina)
> > > 
> > > come close, but are unaffected by the change from 442 to 441 as
> > > the bandswitch cutover point.  These channels fall right on top
> > > of the cutover, but are not affected by the proposed change in
> > > any meaningful way.  The VHF-High filter and VCO would still be
> > > used.  Dmitri's proposed change is a "don't care" unless the
> > > cutover point is changed to 440 MHz. 
> > > 
> > > 
> > > Let's pretend that the proposed cutover point is 440 MHz.
> 
> NO! it is not
> 
> Dmitri,
> 
> can you cut one off and tell us what it is all about ?
> 
> Unless you do so, all other is pointless and I likely stop to
> participate in such stuff.

Sorry my delay. I lost subject of discussion. What main question??

1. AGC TOP of RF part - I think need support for MK3
2. Changing to 441MHz is not critical. We can write some information about this case to Wiki or docs.

With my best regards, Dmitry.

> 
> Cheers,
> Hermann
> 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-05-09  2:27                             ` hermann pitton
@ 2009-05-10  0:43                               ` hermann pitton
  2009-05-09 22:52                                 ` Dmitri Belimov
  0 siblings, 1 reply; 42+ messages in thread
From: hermann pitton @ 2009-05-10  0:43 UTC (permalink / raw)
  To: Andy Walls
  Cc: Dmitri Belimov, Mauro Carvalho Chehab, video4linux-list, linux-media

[snip]
> > 
> > Channel designations I dug out of ivtv-tune:
> > 
> > S38 439.250 MHz (European cable)
> > H18 439.250 MHz (SECAM France)
> > 47  440.250 MHz (PAL China)
> > 059 440.250 MHz (PAL Argentina)
> > 
> > come close, but are unaffected by the change from 442 to 441 as the
> > bandswitch cutover point.  These channels fall right on top of the
> > cutover, but are not affected by the proposed change in any meaningful
> > way.  The VHF-High filter and VCO would still be used.  Dmitri's
> > proposed change is a "don't care" unless the cutover point is changed to
> > 440 MHz. 
> > 
> > 
> > Let's pretend that the proposed cutover point is 440 MHz.

NO! it is not

Dmitri,

can you cut one off and tell us what it is all about ?

Unless you do so, all other is pointless and I likely stop to
participate in such stuff.

Cheers,
Hermann






^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-05-09 22:52                                 ` Dmitri Belimov
@ 2009-05-11  3:35                                   ` hermann pitton
  2009-05-11 10:19                                     ` Mauro Carvalho Chehab
                                                       ` (2 more replies)
  0 siblings, 3 replies; 42+ messages in thread
From: hermann pitton @ 2009-05-11  3:35 UTC (permalink / raw)
  To: Dmitri Belimov
  Cc: Andy Walls, Mauro Carvalho Chehab, video4linux-list, linux-media

Dmitri,

Am Sonntag, den 10.05.2009, 08:52 +1000 schrieb Dmitri Belimov:
> Hi All.
> 
> > [snip]
> > > > 
> > > > Channel designations I dug out of ivtv-tune:
> > > > 
> > > > S38 439.250 MHz (European cable)
> > > > H18 439.250 MHz (SECAM France)
> > > > 47  440.250 MHz (PAL China)
> > > > 059 440.250 MHz (PAL Argentina)
> > > > 
> > > > come close, but are unaffected by the change from 442 to 441 as
> > > > the bandswitch cutover point.  These channels fall right on top
> > > > of the cutover, but are not affected by the proposed change in
> > > > any meaningful way.  The VHF-High filter and VCO would still be
> > > > used.  Dmitri's proposed change is a "don't care" unless the
> > > > cutover point is changed to 440 MHz. 
> > > > 
> > > > 
> > > > Let's pretend that the proposed cutover point is 440 MHz.
> > 
> > NO! it is not
> > 
> > Dmitri,
> > 
> > can you cut one off and tell us what it is all about ?
> > 
> > Unless you do so, all other is pointless and I likely stop to
> > participate in such stuff.
> 
> Sorry my delay. I lost subject of discussion. What main question??
> 
> 1. AGC TOP of RF part - I think need support for MK3
> 2. Changing to 441MHz is not critical. We can write some information about this case to Wiki or docs.

for 2.: Discussed to the end if you stay at 441MHz. If you still want to
have it in, just send  a patch and no more info is needed. (Likely Andy
is giving only examples for more difficult cases, sorry.)

for 1.: I would like to be absolutely sure, that we are talking about
the same tuner. I want to have the exact filters on it at least.

3.: That is what Andy noted. Following the Philips datasheet for TOP, it
should be added for negative modulation, positive modulation and FM
accordingly. (2 and 3 are out of discussion)

If you still have some sort of Secam fire and can improve it, we must
know the tuner you are on "exactly". If it is the original Philips,
without any such TOP suggestions over the full range in recent
datasheets (???), I assume you might have them, I would say you can
proceed, if you have shown that you are really still on the same tuner.

Cheers,
Hermann







^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-05-11  3:35                                   ` hermann pitton
@ 2009-05-11 10:19                                     ` Mauro Carvalho Chehab
  2009-05-12 21:21                                       ` Dmitri Belimov
  2009-05-11 10:58                                     ` Dmitri Belimov
       [not found]                                     ` <20090513073757.6177c42e@glory.loctelecom.ru>
  2 siblings, 1 reply; 42+ messages in thread
From: Mauro Carvalho Chehab @ 2009-05-11 10:19 UTC (permalink / raw)
  To: hermann pitton
  Cc: Dmitri Belimov, Andy Walls, Mauro Carvalho Chehab,
	video4linux-list, linux-media


>> 1. AGC TOP of RF part - I think need support for MK3
>> 2. Changing to 441MHz is not critical. We can write some information about this case to Wiki or docs.
> 
> for 2.: Discussed to the end if you stay at 441MHz. If you still want to
> have it in, just send  a patch and no more info is needed. (Likely Andy
> is giving only examples for more difficult cases, sorry.)
> 
> for 1.: I would like to be absolutely sure, that we are talking about
> the same tuner. I want to have the exact filters on it at least.

I 
would 
also 
say 
that, 
if 
we 
need 
to 
implement 
AGC 
TOP 
control, 
it 
would 
be 
better 
to
add 
it 
at 
struct 
v4l2_tuner 
(VIDIOC_G_TUNER 
and 
VIDIOC_S_TUNER), 
instead 
of 
adding 
it
as a 
control.

> 
> 3.: That is what Andy noted. Following the Philips datasheet for TOP, it
> should be added for negative modulation, positive modulation and FM
> accordingly. (2 and 3 are out of discussion)
> 
> If you still have some sort of Secam fire and can improve it, we must
> know the tuner you are on "exactly". If it is the original Philips,
> without any such TOP suggestions over the full range in recent
> datasheets (???), I assume you might have them, I would say you can
> proceed, if you have shown that you are really still on the same tuner.
> 
> Cheers,
> Hermann
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-05-11  3:35                                   ` hermann pitton
  2009-05-11 10:19                                     ` Mauro Carvalho Chehab
@ 2009-05-11 10:58                                     ` Dmitri Belimov
       [not found]                                     ` <20090513073757.6177c42e@glory.loctelecom.ru>
  2 siblings, 0 replies; 42+ messages in thread
From: Dmitri Belimov @ 2009-05-11 10:58 UTC (permalink / raw)
  To: hermann pitton
  Cc: Andy Walls, Mauro Carvalho Chehab, video4linux-list, linux-media

[-- Attachment #1: Type: text/plain, Size: 3131 bytes --]

On Mon, 11 May 2009 05:35:51 +0200
hermann pitton <hermann-pitton@arcor.de> wrote:

> Dmitri,
> 
> Am Sonntag, den 10.05.2009, 08:52 +1000 schrieb Dmitri Belimov:
> > Hi All.
> > 
> > > [snip]
> > > > > 
> > > > > Channel designations I dug out of ivtv-tune:
> > > > > 
> > > > > S38 439.250 MHz (European cable)
> > > > > H18 439.250 MHz (SECAM France)
> > > > > 47  440.250 MHz (PAL China)
> > > > > 059 440.250 MHz (PAL Argentina)
> > > > > 
> > > > > come close, but are unaffected by the change from 442 to 441
> > > > > as the bandswitch cutover point.  These channels fall right
> > > > > on top of the cutover, but are not affected by the proposed
> > > > > change in any meaningful way.  The VHF-High filter and VCO
> > > > > would still be used.  Dmitri's proposed change is a "don't
> > > > > care" unless the cutover point is changed to 440 MHz. 
> > > > > 
> > > > > 
> > > > > Let's pretend that the proposed cutover point is 440 MHz.
> > > 
> > > NO! it is not
> > > 
> > > Dmitri,
> > > 
> > > can you cut one off and tell us what it is all about ?
> > > 
> > > Unless you do so, all other is pointless and I likely stop to
> > > participate in such stuff.
> > 
> > Sorry my delay. I lost subject of discussion. What main question??
> > 
> > 1. AGC TOP of RF part - I think need support for MK3
> > 2. Changing to 441MHz is not critical. We can write some
> > information about this case to Wiki or docs.
> 
> for 2.: Discussed to the end if you stay at 441MHz. If you still want
> to have it in, just send  a patch and no more info is needed. (Likely
> Andy is giving only examples for more difficult cases, sorry.)

This is my patch.

diff -r b40d628f830d linux/drivers/media/common/tuners/tuner-types.c
--- a/linux/drivers/media/common/tuners/tuner-types.c	Fri Apr 24 01:46:41 2009 -0300
+++ b/linux/drivers/media/common/tuners/tuner-types.c	Tue Apr 28 03:35:42 2009 +1000
@@ -558,8 +558,8 @@
 
 static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = {
 	{ 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
-	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
-	{ 16 * 999.99        , 0x8e, 0x04, },
+	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
+	{ 16 * 864.00        , 0x8e, 0x04, },
 };
 
 static struct tuner_params tuner_fm1216me_mk3_params[] = {

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

 
> for 1.: I would like to be absolutely sure, that we are talking about
> the same tuner. I want to have the exact filters on it at least.
>
> 3.: That is what Andy noted. Following the Philips datasheet for TOP,
> it should be added for negative modulation, positive modulation and FM
> accordingly. (2 and 3 are out of discussion)
> 
> If you still have some sort of Secam fire and can improve it, we must
> know the tuner you are on "exactly". If it is the original Philips,
> without any such TOP suggestions over the full range in recent
> datasheets (???), I assume you might have them, I would say you can
> proceed, if you have shown that you are really still on the same
> tuner.

Ok. I read the datasheet, make photos inside tuner.

With my best regards, Dmitry.

> Cheers,
> Hermann
> 
> 
> 
> 
> 
> 

[-- Attachment #2: behold_mk3_range.patch --]
[-- Type: text/x-patch, Size: 663 bytes --]

diff -r b40d628f830d linux/drivers/media/common/tuners/tuner-types.c
--- a/linux/drivers/media/common/tuners/tuner-types.c	Fri Apr 24 01:46:41 2009 -0300
+++ b/linux/drivers/media/common/tuners/tuner-types.c	Tue Apr 28 03:35:42 2009 +1000
@@ -558,8 +558,8 @@
 
 static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = {
 	{ 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
-	{ 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
-	{ 16 * 999.99        , 0x8e, 0x04, },
+	{ 16 * 441.00 /*MHz*/, 0x8e, 0x02, },
+	{ 16 * 864.00        , 0x8e, 0x04, },
 };
 
 static struct tuner_params tuner_fm1216me_mk3_params[] = {

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-05-11 10:19                                     ` Mauro Carvalho Chehab
@ 2009-05-12 21:21                                       ` Dmitri Belimov
  0 siblings, 0 replies; 42+ messages in thread
From: Dmitri Belimov @ 2009-05-12 21:21 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: hermann pitton, Andy Walls, Mauro Carvalho Chehab,
	video4linux-list, linux-media

Hi 

> >> 1. AGC TOP of RF part - I think need support for MK3
> >> 2. Changing to 441MHz is not critical. We can write some
> >> information about this case to Wiki or docs.
> > 
> > for 2.: Discussed to the end if you stay at 441MHz. If you still
> > want to have it in, just send  a patch and no more info is needed.
> > (Likely Andy is giving only examples for more difficult cases,
> > sorry.)
> > 
> > for 1.: I would like to be absolutely sure, that we are talking
> > about the same tuner. I want to have the exact filters on it at
> > least.
> 
> I would also say that, if we need to implement AGC TOP 
> control, it would be better to add it at struct v4l2_tuner 
> (VIDIOC_G_TUNER and VIDIOC_S_TUNER), instead 
> of adding it as a control.

Good idea. 

For MK3 need control AGC TOP and TOP of TDA9887
For MK5 need control only TOP of TDA9887

With my best regards, Dmitry.

> > 
> > 3.: That is what Andy noted. Following the Philips datasheet for
> > TOP, it should be added for negative modulation, positive
> > modulation and FM accordingly. (2 and 3 are out of discussion)
> > 
> > If you still have some sort of Secam fire and can improve it, we
> > must know the tuner you are on "exactly". If it is the original
> > Philips, without any such TOP suggestions over the full range in
> > recent datasheets (???), I assume you might have them, I would say
> > you can proceed, if you have shown that you are really still on the
> > same tuner.
> > 
> > Cheers,
> > Hermann
> > 
> > 
> > 
> > 
> > 
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe
> > linux-media" in the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
       [not found]                                     ` <20090513073757.6177c42e@glory.loctelecom.ru>
@ 2009-05-13 23:44                                       ` hermann pitton
       [not found]                                         ` <20090514101758.04665ab4@glory.loctelecom.ru>
  0 siblings, 1 reply; 42+ messages in thread
From: hermann pitton @ 2009-05-13 23:44 UTC (permalink / raw)
  To: Dmitri Belimov
  Cc: Andy Walls, Mauro Carvalho Chehab, video4linux-list, linux-media

Hi Dmitry,

Am Mittwoch, den 13.05.2009, 07:37 +1000 schrieb Dmitri Belimov:
> Hi hermann
> 
> > Am Sonntag, den 10.05.2009, 08:52 +1000 schrieb Dmitri Belimov:
> > > Hi All.
> > > 
> > > > [snip]
> > > > > > 
> > > > > > Channel designations I dug out of ivtv-tune:
> > > > > > 
> > > > > > S38 439.250 MHz (European cable)
> > > > > > H18 439.250 MHz (SECAM France)
> > > > > > 47  440.250 MHz (PAL China)
> > > > > > 059 440.250 MHz (PAL Argentina)
> > > > > > 
> > > > > > come close, but are unaffected by the change from 442 to 441
> > > > > > as the bandswitch cutover point.  These channels fall right
> > > > > > on top of the cutover, but are not affected by the proposed
> > > > > > change in any meaningful way.  The VHF-High filter and VCO
> > > > > > would still be used.  Dmitri's proposed change is a "don't
> > > > > > care" unless the cutover point is changed to 440 MHz. 
> > > > > > 
> > > > > > 
> > > > > > Let's pretend that the proposed cutover point is 440 MHz.
> > > > 
> > > > NO! it is not
> > > > 
> > > > Dmitri,
> > > > 
> > > > can you cut one off and tell us what it is all about ?
> > > > 
> > > > Unless you do so, all other is pointless and I likely stop to
> > > > participate in such stuff.
> > > 
> > > Sorry my delay. I lost subject of discussion. What main question??
> > > 
> > > 1. AGC TOP of RF part - I think need support for MK3
> > > 2. Changing to 441MHz is not critical. We can write some
> > > information about this case to Wiki or docs.
> > 
> > for 2.: Discussed to the end if you stay at 441MHz. If you still want
> > to have it in, just send  a patch and no more info is needed. (Likely
> > Andy is giving only examples for more difficult cases, sorry.)
> > 
> > for 1.: I would like to be absolutely sure, that we are talking about
> > the same tuner. I want to have the exact filters on it at least.
> > 
> > 3.: That is what Andy noted. Following the Philips datasheet for TOP,
> > it should be added for negative modulation, positive modulation and FM
> > accordingly. (2 and 3 are out of discussion)
> > 
> > If you still have some sort of Secam fire and can improve it, we must
> > know the tuner you are on "exactly". If it is the original Philips,
> > without any such TOP suggestions over the full range in recent
> > datasheets (???), I assume you might have them, I would say you can
> > proceed, if you have shown that you are really still on the same
> > tuner.
> 
> This is real Philips MK3 and MK5 tuner. We have all docs from vendor.
> 
> This is some photos of the MK3 hybrid tuner. I make photos of the analog MK3 little later.
> 

thanks a lot.

I had only a first look on this one.

There are a lot of different revisions, yours is F4 on the tuner PCB.

Taifun PLL versions vary, different combinations of ceramic and SMD
filters are used for the radio IF,

but even on a revision C1 with Taifun 6034T A1 and tuner revision SV21
0437 (CTX918_V2 md7134) all three SAW filters are the same already. 

A CTX925 with your Taifun 6034T B1 had also no better performance for
what I can say. PCB still has C1, but SV21 0502 tuner revision.

Important to know was, that you are on original Philips tuners and SAW
filters are the same. Guess this will hold for the analog FM1216ME/I MK3
too.

Good decision, it are still the best tuners for analog and digital I
have around, but can't talk for Secam D/K. I wonder about missing
complaints during the last four years.

Cheers,
Hermann



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
       [not found]                                         ` <20090514101758.04665ab4@glory.loctelecom.ru>
@ 2009-05-14  1:10                                           ` hermann pitton
  2009-05-22  0:51                                             ` hermann pitton
  0 siblings, 1 reply; 42+ messages in thread
From: hermann pitton @ 2009-05-14  1:10 UTC (permalink / raw)
  To: Dmitri Belimov
  Cc: Andy Walls, Mauro Carvalho Chehab, video4linux-list, linux-media

Hi Dmitry :)

Am Donnerstag, den 14.05.2009, 10:17 +1000 schrieb Dmitri Belimov:
> Hi
> 
> > Hi Dmitry,
> > 
> > Am Mittwoch, den 13.05.2009, 07:37 +1000 schrieb Dmitri Belimov:
> > > Hi hermann
> > > 
> > > > Am Sonntag, den 10.05.2009, 08:52 +1000 schrieb Dmitri Belimov:
> > > > > Hi All.
> > > > > 
> > > > > > [snip]
> > > > > > > > 
> > > > > > > > Channel designations I dug out of ivtv-tune:
> > > > > > > > 
> > > > > > > > S38 439.250 MHz (European cable)
> > > > > > > > H18 439.250 MHz (SECAM France)
> > > > > > > > 47  440.250 MHz (PAL China)
> > > > > > > > 059 440.250 MHz (PAL Argentina)
> > > > > > > > 
> > > > > > > > come close, but are unaffected by the change from 442 to
> > > > > > > > 441 as the bandswitch cutover point.  These channels fall
> > > > > > > > right on top of the cutover, but are not affected by the
> > > > > > > > proposed change in any meaningful way.  The VHF-High
> > > > > > > > filter and VCO would still be used.  Dmitri's proposed
> > > > > > > > change is a "don't care" unless the cutover point is
> > > > > > > > changed to 440 MHz. 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Let's pretend that the proposed cutover point is 440 MHz.
> > > > > > 
> > > > > > NO! it is not
> > > > > > 
> > > > > > Dmitri,
> > > > > > 
> > > > > > can you cut one off and tell us what it is all about ?
> > > > > > 
> > > > > > Unless you do so, all other is pointless and I likely stop to
> > > > > > participate in such stuff.
> > > > > 
> > > > > Sorry my delay. I lost subject of discussion. What main
> > > > > question??
> > > > > 
> > > > > 1. AGC TOP of RF part - I think need support for MK3
> > > > > 2. Changing to 441MHz is not critical. We can write some
> > > > > information about this case to Wiki or docs.
> > > > 
> > > > for 2.: Discussed to the end if you stay at 441MHz. If you still
> > > > want to have it in, just send  a patch and no more info is
> > > > needed. (Likely Andy is giving only examples for more difficult
> > > > cases, sorry.)
> > > > 
> > > > for 1.: I would like to be absolutely sure, that we are talking
> > > > about the same tuner. I want to have the exact filters on it at
> > > > least.
> > > > 
> > > > 3.: That is what Andy noted. Following the Philips datasheet for
> > > > TOP, it should be added for negative modulation, positive
> > > > modulation and FM accordingly. (2 and 3 are out of discussion)
> > > > 
> > > > If you still have some sort of Secam fire and can improve it, we
> > > > must know the tuner you are on "exactly". If it is the original
> > > > Philips, without any such TOP suggestions over the full range in
> > > > recent datasheets (???), I assume you might have them, I would
> > > > say you can proceed, if you have shown that you are really still
> > > > on the same tuner.
> > > 
> > > This is real Philips MK3 and MK5 tuner. We have all docs from
> > > vendor.
> > > 
> > > This is some photos of the MK3 hybrid tuner. I make photos of the
> > > analog MK3 little later.
> > > 
> > 
> > thanks a lot.
> > 
> > I had only a first look on this one.
> > 
> > There are a lot of different revisions, yours is F4 on the tuner PCB.
> > 
> > Taifun PLL versions vary, different combinations of ceramic and SMD
> > filters are used for the radio IF,
> > 
> > but even on a revision C1 with Taifun 6034T A1 and tuner revision SV21
> > 0437 (CTX918_V2 md7134) all three SAW filters are the same already. 
> > 
> > A CTX925 with your Taifun 6034T B1 had also no better performance for
> > what I can say. PCB still has C1, but SV21 0502 tuner revision.
> > 
> > Important to know was, that you are on original Philips tuners and SAW
> > filters are the same. Guess this will hold for the analog FM1216ME/I
> > MK3 too.
> 
> This is photos of analog MK3. Not so good, sorry.
> 
> > Good decision, it are still the best tuners for analog and digital I
> > have around, but can't talk for Secam D/K. I wonder about missing
> > complaints during the last four years.
> 
> Our customers watch TV with params
> saa7134 secam=d alsa=1
> 


That depends on how up to date the app is, once selected, even per
channel, you don't have to do this ever again and don't need any insmod
options at all currently.

I recently tried to keep it for others the same :)

Umm, for the analog only FM1216ME/ I H-3 (MK3) it seems you have some
other stuff on it employed. On a first look ;)

Cheers,
Hermann







^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH] FM1216ME_MK3 some changes
  2009-05-14  1:10                                           ` hermann pitton
@ 2009-05-22  0:51                                             ` hermann pitton
  0 siblings, 0 replies; 42+ messages in thread
From: hermann pitton @ 2009-05-22  0:51 UTC (permalink / raw)
  To: Dmitri Belimov; +Cc: video4linux-list, linux-media, Mauro Carvalho Chehab


Am Donnerstag, den 14.05.2009, 03:10 +0200 schrieb hermann pitton:
> Hi Dmitry :)

[snip]
> 
> That depends on how up to date the app is, once selected, even per
> channel, you don't have to do this ever again and don't need any insmod
> options at all currently.
> 
> I recently tried to keep it for others the same :)
> 
> Umm, for the analog only FM1216ME/ I H-3 (MK3) it seems you have some
> other stuff on it employed. On a first look ;)

Dmitry,

any news on that?

I don't want to hinder you to do improvements, but what about this SAW
filters?

Are they really approved to have a Philips label on the tuner?

The hand/foot ;) painted claimed performance statistics don't look like
that.

Am I wrong?

Cheers,
Hermann



^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2009-05-22  0:54 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-22  7:48 [PATCH] FM1216ME_MK3 some changes Dmitri Belimov
2009-04-23  2:08 ` Andy Walls
2009-04-23  1:52   ` hermann pitton
2009-04-23 10:36   ` Dmitri Belimov
2009-04-24  1:43     ` Andy Walls
2009-04-24  1:06       ` hermann pitton
2009-04-24  1:34         ` hermann pitton
2009-04-26 13:58       ` Dmitri Belimov
2009-04-27  4:45         ` hermann pitton
2009-04-27  9:29       ` Dmitri Belimov
2009-04-28  0:11         ` hermann pitton
2009-04-27 10:42           ` Dmitri Belimov
2009-04-28  0:57             ` hermann pitton
2009-04-28  0:20           ` hermann pitton
2009-04-28 18:18         ` Mauro Carvalho Chehab
2009-04-28  9:59           ` Dmitri Belimov
2009-04-29  3:10             ` hermann pitton
2009-04-29 10:12               ` Dmitri Belimov
2009-04-30  0:15                 ` hermann pitton
2009-05-05 18:42                   ` Dmitri Belimov
2009-05-07  0:01                     ` hermann pitton
2009-05-07  3:03                       ` Andy Walls
2009-05-06 23:05                         ` Dmitri Belimov
2009-05-08  0:08                         ` hermann pitton
2009-05-09  2:01                           ` Andy Walls
2009-05-09  2:27                             ` hermann pitton
2009-05-10  0:43                               ` hermann pitton
2009-05-09 22:52                                 ` Dmitri Belimov
2009-05-11  3:35                                   ` hermann pitton
2009-05-11 10:19                                     ` Mauro Carvalho Chehab
2009-05-12 21:21                                       ` Dmitri Belimov
2009-05-11 10:58                                     ` Dmitri Belimov
     [not found]                                     ` <20090513073757.6177c42e@glory.loctelecom.ru>
2009-05-13 23:44                                       ` hermann pitton
     [not found]                                         ` <20090514101758.04665ab4@glory.loctelecom.ru>
2009-05-14  1:10                                           ` hermann pitton
2009-05-22  0:51                                             ` hermann pitton
2009-04-30  1:14                 ` Andy Walls
2009-05-01  5:18                   ` hermann pitton
2009-05-01 23:55                     ` hermann pitton
2009-05-02  0:52                       ` Andy Walls
2009-05-02  2:05                         ` hermann pitton
2009-05-03  0:29                           ` hermann pitton
2009-05-06 22:58                   ` Dmitri Belimov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.