diff options
Diffstat (limited to 'drivers/media/video/hdpvr/hdpvr-core.c')
-rw-r--r-- | drivers/media/video/hdpvr/hdpvr-core.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/media/video/hdpvr/hdpvr-core.c b/drivers/media/video/hdpvr/hdpvr-core.c index e5eb56a5b618..6510110f53d0 100644 --- a/drivers/media/video/hdpvr/hdpvr-core.c +++ b/drivers/media/video/hdpvr/hdpvr-core.c | |||
@@ -154,10 +154,20 @@ static int device_authorization(struct hdpvr_device *dev) | |||
154 | } | 154 | } |
155 | #endif | 155 | #endif |
156 | 156 | ||
157 | dev->fw_ver = dev->usbc_buf[1]; | ||
158 | |||
157 | v4l2_info(&dev->v4l2_dev, "firmware version 0x%x dated %s\n", | 159 | v4l2_info(&dev->v4l2_dev, "firmware version 0x%x dated %s\n", |
158 | dev->usbc_buf[1], &dev->usbc_buf[2]); | 160 | dev->fw_ver, &dev->usbc_buf[2]); |
161 | |||
162 | if (dev->fw_ver > 0x15) { | ||
163 | dev->options.brightness = 0x80; | ||
164 | dev->options.contrast = 0x40; | ||
165 | dev->options.hue = 0xf; | ||
166 | dev->options.saturation = 0x40; | ||
167 | dev->options.sharpness = 0x80; | ||
168 | } | ||
159 | 169 | ||
160 | switch (dev->usbc_buf[1]) { | 170 | switch (dev->fw_ver) { |
161 | case HDPVR_FIRMWARE_VERSION: | 171 | case HDPVR_FIRMWARE_VERSION: |
162 | dev->flags &= ~HDPVR_FLAG_AC3_CAP; | 172 | dev->flags &= ~HDPVR_FLAG_AC3_CAP; |
163 | break; | 173 | break; |
@@ -169,7 +179,7 @@ static int device_authorization(struct hdpvr_device *dev) | |||
169 | default: | 179 | default: |
170 | v4l2_info(&dev->v4l2_dev, "untested firmware, the driver might" | 180 | v4l2_info(&dev->v4l2_dev, "untested firmware, the driver might" |
171 | " not work.\n"); | 181 | " not work.\n"); |
172 | if (dev->usbc_buf[1] >= HDPVR_FIRMWARE_VERSION_AC3) | 182 | if (dev->fw_ver >= HDPVR_FIRMWARE_VERSION_AC3) |
173 | dev->flags |= HDPVR_FLAG_AC3_CAP; | 183 | dev->flags |= HDPVR_FLAG_AC3_CAP; |
174 | else | 184 | else |
175 | dev->flags &= ~HDPVR_FLAG_AC3_CAP; | 185 | dev->flags &= ~HDPVR_FLAG_AC3_CAP; |
@@ -270,6 +280,8 @@ static const struct hdpvr_options hdpvr_default_options = { | |||
270 | .bitrate_mode = HDPVR_CONSTANT, | 280 | .bitrate_mode = HDPVR_CONSTANT, |
271 | .gop_mode = HDPVR_SIMPLE_IDR_GOP, | 281 | .gop_mode = HDPVR_SIMPLE_IDR_GOP, |
272 | .audio_codec = V4L2_MPEG_AUDIO_ENCODING_AAC, | 282 | .audio_codec = V4L2_MPEG_AUDIO_ENCODING_AAC, |
283 | /* original picture controls for firmware version <= 0x15 */ | ||
284 | /* updated in device_authorization() for newer firmware */ | ||
273 | .brightness = 0x86, | 285 | .brightness = 0x86, |
274 | .contrast = 0x80, | 286 | .contrast = 0x80, |
275 | .hue = 0x80, | 287 | .hue = 0x80, |