spapr: Don't allow multiple active vCPUs at CAS
[qemu/ar7.git] / qapi / audio.json
blob83312b23391edc0bc76fc6d69d66a472b02ed87a
1 # -*- mode: python -*-
3 # Copyright (C) 2015-2019 Zoltán Kővágó <DirtY.iCE.hu@gmail.com>
5 # This work is licensed under the terms of the GNU GPL, version 2 or later.
6 # See the COPYING file in the top-level directory.
8 ##
9 # @AudiodevPerDirectionOptions:
11 # General audio backend options that are used for both playback and
12 # recording.
14 # @mixing-engine: use QEMU's mixing engine to mix all streams inside QEMU and
15 #                 convert audio formats when not supported by the backend. When
16 #                 set to off, fixed-settings must be also off (default on,
17 #                 since 4.2)
19 # @fixed-settings: use fixed settings for host input/output. When off,
20 #                  frequency, channels and format must not be
21 #                  specified (default true)
23 # @frequency: frequency to use when using fixed settings
24 #             (default 44100)
26 # @channels: number of channels when using fixed settings (default 2)
28 # @voices: number of voices to use (default 1)
30 # @format: sample format to use when using fixed settings
31 #          (default s16)
33 # @buffer-length: the buffer length in microseconds
35 # Since: 4.0
37 { 'struct': 'AudiodevPerDirectionOptions',
38   'data': {
39     '*mixing-engine':  'bool',
40     '*fixed-settings': 'bool',
41     '*frequency':      'uint32',
42     '*channels':       'uint32',
43     '*voices':         'uint32',
44     '*format':         'AudioFormat',
45     '*buffer-length':  'uint32' } }
48 # @AudiodevGenericOptions:
50 # Generic driver-specific options.
52 # @in: options of the capture stream
54 # @out: options of the playback stream
56 # Since: 4.0
58 { 'struct': 'AudiodevGenericOptions',
59   'data': {
60     '*in':  'AudiodevPerDirectionOptions',
61     '*out': 'AudiodevPerDirectionOptions' } }
64 # @AudiodevAlsaPerDirectionOptions:
66 # Options of the ALSA backend that are used for both playback and
67 # recording.
69 # @dev: the name of the ALSA device to use (default 'default')
71 # @period-length: the period length in microseconds
73 # @try-poll: attempt to use poll mode, falling back to non-polling
74 #            access on failure (default true)
76 # Since: 4.0
78 { 'struct': 'AudiodevAlsaPerDirectionOptions',
79   'base': 'AudiodevPerDirectionOptions',
80   'data': {
81     '*dev':           'str',
82     '*period-length': 'uint32',
83     '*try-poll':      'bool' } }
86 # @AudiodevAlsaOptions:
88 # Options of the ALSA audio backend.
90 # @in: options of the capture stream
92 # @out: options of the playback stream
94 # @threshold: set the threshold (in microseconds) when playback starts
96 # Since: 4.0
98 { 'struct': 'AudiodevAlsaOptions',
99   'data': {
100     '*in':        'AudiodevAlsaPerDirectionOptions',
101     '*out':       'AudiodevAlsaPerDirectionOptions',
102     '*threshold': 'uint32' } }
105 # @AudiodevCoreaudioPerDirectionOptions:
107 # Options of the Core Audio backend that are used for both playback and
108 # recording.
110 # @buffer-count: number of buffers
112 # Since: 4.0
114 { 'struct': 'AudiodevCoreaudioPerDirectionOptions',
115   'base': 'AudiodevPerDirectionOptions',
116   'data': {
117     '*buffer-count': 'uint32' } }
120 # @AudiodevCoreaudioOptions:
122 # Options of the coreaudio audio backend.
124 # @in: options of the capture stream
126 # @out: options of the playback stream
128 # Since: 4.0
130 { 'struct': 'AudiodevCoreaudioOptions',
131   'data': {
132     '*in':  'AudiodevCoreaudioPerDirectionOptions',
133     '*out': 'AudiodevCoreaudioPerDirectionOptions' } }
136 # @AudiodevDsoundOptions:
138 # Options of the DirectSound audio backend.
140 # @in: options of the capture stream
142 # @out: options of the playback stream
144 # @latency: add extra latency to playback in microseconds
145 #           (default 10000)
147 # Since: 4.0
149 { 'struct': 'AudiodevDsoundOptions',
150   'data': {
151     '*in':      'AudiodevPerDirectionOptions',
152     '*out':     'AudiodevPerDirectionOptions',
153     '*latency': 'uint32' } }
156 # @AudiodevOssPerDirectionOptions:
158 # Options of the OSS backend that are used for both playback and
159 # recording.
161 # @dev: file name of the OSS device (default '/dev/dsp')
163 # @buffer-count: number of buffers
165 # @try-poll: attempt to use poll mode, falling back to non-polling
166 #            access on failure (default true)
168 # Since: 4.0
170 { 'struct': 'AudiodevOssPerDirectionOptions',
171   'base': 'AudiodevPerDirectionOptions',
172   'data': {
173     '*dev':          'str',
174     '*buffer-count': 'uint32',
175     '*try-poll':     'bool' } }
178 # @AudiodevOssOptions:
180 # Options of the OSS audio backend.
182 # @in: options of the capture stream
184 # @out: options of the playback stream
186 # @try-mmap: try using memory-mapped access, falling back to
187 #            non-memory-mapped access on failure (default true)
189 # @exclusive: open device in exclusive mode (vmix won't work)
190 #             (default false)
192 # @dsp-policy: set the timing policy of the device (between 0 and 10,
193 #              where smaller number means smaller latency but higher
194 #              CPU usage) or -1 to use fragment mode (option ignored
195 #              on some platforms) (default 5)
197 # Since: 4.0
199 { 'struct': 'AudiodevOssOptions',
200   'data': {
201     '*in':         'AudiodevOssPerDirectionOptions',
202     '*out':        'AudiodevOssPerDirectionOptions',
203     '*try-mmap':   'bool',
204     '*exclusive':  'bool',
205     '*dsp-policy': 'uint32' } }
208 # @AudiodevPaPerDirectionOptions:
210 # Options of the Pulseaudio backend that are used for both playback and
211 # recording.
213 # @name: name of the sink/source to use
215 # @stream-name: name of the PulseAudio stream created by qemu.  Can be
216 #               used to identify the stream in PulseAudio when you
217 #               create multiple PulseAudio devices or run multiple qemu
218 #               instances (default: audiodev's id, since 4.2)
220 # @latency: latency you want PulseAudio to achieve in microseconds
221 #           (default 15000)
223 # Since: 4.0
225 { 'struct': 'AudiodevPaPerDirectionOptions',
226   'base': 'AudiodevPerDirectionOptions',
227   'data': {
228     '*name': 'str',
229     '*stream-name': 'str',
230     '*latency': 'uint32' } }
233 # @AudiodevPaOptions:
235 # Options of the PulseAudio audio backend.
237 # @in: options of the capture stream
239 # @out: options of the playback stream
241 # @server: PulseAudio server address (default: let PulseAudio choose)
243 # Since: 4.0
245 { 'struct': 'AudiodevPaOptions',
246   'data': {
247     '*in':     'AudiodevPaPerDirectionOptions',
248     '*out':    'AudiodevPaPerDirectionOptions',
249     '*server': 'str' } }
252 # @AudiodevWavOptions:
254 # Options of the wav audio backend.
256 # @in: options of the capture stream
258 # @out: options of the playback stream
260 # @path: name of the wav file to record (default 'qemu.wav')
262 # Since: 4.0
264 { 'struct': 'AudiodevWavOptions',
265   'data': {
266     '*in':   'AudiodevPerDirectionOptions',
267     '*out':  'AudiodevPerDirectionOptions',
268     '*path': 'str' } }
272 # @AudioFormat:
274 # An enumeration of possible audio formats.
276 # Since: 4.0
278 { 'enum': 'AudioFormat',
279   'data': [ 'u8', 's8', 'u16', 's16', 'u32', 's32' ] }
282 # @AudiodevDriver:
284 # An enumeration of possible audio backend drivers.
286 # Since: 4.0
288 { 'enum': 'AudiodevDriver',
289   'data': [ 'none', 'alsa', 'coreaudio', 'dsound', 'oss', 'pa', 'sdl',
290             'spice', 'wav' ] }
293 # @Audiodev:
295 # Options of an audio backend.
297 # @id: identifier of the backend
299 # @driver: the backend driver to use
301 # @timer-period: timer period (in microseconds, 0: use lowest possible)
303 # Since: 4.0
305 { 'union': 'Audiodev',
306   'base': {
307     'id':            'str',
308     'driver':        'AudiodevDriver',
309     '*timer-period': 'uint32' },
310   'discriminator': 'driver',
311   'data': {
312     'none':      'AudiodevGenericOptions',
313     'alsa':      'AudiodevAlsaOptions',
314     'coreaudio': 'AudiodevCoreaudioOptions',
315     'dsound':    'AudiodevDsoundOptions',
316     'oss':       'AudiodevOssOptions',
317     'pa':        'AudiodevPaOptions',
318     'sdl':       'AudiodevGenericOptions',
319     'spice':     'AudiodevGenericOptions',
320     'wav':       'AudiodevWavOptions' } }