[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 20/25] audio: remove mixeng specific code from b
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH 20/25] audio: remove mixeng specific code from backends |
Date: |
Wed, 19 Aug 2015 21:07:21 +0200 |
On Do, 2015-08-06 at 20:28 +0200, Kővágó, Zoltán wrote:
> Backends no longer have to deal with mixeng, they just receive a buffer
> in the correct sample format, all mixeng logic is now in the audio.c
> (and mixeng.c). Backends also do not have to deal with soft voices.
>
> Backends now have two way to read/write sound:
> * write and read functions: similar to old read/write functions, except
> that they actually read/write the data to the backend instead of
> placing it into the mixeng buffer. You no longer need run_in/run_out
> afterwards.
> * get_buffer_out/put_buffer_out: the first function returns a buffer
> that can hold some audio data. The caller fills this buffer (maybe
> partially) and calls put_buffer to actually write the data. This way
> we can save copying the buffer in some cases (for example mmaped
> audio). Similarly there's get_buffer_in/put_buffer_in for reading.
>
> Backends only have to support one access method, but they can support
> both if they have efficient implementation for both cases.
Phew, this one became pretty big. Could this be splitted up? The
s/int/size_t/ should be easy to separate.
Also having individual patches for individual backends would be nice.
Possibly you can first add the new interfaces, & helper functions, then
switch backends over one by one, hooking the generic
audio_pcm_hw_run_out() function into run_out callback, finally remove
the old interfaces and call audio_pcm_hw_run_out directly.
cheers,
Gerd
- [Qemu-devel] [PATCH 00/25] audio: -audiodev option, multiple options, Kővágó, Zoltán, 2015/08/06
- [Qemu-devel] [PATCH 02/25] qapi: convert NumaOptions into a flat union, Kővágó, Zoltán, 2015/08/06
- [Qemu-devel] [PATCH 01/25] qapi: support implicit structs in OptsVisitor, Kővágó, Zoltán, 2015/08/06
- [Qemu-devel] [PATCH 04/25] net: use Netdev instead of NetClientOptions in client init, Kővágó, Zoltán, 2015/08/06
- [Qemu-devel] [PATCH 03/25] net: remove NetLegacy struct, Kővágó, Zoltán, 2015/08/06
- [Qemu-devel] [PATCH 20/25] audio: remove mixeng specific code from backends, Kővágó, Zoltán, 2015/08/06
- Re: [Qemu-devel] [PATCH 20/25] audio: remove mixeng specific code from backends,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 10/25] audio: -audiodev command line option, Kővágó, Zoltán, 2015/08/06
- [Qemu-devel] [PATCH 16/25] paaudio: properly disconnect streams in fini_*, Kővágó, Zoltán, 2015/08/06
- [Qemu-devel] [PATCH 24/25] paaudio: get/put_buffer functions, Kővágó, Zoltán, 2015/08/06
- [Qemu-devel] [PATCH 19/25] paaudio: fix playback glitches, Kővágó, Zoltán, 2015/08/06
- [Qemu-devel] [PATCH 18/25] audio: do not run each backend in audio_run, Kővágó, Zoltán, 2015/08/06