From a1f18fdc72a4dc7315f7bd14d6cb30dde42ce6eb Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 21 Dec 2017 10:42:26 -0500 Subject: media: dvb uAPI docs: document mmap-related ioctls 5 new ioctls were added to the DVB demux API, in order to handle memory maped I/O. Add documentation for them. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/dvb/dmx-querybuf.rst | 65 +++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Documentation/media/uapi/dvb/dmx-querybuf.rst (limited to 'Documentation/media/uapi/dvb/dmx-querybuf.rst') diff --git a/Documentation/media/uapi/dvb/dmx-querybuf.rst b/Documentation/media/uapi/dvb/dmx-querybuf.rst new file mode 100644 index 000000000000..46a50f191b10 --- /dev/null +++ b/Documentation/media/uapi/dvb/dmx-querybuf.rst @@ -0,0 +1,65 @@ +.. _DMX_QUERYBUF: + +****************** +ioctl DMX_QUERYBUF +****************** + +Name +==== + +DMX_QUERYBUF - Query the status of a buffer + +.. warning:: this API is still experimental + + +Synopsis +======== + +.. c:function:: int ioctl( int fd, DMX_QUERYBUF, struct dvb_buffer *argp ) + :name: DMX_QUERYBUF + + +Arguments +========= + +``fd`` + File descriptor returned by :ref:`open() `. + +``argp`` + Pointer to struct :c:type:`dvb_buffer`. + + +Description +=========== + +This ioctl is part of the mmap streaming I/O method. It can +be used to query the status of a buffer at any time after buffers have +been allocated with the :ref:`DMX_REQBUFS` ioctl. + +The ``reserved`` array must be zeroed before calling it. + +Applications set the ``index`` field. Valid index numbers range from zero +to the number of buffers allocated with :ref:`DMX_REQBUFS` +(struct :c:type:`dvb_requestbuffers` ``count``) minus one. + +After calling :ref:`DMX_QUERYBUF` with a pointer to this structure, +drivers return an error code or fill the rest of the structure. + +On success, the ``offset`` will contain the offset of the buffer from the +start of the device memory, the ``length`` field its size, and the +``bytesused`` the number of bytes occupied by data in the buffer (payload). + +Return Value +============ + +On success 0 is returned, the ``offset`` will contain the offset of the +buffer from the start of the device memory, the ``length`` field its size, +and the ``bytesused`` the number of bytes occupied by data in the buffer +(payload). + +On error it returns -1 and the ``errno`` variable is set +appropriately. The generic error codes are described at the +:ref:`Generic Error Codes ` chapter. + +EINVAL + The ``index`` is out of bounds. -- cgit From a114a585be4f3173fe454921a0918fb7e71633b0 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 21 Dec 2017 10:57:13 -0500 Subject: media: dvb-core: get rid of mmap reserved field The "reserved" field was a way, used at V4L2 API, to add new data to existing structs without breaking userspace. However, there are now clever ways of doing that, without needing to add an uneeded overhead. So, get rid of them. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/dvb/dmx-querybuf.rst | 2 -- 1 file changed, 2 deletions(-) (limited to 'Documentation/media/uapi/dvb/dmx-querybuf.rst') diff --git a/Documentation/media/uapi/dvb/dmx-querybuf.rst b/Documentation/media/uapi/dvb/dmx-querybuf.rst index 46a50f191b10..89481e24bb86 100644 --- a/Documentation/media/uapi/dvb/dmx-querybuf.rst +++ b/Documentation/media/uapi/dvb/dmx-querybuf.rst @@ -36,8 +36,6 @@ This ioctl is part of the mmap streaming I/O method. It can be used to query the status of a buffer at any time after buffers have been allocated with the :ref:`DMX_REQBUFS` ioctl. -The ``reserved`` array must be zeroed before calling it. - Applications set the ``index`` field. Valid index numbers range from zero to the number of buffers allocated with :ref:`DMX_REQBUFS` (struct :c:type:`dvb_requestbuffers` ``count``) minus one. -- cgit