1059b1c5bSMauro Carvalho Chehab.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2*f9b2e8aaSMauro Carvalho Chehab.. c:namespace:: DTV.dmx 354f38fcaSMauro Carvalho Chehab 454f38fcaSMauro Carvalho Chehab.. _dmx_fwrite: 554f38fcaSMauro Carvalho Chehab 654f38fcaSMauro Carvalho Chehab======================== 754f38fcaSMauro Carvalho ChehabDigital TV demux write() 854f38fcaSMauro Carvalho Chehab======================== 954f38fcaSMauro Carvalho Chehab 1054f38fcaSMauro Carvalho ChehabName 1154f38fcaSMauro Carvalho Chehab---- 1254f38fcaSMauro Carvalho Chehab 1354f38fcaSMauro Carvalho ChehabDigital TV demux write() 1454f38fcaSMauro Carvalho Chehab 1554f38fcaSMauro Carvalho ChehabSynopsis 1654f38fcaSMauro Carvalho Chehab-------- 1754f38fcaSMauro Carvalho Chehab 1854f38fcaSMauro Carvalho Chehab.. c:function:: ssize_t write(int fd, const void *buf, size_t count) 1954f38fcaSMauro Carvalho Chehab 2054f38fcaSMauro Carvalho ChehabArguments 2154f38fcaSMauro Carvalho Chehab--------- 2254f38fcaSMauro Carvalho Chehab 2354f38fcaSMauro Carvalho Chehab``fd`` 24*f9b2e8aaSMauro Carvalho Chehab File descriptor returned by a previous call to :c:func:`open()`. 2554f38fcaSMauro Carvalho Chehab 2654f38fcaSMauro Carvalho Chehab``buf`` 2754f38fcaSMauro Carvalho Chehab Buffer with data to be written 2854f38fcaSMauro Carvalho Chehab 2954f38fcaSMauro Carvalho Chehab``count`` 3054f38fcaSMauro Carvalho Chehab Number of bytes at the buffer 3154f38fcaSMauro Carvalho Chehab 3254f38fcaSMauro Carvalho ChehabDescription 3354f38fcaSMauro Carvalho Chehab----------- 3454f38fcaSMauro Carvalho Chehab 3554f38fcaSMauro Carvalho ChehabThis system call is only provided by the logical device 3654f38fcaSMauro Carvalho Chehab``/dev/dvb/adapter?/dvr?``, associated with the physical demux device that 3754f38fcaSMauro Carvalho Chehabprovides the actual DVR functionality. It is used for replay of a 3854f38fcaSMauro Carvalho Chehabdigitally recorded Transport Stream. Matching filters have to be defined 3954f38fcaSMauro Carvalho Chehabin the corresponding physical demux device, ``/dev/dvb/adapter?/demux?``. 4054f38fcaSMauro Carvalho ChehabThe amount of data to be transferred is implied by count. 4154f38fcaSMauro Carvalho Chehab 4254f38fcaSMauro Carvalho ChehabReturn Value 4354f38fcaSMauro Carvalho Chehab------------ 4454f38fcaSMauro Carvalho Chehab 4554f38fcaSMauro Carvalho ChehabOn success 0 is returned. 4654f38fcaSMauro Carvalho Chehab 4754f38fcaSMauro Carvalho ChehabOn error -1 is returned, and the ``errno`` variable is set 4854f38fcaSMauro Carvalho Chehabappropriately. 4954f38fcaSMauro Carvalho Chehab 5054f38fcaSMauro Carvalho Chehab.. tabularcolumns:: |p{2.5cm}|p{15.0cm}| 5154f38fcaSMauro Carvalho Chehab 5254f38fcaSMauro Carvalho Chehab.. flat-table:: 5354f38fcaSMauro Carvalho Chehab :header-rows: 0 5454f38fcaSMauro Carvalho Chehab :stub-columns: 0 5554f38fcaSMauro Carvalho Chehab :widths: 1 16 5654f38fcaSMauro Carvalho Chehab 5754f38fcaSMauro Carvalho Chehab - - ``EWOULDBLOCK`` 5854f38fcaSMauro Carvalho Chehab - No data was written. This might happen if ``O_NONBLOCK`` was 5954f38fcaSMauro Carvalho Chehab specified and there is no more buffer space available (if 6054f38fcaSMauro Carvalho Chehab ``O_NONBLOCK`` is not specified the function will block until buffer 6154f38fcaSMauro Carvalho Chehab space is available). 6254f38fcaSMauro Carvalho Chehab 6354f38fcaSMauro Carvalho Chehab - - ``EBUSY`` 6454f38fcaSMauro Carvalho Chehab - This error code indicates that there are conflicting requests. The 6554f38fcaSMauro Carvalho Chehab corresponding demux device is setup to receive data from the 6654f38fcaSMauro Carvalho Chehab front- end. Make sure that these filters are stopped and that the 6754f38fcaSMauro Carvalho Chehab filters with input set to ``DMX_IN_DVR`` are started. 6854f38fcaSMauro Carvalho Chehab 6954f38fcaSMauro Carvalho ChehabThe generic error codes are described at the 7054f38fcaSMauro Carvalho Chehab:ref:`Generic Error Codes <gen-errors>` chapter. 71