diff options
author | Jean-François Moine <moinejf@free.fr> | 2011-03-22 05:04:09 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-22 15:38:22 -0400 |
commit | 152507144a59d74423a25e1ba80f4f7f17449417 (patch) | |
tree | f608453b28e34990b8650951483e2708851f9006 /drivers/media | |
parent | ee32ffbf8e446e9b8c247ae9c9ba032979c3eafc (diff) |
[media] gspca - nw80x: Fix some image resolutions
No 352x288 for Ds3303 and no 320x240 for Generic802.
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/gspca/nw80x.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/media/video/gspca/nw80x.c b/drivers/media/video/gspca/nw80x.c index f2adf6f0426f..cfab8973e95c 100644 --- a/drivers/media/video/gspca/nw80x.c +++ b/drivers/media/video/gspca/nw80x.c | |||
@@ -154,6 +154,10 @@ static const u8 webcam_chip[NWEBCAMS] = { | |||
154 | * nw801/802: 320x240, 640x480 | 154 | * nw801/802: 320x240, 640x480 |
155 | */ | 155 | */ |
156 | static const struct v4l2_pix_format cif_mode[] = { | 156 | static const struct v4l2_pix_format cif_mode[] = { |
157 | {320, 240, V4L2_PIX_FMT_JPGL, V4L2_FIELD_NONE, | ||
158 | .bytesperline = 320, | ||
159 | .sizeimage = 320 * 240 * 4 / 8, | ||
160 | .colorspace = V4L2_COLORSPACE_JPEG}, | ||
157 | {352, 288, V4L2_PIX_FMT_JPGL, V4L2_FIELD_NONE, | 161 | {352, 288, V4L2_PIX_FMT_JPGL, V4L2_FIELD_NONE, |
158 | .bytesperline = 352, | 162 | .bytesperline = 352, |
159 | .sizeimage = 352 * 288 * 4 / 8, | 163 | .sizeimage = 352 * 288 * 4 / 8, |
@@ -1782,12 +1786,18 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
1782 | PDEBUG(D_PROBE, "Bridge nw80%d - type: %d", sd->bridge, sd->webcam); | 1786 | PDEBUG(D_PROBE, "Bridge nw80%d - type: %d", sd->bridge, sd->webcam); |
1783 | 1787 | ||
1784 | if (sd->bridge == BRIDGE_NW800) { | 1788 | if (sd->bridge == BRIDGE_NW800) { |
1785 | gspca_dev->cam.cam_mode = cif_mode; | 1789 | switch (sd->webcam) { |
1786 | gspca_dev->cam.nmodes = ARRAY_SIZE(cif_mode); | 1790 | case DS3303u: |
1791 | gspca_dev->cam.cam_mode = cif_mode; /* qvga */ | ||
1792 | break; | ||
1793 | default: | ||
1794 | gspca_dev->cam.cam_mode = &cif_mode[1]; /* cif */ | ||
1795 | break; | ||
1796 | } | ||
1797 | gspca_dev->cam.nmodes = 1; | ||
1787 | } else { | 1798 | } else { |
1788 | gspca_dev->cam.cam_mode = vga_mode; | 1799 | gspca_dev->cam.cam_mode = vga_mode; |
1789 | switch (sd->webcam) { | 1800 | switch (sd->webcam) { |
1790 | case Generic802: | ||
1791 | case Kr651us: | 1801 | case Kr651us: |
1792 | case Proscope: | 1802 | case Proscope: |
1793 | case P35u: | 1803 | case P35u: |