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.
13 # @AudiodevPerDirectionOptions:
15 # General audio backend options that are used for both playback and
18 # @mixing-engine: use QEMU's mixing engine to mix all streams inside QEMU and
19 # convert audio formats when not supported by the backend. When
20 # set to off, fixed-settings must be also off (default on,
23 # @fixed-settings: use fixed settings for host input/output. When off,
24 # frequency, channels and format must not be
25 # specified (default true)
27 # @frequency: frequency to use when using fixed settings
30 # @channels: number of channels when using fixed settings (default 2)
32 # @voices: number of voices to use (default 1)
34 # @format: sample format to use when using fixed settings
37 # @buffer-length: the buffer length in microseconds
41 { 'struct': 'AudiodevPerDirectionOptions',
43 '*mixing-engine': 'bool',
44 '*fixed-settings': 'bool',
45 '*frequency': 'uint32',
46 '*channels': 'uint32',
48 '*format': 'AudioFormat',
49 '*buffer-length': 'uint32' } }
52 # @AudiodevGenericOptions:
54 # Generic driver-specific options.
56 # @in: options of the capture stream
58 # @out: options of the playback stream
62 { 'struct': 'AudiodevGenericOptions',
64 '*in': 'AudiodevPerDirectionOptions',
65 '*out': 'AudiodevPerDirectionOptions' } }
68 # @AudiodevAlsaPerDirectionOptions:
70 # Options of the ALSA backend that are used for both playback and
73 # @dev: the name of the ALSA device to use (default 'default')
75 # @period-length: the period length in microseconds
77 # @try-poll: attempt to use poll mode, falling back to non-polling
78 # access on failure (default true)
82 { 'struct': 'AudiodevAlsaPerDirectionOptions',
83 'base': 'AudiodevPerDirectionOptions',
86 '*period-length': 'uint32',
87 '*try-poll': 'bool' } }
90 # @AudiodevAlsaOptions:
92 # Options of the ALSA audio backend.
94 # @in: options of the capture stream
96 # @out: options of the playback stream
98 # @threshold: set the threshold (in microseconds) when playback starts
102 { 'struct': 'AudiodevAlsaOptions',
104 '*in': 'AudiodevAlsaPerDirectionOptions',
105 '*out': 'AudiodevAlsaPerDirectionOptions',
106 '*threshold': 'uint32' } }
109 # @AudiodevCoreaudioPerDirectionOptions:
111 # Options of the Core Audio backend that are used for both playback and
114 # @buffer-count: number of buffers
118 { 'struct': 'AudiodevCoreaudioPerDirectionOptions',
119 'base': 'AudiodevPerDirectionOptions',
121 '*buffer-count': 'uint32' } }
124 # @AudiodevCoreaudioOptions:
126 # Options of the coreaudio audio backend.
128 # @in: options of the capture stream
130 # @out: options of the playback stream
134 { 'struct': 'AudiodevCoreaudioOptions',
136 '*in': 'AudiodevCoreaudioPerDirectionOptions',
137 '*out': 'AudiodevCoreaudioPerDirectionOptions' } }
140 # @AudiodevDsoundOptions:
142 # Options of the DirectSound audio backend.
144 # @in: options of the capture stream
146 # @out: options of the playback stream
148 # @latency: add extra latency to playback in microseconds
153 { 'struct': 'AudiodevDsoundOptions',
155 '*in': 'AudiodevPerDirectionOptions',
156 '*out': 'AudiodevPerDirectionOptions',
157 '*latency': 'uint32' } }
160 # @AudiodevJackPerDirectionOptions:
162 # Options of the JACK backend that are used for both playback and
165 # @server-name: select from among several possible concurrent server instances
166 # (default: environment variable $JACK_DEFAULT_SERVER if set, else "default")
168 # @client-name: the client name to use. The server will modify this name to
169 # create a unique variant, if needed unless @exact-name is true (default: the
172 # @connect-ports: if set, a regular expression of JACK client port name(s) to
173 # monitor for and automatically connect to
175 # @start-server: start a jack server process if one is not already present
178 # @exact-name: use the exact name requested otherwise JACK automatically
179 # generates a unique one, if needed (default: false)
183 { 'struct': 'AudiodevJackPerDirectionOptions',
184 'base': 'AudiodevPerDirectionOptions',
186 '*server-name': 'str',
187 '*client-name': 'str',
188 '*connect-ports': 'str',
189 '*start-server': 'bool',
190 '*exact-name': 'bool' } }
193 # @AudiodevJackOptions:
195 # Options of the JACK audio backend.
197 # @in: options of the capture stream
199 # @out: options of the playback stream
203 { 'struct': 'AudiodevJackOptions',
205 '*in': 'AudiodevJackPerDirectionOptions',
206 '*out': 'AudiodevJackPerDirectionOptions' } }
209 # @AudiodevOssPerDirectionOptions:
211 # Options of the OSS backend that are used for both playback and
214 # @dev: file name of the OSS device (default '/dev/dsp')
216 # @buffer-count: number of buffers
218 # @try-poll: attempt to use poll mode, falling back to non-polling
219 # access on failure (default true)
223 { 'struct': 'AudiodevOssPerDirectionOptions',
224 'base': 'AudiodevPerDirectionOptions',
227 '*buffer-count': 'uint32',
228 '*try-poll': 'bool' } }
231 # @AudiodevOssOptions:
233 # Options of the OSS audio backend.
235 # @in: options of the capture stream
237 # @out: options of the playback stream
239 # @try-mmap: try using memory-mapped access, falling back to
240 # non-memory-mapped access on failure (default true)
242 # @exclusive: open device in exclusive mode (vmix won't work)
245 # @dsp-policy: set the timing policy of the device (between 0 and 10,
246 # where smaller number means smaller latency but higher
247 # CPU usage) or -1 to use fragment mode (option ignored
248 # on some platforms) (default 5)
252 { 'struct': 'AudiodevOssOptions',
254 '*in': 'AudiodevOssPerDirectionOptions',
255 '*out': 'AudiodevOssPerDirectionOptions',
257 '*exclusive': 'bool',
258 '*dsp-policy': 'uint32' } }
261 # @AudiodevPaPerDirectionOptions:
263 # Options of the Pulseaudio backend that are used for both playback and
266 # @name: name of the sink/source to use
268 # @stream-name: name of the PulseAudio stream created by qemu. Can be
269 # used to identify the stream in PulseAudio when you
270 # create multiple PulseAudio devices or run multiple qemu
271 # instances (default: audiodev's id, since 4.2)
273 # @latency: latency you want PulseAudio to achieve in microseconds
278 { 'struct': 'AudiodevPaPerDirectionOptions',
279 'base': 'AudiodevPerDirectionOptions',
282 '*stream-name': 'str',
283 '*latency': 'uint32' } }
286 # @AudiodevPaOptions:
288 # Options of the PulseAudio audio backend.
290 # @in: options of the capture stream
292 # @out: options of the playback stream
294 # @server: PulseAudio server address (default: let PulseAudio choose)
298 { 'struct': 'AudiodevPaOptions',
300 '*in': 'AudiodevPaPerDirectionOptions',
301 '*out': 'AudiodevPaPerDirectionOptions',
305 # @AudiodevSdlPerDirectionOptions:
307 # Options of the SDL audio backend that are used for both playback and
310 # @buffer-count: number of buffers (default 4)
314 { 'struct': 'AudiodevSdlPerDirectionOptions',
315 'base': 'AudiodevPerDirectionOptions',
317 '*buffer-count': 'uint32' } }
320 # @AudiodevSdlOptions:
322 # Options of the SDL audio backend.
324 # @in: options of the recording stream
326 # @out: options of the playback stream
330 { 'struct': 'AudiodevSdlOptions',
332 '*in': 'AudiodevSdlPerDirectionOptions',
333 '*out': 'AudiodevSdlPerDirectionOptions' } }
336 # @AudiodevWavOptions:
338 # Options of the wav audio backend.
340 # @in: options of the capture stream
342 # @out: options of the playback stream
344 # @path: name of the wav file to record (default 'qemu.wav')
348 { 'struct': 'AudiodevWavOptions',
350 '*in': 'AudiodevPerDirectionOptions',
351 '*out': 'AudiodevPerDirectionOptions',
358 # An enumeration of possible audio formats.
360 # @u8: unsigned 8 bit integer
362 # @s8: signed 8 bit integer
364 # @u16: unsigned 16 bit integer
366 # @s16: signed 16 bit integer
368 # @u32: unsigned 32 bit integer
370 # @s32: signed 32 bit integer
372 # @f32: single precision floating-point (since 5.0)
376 { 'enum': 'AudioFormat',
377 'data': [ 'u8', 's8', 'u16', 's16', 'u32', 's32', 'f32' ] }
382 # An enumeration of possible audio backend drivers.
384 # @jack: JACK audio backend (since 5.1)
388 { 'enum': 'AudiodevDriver',
389 'data': [ 'none', 'alsa', 'coreaudio', 'dsound', 'jack', 'oss', 'pa',
390 'sdl', 'spice', 'wav' ] }
395 # Options of an audio backend.
397 # @id: identifier of the backend
399 # @driver: the backend driver to use
401 # @timer-period: timer period (in microseconds, 0: use lowest possible)
405 { 'union': 'Audiodev',
408 'driver': 'AudiodevDriver',
409 '*timer-period': 'uint32' },
410 'discriminator': 'driver',
412 'none': 'AudiodevGenericOptions',
413 'alsa': 'AudiodevAlsaOptions',
414 'coreaudio': 'AudiodevCoreaudioOptions',
415 'dsound': 'AudiodevDsoundOptions',
416 'jack': 'AudiodevJackOptions',
417 'oss': 'AudiodevOssOptions',
418 'pa': 'AudiodevPaOptions',
419 'sdl': 'AudiodevSdlOptions',
420 'spice': 'AudiodevGenericOptions',
421 'wav': 'AudiodevWavOptions' } }