diff options
author | Anton Altaparmakov <anton@tuxera.com> | 2012-02-27 04:01:22 -0500 |
---|---|---|
committer | Anton Altaparmakov <anton@tuxera.com> | 2012-02-27 04:01:22 -0500 |
commit | f621c5334396fd153cd882ea92466823b7e7b821 (patch) | |
tree | 7b829cad44dc0e5003d7cacac3a7a1b128637083 /drivers/media/video/hdpvr/hdpvr-video.c | |
parent | 0afa1b62e33250d4777c5803a98ae69fbe872061 (diff) | |
parent | 500dd2370e77c9551ba298bdeeb91b02d8402199 (diff) |
Merge branch 'master' of /Volumes/CaseSensitiveDisk/linux
Diffstat (limited to 'drivers/media/video/hdpvr/hdpvr-video.c')
-rw-r--r-- | drivers/media/video/hdpvr/hdpvr-video.c | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/drivers/media/video/hdpvr/hdpvr-video.c b/drivers/media/video/hdpvr/hdpvr-video.c index 087f7c08cb85..11ffe9cc1780 100644 --- a/drivers/media/video/hdpvr/hdpvr-video.c +++ b/drivers/media/video/hdpvr/hdpvr-video.c | |||
@@ -283,12 +283,13 @@ static int hdpvr_start_streaming(struct hdpvr_device *dev) | |||
283 | 283 | ||
284 | hdpvr_config_call(dev, CTRL_START_STREAMING_VALUE, 0x00); | 284 | hdpvr_config_call(dev, CTRL_START_STREAMING_VALUE, 0x00); |
285 | 285 | ||
286 | dev->status = STATUS_STREAMING; | ||
287 | |||
286 | INIT_WORK(&dev->worker, hdpvr_transmit_buffers); | 288 | INIT_WORK(&dev->worker, hdpvr_transmit_buffers); |
287 | queue_work(dev->workqueue, &dev->worker); | 289 | queue_work(dev->workqueue, &dev->worker); |
288 | 290 | ||
289 | v4l2_dbg(MSG_BUFFER, hdpvr_debug, &dev->v4l2_dev, | 291 | v4l2_dbg(MSG_BUFFER, hdpvr_debug, &dev->v4l2_dev, |
290 | "streaming started\n"); | 292 | "streaming started\n"); |
291 | dev->status = STATUS_STREAMING; | ||
292 | 293 | ||
293 | return 0; | 294 | return 0; |
294 | } | 295 | } |
@@ -722,21 +723,39 @@ static const s32 supported_v4l2_ctrls[] = { | |||
722 | }; | 723 | }; |
723 | 724 | ||
724 | static int fill_queryctrl(struct hdpvr_options *opt, struct v4l2_queryctrl *qc, | 725 | static int fill_queryctrl(struct hdpvr_options *opt, struct v4l2_queryctrl *qc, |
725 | int ac3) | 726 | int ac3, int fw_ver) |
726 | { | 727 | { |
727 | int err; | 728 | int err; |
728 | 729 | ||
730 | if (fw_ver > 0x15) { | ||
731 | switch (qc->id) { | ||
732 | case V4L2_CID_BRIGHTNESS: | ||
733 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
734 | case V4L2_CID_CONTRAST: | ||
735 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x40); | ||
736 | case V4L2_CID_SATURATION: | ||
737 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x40); | ||
738 | case V4L2_CID_HUE: | ||
739 | return v4l2_ctrl_query_fill(qc, 0x0, 0x1e, 1, 0xf); | ||
740 | case V4L2_CID_SHARPNESS: | ||
741 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
742 | } | ||
743 | } else { | ||
744 | switch (qc->id) { | ||
745 | case V4L2_CID_BRIGHTNESS: | ||
746 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x86); | ||
747 | case V4L2_CID_CONTRAST: | ||
748 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
749 | case V4L2_CID_SATURATION: | ||
750 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
751 | case V4L2_CID_HUE: | ||
752 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
753 | case V4L2_CID_SHARPNESS: | ||
754 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
755 | } | ||
756 | } | ||
757 | |||
729 | switch (qc->id) { | 758 | switch (qc->id) { |
730 | case V4L2_CID_BRIGHTNESS: | ||
731 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x86); | ||
732 | case V4L2_CID_CONTRAST: | ||
733 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
734 | case V4L2_CID_SATURATION: | ||
735 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
736 | case V4L2_CID_HUE: | ||
737 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
738 | case V4L2_CID_SHARPNESS: | ||
739 | return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); | ||
740 | case V4L2_CID_MPEG_AUDIO_ENCODING: | 759 | case V4L2_CID_MPEG_AUDIO_ENCODING: |
741 | return v4l2_ctrl_query_fill( | 760 | return v4l2_ctrl_query_fill( |
742 | qc, V4L2_MPEG_AUDIO_ENCODING_AAC, | 761 | qc, V4L2_MPEG_AUDIO_ENCODING_AAC, |
@@ -794,7 +813,8 @@ static int vidioc_queryctrl(struct file *file, void *private_data, | |||
794 | 813 | ||
795 | if (qc->id == supported_v4l2_ctrls[i]) | 814 | if (qc->id == supported_v4l2_ctrls[i]) |
796 | return fill_queryctrl(&dev->options, qc, | 815 | return fill_queryctrl(&dev->options, qc, |
797 | dev->flags & HDPVR_FLAG_AC3_CAP); | 816 | dev->flags & HDPVR_FLAG_AC3_CAP, |
817 | dev->fw_ver); | ||
798 | 818 | ||
799 | if (qc->id < supported_v4l2_ctrls[i]) | 819 | if (qc->id < supported_v4l2_ctrls[i]) |
800 | break; | 820 | break; |