All of lore.kernel.org
 help / color / mirror / Atom feed
* V4L/DVB: cx231xx: Colibri carrier offset was wrong for PAL/M
@ 2010-10-09 15:23 Mauro Carvalho Chehab
  2010-10-09 15:40 ` Devin Heitmueller
  0 siblings, 1 reply; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2010-10-09 15:23 UTC (permalink / raw)
  To: linux-me >> Linux Media Mailing List; +Cc: Sri Deevi, Devin Heitmueller

cx231xx: Colibri carrier offset was wrong for PAL/M

The carrier offset check at cx231xx is incomplete. I got here one concrete case
where it is broken: if PAL/M is used (and this is the default for Pixelview SBTVD),
the routine will return zero, and the device will be programmed incorrectly,
producing a bad image. A workaround were to change to NTSC and back to PAL/M,
but the better is to just fix the code ;)

PS.: The checks there for other video standards are incomplete. the proper
solution is to fix the routine in a way that it will always return the proper
value for any valid V4L2_STD.

Cc: stable@kernel.org    
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/video/cx231xx/cx231xx-avcore.c b/drivers/media/video/cx231xx/cx231xx-avcore.c
index 0903773..d52955c 100644
--- a/drivers/media/video/cx231xx/cx231xx-avcore.c
+++ b/drivers/media/video/cx231xx/cx231xx-avcore.c
@@ -1540,7 +1540,7 @@ u32 cx231xx_Get_Colibri_CarrierOffset(u32 mode, u32 standerd)
 
 	if (mode == TUNER_MODE_FM_RADIO) {
 		colibri_carrier_offset = 1100000;
-	} else if (standerd & (V4L2_STD_NTSC | V4L2_STD_NTSC_M_JP)) {
+	} else if (standerd & (V4L2_STD_MN | V4L2_STD_NTSC_M_JP)) {
 		colibri_carrier_offset = 4832000;  /*4.83MHz	*/
 	} else if (standerd & (V4L2_STD_PAL_B | V4L2_STD_PAL_G)) {
 		colibri_carrier_offset = 2700000;  /*2.70MHz       */

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

* Re: V4L/DVB: cx231xx: Colibri carrier offset was wrong for PAL/M
  2010-10-09 15:23 V4L/DVB: cx231xx: Colibri carrier offset was wrong for PAL/M Mauro Carvalho Chehab
@ 2010-10-09 15:40 ` Devin Heitmueller
  2010-10-09 17:00   ` Sri Deevi
  0 siblings, 1 reply; 3+ messages in thread
From: Devin Heitmueller @ 2010-10-09 15:40 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: linux-me >> Linux Media Mailing List, Sri Deevi

On Sat, Oct 9, 2010 at 11:23 AM, Mauro Carvalho Chehab
<mchehab@redhat.com> wrote:
> cx231xx: Colibri carrier offset was wrong for PAL/M
>
> The carrier offset check at cx231xx is incomplete. I got here one concrete case
> where it is broken: if PAL/M is used (and this is the default for Pixelview SBTVD),
> the routine will return zero, and the device will be programmed incorrectly,
> producing a bad image. A workaround were to change to NTSC and back to PAL/M,
> but the better is to just fix the code ;)

Thanks for spotting this.  I've been focusing entirely on NTSC, so any
such fixes for other standards are very welcome.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

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

* RE: V4L/DVB: cx231xx: Colibri carrier offset was wrong for PAL/M
  2010-10-09 15:40 ` Devin Heitmueller
@ 2010-10-09 17:00   ` Sri Deevi
  0 siblings, 0 replies; 3+ messages in thread
From: Sri Deevi @ 2010-10-09 17:00 UTC (permalink / raw)
  To: Devin Heitmueller, Mauro Carvalho Chehab
  Cc: linux-me >> Linux Media Mailing List

Good catch. OK with the fix.

Sri
________________________________________
From: Devin Heitmueller [dheitmueller@kernellabs.com]
Sent: Saturday, October 09, 2010 8:40 AM
To: Mauro Carvalho Chehab
Cc: linux-me >> Linux Media Mailing List; Sri Deevi
Subject: Re: V4L/DVB: cx231xx: Colibri carrier offset was wrong for PAL/M

On Sat, Oct 9, 2010 at 11:23 AM, Mauro Carvalho Chehab
<mchehab@redhat.com> wrote:
> cx231xx: Colibri carrier offset was wrong for PAL/M
>
> The carrier offset check at cx231xx is incomplete. I got here one concrete case
> where it is broken: if PAL/M is used (and this is the default for Pixelview SBTVD),
> the routine will return zero, and the device will be programmed incorrectly,
> producing a bad image. A workaround were to change to NTSC and back to PAL/M,
> but the better is to just fix the code ;)

Thanks for spotting this.  I've been focusing entirely on NTSC, so any
such fixes for other standards are very welcome.

Devin

--
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

Conexant E-mail Firewall (Conexant.Com) made the following annotations
---------------------------------------------------------------------
********************** Legal Disclaimer **************************** 

"This email may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message in error, please advise the sender by reply email and delete the message. Thank you." 

********************************************************************** 

---------------------------------------------------------------------


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

end of thread, other threads:[~2010-10-09 17:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-09 15:23 V4L/DVB: cx231xx: Colibri carrier offset was wrong for PAL/M Mauro Carvalho Chehab
2010-10-09 15:40 ` Devin Heitmueller
2010-10-09 17:00   ` Sri Deevi

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.