2016-06-30 15:18:56 +02:00
|
|
|
|
.. -*- coding: utf-8; mode: rst -*-
|
|
|
|
|
|
|
|
|
|
.. _audio_function_calls:
|
|
|
|
|
|
|
|
|
|
********************
|
|
|
|
|
Audio Function Calls
|
|
|
|
|
********************
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _audio_fopen:
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
DVB audio open()
|
|
|
|
|
================
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This system call opens a named audio device (e.g.
|
|
|
|
|
/dev/dvb/adapter0/audio0) for subsequent use. When an open() call has
|
|
|
|
|
succeeded, the device will be ready for use. The significance of
|
|
|
|
|
blocking or non-blocking mode is described in the documentation for
|
|
|
|
|
functions where there is a difference. It does not affect the semantics
|
|
|
|
|
of the open() call itself. A device opened in blocking mode can later be
|
|
|
|
|
put into non-blocking mode (and vice versa) using the F_SETFL command
|
|
|
|
|
of the fcntl system call. This is a standard system call, documented in
|
|
|
|
|
the Linux manual page for fcntl. Only one user can open the Audio Device
|
|
|
|
|
in O_RDWR mode. All other attempts to open the device in this mode will
|
|
|
|
|
fail, and an error code will be returned. If the Audio Device is opened
|
|
|
|
|
in O_RDONLY mode, the only ioctl call that can be used is
|
|
|
|
|
AUDIO_GET_STATUS. All other call will return with an error code.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int open(const char *deviceName, int flags)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
- const char \*deviceName
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- Name of specific audio device.
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int flags
|
|
|
|
|
|
|
|
|
|
- A bit-wise OR of the following flags:
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
2016-07-04 16:25:48 -03:00
|
|
|
|
-
|
2016-06-30 15:18:56 +02:00
|
|
|
|
- O_RDONLY read-only access
|
|
|
|
|
|
|
|
|
|
- .. row 4
|
|
|
|
|
|
2016-07-04 16:25:48 -03:00
|
|
|
|
-
|
2016-06-30 15:18:56 +02:00
|
|
|
|
- O_RDWR read/write access
|
|
|
|
|
|
|
|
|
|
- .. row 5
|
|
|
|
|
|
2016-07-04 16:25:48 -03:00
|
|
|
|
-
|
2016-06-30 15:18:56 +02:00
|
|
|
|
- O_NONBLOCK open in non-blocking mode
|
|
|
|
|
|
|
|
|
|
- .. row 6
|
|
|
|
|
|
2016-07-04 16:25:48 -03:00
|
|
|
|
-
|
2016-06-30 15:18:56 +02:00
|
|
|
|
- (blocking mode is the default)
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
2016-07-03 11:53:09 -03:00
|
|
|
|
- ``ENODEV``
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- Device driver not loaded/available.
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
2016-07-03 11:53:09 -03:00
|
|
|
|
- ``EBUSY``
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- Device or resource busy.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
2016-07-03 11:53:09 -03:00
|
|
|
|
- ``EINVAL``
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- Invalid argument.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _audio_fclose:
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
DVB audio close()
|
|
|
|
|
=================
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This system call closes a previously opened audio device.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int close(int fd)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
2016-07-03 11:53:09 -03:00
|
|
|
|
- ``EBADF``
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- fd is not a valid open file descriptor.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _audio_fwrite:
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
DVB audio write()
|
|
|
|
|
=================
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This system call can only be used if AUDIO_SOURCE_MEMORY is selected
|
|
|
|
|
in the ioctl call AUDIO_SELECT_SOURCE. The data provided shall be in
|
|
|
|
|
PES format. If O_NONBLOCK is not specified the function will block
|
|
|
|
|
until buffer space is available. The amount of data to be transferred is
|
|
|
|
|
implied by count.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: size_t write(int fd, const void *buf, size_t count)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
- void \*buf
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- Pointer to the buffer containing the PES data.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
|
|
- size_t count
|
|
|
|
|
|
|
|
|
|
- Size of buf.
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
2016-07-03 11:53:09 -03:00
|
|
|
|
- ``EPERM``
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- Mode AUDIO_SOURCE_MEMORY not selected.
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
2016-07-03 11:53:09 -03:00
|
|
|
|
- ``ENOMEM``
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- Attempted to write more data than the internal buffer can hold.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
2016-07-03 11:53:09 -03:00
|
|
|
|
- ``EBADF``
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- fd is not a valid open file descriptor.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_STOP:
|
|
|
|
|
|
|
|
|
|
AUDIO_STOP
|
|
|
|
|
==========
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl call asks the Audio Device to stop playing the current
|
|
|
|
|
stream.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(int fd, int request = AUDIO_STOP)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_STOP for this command.
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_PLAY:
|
|
|
|
|
|
|
|
|
|
AUDIO_PLAY
|
|
|
|
|
==========
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl call asks the Audio Device to start playing an audio stream
|
|
|
|
|
from the selected source.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(int fd, int request = AUDIO_PLAY)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_PLAY for this command.
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_PAUSE:
|
|
|
|
|
|
|
|
|
|
AUDIO_PAUSE
|
|
|
|
|
===========
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl call suspends the audio stream being played. Decoding and
|
|
|
|
|
playing are paused. It is then possible to restart again decoding and
|
|
|
|
|
playing process of the audio stream using AUDIO_CONTINUE command.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(int fd, int request = AUDIO_PAUSE)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_PAUSE for this command.
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_CONTINUE:
|
|
|
|
|
|
|
|
|
|
AUDIO_CONTINUE
|
|
|
|
|
==============
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl restarts the decoding and playing process previously paused
|
|
|
|
|
with AUDIO_PAUSE command.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(int fd, int request = AUDIO_CONTINUE)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_CONTINUE for this command.
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_SELECT_SOURCE:
|
|
|
|
|
|
|
|
|
|
AUDIO_SELECT_SOURCE
|
|
|
|
|
===================
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl call informs the audio device which source shall be used for
|
|
|
|
|
the input data. The possible sources are demux or memory. If
|
|
|
|
|
AUDIO_SOURCE_MEMORY is selected, the data is fed to the Audio Device
|
|
|
|
|
through the write command.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(int fd, int request = AUDIO_SELECT_SOURCE, audio_stream_source_t source)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_SELECT_SOURCE for this command.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
|
|
- audio_stream_source_t source
|
|
|
|
|
|
|
|
|
|
- Indicates the source that shall be used for the Audio stream.
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_SET_MUTE:
|
|
|
|
|
|
|
|
|
|
AUDIO_SET_MUTE
|
|
|
|
|
==============
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl is for DVB devices only. To control a V4L2 decoder use the
|
2016-07-01 13:58:44 -03:00
|
|
|
|
V4L2 :ref:`VIDIOC_DECODER_CMD` with the
|
2016-06-30 15:18:56 +02:00
|
|
|
|
``V4L2_DEC_CMD_START_MUTE_AUDIO`` flag instead.
|
|
|
|
|
|
|
|
|
|
This ioctl call asks the audio device to mute the stream that is
|
|
|
|
|
currently being played.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(int fd, int request = AUDIO_SET_MUTE, boolean state)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_SET_MUTE for this command.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
|
|
- boolean state
|
|
|
|
|
|
|
|
|
|
- Indicates if audio device shall mute or not.
|
|
|
|
|
|
|
|
|
|
- .. row 4
|
|
|
|
|
|
2016-07-04 16:25:48 -03:00
|
|
|
|
-
|
2016-06-30 15:18:56 +02:00
|
|
|
|
- TRUE Audio Mute
|
|
|
|
|
|
|
|
|
|
- .. row 5
|
|
|
|
|
|
2016-07-04 16:25:48 -03:00
|
|
|
|
-
|
2016-06-30 15:18:56 +02:00
|
|
|
|
- FALSE Audio Un-mute
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_SET_AV_SYNC:
|
|
|
|
|
|
|
|
|
|
AUDIO_SET_AV_SYNC
|
|
|
|
|
=================
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl call asks the Audio Device to turn ON or OFF A/V
|
|
|
|
|
synchronization.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(int fd, int request = AUDIO_SET_AV_SYNC, boolean state)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_AV_SYNC for this command.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
|
|
- boolean state
|
|
|
|
|
|
|
|
|
|
- Tells the DVB subsystem if A/V synchronization shall be ON or OFF.
|
|
|
|
|
|
|
|
|
|
- .. row 4
|
|
|
|
|
|
2016-07-04 16:25:48 -03:00
|
|
|
|
-
|
2016-06-30 15:18:56 +02:00
|
|
|
|
- TRUE AV-sync ON
|
|
|
|
|
|
|
|
|
|
- .. row 5
|
|
|
|
|
|
2016-07-04 16:25:48 -03:00
|
|
|
|
-
|
2016-06-30 15:18:56 +02:00
|
|
|
|
- FALSE AV-sync OFF
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_SET_BYPASS_MODE:
|
|
|
|
|
|
|
|
|
|
AUDIO_SET_BYPASS_MODE
|
|
|
|
|
=====================
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl call asks the Audio Device to bypass the Audio decoder and
|
|
|
|
|
forward the stream without decoding. This mode shall be used if streams
|
|
|
|
|
that can’t be handled by the DVB system shall be decoded. Dolby
|
|
|
|
|
DigitalTM streams are automatically forwarded by the DVB subsystem if
|
|
|
|
|
the hardware can handle it.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(int fd, int request = AUDIO_SET_BYPASS_MODE, boolean mode)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_SET_BYPASS_MODE for this command.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
|
|
- boolean mode
|
|
|
|
|
|
|
|
|
|
- Enables or disables the decoding of the current Audio stream in
|
2016-07-04 16:25:48 -03:00
|
|
|
|
the DVB subsystem.
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- .. row 4
|
|
|
|
|
|
2016-07-04 16:25:48 -03:00
|
|
|
|
-
|
2016-06-30 15:18:56 +02:00
|
|
|
|
- TRUE Bypass is disabled
|
|
|
|
|
|
|
|
|
|
- .. row 5
|
|
|
|
|
|
2016-07-04 16:25:48 -03:00
|
|
|
|
-
|
2016-06-30 15:18:56 +02:00
|
|
|
|
- FALSE Bypass is enabled
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_CHANNEL_SELECT:
|
|
|
|
|
|
|
|
|
|
AUDIO_CHANNEL_SELECT
|
|
|
|
|
====================
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl is for DVB devices only. To control a V4L2 decoder use the
|
|
|
|
|
V4L2 ``V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK`` control instead.
|
|
|
|
|
|
|
|
|
|
This ioctl call asks the Audio Device to select the requested channel if
|
|
|
|
|
possible.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(int fd, int request = AUDIO_CHANNEL_SELECT, audio_channel_select_t)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_CHANNEL_SELECT for this command.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
|
|
- audio_channel_select_t ch
|
|
|
|
|
|
|
|
|
|
- Select the output format of the audio (mono left/right, stereo).
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_BILINGUAL_CHANNEL_SELECT:
|
|
|
|
|
|
|
|
|
|
AUDIO_BILINGUAL_CHANNEL_SELECT
|
|
|
|
|
==============================
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl is obsolete. Do not use in new drivers. It has been replaced
|
|
|
|
|
by the V4L2 ``V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK`` control
|
|
|
|
|
for MPEG decoders controlled through V4L2.
|
|
|
|
|
|
|
|
|
|
This ioctl call asks the Audio Device to select the requested channel
|
|
|
|
|
for bilingual streams if possible.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(int fd, int request = AUDIO_BILINGUAL_CHANNEL_SELECT, audio_channel_select_t)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_BILINGUAL_CHANNEL_SELECT for this command.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
|
|
- audio_channel_select_t ch
|
|
|
|
|
|
|
|
|
|
- Select the output format of the audio (mono left/right, stereo).
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_GET_PTS:
|
|
|
|
|
|
|
|
|
|
AUDIO_GET_PTS
|
|
|
|
|
=============
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl is obsolete. Do not use in new drivers. If you need this
|
|
|
|
|
functionality, then please contact the linux-media mailing list
|
|
|
|
|
(`https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__).
|
|
|
|
|
|
|
|
|
|
This ioctl call asks the Audio Device to return the current PTS
|
|
|
|
|
timestamp.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(int fd, int request = AUDIO_GET_PTS, __u64 *pts)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_GET_PTS for this command.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
- __u64 \*pts
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- Returns the 33-bit timestamp as defined in ITU T-REC-H.222.0 /
|
2016-07-04 16:25:48 -03:00
|
|
|
|
ISO/IEC 13818-1.
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 16:25:48 -03:00
|
|
|
|
The PTS should belong to the currently played frame if possible,
|
|
|
|
|
but may also be a value close to it like the PTS of the last
|
|
|
|
|
decoded frame or the last PTS extracted by the PES parser.
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_GET_STATUS:
|
|
|
|
|
|
|
|
|
|
AUDIO_GET_STATUS
|
|
|
|
|
================
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl call asks the Audio Device to return the current state of the
|
|
|
|
|
Audio Device.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(int fd, int request = AUDIO_GET_STATUS, struct audio_status *status)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_GET_STATUS for this command.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
- struct audio_status \*status
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- Returns the current state of Audio Device.
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_GET_CAPABILITIES:
|
|
|
|
|
|
|
|
|
|
AUDIO_GET_CAPABILITIES
|
|
|
|
|
======================
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl call asks the Audio Device to tell us about the decoding
|
|
|
|
|
capabilities of the audio hardware.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(int fd, int request = AUDIO_GET_CAPABILITIES, unsigned int *cap)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_GET_CAPABILITIES for this command.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
- unsigned int \*cap
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- Returns a bit array of supported sound formats.
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_CLEAR_BUFFER:
|
|
|
|
|
|
|
|
|
|
AUDIO_CLEAR_BUFFER
|
|
|
|
|
==================
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl call asks the Audio Device to clear all software and hardware
|
|
|
|
|
buffers of the audio decoder device.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(int fd, int request = AUDIO_CLEAR_BUFFER)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_CLEAR_BUFFER for this command.
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_SET_ID:
|
|
|
|
|
|
|
|
|
|
AUDIO_SET_ID
|
|
|
|
|
============
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl selects which sub-stream is to be decoded if a program or
|
|
|
|
|
system stream is sent to the video device. If no audio stream type is
|
|
|
|
|
set the id has to be in [0xC0,0xDF] for MPEG sound, in [0x80,0x87] for
|
|
|
|
|
AC3 and in [0xA0,0xA7] for LPCM. More specifications may follow for
|
|
|
|
|
other stream types. If the stream type is set the id just specifies the
|
|
|
|
|
substream id of the audio stream and only the first 5 bits are
|
|
|
|
|
recognized.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(int fd, int request = AUDIO_SET_ID, int id)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_SET_ID for this command.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
|
|
- int id
|
|
|
|
|
|
|
|
|
|
- audio sub-stream id
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_SET_MIXER:
|
|
|
|
|
|
|
|
|
|
AUDIO_SET_MIXER
|
|
|
|
|
===============
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl lets you adjust the mixer settings of the audio decoder.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(int fd, int request = AUDIO_SET_MIXER, audio_mixer_t *mix)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_SET_ID for this command.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
- audio_mixer_t \*mix
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- mixer settings.
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_SET_STREAMTYPE:
|
|
|
|
|
|
|
|
|
|
AUDIO_SET_STREAMTYPE
|
|
|
|
|
====================
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl tells the driver which kind of audio stream to expect. This
|
|
|
|
|
is useful if the stream offers several audio sub-streams like LPCM and
|
|
|
|
|
AC3.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(fd, int request = AUDIO_SET_STREAMTYPE, int type)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_SET_STREAMTYPE for this command.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
|
|
- int type
|
|
|
|
|
|
|
|
|
|
- stream type
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
2016-07-03 11:53:09 -03:00
|
|
|
|
- ``EINVAL``
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- type is not a valid or supported stream type.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_SET_EXT_ID:
|
|
|
|
|
|
|
|
|
|
AUDIO_SET_EXT_ID
|
|
|
|
|
================
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl can be used to set the extension id for MPEG streams in DVD
|
|
|
|
|
playback. Only the first 3 bits are recognized.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(fd, int request = AUDIO_SET_EXT_ID, int id)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_SET_EXT_ID for this command.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
|
|
- int id
|
|
|
|
|
|
|
|
|
|
- audio sub_stream_id
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
2016-07-03 11:53:09 -03:00
|
|
|
|
- ``EINVAL``
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- id is not a valid id.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_SET_ATTRIBUTES:
|
|
|
|
|
|
|
|
|
|
AUDIO_SET_ATTRIBUTES
|
|
|
|
|
====================
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl is intended for DVD playback and allows you to set certain
|
|
|
|
|
information about the audio stream.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(fd, int request = AUDIO_SET_ATTRIBUTES, audio_attributes_t attr )
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_SET_ATTRIBUTES for this command.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
|
|
- audio_attributes_t attr
|
|
|
|
|
|
|
|
|
|
- audio attributes according to section ??
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
2016-07-03 11:53:09 -03:00
|
|
|
|
- ``EINVAL``
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- attr is not a valid or supported attribute setting.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _AUDIO_SET_KARAOKE:
|
|
|
|
|
|
|
|
|
|
AUDIO_SET_KARAOKE
|
|
|
|
|
=================
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
This ioctl allows one to set the mixer settings for a karaoke DVD.
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Synopsis
|
|
|
|
|
--------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
.. c:function:: int ioctl(fd, int request = AUDIO_SET_KARAOKE, audio_karaoke_t *karaoke)
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Arguments
|
|
|
|
|
----------
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
|
|
- int fd
|
|
|
|
|
|
|
|
|
|
- File descriptor returned by a previous call to open().
|
|
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
|
|
- int request
|
|
|
|
|
|
|
|
|
|
- Equals AUDIO_SET_KARAOKE for this command.
|
|
|
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
- audio_karaoke_t \*karaoke
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- karaoke settings according to section ??.
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 12:15:56 -03:00
|
|
|
|
Return Value
|
|
|
|
|
------------
|
2016-06-30 15:18:56 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. flat-table::
|
|
|
|
|
:header-rows: 0
|
|
|
|
|
:stub-columns: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
2016-07-03 11:53:09 -03:00
|
|
|
|
- ``EINVAL``
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
|
- karaoke is not a valid or supported karaoke setting.
|