.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * |
---|
3 | 4 | * (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs] |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or modify |
---|
6 | | - * it under the terms of the GNU General Public License as published by |
---|
7 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
8 | | - * (at your option) any later version. |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope that it will be useful, |
---|
11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | | - * GNU General Public License for more details. |
---|
14 | 5 | */ |
---|
15 | 6 | |
---|
16 | 7 | #include "saa7134.h" |
---|
.. | .. |
---|
100 | 91 | if (f->index != 0) |
---|
101 | 92 | return -EINVAL; |
---|
102 | 93 | |
---|
103 | | - strlcpy(f->description, "MPEG TS", sizeof(f->description)); |
---|
104 | 94 | f->pixelformat = V4L2_PIX_FMT_MPEG; |
---|
105 | | - f->flags = V4L2_FMT_FLAG_COMPRESSED; |
---|
106 | 95 | return 0; |
---|
107 | 96 | } |
---|
108 | 97 | |
---|
.. | .. |
---|
265 | 254 | "%s empress (%s)", dev->name, |
---|
266 | 255 | saa7134_boards[dev->board].name); |
---|
267 | 256 | v4l2_ctrl_handler_init(hdl, 21); |
---|
268 | | - v4l2_ctrl_add_handler(hdl, &dev->ctrl_handler, empress_ctrl_filter); |
---|
| 257 | + v4l2_ctrl_add_handler(hdl, &dev->ctrl_handler, empress_ctrl_filter, false); |
---|
269 | 258 | if (dev->empress_sd) |
---|
270 | | - v4l2_ctrl_add_handler(hdl, dev->empress_sd->ctrl_handler, NULL); |
---|
| 259 | + v4l2_ctrl_add_handler(hdl, dev->empress_sd->ctrl_handler, NULL, true); |
---|
271 | 260 | if (hdl->error) { |
---|
272 | 261 | video_device_release(dev->empress_dev); |
---|
273 | 262 | return hdl->error; |
---|
.. | .. |
---|
299 | 288 | return err; |
---|
300 | 289 | } |
---|
301 | 290 | dev->empress_dev->queue = q; |
---|
| 291 | + dev->empress_dev->device_caps = V4L2_CAP_READWRITE | V4L2_CAP_STREAMING | |
---|
| 292 | + V4L2_CAP_VIDEO_CAPTURE; |
---|
| 293 | + if (dev->tuner_type != TUNER_ABSENT && dev->tuner_type != UNSET) |
---|
| 294 | + dev->empress_dev->device_caps |= V4L2_CAP_TUNER; |
---|
302 | 295 | |
---|
303 | 296 | video_set_drvdata(dev->empress_dev, dev); |
---|
304 | | - err = video_register_device(dev->empress_dev,VFL_TYPE_GRABBER, |
---|
| 297 | + err = video_register_device(dev->empress_dev,VFL_TYPE_VIDEO, |
---|
305 | 298 | empress_nr[dev->nr]); |
---|
306 | 299 | if (err < 0) { |
---|
307 | 300 | pr_info("%s: can't register video device\n", |
---|
.. | .. |
---|
324 | 317 | if (NULL == dev->empress_dev) |
---|
325 | 318 | return 0; |
---|
326 | 319 | flush_work(&dev->empress_workqueue); |
---|
327 | | - video_unregister_device(dev->empress_dev); |
---|
328 | | - vb2_queue_release(&dev->empress_vbq); |
---|
| 320 | + vb2_video_unregister_device(dev->empress_dev); |
---|
329 | 321 | v4l2_ctrl_handler_free(&dev->empress_ctrl_handler); |
---|
330 | 322 | dev->empress_dev = NULL; |
---|
331 | 323 | return 0; |
---|