| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * cx18 init/start/stop/exit stream functions |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl> |
|---|
| 7 | 8 | * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net> |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 10 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 11 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 12 | | - * (at your option) any later version. |
|---|
| 13 | | - * |
|---|
| 14 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 15 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 16 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 17 | | - * GNU General Public License for more details. |
|---|
| 18 | 9 | */ |
|---|
| 19 | 10 | |
|---|
| 20 | 11 | #include "cx18-driver.h" |
|---|
| .. | .. |
|---|
| 57 | 48 | } cx18_stream_info[] = { |
|---|
| 58 | 49 | { /* CX18_ENC_STREAM_TYPE_MPG */ |
|---|
| 59 | 50 | "encoder MPEG", |
|---|
| 60 | | - VFL_TYPE_GRABBER, 0, |
|---|
| 51 | + VFL_TYPE_VIDEO, 0, |
|---|
| 61 | 52 | PCI_DMA_FROMDEVICE, |
|---|
| 62 | 53 | V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE | |
|---|
| 63 | 54 | V4L2_CAP_AUDIO | V4L2_CAP_TUNER |
|---|
| 64 | 55 | }, |
|---|
| 65 | 56 | { /* CX18_ENC_STREAM_TYPE_TS */ |
|---|
| 66 | 57 | "TS", |
|---|
| 67 | | - VFL_TYPE_GRABBER, -1, |
|---|
| 58 | + VFL_TYPE_VIDEO, -1, |
|---|
| 68 | 59 | PCI_DMA_FROMDEVICE, |
|---|
| 69 | 60 | }, |
|---|
| 70 | 61 | { /* CX18_ENC_STREAM_TYPE_YUV */ |
|---|
| 71 | 62 | "encoder YUV", |
|---|
| 72 | | - VFL_TYPE_GRABBER, CX18_V4L2_ENC_YUV_OFFSET, |
|---|
| 63 | + VFL_TYPE_VIDEO, CX18_V4L2_ENC_YUV_OFFSET, |
|---|
| 73 | 64 | PCI_DMA_FROMDEVICE, |
|---|
| 74 | 65 | V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE | |
|---|
| 75 | 66 | V4L2_CAP_STREAMING | V4L2_CAP_AUDIO | V4L2_CAP_TUNER |
|---|
| .. | .. |
|---|
| 83 | 74 | }, |
|---|
| 84 | 75 | { /* CX18_ENC_STREAM_TYPE_PCM */ |
|---|
| 85 | 76 | "encoder PCM audio", |
|---|
| 86 | | - VFL_TYPE_GRABBER, CX18_V4L2_ENC_PCM_OFFSET, |
|---|
| 77 | + VFL_TYPE_VIDEO, CX18_V4L2_ENC_PCM_OFFSET, |
|---|
| 87 | 78 | PCI_DMA_FROMDEVICE, |
|---|
| 88 | 79 | V4L2_CAP_TUNER | V4L2_CAP_AUDIO | V4L2_CAP_READWRITE, |
|---|
| 89 | 80 | }, |
|---|
| 90 | 81 | { /* CX18_ENC_STREAM_TYPE_IDX */ |
|---|
| 91 | 82 | "encoder IDX", |
|---|
| 92 | | - VFL_TYPE_GRABBER, -1, |
|---|
| 83 | + VFL_TYPE_VIDEO, -1, |
|---|
| 93 | 84 | PCI_DMA_FROMDEVICE, |
|---|
| 94 | 85 | }, |
|---|
| 95 | 86 | { /* CX18_ENC_STREAM_TYPE_RAD */ |
|---|
| .. | .. |
|---|
| 420 | 411 | return 0; |
|---|
| 421 | 412 | |
|---|
| 422 | 413 | num = s->video_dev.num; |
|---|
| 414 | + s->video_dev.device_caps = s->v4l2_dev_caps; /* device capabilities */ |
|---|
| 423 | 415 | /* card number + user defined offset + device offset */ |
|---|
| 424 | 416 | if (type != CX18_ENC_STREAM_TYPE_MPG) { |
|---|
| 425 | 417 | struct cx18_stream *s_mpg = &cx->streams[CX18_ENC_STREAM_TYPE_MPG]; |
|---|
| .. | .. |
|---|
| 442 | 434 | name = video_device_node_name(&s->video_dev); |
|---|
| 443 | 435 | |
|---|
| 444 | 436 | switch (vfl_type) { |
|---|
| 445 | | - case VFL_TYPE_GRABBER: |
|---|
| 437 | + case VFL_TYPE_VIDEO: |
|---|
| 446 | 438 | CX18_INFO("Registered device %s for %s (%d x %d.%02d kB)\n", |
|---|
| 447 | 439 | name, s->name, cx->stream_buffers[type], |
|---|
| 448 | 440 | cx->stream_buf_size[type] / 1024, |
|---|
| .. | .. |
|---|
| 853 | 845 | |
|---|
| 854 | 846 | /* |
|---|
| 855 | 847 | * Audio related reset according to |
|---|
| 856 | | - * Documentation/media/v4l-drivers/cx2341x.rst |
|---|
| 848 | + * Documentation/driver-api/media/drivers/cx2341x-devel.rst |
|---|
| 857 | 849 | */ |
|---|
| 858 | 850 | if (atomic_read(&cx->ana_capturing) == 0) |
|---|
| 859 | 851 | cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 2, |
|---|
| .. | .. |
|---|
| 861 | 853 | |
|---|
| 862 | 854 | /* |
|---|
| 863 | 855 | * Number of lines for Field 1 & Field 2 according to |
|---|
| 864 | | - * Documentation/media/v4l-drivers/cx2341x.rst |
|---|
| 856 | + * Documentation/driver-api/media/drivers/cx2341x-devel.rst |
|---|
| 865 | 857 | * Field 1 is 312 for 625 line systems in BT.656 |
|---|
| 866 | 858 | * Field 2 is 313 for 625 line systems in BT.656 |
|---|
| 867 | 859 | */ |
|---|