1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
16 This section describes the structures, data types and defines used when
17 talking to the audio device.
19 .. c:type:: audio_stream_source
21 The audio stream source is set through the AUDIO_SELECT_SOURCE call
22 and can take the following values, depending on whether we are replaying
23 from an internal (demux) or external (user write) source.
31 } audio_stream_source_t;
33 AUDIO_SOURCE_DEMUX selects the demultiplexer (fed either by the
34 frontend or the DVR device) as the source of the video stream. If
35 AUDIO_SOURCE_MEMORY is selected the stream comes from the application
36 through the ``write()`` system call.
39 .. c:type:: audio_play_state
41 The following values can be returned by the AUDIO_GET_STATUS call
42 representing the state of audio playback.
54 .. c:type:: audio_channel_select
56 The audio channel selected via AUDIO_CHANNEL_SELECT is determined by
68 } audio_channel_select_t;
71 .. c:type:: audio_status
73 The AUDIO_GET_STATUS call returns the following structure informing
74 about various states of the playback operation.
79 typedef struct audio_status {
80 boolean AV_sync_state;
82 audio_play_state_t play_state;
83 audio_stream_source_t stream_source;
84 audio_channel_select_t channel_select;
86 audio_mixer_t mixer_state;
90 .. c:type:: audio_mixer
92 The following structure is used by the AUDIO_SET_MIXER call to set the
98 typedef struct audio_mixer {
99 unsigned int volume_left;
100 unsigned int volume_right;
109 A call to AUDIO_GET_CAPABILITIES returns an unsigned integer with the
110 following bits set according to the hardwares capabilities.
115 #define AUDIO_CAP_DTS 1
116 #define AUDIO_CAP_LPCM 2
117 #define AUDIO_CAP_MP1 4
118 #define AUDIO_CAP_MP2 8
119 #define AUDIO_CAP_MP3 16
120 #define AUDIO_CAP_AAC 32
121 #define AUDIO_CAP_OGG 64
122 #define AUDIO_CAP_SDDS 128
123 #define AUDIO_CAP_AC3 256