4 # Copyright (C) 2015-2019 Zoltán Kővágó <DirtY.iCE.hu@gmail.com>
6 # This work is licensed under the terms of the GNU GPL, version 2 or later.
7 # See the COPYING file in the top-level directory.
14 # @AudiodevPerDirectionOptions:
16 # General audio backend options that are used for both playback and
19 # @mixing-engine: use QEMU's mixing engine to mix all streams inside QEMU and
20 # convert audio formats when not supported by the backend. When
21 # set to off, fixed-settings must be also off (default on,
24 # @fixed-settings: use fixed settings for host input/output. When off,
25 # frequency, channels and format must not be
26 # specified (default true)
28 # @frequency: frequency to use when using fixed settings
31 # @channels: number of channels when using fixed settings (default 2)
33 # @voices: number of voices to use (default 1)
35 # @format: sample format to use when using fixed settings
38 # @buffer-length: the buffer length in microseconds
42 { 'struct': 'AudiodevPerDirectionOptions',
44 '*mixing-engine': 'bool',
45 '*fixed-settings': 'bool',
46 '*frequency': 'uint32',
47 '*channels': 'uint32',
49 '*format': 'AudioFormat',
50 '*buffer-length': 'uint32' } }
53 # @AudiodevGenericOptions:
55 # Generic driver-specific options.
57 # @in: options of the capture stream
59 # @out: options of the playback stream
63 { 'struct': 'AudiodevGenericOptions',
65 '*in': 'AudiodevPerDirectionOptions',
66 '*out': 'AudiodevPerDirectionOptions' } }
69 # @AudiodevAlsaPerDirectionOptions:
71 # Options of the ALSA backend that are used for both playback and
74 # @dev: the name of the ALSA device to use (default 'default')
76 # @period-length: the period length in microseconds
78 # @try-poll: attempt to use poll mode, falling back to non-polling
79 # access on failure (default true)
83 { 'struct': 'AudiodevAlsaPerDirectionOptions',
84 'base': 'AudiodevPerDirectionOptions',
87 '*period-length': 'uint32',
88 '*try-poll': 'bool' } }
91 # @AudiodevAlsaOptions:
93 # Options of the ALSA audio backend.
95 # @in: options of the capture stream
97 # @out: options of the playback stream
99 # @threshold: set the threshold (in microseconds) when playback starts
103 { 'struct': 'AudiodevAlsaOptions',
105 '*in': 'AudiodevAlsaPerDirectionOptions',
106 '*out': 'AudiodevAlsaPerDirectionOptions',
107 '*threshold': 'uint32' } }
110 # @AudiodevCoreaudioPerDirectionOptions:
112 # Options of the Core Audio backend that are used for both playback and
115 # @buffer-count: number of buffers
119 { 'struct': 'AudiodevCoreaudioPerDirectionOptions',
120 'base': 'AudiodevPerDirectionOptions',
122 '*buffer-count': 'uint32' } }
125 # @AudiodevCoreaudioOptions:
127 # Options of the coreaudio audio backend.
129 # @in: options of the capture stream
131 # @out: options of the playback stream
135 { 'struct': 'AudiodevCoreaudioOptions',
137 '*in': 'AudiodevCoreaudioPerDirectionOptions',
138 '*out': 'AudiodevCoreaudioPerDirectionOptions' } }
141 # @AudiodevDsoundOptions:
143 # Options of the DirectSound audio backend.
145 # @in: options of the capture stream
147 # @out: options of the playback stream
149 # @latency: add extra latency to playback in microseconds
154 { 'struct': 'AudiodevDsoundOptions',
156 '*in': 'AudiodevPerDirectionOptions',
157 '*out': 'AudiodevPerDirectionOptions',
158 '*latency': 'uint32' } }
161 # @AudiodevJackPerDirectionOptions:
163 # Options of the JACK backend that are used for both playback and
166 # @server-name: select from among several possible concurrent server instances
167 # (default: environment variable $JACK_DEFAULT_SERVER if set, else "default")
169 # @client-name: the client name to use. The server will modify this name to
170 # create a unique variant, if needed unless @exact-name is true (default: the
173 # @connect-ports: if set, a regular expression of JACK client port name(s) to
174 # monitor for and automatically connect to
176 # @start-server: start a jack server process if one is not already present
179 # @exact-name: use the exact name requested otherwise JACK automatically
180 # generates a unique one, if needed (default: false)
184 { 'struct': 'AudiodevJackPerDirectionOptions',
185 'base': 'AudiodevPerDirectionOptions',
187 '*server-name': 'str',
188 '*client-name': 'str',
189 '*connect-ports': 'str',
190 '*start-server': 'bool',
191 '*exact-name': 'bool' } }
194 # @AudiodevJackOptions:
196 # Options of the JACK audio backend.
198 # @in: options of the capture stream
200 # @out: options of the playback stream
204 { 'struct': 'AudiodevJackOptions',
206 '*in': 'AudiodevJackPerDirectionOptions',
207 '*out': 'AudiodevJackPerDirectionOptions' } }
210 # @AudiodevOssPerDirectionOptions:
212 # Options of the OSS backend that are used for both playback and
215 # @dev: file name of the OSS device (default '/dev/dsp')
217 # @buffer-count: number of buffers
219 # @try-poll: attempt to use poll mode, falling back to non-polling
220 # access on failure (default true)
224 { 'struct': 'AudiodevOssPerDirectionOptions',
225 'base': 'AudiodevPerDirectionOptions',
228 '*buffer-count': 'uint32',
229 '*try-poll': 'bool' } }
232 # @AudiodevOssOptions:
234 # Options of the OSS audio backend.
236 # @in: options of the capture stream
238 # @out: options of the playback stream
240 # @try-mmap: try using memory-mapped access, falling back to
241 # non-memory-mapped access on failure (default true)
243 # @exclusive: open device in exclusive mode (vmix won't work)
246 # @dsp-policy: set the timing policy of the device (between 0 and 10,
247 # where smaller number means smaller latency but higher
248 # CPU usage) or -1 to use fragment mode (option ignored
249 # on some platforms) (default 5)
253 { 'struct': 'AudiodevOssOptions',
255 '*in': 'AudiodevOssPerDirectionOptions',
256 '*out': 'AudiodevOssPerDirectionOptions',
258 '*exclusive': 'bool',
259 '*dsp-policy': 'uint32' } }
262 # @AudiodevPaPerDirectionOptions:
264 # Options of the Pulseaudio backend that are used for both playback and
267 # @name: name of the sink/source to use
269 # @stream-name: name of the PulseAudio stream created by qemu. Can be
270 # used to identify the stream in PulseAudio when you
271 # create multiple PulseAudio devices or run multiple qemu
272 # instances (default: audiodev's id, since 4.2)
274 # @latency: latency you want PulseAudio to achieve in microseconds
279 { 'struct': 'AudiodevPaPerDirectionOptions',
280 'base': 'AudiodevPerDirectionOptions',
283 '*stream-name': 'str',
284 '*latency': 'uint32' } }
287 # @AudiodevPaOptions:
289 # Options of the PulseAudio audio backend.
291 # @in: options of the capture stream
293 # @out: options of the playback stream
295 # @server: PulseAudio server address (default: let PulseAudio choose)
299 { 'struct': 'AudiodevPaOptions',
301 '*in': 'AudiodevPaPerDirectionOptions',
302 '*out': 'AudiodevPaPerDirectionOptions',
306 # @AudiodevSdlPerDirectionOptions:
308 # Options of the SDL audio backend that are used for both playback and
311 # @buffer-count: number of buffers (default 4)
315 { 'struct': 'AudiodevSdlPerDirectionOptions',
316 'base': 'AudiodevPerDirectionOptions',
318 '*buffer-count': 'uint32' } }
321 # @AudiodevSdlOptions:
323 # Options of the SDL audio backend.
325 # @in: options of the recording stream
327 # @out: options of the playback stream
331 { 'struct': 'AudiodevSdlOptions',
333 '*in': 'AudiodevSdlPerDirectionOptions',
334 '*out': 'AudiodevSdlPerDirectionOptions' } }
337 # @AudiodevWavOptions:
339 # Options of the wav audio backend.
341 # @in: options of the capture stream
343 # @out: options of the playback stream
345 # @path: name of the wav file to record (default 'qemu.wav')
349 { 'struct': 'AudiodevWavOptions',
351 '*in': 'AudiodevPerDirectionOptions',
352 '*out': 'AudiodevPerDirectionOptions',
359 # An enumeration of possible audio formats.
361 # @u8: unsigned 8 bit integer
363 # @s8: signed 8 bit integer
365 # @u16: unsigned 16 bit integer
367 # @s16: signed 16 bit integer
369 # @u32: unsigned 32 bit integer
371 # @s32: signed 32 bit integer
373 # @f32: single precision floating-point (since 5.0)
377 { 'enum': 'AudioFormat',
378 'data': [ 'u8', 's8', 'u16', 's16', 'u32', 's32', 'f32' ] }
383 # An enumeration of possible audio backend drivers.
385 # @jack: JACK audio backend (since 5.1)
389 { 'enum': 'AudiodevDriver',
390 'data': [ 'none', 'alsa', 'coreaudio', 'dbus', 'dsound', 'jack', 'oss', 'pa',
391 'sdl', 'spice', 'wav' ] }
396 # Options of an audio backend.
398 # @id: identifier of the backend
400 # @driver: the backend driver to use
402 # @timer-period: timer period (in microseconds, 0: use lowest possible)
406 { 'union': 'Audiodev',
409 'driver': 'AudiodevDriver',
410 '*timer-period': 'uint32' },
411 'discriminator': 'driver',
413 'none': 'AudiodevGenericOptions',
414 'alsa': 'AudiodevAlsaOptions',
415 'coreaudio': 'AudiodevCoreaudioOptions',
416 'dbus': 'AudiodevGenericOptions',
417 'dsound': 'AudiodevDsoundOptions',
418 'jack': 'AudiodevJackOptions',
419 'oss': 'AudiodevOssOptions',
420 'pa': 'AudiodevPaOptions',
421 'sdl': 'AudiodevSdlOptions',
422 'spice': 'AudiodevGenericOptions',
423 'wav': 'AudiodevWavOptions' } }