git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[pandora-kernel.git]
/
drivers
/
media
/
video
/
saa717x.c
diff --git
a/drivers/media/video/saa717x.c
b/drivers/media/video/saa717x.c
index
d521c64
..
78d6995
100644
(file)
--- a/
drivers/media/video/saa717x.c
+++ b/
drivers/media/video/saa717x.c
@@
-1199,28
+1199,32
@@
static int saa717x_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *
}
#endif
}
#endif
-static int saa717x_s_
fmt(struct v4l2_subdev *sd, struct v4l2_forma
t *fmt)
+static int saa717x_s_
mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefm
t *fmt)
{
{
- struct v4l2_pix_format *pix;
int prescale, h_scale, v_scale;
int prescale, h_scale, v_scale;
- pix = &fmt->fmt.pix;
v4l2_dbg(1, debug, sd, "decoder set size\n");
v4l2_dbg(1, debug, sd, "decoder set size\n");
+ if (fmt->code != V4L2_MBUS_FMT_FIXED)
+ return -EINVAL;
+
/* FIXME need better bounds checking here */
/* FIXME need better bounds checking here */
- if (
pix->width < 1 || pix
->width > 1440)
+ if (
fmt->width < 1 || fmt
->width > 1440)
return -EINVAL;
return -EINVAL;
- if (
pix->height < 1 || pix
->height > 960)
+ if (
fmt->height < 1 || fmt
->height > 960)
return -EINVAL;
return -EINVAL;
+ fmt->field = V4L2_FIELD_INTERLACED;
+ fmt->colorspace = V4L2_COLORSPACE_SMPTE170M;
+
/* scaling setting */
/* NTSC and interlace only */
/* scaling setting */
/* NTSC and interlace only */
- prescale = SAA717X_NTSC_WIDTH /
pix
->width;
+ prescale = SAA717X_NTSC_WIDTH /
fmt
->width;
if (prescale == 0)
prescale = 1;
if (prescale == 0)
prescale = 1;
- h_scale = 1024 * SAA717X_NTSC_WIDTH / prescale /
pix
->width;
+ h_scale = 1024 * SAA717X_NTSC_WIDTH / prescale /
fmt
->width;
/* interlace */
/* interlace */
- v_scale = 512 * 2 * SAA717X_NTSC_HEIGHT /
pix
->height;
+ v_scale = 512 * 2 * SAA717X_NTSC_HEIGHT /
fmt
->height;
/* Horizontal prescaling etc */
set_h_prescale(sd, 0, prescale);
/* Horizontal prescaling etc */
set_h_prescale(sd, 0, prescale);
@@
-1241,19
+1245,19
@@
static int saa717x_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt)
/* set video output size */
/* video number of pixels at output */
/* TASK A */
/* set video output size */
/* video number of pixels at output */
/* TASK A */
- saa717x_write(sd, 0x5C, (u8)(
pix
->width & 0xFF));
- saa717x_write(sd, 0x5D, (u8)((
pix
->width >> 8) & 0xFF));
+ saa717x_write(sd, 0x5C, (u8)(
fmt
->width & 0xFF));
+ saa717x_write(sd, 0x5D, (u8)((
fmt
->width >> 8) & 0xFF));
/* TASK B */
/* TASK B */
- saa717x_write(sd, 0x9C, (u8)(
pix
->width & 0xFF));
- saa717x_write(sd, 0x9D, (u8)((
pix
->width >> 8) & 0xFF));
+ saa717x_write(sd, 0x9C, (u8)(
fmt
->width & 0xFF));
+ saa717x_write(sd, 0x9D, (u8)((
fmt
->width >> 8) & 0xFF));
/* video number of lines at output */
/* TASK A */
/* video number of lines at output */
/* TASK A */
- saa717x_write(sd, 0x5E, (u8)(
pix
->height & 0xFF));
- saa717x_write(sd, 0x5F, (u8)((
pix
->height >> 8) & 0xFF));
+ saa717x_write(sd, 0x5E, (u8)(
fmt
->height & 0xFF));
+ saa717x_write(sd, 0x5F, (u8)((
fmt
->height >> 8) & 0xFF));
/* TASK B */
/* TASK B */
- saa717x_write(sd, 0x9E, (u8)(
pix
->height & 0xFF));
- saa717x_write(sd, 0x9F, (u8)((
pix
->height >> 8) & 0xFF));
+ saa717x_write(sd, 0x9E, (u8)(
fmt
->height & 0xFF));
+ saa717x_write(sd, 0x9F, (u8)((
fmt
->height >> 8) & 0xFF));
return 0;
}
return 0;
}
@@
-1403,7
+1407,7
@@
static const struct v4l2_subdev_tuner_ops saa717x_tuner_ops = {
static const struct v4l2_subdev_video_ops saa717x_video_ops = {
.s_routing = saa717x_s_video_routing,
static const struct v4l2_subdev_video_ops saa717x_video_ops = {
.s_routing = saa717x_s_video_routing,
- .s_
fmt = saa717x_
s_fmt,
+ .s_
mbus_fmt = saa717x_s_mbu
s_fmt,
.s_stream = saa717x_s_stream,
};
.s_stream = saa717x_s_stream,
};