Mauro Carvalho Chehab | 47d23e3 | 2016-07-05 10:37:31 -0300 | [diff] [blame] | 1 | .. -*- coding: utf-8; mode: rst -*- |
| 2 | |
| 3 | .. _audio_fwrite: |
| 4 | |
Mauro Carvalho Chehab | 699f19e | 2017-09-01 12:28:16 -0400 | [diff] [blame] | 5 | ========================= |
| 6 | Digital TV audio write() |
| 7 | ========================= |
Mauro Carvalho Chehab | 47d23e3 | 2016-07-05 10:37:31 -0300 | [diff] [blame] | 8 | |
Mauro Carvalho Chehab | 15e7d61 | 2016-07-05 15:14:35 -0300 | [diff] [blame] | 9 | Name |
Mauro Carvalho Chehab | 586027c | 2016-07-05 07:58:48 -0300 | [diff] [blame] | 10 | ---- |
Mauro Carvalho Chehab | 47d23e3 | 2016-07-05 10:37:31 -0300 | [diff] [blame] | 11 | |
Mauro Carvalho Chehab | 699f19e | 2017-09-01 12:28:16 -0400 | [diff] [blame] | 12 | Digital TV audio write() |
Mauro Carvalho Chehab | 47d23e3 | 2016-07-05 10:37:31 -0300 | [diff] [blame] | 13 | |
Mauro Carvalho Chehab | cf8076c | 2016-08-19 16:56:15 -0300 | [diff] [blame] | 14 | .. attention:: This ioctl is deprecated |
Mauro Carvalho Chehab | 15e7d61 | 2016-07-05 15:14:35 -0300 | [diff] [blame] | 15 | |
| 16 | Synopsis |
Mauro Carvalho Chehab | 47d23e3 | 2016-07-05 10:37:31 -0300 | [diff] [blame] | 17 | -------- |
| 18 | |
Mauro Carvalho Chehab | 1b81f01 | 2016-08-19 12:00:43 -0300 | [diff] [blame] | 19 | .. c:function:: size_t write(int fd, const void *buf, size_t count) |
Mauro Carvalho Chehab | cf8076c | 2016-08-19 16:56:15 -0300 | [diff] [blame] | 20 | :name: dvb-audio-write |
Mauro Carvalho Chehab | 47d23e3 | 2016-07-05 10:37:31 -0300 | [diff] [blame] | 21 | |
Mauro Carvalho Chehab | 47d23e3 | 2016-07-05 10:37:31 -0300 | [diff] [blame] | 22 | |
Mauro Carvalho Chehab | 15e7d61 | 2016-07-05 15:14:35 -0300 | [diff] [blame] | 23 | Arguments |
Mauro Carvalho Chehab | 586027c | 2016-07-05 07:58:48 -0300 | [diff] [blame] | 24 | --------- |
Mauro Carvalho Chehab | 47d23e3 | 2016-07-05 10:37:31 -0300 | [diff] [blame] | 25 | |
| 26 | .. flat-table:: |
| 27 | :header-rows: 0 |
| 28 | :stub-columns: 0 |
| 29 | |
| 30 | |
| 31 | - .. row 1 |
| 32 | |
| 33 | - int fd |
| 34 | |
| 35 | - File descriptor returned by a previous call to open(). |
| 36 | |
| 37 | - .. row 2 |
| 38 | |
| 39 | - void \*buf |
| 40 | |
| 41 | - Pointer to the buffer containing the PES data. |
| 42 | |
| 43 | - .. row 3 |
| 44 | |
| 45 | - size_t count |
| 46 | |
| 47 | - Size of buf. |
| 48 | |
| 49 | |
Mauro Carvalho Chehab | 15e7d61 | 2016-07-05 15:14:35 -0300 | [diff] [blame] | 50 | Description |
Mauro Carvalho Chehab | 586027c | 2016-07-05 07:58:48 -0300 | [diff] [blame] | 51 | ----------- |
| 52 | |
| 53 | This system call can only be used if AUDIO_SOURCE_MEMORY is selected |
| 54 | in the ioctl call AUDIO_SELECT_SOURCE. The data provided shall be in |
| 55 | PES format. If O_NONBLOCK is not specified the function will block |
| 56 | until buffer space is available. The amount of data to be transferred is |
| 57 | implied by count. |
| 58 | |
| 59 | |
Mauro Carvalho Chehab | 15e7d61 | 2016-07-05 15:14:35 -0300 | [diff] [blame] | 60 | Return Value |
Mauro Carvalho Chehab | 47d23e3 | 2016-07-05 10:37:31 -0300 | [diff] [blame] | 61 | ------------ |
| 62 | |
Mauro Carvalho Chehab | 47d23e3 | 2016-07-05 10:37:31 -0300 | [diff] [blame] | 63 | .. flat-table:: |
| 64 | :header-rows: 0 |
| 65 | :stub-columns: 0 |
| 66 | |
| 67 | |
| 68 | - .. row 1 |
| 69 | |
| 70 | - ``EPERM`` |
| 71 | |
| 72 | - Mode AUDIO_SOURCE_MEMORY not selected. |
| 73 | |
| 74 | - .. row 2 |
| 75 | |
| 76 | - ``ENOMEM`` |
| 77 | |
| 78 | - Attempted to write more data than the internal buffer can hold. |
| 79 | |
| 80 | - .. row 3 |
| 81 | |
| 82 | - ``EBADF`` |
| 83 | |
| 84 | - fd is not a valid open file descriptor. |