|
@@ -1198,28 +1198,28 @@ static int __devinit ivtv_probe(struct pci_dev *pdev,
|
|
itv->tuner_std = itv->std;
|
|
itv->tuner_std = itv->std;
|
|
|
|
|
|
if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) {
|
|
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);
|
|
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);
|
|
V4L2_CID_MPEG_VIDEO_DEC_FRAME, 0, 0x7fffffff, 1, 0);
|
|
/* Note: V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO is not supported,
|
|
/* Note: V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO is not supported,
|
|
mask that menu item. */
|
|
mask that menu item. */
|
|
itv->ctrl_audio_playback =
|
|
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_CID_MPEG_AUDIO_DEC_PLAYBACK,
|
|
V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO,
|
|
V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO,
|
|
1 << V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO,
|
|
1 << V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO,
|
|
V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO);
|
|
V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO);
|
|
itv->ctrl_audio_multilingual_playback =
|
|
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_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK,
|
|
V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO,
|
|
V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO,
|
|
1 << V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO,
|
|
1 << V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO,
|
|
V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT);
|
|
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;
|
|
goto free_i2c;
|
|
}
|
|
}
|
|
v4l2_ctrl_cluster(2, &itv->ctrl_pts);
|
|
v4l2_ctrl_cluster(2, &itv->ctrl_pts);
|
|
@@ -1260,8 +1260,6 @@ free_streams:
|
|
free_irq:
|
|
free_irq:
|
|
free_irq(itv->pdev->irq, (void *)itv);
|
|
free_irq(itv->pdev->irq, (void *)itv);
|
|
free_i2c:
|
|
free_i2c:
|
|
- if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)
|
|
|
|
- v4l2_ctrl_handler_free(&itv->hdl_out);
|
|
|
|
v4l2_ctrl_handler_free(&itv->cxhdl.hdl);
|
|
v4l2_ctrl_handler_free(&itv->cxhdl.hdl);
|
|
exit_ivtv_i2c(itv);
|
|
exit_ivtv_i2c(itv);
|
|
free_io:
|
|
free_io:
|
|
@@ -1418,8 +1416,6 @@ static void ivtv_remove(struct pci_dev *pdev)
|
|
ivtv_streams_cleanup(itv, 1);
|
|
ivtv_streams_cleanup(itv, 1);
|
|
ivtv_udma_free(itv);
|
|
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);
|
|
v4l2_ctrl_handler_free(&itv->cxhdl.hdl);
|
|
|
|
|
|
exit_ivtv_i2c(itv);
|
|
exit_ivtv_i2c(itv);
|