2016-06-30 21:18:56 +08:00
|
|
|
.. -*- coding: utf-8; mode: rst -*-
|
|
|
|
|
2016-07-02 00:42:29 +08:00
|
|
|
.. _VIDIOC_ENUMAUDIO:
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
**********************
|
|
|
|
ioctl VIDIOC_ENUMAUDIO
|
|
|
|
**********************
|
|
|
|
|
2016-07-06 02:14:35 +08:00
|
|
|
Name
|
2016-07-05 18:58:48 +08:00
|
|
|
====
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-07-05 18:58:48 +08:00
|
|
|
VIDIOC_ENUMAUDIO - Enumerate audio inputs
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-07-06 02:14:35 +08:00
|
|
|
|
|
|
|
Synopsis
|
2016-06-30 21:18:56 +08:00
|
|
|
========
|
|
|
|
|
2016-08-20 03:53:38 +08:00
|
|
|
.. c:function:: int ioctl( int fd, VIDIOC_ENUMAUDIO, struct v4l2_audio *argp )
|
|
|
|
:name: VIDIOC_ENUMAUDIO
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-07-05 18:58:48 +08:00
|
|
|
|
2016-07-06 02:14:35 +08:00
|
|
|
Arguments
|
2016-06-30 21:18:56 +08:00
|
|
|
=========
|
|
|
|
|
|
|
|
``fd``
|
|
|
|
File descriptor returned by :ref:`open() <func-open>`.
|
|
|
|
|
|
|
|
``argp``
|
2017-09-02 21:54:48 +08:00
|
|
|
Pointer to struct :c:type:`v4l2_audio`.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
|
2016-07-06 02:14:35 +08:00
|
|
|
Description
|
2016-06-30 21:18:56 +08:00
|
|
|
===========
|
|
|
|
|
|
|
|
To query the attributes of an audio input applications initialize the
|
|
|
|
``index`` field and zero out the ``reserved`` array of a struct
|
2016-08-30 04:37:59 +08:00
|
|
|
:c:type:`v4l2_audio` and call the :ref:`VIDIOC_ENUMAUDIO`
|
2016-06-30 21:18:56 +08:00
|
|
|
ioctl with a pointer to this structure. Drivers fill the rest of the
|
2016-07-03 22:53:09 +08:00
|
|
|
structure or return an ``EINVAL`` error code when the index is out of
|
2016-06-30 21:18:56 +08:00
|
|
|
bounds. To enumerate all audio inputs applications shall begin at index
|
2016-07-03 22:53:09 +08:00
|
|
|
zero, incrementing by one until the driver returns ``EINVAL``.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-07-03 21:02:29 +08:00
|
|
|
See :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` for a description of struct
|
2016-08-30 04:37:59 +08:00
|
|
|
:c:type:`v4l2_audio`.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
|
2016-07-06 02:14:35 +08:00
|
|
|
Return Value
|
2016-06-30 21:18:56 +08:00
|
|
|
============
|
|
|
|
|
|
|
|
On success 0 is returned, on error -1 and the ``errno`` variable is set
|
|
|
|
appropriately. The generic error codes are described at the
|
|
|
|
:ref:`Generic Error Codes <gen-errors>` chapter.
|
|
|
|
|
|
|
|
EINVAL
|
|
|
|
The number of the audio input is out of bounds.
|