diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-20 12:37:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-20 12:37:45 -0400 |
commit | fb091be08d1acf184e8801dfdcace6e0cb19b1fe (patch) | |
tree | cbd0c4200fd8628d592167589ca790e36fc4ae26 /drivers/media/video/saa7127.c | |
parent | bd7fc2f2d807fdb254f7efc542f8eec3f23e289e (diff) | |
parent | e8d0416796d43a950ec7b65629e53419b2e22453 (diff) |
Merge branch 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (534 commits)
V4L/DVB (13554a): v4l: Use the video_drvdata function in drivers
V4L/DVB: vivi and mem2mem_testdev need slab.h to build
V4L/DVB: tm6000: bugfix image position
V4L/DVB: IR/imon: remove dead IMON_KEY_RELEASE_OFFSET
V4L/DVB: tm6000: README - add vbi
V4L/DVB: Fix unlock logic at medusa_video_init
V4L/DVB: fix dvb frontend lockup
V4L/DVB: s2255drv: remove dead code
V4L/DVB: s2255drv: return if vdev not found
V4L/DVB: ov511: cleanup: remove unneeded null check
V4L/DVB: media/mem2mem: dereferencing free memory
V4L/DVB: media/IR: Add missing include file to rc-map.c
V4L/DVB: dvb/stv6110x: cleanup error handling
V4L/DVB: ngene: Add lgdt3303 and mt2131 deps to Kconfig
V4L/DVB: ngene: start separating out DVB functions into separate file
V4L/DVB: ngene: split out card specific code into a separate file
V4L/DVB: ngene: split out i2c code into a separate file
V4L/DVB: ngene: add initial support for digital side of Avermedia m780
V4L/DVB: ngene: properly support boards where channel 0 isn't a TS input
V4L-DVB: ngene: make sure that tuner headers are included
...
Diffstat (limited to 'drivers/media/video/saa7127.c')
-rw-r--r-- | drivers/media/video/saa7127.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/drivers/media/video/saa7127.c b/drivers/media/video/saa7127.c index 250ef84cf5ca..87986ad62f86 100644 --- a/drivers/media/video/saa7127.c +++ b/drivers/media/video/saa7127.c | |||
@@ -625,29 +625,33 @@ static int saa7127_s_stream(struct v4l2_subdev *sd, int enable) | |||
625 | return saa7127_set_video_enable(sd, enable); | 625 | return saa7127_set_video_enable(sd, enable); |
626 | } | 626 | } |
627 | 627 | ||
628 | static int saa7127_g_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt) | 628 | static int saa7127_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt) |
629 | { | 629 | { |
630 | struct saa7127_state *state = to_state(sd); | 630 | struct saa7127_state *state = to_state(sd); |
631 | 631 | ||
632 | if (fmt->type != V4L2_BUF_TYPE_SLICED_VBI_CAPTURE) | 632 | memset(fmt, 0, sizeof(*fmt)); |
633 | return -EINVAL; | ||
634 | |||
635 | memset(&fmt->fmt.sliced, 0, sizeof(fmt->fmt.sliced)); | ||
636 | if (state->vps_enable) | 633 | if (state->vps_enable) |
637 | fmt->fmt.sliced.service_lines[0][16] = V4L2_SLICED_VPS; | 634 | fmt->service_lines[0][16] = V4L2_SLICED_VPS; |
638 | if (state->wss_enable) | 635 | if (state->wss_enable) |
639 | fmt->fmt.sliced.service_lines[0][23] = V4L2_SLICED_WSS_625; | 636 | fmt->service_lines[0][23] = V4L2_SLICED_WSS_625; |
640 | if (state->cc_enable) { | 637 | if (state->cc_enable) { |
641 | fmt->fmt.sliced.service_lines[0][21] = V4L2_SLICED_CAPTION_525; | 638 | fmt->service_lines[0][21] = V4L2_SLICED_CAPTION_525; |
642 | fmt->fmt.sliced.service_lines[1][21] = V4L2_SLICED_CAPTION_525; | 639 | fmt->service_lines[1][21] = V4L2_SLICED_CAPTION_525; |
643 | } | 640 | } |
644 | fmt->fmt.sliced.service_set = | 641 | fmt->service_set = |
645 | (state->vps_enable ? V4L2_SLICED_VPS : 0) | | 642 | (state->vps_enable ? V4L2_SLICED_VPS : 0) | |
646 | (state->wss_enable ? V4L2_SLICED_WSS_625 : 0) | | 643 | (state->wss_enable ? V4L2_SLICED_WSS_625 : 0) | |
647 | (state->cc_enable ? V4L2_SLICED_CAPTION_525 : 0); | 644 | (state->cc_enable ? V4L2_SLICED_CAPTION_525 : 0); |
648 | return 0; | 645 | return 0; |
649 | } | 646 | } |
650 | 647 | ||
648 | static int saa7127_g_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt) | ||
649 | { | ||
650 | if (fmt->type != V4L2_BUF_TYPE_SLICED_VBI_CAPTURE) | ||
651 | return -EINVAL; | ||
652 | return saa7127_g_sliced_fmt(sd, &fmt->fmt.sliced); | ||
653 | } | ||
654 | |||
651 | static int saa7127_s_vbi_data(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data) | 655 | static int saa7127_s_vbi_data(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data) |
652 | { | 656 | { |
653 | switch (data->id) { | 657 | switch (data->id) { |
@@ -727,16 +731,21 @@ static const struct v4l2_subdev_core_ops saa7127_core_ops = { | |||
727 | }; | 731 | }; |
728 | 732 | ||
729 | static const struct v4l2_subdev_video_ops saa7127_video_ops = { | 733 | static const struct v4l2_subdev_video_ops saa7127_video_ops = { |
730 | .s_vbi_data = saa7127_s_vbi_data, | ||
731 | .g_fmt = saa7127_g_fmt, | 734 | .g_fmt = saa7127_g_fmt, |
732 | .s_std_output = saa7127_s_std_output, | 735 | .s_std_output = saa7127_s_std_output, |
733 | .s_routing = saa7127_s_routing, | 736 | .s_routing = saa7127_s_routing, |
734 | .s_stream = saa7127_s_stream, | 737 | .s_stream = saa7127_s_stream, |
735 | }; | 738 | }; |
736 | 739 | ||
740 | static const struct v4l2_subdev_vbi_ops saa7127_vbi_ops = { | ||
741 | .s_vbi_data = saa7127_s_vbi_data, | ||
742 | .g_sliced_fmt = saa7127_g_sliced_fmt, | ||
743 | }; | ||
744 | |||
737 | static const struct v4l2_subdev_ops saa7127_ops = { | 745 | static const struct v4l2_subdev_ops saa7127_ops = { |
738 | .core = &saa7127_core_ops, | 746 | .core = &saa7127_core_ops, |
739 | .video = &saa7127_video_ops, | 747 | .video = &saa7127_video_ops, |
748 | .vbi = &saa7127_vbi_ops, | ||
740 | }; | 749 | }; |
741 | 750 | ||
742 | /* ----------------------------------------------------------------------- */ | 751 | /* ----------------------------------------------------------------------- */ |