Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295029
b: refs/heads/master
c: eb2ba85
h: refs/heads/master
i:
  295027: d2f1266
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Mar 8, 2012
1 parent 52a7176 commit d26d740
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 072e660257ee26e4f4defd836b1e1fa23d68de32
refs/heads/master: eb2ba855470797b20dced364f5897cc949e7ade6
4 changes: 2 additions & 2 deletions trunk/drivers/media/video/ivtv/ivtv-controls.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ int ivtv_g_pts_frame(struct ivtv *itv, s64 *pts, s64 *frame)

static int ivtv_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
{
struct ivtv *itv = container_of(ctrl->handler, struct ivtv, hdl_out);
struct ivtv *itv = container_of(ctrl->handler, struct ivtv, cxhdl.hdl);

switch (ctrl->id) {
/* V4L2_CID_MPEG_VIDEO_DEC_PTS and V4L2_CID_MPEG_VIDEO_DEC_FRAME
Expand All @@ -143,7 +143,7 @@ static int ivtv_g_volatile_ctrl(struct v4l2_ctrl *ctrl)

static int ivtv_s_ctrl(struct v4l2_ctrl *ctrl)
{
struct ivtv *itv = container_of(ctrl->handler, struct ivtv, hdl_out);
struct ivtv *itv = container_of(ctrl->handler, struct ivtv, cxhdl.hdl);

switch (ctrl->id) {
/* V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK and MULTILINGUAL_PLAYBACK
Expand Down
20 changes: 8 additions & 12 deletions trunk/drivers/media/video/ivtv/ivtv-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1198,28 +1198,28 @@ static int __devinit ivtv_probe(struct pci_dev *pdev,
itv->tuner_std = itv->std;

if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) {
v4l2_ctrl_handler_init(&itv->hdl_out, 50);
itv->ctrl_pts = v4l2_ctrl_new_std(&itv->hdl_out, &ivtv_hdl_out_ops,
struct v4l2_ctrl_handler *hdl = itv->v4l2_dev.ctrl_handler;

itv->ctrl_pts = v4l2_ctrl_new_std(hdl, &ivtv_hdl_out_ops,
V4L2_CID_MPEG_VIDEO_DEC_PTS, 0, 0, 1, 0);
itv->ctrl_frame = v4l2_ctrl_new_std(&itv->hdl_out, &ivtv_hdl_out_ops,
itv->ctrl_frame = v4l2_ctrl_new_std(hdl, &ivtv_hdl_out_ops,
V4L2_CID_MPEG_VIDEO_DEC_FRAME, 0, 0x7fffffff, 1, 0);
/* Note: V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO is not supported,
mask that menu item. */
itv->ctrl_audio_playback =
v4l2_ctrl_new_std_menu(&itv->hdl_out, &ivtv_hdl_out_ops,
v4l2_ctrl_new_std_menu(hdl, &ivtv_hdl_out_ops,
V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK,
V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO,
1 << V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO,
V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO);
itv->ctrl_audio_multilingual_playback =
v4l2_ctrl_new_std_menu(&itv->hdl_out, &ivtv_hdl_out_ops,
v4l2_ctrl_new_std_menu(hdl, &ivtv_hdl_out_ops,
V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK,
V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO,
1 << V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO,
V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT);
v4l2_ctrl_add_handler(&itv->hdl_out, &itv->cxhdl.hdl);
if (itv->hdl_out.error) {
retval = itv->hdl_out.error;
if (hdl->error) {
retval = hdl->error;
goto free_i2c;
}
v4l2_ctrl_cluster(2, &itv->ctrl_pts);
Expand Down Expand Up @@ -1260,8 +1260,6 @@ static int __devinit ivtv_probe(struct pci_dev *pdev,
free_irq:
free_irq(itv->pdev->irq, (void *)itv);
free_i2c:
if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)
v4l2_ctrl_handler_free(&itv->hdl_out);
v4l2_ctrl_handler_free(&itv->cxhdl.hdl);
exit_ivtv_i2c(itv);
free_io:
Expand Down Expand Up @@ -1418,8 +1416,6 @@ static void ivtv_remove(struct pci_dev *pdev)
ivtv_streams_cleanup(itv, 1);
ivtv_udma_free(itv);

if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)
v4l2_ctrl_handler_free(&itv->hdl_out);
v4l2_ctrl_handler_free(&itv->cxhdl.hdl);

exit_ivtv_i2c(itv);
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/media/video/ivtv/ivtv-driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,6 @@ struct ivtv {
struct v4l2_ctrl *ctrl_audio_playback;
struct v4l2_ctrl *ctrl_audio_multilingual_playback;
};
struct v4l2_ctrl_handler hdl_out;
struct v4l2_ctrl_handler hdl_gpio;
struct v4l2_subdev sd_gpio; /* GPIO sub-device */
u16 instance;
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/media/video/ivtv/ivtv-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1548,10 +1548,7 @@ static int ivtv_log_status(struct file *file, void *fh)
}
IVTV_INFO("Tuner: %s\n",
test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags) ? "Radio" : "TV");
if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)
v4l2_ctrl_handler_log_status(&itv->hdl_out, itv->v4l2_dev.name);
else
v4l2_ctrl_handler_log_status(&itv->cxhdl.hdl, itv->v4l2_dev.name);
v4l2_ctrl_handler_log_status(&itv->cxhdl.hdl, itv->v4l2_dev.name);
IVTV_INFO("Status flags: 0x%08lx\n", itv->i_flags);
for (i = 0; i < IVTV_MAX_STREAMS; i++) {
struct ivtv_stream *s = &itv->streams[i];
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/media/video/ivtv/ivtv-streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,8 @@ static int ivtv_prep_dev(struct ivtv *itv, int type)

s->vdev->num = num;
s->vdev->v4l2_dev = &itv->v4l2_dev;
if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)
s->vdev->ctrl_handler = &itv->hdl_out;
else
s->vdev->ctrl_handler = itv->v4l2_dev.ctrl_handler;
s->vdev->fops = ivtv_stream_info[type].fops;
s->vdev->ctrl_handler = itv->v4l2_dev.ctrl_handler;
s->vdev->release = video_device_release;
s->vdev->tvnorms = V4L2_STD_ALL;
s->vdev->lock = &itv->serialize_lock;
Expand Down

0 comments on commit d26d740

Please sign in to comment.