Configure the buffer size.
This function can configure the buffer size of the file descriptor currently in use. If the subdevice index is set to A4L_BUF_DEFMAGIC, it can also define the default buffser size at open time.
- Parameters
-
[in] | fd | File descriptor as returned by a4l_sys_open() |
[in] | idx_subd | Index of the concerned subdevice |
[in] | size | Buffer size to be set |
- Returns
- 0 on success. Otherwise:
- -EINVAL is returned if some argument is missing or wrong (Please, type "dmesg" for more info)
- -EPERM is returned if the function is called in an RT context or if the buffer to resize is mapped in user-space (Please, type "dmesg" for more info)
- -EFAULT is returned if a user <-> kernel transfer went wrong
- -EBUSY is returned if the selected subdevice is already processing an asynchronous operation
- -ENOMEM is returned if the system is out of memory
Referenced by a4l_set_bufsize().