All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sn9c20x: fixed exposure control for HV7131R sensor
@ 2009-10-19 21:55 German Galkin
  2009-11-24 12:54 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 2+ messages in thread
From: German Galkin @ 2009-10-19 21:55 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, linux-media

Made the range of exposure values (0-0x1770) distribute evenly through
HV7131R's exposure control bytes.

Signed-off-by: German Galkin <galkinga@gmail.com>
---
diff --git a/drivers/media/video/gspca/sn9c20x.c
b/drivers/media/video/gspca/sn9c20x.c
index 99632a7..f173b35 100644
--- a/drivers/media/video/gspca/sn9c20x.c
+++ b/drivers/media/video/gspca/sn9c20x.c
@@ -1656,9 +1656,9 @@ static int set_exposure(struct gspca_dev
*gspca_dev)
        case SENSOR_HV7131R:
                exp[0] |= (4 << 4);
                exp[2] = 0x25;
-               exp[3] = ((sd->exposure * 0xffffff) / 0xffff) >> 16;
-               exp[4] = ((sd->exposure * 0xffffff) / 0xffff) >> 8;
-               exp[5] = ((sd->exposure * 0xffffff) / 0xffff) & 0xff;
+               exp[3] = (sd->exposure >> 5) & 0xff;
+               exp[4] = (sd->exposure << 3) & 0xff;
+               exp[5] = 0;
                break;
        default:
                return 0;



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

* Re: [PATCH] sn9c20x: fixed exposure control for HV7131R sensor
  2009-10-19 21:55 [PATCH] sn9c20x: fixed exposure control for HV7131R sensor German Galkin
@ 2009-11-24 12:54 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2009-11-24 12:54 UTC (permalink / raw)
  To: German Galkin; +Cc: linux-media, Brian Johnson

Hi German,

Your patch got line-wrapped. Also, it doesn't apply. Please, resubmit it against
the latest development tree.

Cheers,
Mauro.

German Galkin wrote:
> Made the range of exposure values (0-0x1770) distribute evenly through
> HV7131R's exposure control bytes.
> 
> Signed-off-by: German Galkin <galkinga@gmail.com>
> ---
> diff --git a/drivers/media/video/gspca/sn9c20x.c
> b/drivers/media/video/gspca/sn9c20x.c
> index 99632a7..f173b35 100644
> --- a/drivers/media/video/gspca/sn9c20x.c
> +++ b/drivers/media/video/gspca/sn9c20x.c
> @@ -1656,9 +1656,9 @@ static int set_exposure(struct gspca_dev
> *gspca_dev)
>         case SENSOR_HV7131R:
>                 exp[0] |= (4 << 4);
>                 exp[2] = 0x25;
> -               exp[3] = ((sd->exposure * 0xffffff) / 0xffff) >> 16;
> -               exp[4] = ((sd->exposure * 0xffffff) / 0xffff) >> 8;
> -               exp[5] = ((sd->exposure * 0xffffff) / 0xffff) & 0xff;
> +               exp[3] = (sd->exposure >> 5) & 0xff;
> +               exp[4] = (sd->exposure << 3) & 0xff;
> +               exp[5] = 0;
>                 break;
>         default:
>                 return 0;
> 
> 
> --
> 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] 2+ messages in thread

end of thread, other threads:[~2009-11-24 12:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-19 21:55 [PATCH] sn9c20x: fixed exposure control for HV7131R sensor German Galkin
2009-11-24 12:54 ` Mauro Carvalho Chehab

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.