* [PATCH] TDA9887 PAL-Nc fix @ 2012-04-18 12:22 Gonzalo de la Vega 2012-04-19 23:50 ` Andy Walls 0 siblings, 1 reply; 6+ messages in thread From: Gonzalo de la Vega @ 2012-04-18 12:22 UTC (permalink / raw) To: linux-media The tunner IF for PAL-Nc norm, which AFAIK is used only in Argentina, was being defined as equal to PAL-M but it is not. It actually uses the same video IF as PAL-BG (and unlike PAL-M) but the audio is at 4.5MHz (same as PAL-M). A separate structure member was added for PAL-Nc. Signed-off-by: Gonzalo A. de la Vega <gadelavega@gmail.com> diff --git a/drivers/media/common/tuners/tda9887.c b/drivers/media/common/tuners/tda9887.c index cdb645d..b560b5d 100644 --- a/drivers/media/common/tuners/tda9887.c +++ b/drivers/media/common/tuners/tda9887.c @@ -168,8 +168,8 @@ static struct tvnorm tvnorms[] = { cAudioIF_6_5 | cVideoIF_38_90 ), },{ - .std = V4L2_STD_PAL_M | V4L2_STD_PAL_Nc, - .name = "PAL-M/Nc", + .std = V4L2_STD_PAL_M, + .name = "PAL-M", .b = ( cNegativeFmTV | cQSS ), .c = ( cDeemphasisON | @@ -179,6 +179,17 @@ static struct tvnorm tvnorms[] = { cAudioIF_4_5 | cVideoIF_45_75 ), },{ + .std = V4L2_STD_PAL_Nc, + .name = "PAL-Nc", + .b = ( cNegativeFmTV | + cQSS ), + .c = ( cDeemphasisON | + cDeemphasis75 | + cTopDefault), + .e = ( cGating_36 | + cAudioIF_4_5 | + cVideoIF_38_90 ), + },{ .std = V4L2_STD_SECAM_B | V4L2_STD_SECAM_G | V4L2_STD_SECAM_H, .name = "SECAM-BGH", .b = ( cNegativeFmTV | ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] TDA9887 PAL-Nc fix 2012-04-18 12:22 [PATCH] TDA9887 PAL-Nc fix Gonzalo de la Vega @ 2012-04-19 23:50 ` Andy Walls 2012-04-20 14:01 ` Gonzalo A. de la Vega 0 siblings, 1 reply; 6+ messages in thread From: Andy Walls @ 2012-04-19 23:50 UTC (permalink / raw) To: Gonzalo de la Vega; +Cc: linux-media On Wed, 2012-04-18 at 09:22 -0300, Gonzalo de la Vega wrote: > The tunner IF for PAL-Nc norm, which AFAIK is used only in Argentina, was being defined as equal to PAL-M but it is not. It actually uses the same video IF as PAL-BG (and unlike PAL-M) but the audio is at 4.5MHz (same as PAL-M). A separate structure member was added for PAL-Nc. > > Signed-off-by: Gonzalo A. de la Vega <gadelavega@gmail.com> Hmmm. The Video IF for N systems is 45.75 MHz according to this popular book (see page 29 of the PDF): http://www.deetc.isel.ipl.pt/Analisedesinai/sm/downloads/doc/ch08.pdf The Video IF is really determined by the IF SAW filter used in your tuner assembly, and how the tuner data sheet says to program the mixer/oscillator chip to mix down from RF to IF. What model analog tuner assembly are you using? It could be that the linux tuner-simple module is setting up the mixer/oscillator chip wrong. Regards, Andy > > diff --git a/drivers/media/common/tuners/tda9887.c b/drivers/media/common/tuners/tda9887.c > index cdb645d..b560b5d 100644 > --- a/drivers/media/common/tuners/tda9887.c > +++ b/drivers/media/common/tuners/tda9887.c > @@ -168,8 +168,8 @@ static struct tvnorm tvnorms[] = { > cAudioIF_6_5 | > cVideoIF_38_90 ), > },{ > - .std = V4L2_STD_PAL_M | V4L2_STD_PAL_Nc, > - .name = "PAL-M/Nc", > + .std = V4L2_STD_PAL_M, > + .name = "PAL-M", > .b = ( cNegativeFmTV | > cQSS ), > .c = ( cDeemphasisON | > @@ -179,6 +179,17 @@ static struct tvnorm tvnorms[] = { > cAudioIF_4_5 | > cVideoIF_45_75 ), > },{ > + .std = V4L2_STD_PAL_Nc, > + .name = "PAL-Nc", > + .b = ( cNegativeFmTV | > + cQSS ), > + .c = ( cDeemphasisON | > + cDeemphasis75 | > + cTopDefault), > + .e = ( cGating_36 | > + cAudioIF_4_5 | > + cVideoIF_38_90 ), > + },{ > .std = V4L2_STD_SECAM_B | V4L2_STD_SECAM_G | V4L2_STD_SECAM_H, > .name = "SECAM-BGH", > .b = ( cNegativeFmTV | > -- > 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] 6+ messages in thread
* Re: [PATCH] TDA9887 PAL-Nc fix 2012-04-19 23:50 ` Andy Walls @ 2012-04-20 14:01 ` Gonzalo A. de la Vega 2012-04-20 15:08 ` Mauro Carvalho Chehab 2012-04-20 20:57 ` Andy Walls 0 siblings, 2 replies; 6+ messages in thread From: Gonzalo A. de la Vega @ 2012-04-20 14:01 UTC (permalink / raw) To: Andy Walls; +Cc: linux-media On Thu, Apr 19, 2012 at 8:50 PM, Andy Walls <awalls@md.metrocast.net> wrote: > On Wed, 2012-04-18 at 09:22 -0300, Gonzalo de la Vega wrote: >> The tunner IF for PAL-Nc norm, which AFAIK is used only in Argentina, was being defined as equal to PAL-M but it is not. It actually uses the same video IF as PAL-BG (and unlike PAL-M) but the audio is at 4.5MHz (same as PAL-M). A separate structure member was added for PAL-Nc. >> >> Signed-off-by: Gonzalo A. de la Vega <gadelavega@gmail.com> > > Hmmm. > > The Video IF for N systems is 45.75 MHz according to this popular book > (see page 29 of the PDF): > http://www.deetc.isel.ipl.pt/Analisedesinai/sm/downloads/doc/ch08.pdf > > The Video IF is really determined by the IF SAW filter used in your > tuner assembly, and how the tuner data sheet says to program the > mixer/oscillator chip to mix down from RF to IF. > > What model analog tuner assembly are you using? It could be that the > linux tuner-simple module is setting up the mixer/oscillator chip wrong. > > Regards, > Andy Hi Andy, first of all and to clarify things: I could not tune analog TV without this patch, or I could barely see a BW image. With the patch applied, I can see image in full color and with good sound. So it works with the patch, it does not work without it. Now, I'm not an expert on TV (I am an electronics engineer thou) so I am having some trouble trying to put together what I read in the TDA9887 datasheet and the reference you sent. The thing with PAL-Nc is that it has a video bandwidth of 4.2MHz not 5.0MHz (page 51) and the attenuation of color difference signals for >20dB is at 3.6MHz instead of 4MHz (page 54). You can just search for "Argentina" inside the document. So, this works... but now I'm not sure why. I guess cVideoIF_38_90 is compensating for the bandwidth difference. I need to study this. Gonzalo > >> >> diff --git a/drivers/media/common/tuners/tda9887.c b/drivers/media/common/tuners/tda9887.c >> index cdb645d..b560b5d 100644 >> --- a/drivers/media/common/tuners/tda9887.c >> +++ b/drivers/media/common/tuners/tda9887.c >> @@ -168,8 +168,8 @@ static struct tvnorm tvnorms[] = { >> cAudioIF_6_5 | >> cVideoIF_38_90 ), >> },{ >> - .std = V4L2_STD_PAL_M | V4L2_STD_PAL_Nc, >> - .name = "PAL-M/Nc", >> + .std = V4L2_STD_PAL_M, >> + .name = "PAL-M", >> .b = ( cNegativeFmTV | >> cQSS ), >> .c = ( cDeemphasisON | >> @@ -179,6 +179,17 @@ static struct tvnorm tvnorms[] = { >> cAudioIF_4_5 | >> cVideoIF_45_75 ), >> },{ >> + .std = V4L2_STD_PAL_Nc, >> + .name = "PAL-Nc", >> + .b = ( cNegativeFmTV | >> + cQSS ), >> + .c = ( cDeemphasisON | >> + cDeemphasis75 | >> + cTopDefault), >> + .e = ( cGating_36 | >> + cAudioIF_4_5 | >> + cVideoIF_38_90 ), >> + },{ >> .std = V4L2_STD_SECAM_B | V4L2_STD_SECAM_G | V4L2_STD_SECAM_H, >> .name = "SECAM-BGH", >> .b = ( cNegativeFmTV | >> -- >> 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] 6+ messages in thread
* Re: [PATCH] TDA9887 PAL-Nc fix 2012-04-20 14:01 ` Gonzalo A. de la Vega @ 2012-04-20 15:08 ` Mauro Carvalho Chehab 2012-04-20 16:50 ` Ezequiel García 2012-04-20 20:57 ` Andy Walls 1 sibling, 1 reply; 6+ messages in thread From: Mauro Carvalho Chehab @ 2012-04-20 15:08 UTC (permalink / raw) To: Gonzalo A. de la Vega; +Cc: Andy Walls, linux-media Buenos dias Gonzalo, Em 20-04-2012 11:01, Gonzalo A. de la Vega escreveu: > On Thu, Apr 19, 2012 at 8:50 PM, Andy Walls <awalls@md.metrocast.net> wrote: >> On Wed, 2012-04-18 at 09:22 -0300, Gonzalo de la Vega wrote: >>> The tunner IF for PAL-Nc norm, which AFAIK is used only in Argentina, was being defined as equal to PAL-M but it is not. It actually uses the same video IF as PAL-BG (and unlike PAL-M) but the audio is at 4.5MHz (same as PAL-M). A separate structure member was added for PAL-Nc. >>> >>> Signed-off-by: Gonzalo A. de la Vega <gadelavega@gmail.com> >> >> Hmmm. >> >> The Video IF for N systems is 45.75 MHz according to this popular book >> (see page 29 of the PDF): >> http://www.deetc.isel.ipl.pt/Analisedesinai/sm/downloads/doc/ch08.pdf >> >> The Video IF is really determined by the IF SAW filter used in your >> tuner assembly, and how the tuner data sheet says to program the >> mixer/oscillator chip to mix down from RF to IF. >> >> What model analog tuner assembly are you using? It could be that the >> linux tuner-simple module is setting up the mixer/oscillator chip wrong. >> >> Regards, >> Andy > > Hi Andy, > first of all and to clarify things: I could not tune analog TV without > this patch, or I could barely see a BW image. With the patch applied, > I can see image in full color and with good sound. So it works with > the patch, it does not work without it. > > Now, I'm not an expert on TV (I am an electronics engineer thou) so I > am having some trouble trying to put together what I read in the > TDA9887 datasheet and the reference you sent. The thing with PAL-Nc is > that it has a video bandwidth of 4.2MHz not 5.0MHz (page 51) and the > attenuation of color difference signals for >20dB is at 3.6MHz instead > of 4MHz (page 54). You can just search for "Argentina" inside the > document. > > So, this works... but now I'm not sure why. I guess cVideoIF_38_90 is > compensating for the bandwidth difference. I need to study this. >From other discussions we've had at the ML, it seems that devices sold in Argentina with analog tuners sometimes come with a NTSC tuner, and sometimes come with an European PAL tuner. They solve the frequency shifts that happen there via some tda9887 (and/or tuner-simple) adjustments. It seems that the setup, when using one type, is different than the other. That's why we need to know exactly what it is the tuner that your device has. So, from time to time, we receive patches from someone in Argentina fixing support for one type, but breaking support for the other type. What we need is that someone with technical expertise and with the two types of devices, with access to real PAL-Nc signals, to work on a solution that would set it accordingly, depending on the actual tuner used on it. Regards, Mauro ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] TDA9887 PAL-Nc fix 2012-04-20 15:08 ` Mauro Carvalho Chehab @ 2012-04-20 16:50 ` Ezequiel García 0 siblings, 0 replies; 6+ messages in thread From: Ezequiel García @ 2012-04-20 16:50 UTC (permalink / raw) To: Mauro Carvalho Chehab; +Cc: Gonzalo A. de la Vega, Andy Walls, linux-media Hola ;) > > From other discussions we've had at the ML, it seems that devices sold in > Argentina with analog tuners sometimes come with a NTSC tuner, and sometimes > come with an European PAL tuner. They solve the frequency shifts that > happen there via some tda9887 (and/or tuner-simple) adjustments. > > It seems that the setup, when using one type, is different than the other. > > That's why we need to know exactly what it is the tuner that your device > has. > > So, from time to time, we receive patches from someone in Argentina fixing > support for one type, but breaking support for the other type. > > What we need is that someone with technical expertise and with the two types > of devices, with access to real PAL-Nc signals, to work on a solution that > would set it accordingly, depending on the actual tuner used on it. > I live in Argentina, and have access to digital signal and some tuners. Perhaps I could help, provided someone cares to send me the relevant devices? Gonzalo: What device is that? ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] TDA9887 PAL-Nc fix 2012-04-20 14:01 ` Gonzalo A. de la Vega 2012-04-20 15:08 ` Mauro Carvalho Chehab @ 2012-04-20 20:57 ` Andy Walls 1 sibling, 0 replies; 6+ messages in thread From: Andy Walls @ 2012-04-20 20:57 UTC (permalink / raw) To: Gonzalo A. de la Vega; +Cc: linux-media On Fri, 2012-04-20 at 11:01 -0300, Gonzalo A. de la Vega wrote: > On Thu, Apr 19, 2012 at 8:50 PM, Andy Walls <awalls@md.metrocast.net> wrote: > > On Wed, 2012-04-18 at 09:22 -0300, Gonzalo de la Vega wrote: > >> The tunner IF for PAL-Nc norm, which AFAIK is used only in Argentina, was being defined as equal to PAL-M but it is not. It actually uses the same video IF as PAL-BG (and unlike PAL-M) but the audio is at 4.5MHz (same as PAL-M). A separate structure member was added for PAL-Nc. > >> > >> Signed-off-by: Gonzalo A. de la Vega <gadelavega@gmail.com> > > > > Hmmm. > > > > The Video IF for N systems is 45.75 MHz according to this popular book > > (see page 29 of the PDF): > > http://www.deetc.isel.ipl.pt/Analisedesinai/sm/downloads/doc/ch08.pdf > > > > The Video IF is really determined by the IF SAW filter used in your > > tuner assembly, and how the tuner data sheet says to program the > > mixer/oscillator chip to mix down from RF to IF. > > > > What model analog tuner assembly are you using? It could be that the > > linux tuner-simple module is setting up the mixer/oscillator chip wrong. > > > > Regards, > > Andy > > Hi Andy, > first of all and to clarify things: I could not tune analog TV without > this patch, or I could barely see a BW image. With the patch applied, > I can see image in full color and with good sound. So it works with > the patch, it does not work without it. I believe you. However, I beleive your fix is in the wrong place. Every M/N tuner datahseet that I have seen, specifies a Video IF of 45.75 MHz. > Now, I'm not an expert on TV (I am an electronics engineer thou) so I > am having some trouble trying to put together what I read in the > TDA9887 datasheet and the reference you sent. Here's a datasheet for the LG TAPE-H091F tuner (M/N using a TDA9887): http://dl.ivtvdriver.org/datasheets/tuners/TAPE-H091F_MK3.pdf Look at the block diagram on page 26. This design is very typical of analog tuner assemblies. The IF SAW filter is fixed. I could program the mixer/oscialltor chip and the TDA9887 IF decoder chip so the Video IF in use was 38.90 MHz, and probably get a viewable TV picture. That doesn't mean using 38.90 MHz is right, if the IF SAW filter is fixed and centered at 45.75 MHz. > The thing with PAL-Nc is > that it has a video bandwidth of 4.2MHz not 5.0MHz (page 51) and the > attenuation of color difference signals for >20dB is at 3.6MHz instead > of 4MHz (page 54). You can just search for "Argentina" inside the > document. > Yes, that's fine. The Video IF is what I am concerned about. Your change could break other tuners and/or the linux tuner-simple.ko module is programming some(?) tuners wrong for PAL-N and PAL-Nc By the way, this document describes PAL Combination N (-Nc) as a difference from PAL-N: ITU-R BT.470-6 http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.470-6-199811-S!!PDF-E.pdf Argentine Law 21.895, October 1978, wasn't much help in describing the technical aspects of PAL-Nc: http://www.infojus.gov.ar/index.php?kk_seccion=documento®istro=LEYNAC&docid=LEY%2520C%2520021895%25201978%252010%252030 > So, this works... but now I'm not sure why. Likely the tuner-simple.ko module is programming the mixer oscillator component for the 38.90 MHz IF. That may be right or wrong, depending on you exact tuner model. Again, what exact tuner assembly are you using? > I guess cVideoIF_38_90 is > compensating for the bandwidth difference. I need to study this. Nope. It is just matching how the tuner-simple.ko module programmed the mixer/oscillator chip. Regards, Andy > Gonzalo > > > > >> > >> diff --git a/drivers/media/common/tuners/tda9887.c b/drivers/media/common/tuners/tda9887.c > >> index cdb645d..b560b5d 100644 > >> --- a/drivers/media/common/tuners/tda9887.c > >> +++ b/drivers/media/common/tuners/tda9887.c > >> @@ -168,8 +168,8 @@ static struct tvnorm tvnorms[] = { > >> cAudioIF_6_5 | > >> cVideoIF_38_90 ), > >> },{ > >> - .std = V4L2_STD_PAL_M | V4L2_STD_PAL_Nc, > >> - .name = "PAL-M/Nc", > >> + .std = V4L2_STD_PAL_M, > >> + .name = "PAL-M", > >> .b = ( cNegativeFmTV | > >> cQSS ), > >> .c = ( cDeemphasisON | > >> @@ -179,6 +179,17 @@ static struct tvnorm tvnorms[] = { > >> cAudioIF_4_5 | > >> cVideoIF_45_75 ), > >> },{ > >> + .std = V4L2_STD_PAL_Nc, > >> + .name = "PAL-Nc", > >> + .b = ( cNegativeFmTV | > >> + cQSS ), > >> + .c = ( cDeemphasisON | > >> + cDeemphasis75 | > >> + cTopDefault), > >> + .e = ( cGating_36 | > >> + cAudioIF_4_5 | > >> + cVideoIF_38_90 ), > >> + },{ > >> .std = V4L2_STD_SECAM_B | V4L2_STD_SECAM_G | V4L2_STD_SECAM_H, > >> .name = "SECAM-BGH", > >> .b = ( cNegativeFmTV | > >> -- > >> 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 > > > > > -- > 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] 6+ messages in thread
end of thread, other threads:[~2012-04-20 20:57 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-04-18 12:22 [PATCH] TDA9887 PAL-Nc fix Gonzalo de la Vega 2012-04-19 23:50 ` Andy Walls 2012-04-20 14:01 ` Gonzalo A. de la Vega 2012-04-20 15:08 ` Mauro Carvalho Chehab 2012-04-20 16:50 ` Ezequiel García 2012-04-20 20:57 ` Andy Walls
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.