~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/userspace-api/media/dvb/dmx-mmap.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/userspace-api/media/dvb/dmx-mmap.rst (Version linux-6.12-rc7) and /Documentation/userspace-api/media/dvb/dmx-mmap.rst (Version linux-4.14.336)


  1 .. SPDX-License-Identifier: GFDL-1.1-no-invari    
  2 .. c:namespace:: DTV.dmx                          
  3                                                   
  4 .. _dmx-mmap:                                     
  5                                                   
  6 *****************                                 
  7 Digital TV mmap()                                 
  8 *****************                                 
  9                                                   
 10 Name                                              
 11 ====                                              
 12                                                   
 13 dmx-mmap - Map device memory into application     
 14                                                   
 15 .. warning:: this API is still experimental       
 16                                                   
 17 Synopsis                                          
 18 ========                                          
 19                                                   
 20 .. code-block:: c                                 
 21                                                   
 22     #include <unistd.h>                           
 23     #include <sys/mman.h>                         
 24                                                   
 25 .. c:function:: void *mmap( void *start, size_    
 26                                                   
 27 Arguments                                         
 28 =========                                         
 29                                                   
 30 ``start``                                         
 31     Map the buffer to this address in the appl    
 32     When the ``MAP_FIXED`` flag is specified,     
 33     multiple of the pagesize and mmap will fai    
 34     address cannot be used. Use of this option    
 35     applications should just specify a ``NULL`    
 36                                                   
 37 ``length``                                        
 38     Length of the memory area to map. This mus    
 39     DVB packet length (188, on most drivers).     
 40                                                   
 41 ``prot``                                          
 42     The ``prot`` argument describes the desire    
 43     Regardless of the device type and the dire    
 44     should be set to ``PROT_READ`` | ``PROT_WR    
 45     and write access to image buffers. Drivers    
 46     this combination of flags.                    
 47                                                   
 48 ``flags``                                         
 49     The ``flags`` parameter specifies the type    
 50     mapping options and whether modifications     
 51     the page are private to the process or are    
 52     references.                                   
 53                                                   
 54     ``MAP_FIXED`` requests that the driver sel    
 55     the one specified. If the specified addres    
 56     :c:func:`mmap()` will fail. If ``MAP_FIXED    
 57     ``start`` must be a multiple of the pagesi    
 58     discouraged.                                  
 59                                                   
 60     One of the ``MAP_SHARED`` or ``MAP_PRIVATE    
 61     ``MAP_SHARED`` allows applications to shar    
 62     other (e. g. child-) processes.               
 63                                                   
 64     .. note::                                     
 65                                                   
 66        The Linux Digital TV applications shoul    
 67        ``MAP_PRIVATE``, ``MAP_DENYWRITE``, ``M    
 68        flags.                                     
 69                                                   
 70 ``fd``                                            
 71     File descriptor returned by :c:func:`open(    
 72                                                   
 73 ``offset``                                        
 74     Offset of the buffer in device memory, as     
 75     :ref:`DMX_QUERYBUF` ioctl.                    
 76                                                   
 77 Description                                       
 78 ===========                                       
 79                                                   
 80 The :c:func:`mmap()` function asks to map ``le    
 81 ``offset`` in the memory of the device specifi    
 82 application address space, preferably at addre    
 83 address is a hint only, and is usually specifi    
 84                                                   
 85 Suitable length and offset parameters are quer    
 86 :ref:`DMX_QUERYBUF` ioctl. Buffers must be all    
 87 :ref:`DMX_REQBUFS` ioctl before they can be qu    
 88                                                   
 89 To unmap buffers the :c:func:`munmap()` functi    
 90                                                   
 91 Return Value                                      
 92 ============                                      
 93                                                   
 94 On success :c:func:`mmap()` returns a pointer     
 95 error ``MAP_FAILED`` (-1) is returned, and the    
 96 appropriately. Possible error codes are:          
 97                                                   
 98 EBADF                                             
 99     ``fd`` is not a valid file descriptor.        
100                                                   
101 EACCES                                            
102     ``fd`` is not open for reading and writing    
103                                                   
104 EINVAL                                            
105     The ``start`` or ``length`` or ``offset``     
106     they are too large, or not aligned on a ``    
107                                                   
108     The ``flags`` or ``prot`` value is not sup    
109                                                   
110     No buffers have been allocated with the       
111     :ref:`DMX_REQBUFS` ioctl.                     
112                                                   
113 ENOMEM                                            
114     Not enough physical or virtual memory was     
115     request.                                      
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php