diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-11-24 06:37:21 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-12-02 11:28:48 -0200 |
commit | dfdf780b4651cf4932b96d3fe296230afacc360a (patch) | |
tree | 5818119d63a94b8b7ee3474af1ca0028c13385c0 /drivers/media/pci/cx18/cx18-streams.c | |
parent | 1fb69bfd29e4b2e5e93922105326dd6cbd5ef6eb (diff) | |
download | lwn-dfdf780b4651cf4932b96d3fe296230afacc360a.tar.gz lwn-dfdf780b4651cf4932b96d3fe296230afacc360a.zip |
[media] cx18: add device_caps support
This was missing in this driver, so add this functionality.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/cx18/cx18-streams.c')
-rw-r--r-- | drivers/media/pci/cx18/cx18-streams.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/pci/cx18/cx18-streams.c b/drivers/media/pci/cx18/cx18-streams.c index f3541b5156ce..369445fcf3e5 100644 --- a/drivers/media/pci/cx18/cx18-streams.c +++ b/drivers/media/pci/cx18/cx18-streams.c @@ -58,11 +58,14 @@ static struct { int vfl_type; int num_offset; int dma; + u32 caps; } cx18_stream_info[] = { { /* CX18_ENC_STREAM_TYPE_MPG */ "encoder MPEG", VFL_TYPE_GRABBER, 0, PCI_DMA_FROMDEVICE, + V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE | + V4L2_CAP_AUDIO | V4L2_CAP_TUNER }, { /* CX18_ENC_STREAM_TYPE_TS */ "TS", @@ -73,11 +76,15 @@ static struct { "encoder YUV", VFL_TYPE_GRABBER, CX18_V4L2_ENC_YUV_OFFSET, PCI_DMA_FROMDEVICE, + V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE | + V4L2_CAP_STREAMING | V4L2_CAP_AUDIO | V4L2_CAP_TUNER }, { /* CX18_ENC_STREAM_TYPE_VBI */ "encoder VBI", VFL_TYPE_VBI, 0, PCI_DMA_FROMDEVICE, + V4L2_CAP_VBI_CAPTURE | V4L2_CAP_SLICED_VBI_CAPTURE | + V4L2_CAP_READWRITE | V4L2_CAP_TUNER }, { /* CX18_ENC_STREAM_TYPE_PCM */ "encoder PCM audio", @@ -93,6 +100,7 @@ static struct { "encoder radio", VFL_TYPE_RADIO, 0, PCI_DMA_NONE, + V4L2_CAP_RADIO | V4L2_CAP_TUNER }, }; @@ -260,6 +268,7 @@ static void cx18_stream_init(struct cx18 *cx, int type) s->handle = CX18_INVALID_TASK_HANDLE; s->dma = cx18_stream_info[type].dma; + s->v4l2_dev_caps = cx18_stream_info[type].caps; s->buffers = cx->stream_buffers[type]; s->buf_size = cx->stream_buf_size[type]; INIT_LIST_HEAD(&s->buf_pool); |