Re: [RFC PATCH] audio: proper support for float samples in mixeng

2020-02-03 Thread Zoltán Kővágó
On 2020-02-03 11:00, Peter Maydell wrote: On Sun, 2 Feb 2020 at 19:39, Kővágó, Zoltán wrote: This adds proper support for float samples in mixeng by adding a new audio format for it. Limitations: only native endianness is supported. Could you explain a bit more what this limitation means,

Re: [PATCH v2] Implement the Screamer sound chip for the mac99 machine type

2020-02-02 Thread Zoltán Kővágó
On 2020-01-28 09:30, Volker Rümelin wrote: Hi, Unfortunately it's not that simple to simply revert the patch since the old backend api no longer exists.  Also I don't have a Mac so it's almost impossible for me to test the results.  I looked at the specified commit and I think I found a

Re: [PATCH] coreaudio: fix coreaudio playback

2020-02-02 Thread Zoltán Kővágó
in v4.1.0 of coreaudio.c had to be moved to mixeng.c and the generic buffer management code needed a hint about the size of the float type. This patch is based on a patch from Zoltán Kővágó found at https://lists.nongnu.org/archive/html/qemu-devel/2020-01/msg02142.html. Fixes: 2ceb8240fa "

Re: [PATCH] audio/dsound: fix invalid parameters error

2020-01-26 Thread Zoltán Kővágó
On 2020-01-18 07:30, Philippe Mathieu-Daudé wrote: On 1/17/20 7:26 PM, KJ Liew wrote: QEMU Windows has broken dsound backend since the rewrite of audio API in version 4.2.0. Both playback and capture buffers failed to lock with invalid parameters error. Fixes: 7fa9754ac88 (dsoundaudio: port

Re: [PATCH v2] Implement the Screamer sound chip for the mac99 machine type

2020-01-10 Thread Zoltán Kővágó
On 2020-01-05 02:58, Programmingkid wrote: I found the patch that breaks Screamer sound support for qemu-system-ppc. It is this: commit 2ceb8240fa4e4e30fb853565eb2bed3032d74f62 Author: Kővágó, Zoltán Date: Thu Sep 19 23:24:11 2019 +0200 coreaudio: port to the new audio backend api

Re: [PATCH] audio: fix audio recording

2019-11-19 Thread Zoltán Kővágó
On 2019-11-19 20:43, Richard Henderson wrote: On 11/19/19 9:01 AM, Philippe Mathieu-Daudé wrote: Cc'ing Zoltán. On 11/19/19 7:58 AM, Volker Rümelin wrote: With current code audio recording with all audio backends except PulseAudio and DirectSound is broken. The generic audio recording buffer

Re: [PATCH] audio: fix audio recording

2019-11-19 Thread Zoltán Kővágó
by: Volker Rümelin Reviewed-by: Zoltán Kővágó --- audio/audio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/audio/audio.c b/audio/audio.c index 7fc3aa9d16..56fae55047 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -1390,6 +1390,7 @@ void *audio_generic_get_buffer_in(HWVoiceIn *hw, siz

Re: [PATCH v4 15/24] audio: add mixing-engine option (documentation)

2019-10-03 Thread Zoltán Kővágó
On 2019-10-01 08:23, Markus Armbruster wrote: "Zoltán Kővágó" writes: On 2019-09-25 11:49, Markus Armbruster wrote: "Zoltán Kővágó" writes: On 2019-09-23 15:08, Markus Armbruster wrote: "Kővágó, Zoltán" writes: This will allow us to disable mixen

Re: [PATCH v4 15/24] audio: add mixing-engine option (documentation)

2019-09-29 Thread Zoltán Kővágó
On 2019-09-25 11:49, Markus Armbruster wrote: "Zoltán Kővágó" writes: On 2019-09-23 15:08, Markus Armbruster wrote: "Kővágó, Zoltán" writes: This will allow us to disable mixeng when we use a decent backend. Disabling mixeng have a few advantages: * we no longer conv

Re: [PATCH v4 21/24] paaudio: channel-map option

2019-09-29 Thread Zoltán Kővágó
On 2019-09-25 16:13, Gerd Hoffmann wrote: Hi, Oh now that I looked again at the pulseaudio docs, channel-map doesn't have to be a list, it can be also a "well-known mapping name". Unambiguous because the well-known mapping names are not valid channel position list members. Do we have

Re: [PATCH v4 21/24] paaudio: channel-map option

2019-09-23 Thread Zoltán Kővágó
On 2019-09-23 15:12, Markus Armbruster wrote: "Kővágó, Zoltán" writes: Add an option to change the channel map used by pulseaudio. If not specified, falls back to an OSS compatible channel map. Signed-off-by: Kővágó, Zoltán --- audio/paaudio.c | 18 ++ qapi/audio.json |

Re: [PATCH v4 15/24] audio: add mixing-engine option (documentation)

2019-09-23 Thread Zoltán Kővágó
On 2019-09-23 15:08, Markus Armbruster wrote: "Kővágó, Zoltán" writes: This will allow us to disable mixeng when we use a decent backend. Disabling mixeng have a few advantages: * we no longer convert the audio output from one format to another, when the underlying audio system would just

Re: [Qemu-devel] [PULL 00/26] Audio 20190919 patches

2019-09-19 Thread Zoltán Kővágó
On 2019-09-19 17:28, Eric Blake wrote: On 9/19/19 10:15 AM, Peter Maydell wrote: On Thu, 19 Sep 2019 at 09:38, Gerd Hoffmann wrote: The following changes since commit f8c3db33a5e863291182f8862ddf81618a7c6194: target/sparc: Switch to do_transaction_failed() hook (2019-09-17 12:01:00

Re: [Qemu-devel] [PATCH 2/2] audio: add -audiodev pa, in|out.latency= to documentation

2019-09-17 Thread Zoltán Kővágó
On 2019-09-11 16:58, Stefan Hajnoczi wrote: The "latency" parameter wasn't covered by the documentation. Signed-off-by: Stefan Hajnoczi Reviewed-by: Zoltán Kővágó --- How is this parameter related to buffer-length? Pulseaudio being a client-server architecture is a bit diff

Re: [Qemu-devel] [PATCH 1/2] audio: fix buffer-length typo in documentation

2019-09-17 Thread Zoltán Kővágó
On 2019-09-11 16:58, Stefan Hajnoczi wrote: Fixes: f0b3d811529 ("audio: -audiodev command line option: documentation") Signed-off-by: Stefan Hajnoczi --- qemu-options.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index

Re: [Qemu-devel] [PATCH v2 00/24] Audio: Mixeng-free 5.1/7.1 audio support

2019-09-14 Thread Zoltán Kővágó
On 2019-09-12 12:20, Gerd Hoffmann wrote: On Sun, Sep 08, 2019 at 11:22:00PM +0200, Kővágó, Zoltán wrote: Hi, This is the v2 of my patch series that makes mixeng optional and enables more than two audio channels. Changes from v1: * renamed "mixeng" option to "mixing-engine" * dropped patch

Re: [Qemu-devel] [PATCH v2 4/4] audio: paaudio: ability to specify stream name

2019-09-09 Thread Zoltán Kővágó
On 2019-08-28 12:39, Maxim Levitsky wrote: On Wed, 2019-08-28 at 11:26 +0100, Daniel P. Berrangé wrote: On Wed, Aug 28, 2019 at 01:14:03PM +0300, Maxim Levitsky wrote: On Wed, 2019-08-28 at 10:53 +0100, Daniel P. Berrangé wrote: On Wed, Aug 28, 2019 at 12:43:49AM +0200, Zoltán Kővágó wrote

Re: [Qemu-devel] [PATCH v2 4/4] audio: paaudio: ability to specify stream name

2019-08-27 Thread Zoltán Kővágó
On 2019-08-27 07:42, Gerd Hoffmann wrote: > On Mon, Aug 26, 2019 at 09:59:04PM +0200, Kővágó, Zoltán wrote: >> This can be used to identify stream in tools like pavucontrol when one >> creates multiple -audiodevs or runs multiple qemu instances. > > Hmm, can we create an useful name

Re: [Qemu-devel] [PATCH 16/25] audio: add mixeng option (documentation)

2019-08-26 Thread Zoltán Kővágó
On 2019-08-26 15:35, Eric Blake wrote: > On 8/25/19 1:46 PM, Kővágó, Zoltán wrote: >> This will allow us to disable mixeng when we use a decent backend. >> >> Disabling mixeng have a few advantages: >> * we no longer convert the audio output from one format to another, when >> the underlying

Re: [Qemu-devel] [PATCH 2/3] audio: paaudio: fix client name

2019-08-26 Thread Zoltán Kővágó
On 2019-08-26 10:21, Maxim Levitsky wrote: > On Mon, 2019-08-26 at 02:29 +0200, Kővágó, Zoltán wrote: >> pa_context_new expects a client name, not a server socket path. >> >> Signed-off-by: Kővágó, Zoltán >> --- >> audio/paaudio.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >>

Re: [Qemu-devel] [PULL 07/15] audio: audiodev= parameters no longer optional when -audiodev present

2019-08-25 Thread Zoltán Kővágó
On 2019-08-26 00:15, Maxim Levitsky wrote: > On Sun, 2019-08-25 at 20:05 +0200, Zoltán Kővágó wrote: >> On 2019-08-25 11:44, Maxim Levitsky wrote: >>> On Wed, 2019-08-21 at 10:41 +0200, Gerd Hoffmann wrote: >>>> From: Kővágó, Zoltán >>>> >>>&

Re: [Qemu-devel] [PULL 07/15] audio: audiodev= parameters no longer optional when -audiodev present

2019-08-25 Thread Zoltán Kővágó
On 2019-08-25 11:44, Maxim Levitsky wrote: > On Wed, 2019-08-21 at 10:41 +0200, Gerd Hoffmann wrote: >> From: Kővágó, Zoltán >> >> This means you should probably stop using -soundhw (as it doesn't allow >> you to specify any options) and add the device manually with -device. >> The exception is

Re: [Qemu-devel] [PATCH v4 14/14] audio: fix memory leak reported by ASAN

2019-08-18 Thread Zoltán Kővágó
Hi, On 2019-08-19 01:25, Philippe Mathieu-Daudé wrote: > Hi Zoltán, > > On 8/19/19 1:06 AM, Kővágó, Zoltán wrote: >> Signed-off-by: Kővágó, Zoltán >> --- >> audio/audio.c | 6 ++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/audio/audio.c b/audio/audio.c >> index

Re: [Qemu-devel] [PATCH v2 03/14] audio: add audiodev property to vnc and wav_capture

2019-07-28 Thread Zoltán Kővágó
On 2019-07-28 15:42, Zoltán Kővágó wrote: On 2019-07-22 16:21, Markus Armbruster wrote: "Zoltán Kővágó" writes: On 2019-07-16 08:23, Markus Armbruster wrote: "Kővágó, Zoltán" writes: Signed-off-by: Kővágó, Zoltán ---    ui/vnc.h    |  2 ++    monitor/misc.c  | 1

Re: [Qemu-devel] [PATCH v2 03/14] audio: add audiodev property to vnc and wav_capture

2019-07-28 Thread Zoltán Kővágó
On 2019-07-22 16:21, Markus Armbruster wrote: "Zoltán Kővágó" writes: On 2019-07-16 08:23, Markus Armbruster wrote: "Kővágó, Zoltán" writes: Signed-off-by: Kővágó, Zoltán --- ui/vnc.h| 2 ++ monitor/misc.c | 12 +++- ui/vnc.c| 15 ++

Re: [Qemu-devel] [PATCH v2 03/14] audio: add audiodev property to vnc and wav_capture

2019-07-21 Thread Zoltán Kővágó
On 2019-07-16 08:23, Markus Armbruster wrote: "Kővágó, Zoltán" writes: Signed-off-by: Kővágó, Zoltán --- ui/vnc.h| 2 ++ monitor/misc.c | 12 +++- ui/vnc.c| 15 ++- hmp-commands.hx | 13 - qemu-options.hx | 6 ++ 5 files changed,

Re: [Qemu-devel] [PATCH 09/11] paaudio: fix playback glitches

2019-07-14 Thread Zoltán Kővágó
On 2019-07-10 21:58, Marc-André Lureau wrote: > On Tue, Jul 9, 2019 at 10:49 PM Kővágó, Zoltán wrote: >> >> Pulseaudio normally assumes that when the server wants it, the client >> can generate the audio samples and send it right away. Unfortunately >> this is not the case with QEMU -- it's up

Re: [Qemu-devel] [PATCH 10/11] audio: remove read and write pcm_ops

2019-07-11 Thread Zoltán Kővágó
On 2019-07-10 21:57, Marc-André Lureau wrote: > On Tue, Jul 9, 2019 at 10:57 PM Kővágó, Zoltán wrote: >> >> They just called audio_pcm_sw_read/write anyway, so it makes no sense >> to have them too. (The noaudio's read is the only exception, but it >> should work with the generic code too.) > >

Re: [Qemu-devel] [PATCH 04/11] audio: audiodev= parameters no longer optional when -audiodev present

2019-07-11 Thread Zoltán Kővágó
On 2019-07-10 21:30, Marc-André Lureau wrote: > On Tue, Jul 9, 2019 at 11:00 PM Kővágó, Zoltán wrote: >> >> This means you should probably stop using -soundhw (as it doesn't allow >> you to specify any options) and add the device manually with -device. >> The exception is pcspk, it's currently

Re: [Qemu-devel] [PATCH 02/11] audio: basic support for multi backend audio

2019-07-11 Thread Zoltán Kővágó
On 2019-07-11 16:37, Markus Armbruster wrote: > "Zoltán Kővágó" writes: > >> On 2019-07-10 06:06, Markus Armbruster wrote: >>> "Kővágó, Zoltán" writes: >>> >>>> Audio functions no longer access glob_audio_state, instead they get

Re: [Qemu-devel] [PATCH 02/11] audio: basic support for multi backend audio

2019-07-10 Thread Zoltán Kővágó
On 2019-07-10 06:06, Markus Armbruster wrote: > "Kővágó, Zoltán" writes: > >> Audio functions no longer access glob_audio_state, instead they get an >> AudioState as a parameter. This is required in order to support >> multiple backends. >> >> glob_audio_state is also gone, and replaced with a

Re: [Qemu-devel] [PATCH] audio: fix audio timer rate conversion bug

2019-04-01 Thread Zoltán Kővágó
engths, this one slipped through my unification attempts. > > This fixes commit 71830221fb23388b32e6516c2fb7a698453a6c5a > -audiodev command line option basic implementation. > > Signed-off-by: Volker Rümelin Reviewed-by: Zoltán Kővágó > --- > audio/audio.c| 2 +-

Re: [Qemu-devel] [PULL 04/14] audio: -audiodev command line option basic implementation

2019-03-14 Thread Zoltán Kővágó
On 2019-03-14 10:46, Peter Maydell wrote: > On Tue, 12 Mar 2019 at 07:13, Gerd Hoffmann wrote: >> >> From: Kővágó, Zoltán >> >> Audio drivers now get an Audiodev * as config paramters, instead of the >> global audio_option structs. There is some code in audio/audio_legacy.c >> that converts the

Re: [Qemu-devel] [PATCH v6 01/14] qapi: qapi for audio backends

2019-03-09 Thread Zoltán Kővágó
i/Makefile.objs| 6 +- >> 3 files changed, 308 insertions(+), 3 deletions(-) >> create mode 100644 qapi/audio.json >> >> diff --git a/qapi/audio.json b/qapi/audio.json >> new file mode 100644 >> index 00..97aee37288 >> --- /dev/null >> +++ b/qapi/audio.js

Re: [Qemu-devel] [PATCH v5 04/14] audio: -audiodev command line option basic implementation

2019-03-08 Thread Zoltán Kővágó
On 2019-03-08 08:21, Markus Armbruster wrote: > "Zoltán Kővágó" writes: > >> On 2019-03-07 16:56, Gerd Hoffmann wrote: >>> On Tue, Feb 26, 2019 at 02:39:38AM +0100, Zoltán Kővágó wrote: >>>> On 2019-02-20 22:37, Kővágó, Zoltán wrote: >>>>

Re: [Qemu-devel] [PATCH v5 04/14] audio: -audiodev command line option basic implementation

2019-03-07 Thread Zoltán Kővágó
On 2019-03-07 16:56, Gerd Hoffmann wrote: > On Tue, Feb 26, 2019 at 02:39:38AM +0100, Zoltán Kővágó wrote: >> On 2019-02-20 22:37, Kővágó, Zoltán wrote: >> [...] >>> diff --git a/audio/audio.c b/audio/audio.c >>> index ce8e6ea8c2..8ad8cbe559 100644 >>> -

Re: [Qemu-devel] [PATCH v5 04/14] audio: -audiodev command line option basic implementation

2019-02-25 Thread Zoltán Kővágó
On 2019-02-20 22:37, Kővágó, Zoltán wrote: [...] > diff --git a/audio/audio.c b/audio/audio.c > index ce8e6ea8c2..8ad8cbe559 100644 > --- a/audio/audio.c > +++ b/audio/audio.c [...] > @@ -2129,3 +1866,170 @@ void AUD_set_volume_in (SWVoiceIn *sw, int mute, > uint8_t lvol, uint8_t rvol) >

Re: [Qemu-devel] [PATCH v4 04/14] audio: -audiodev command line option basic implementation

2019-02-07 Thread Zoltán Kővágó
On 2019-01-29 16:56, Markus Armbruster wrote: > "Kővágó, Zoltán" writes: > >> Audio drivers now get an Audiodev * as config paramters, instead of the >> global audio_option structs. There is some code in audio/audio_legacy.c >> that converts the old environment variables to audiodev options

Re: [Qemu-devel] [PATCH v4 01/14] qapi: qapi for audio backends

2019-02-07 Thread Zoltán Kővágó
On 2019-01-29 14:33, Markus Armbruster wrote: > "Kővágó, Zoltán" writes: [...] >> + >> +## >> +# @AudiodevPaOptions: >> +# >> +# Options of the pa (PulseAudio) audio backend. >> +# >> +# @server: PulseAudio server address (default: let PulseAudio choose) >> +# >> +# @sink: name of the sink to use

Re: [Qemu-devel] [PATCH v3 15/50] audio: reduce glob_audio_state usage

2019-01-24 Thread Zoltán Kővágó
On 2019-01-24 12:19, Gerd Hoffmann wrote: > Hi, > >> So, I think with the first part the only open issue is whenever we go >> with the nested types (i.e. patch #1 as-is) or not. Given that the >> one-element-structs added in that patch will get additional fields I >> think the nesting makes

Re: [Qemu-devel] [PATCH v3 15/50] audio: reduce glob_audio_state usage

2019-01-23 Thread Zoltán Kővágó
On 2019-01-17 10:22, Gerd Hoffmann wrote: > On Thu, Jan 17, 2019 at 12:36:48AM +0100, Kővágó, Zoltán wrote: >> Remove glob_audio_state from functions, where possible without breaking >> the API. This means that most static functions in audio.c now take an >> AudioState pointer instead of

Re: [Qemu-devel] [PATCH v3 47/50] paaudio: channel-map option

2019-01-23 Thread Zoltán Kővágó
On 2019-01-17 11:03, Gerd Hoffmann wrote: > On Thu, Jan 17, 2019 at 12:37:20AM +0100, Kővágó, Zoltán wrote: >> Add an option to change the channel map used by pulseaudio. If not >> specified, falls back to an OSS compatible channel map. >> >> Signed-off-by: Kővágó, Zoltán >> --- >>

Re: [Qemu-devel] [PATCH v2 43/52] audio: add mixeng option (documentation)

2019-01-16 Thread Zoltán Kővágó
On 2019-01-10 02:43, Eric Blake wrote: > On 12/23/18 2:52 PM, Kővágó, Zoltán wrote: >> This will allow us to disable mixeng when we use a decent backend. >> >> Disabling mixeng have a few advantages: >> * we no longer convert the audio output from one format to another, when >> the underlying

Re: [Qemu-devel] [PATCH v2 06/52] audio: -audiodev command line option basic implementation

2019-01-10 Thread Zoltán Kővágó
On 2019-01-10 08:25, Gerd Hoffmann wrote: > Hi, > >> I was thinking about creating an Audiodev (the qapi type) directly would >> be better, then somehow print it with reflection. While this is not a >> typical use of qapi, at least qmp_qom_list creates qapi objects >> directly, so I assume

Re: [Qemu-devel] [PATCH v2 06/52] audio: -audiodev command line option basic implementation

2019-01-09 Thread Zoltán Kővágó
On 2019-01-08 04:42, Markus Armbruster wrote: > "Zoltán Kővágó" writes: > >> On 2019-01-07 14:13, Markus Armbruster wrote: >>> "Kővágó, Zoltán" writes: >>> >>>> Audio drivers now get an Audiodev * as config paramters, instead of the

Re: [Qemu-devel] [PATCH v2 06/52] audio: -audiodev command line option basic implementation

2019-01-07 Thread Zoltán Kővágó
On 2019-01-07 14:13, Markus Armbruster wrote: > "Kővágó, Zoltán" writes: > >> Audio drivers now get an Audiodev * as config paramters, instead of the >> global audio_option structs. There is some code in audio/audio_legacy.c >> that converts the old environment variables to audiodev options

Re: [Qemu-devel] [RFC PATCH] osdep: Make MIN/MAX evaluate arguments only once

2019-01-04 Thread Zoltán Kővágó
Hi, I have a similar patch in my queue[1] On 2019-01-04 16:39, Eric Blake wrote: > Use the __auto_type keyword to make sure our min/max macros only > evaluate their arguments once. > > Signed-off-by: Eric Blake > --- > > RFC because __auto_type didn't exist until gcc 4.9, and I don't know >

Re: [Qemu-devel] [PATCH v2 00/52] Audio 5.1 patches

2019-01-04 Thread Zoltán Kővágó
On 2019-01-01 17:17, Programmingkid wrote: > >> On Jan 1, 2019, at 7:27 AM, Zoltán Kővágó wrote: >> >> On 2019-01-01 05:24, Programmingkid wrote: >>>> On 2018-12-29 01:49, Programmingkid wrote: >> [snip] >>>>> >>>>> I tr

Re: [Qemu-devel] [PATCH v2 00/52] Audio 5.1 patches

2019-01-01 Thread Zoltán Kővágó
On 2019-01-01 05:24, Programmingkid wrote: >> On 2018-12-29 01:49, Programmingkid wrote: [snip] >>> >>> I tried ac97 with a Windows 2000 guest in qemu-system-i386 - same demonic >>> sound. >>> With the above configuration but with an es1370 sound card I heard the same >>> sound. I kept seeing

Re: [Qemu-devel] [PATCH v2 00/52] Audio 5.1 patches

2018-12-28 Thread Zoltán Kővágó
On 2018-12-29 01:12, Programmingkid wrote: > >> On Dec 28, 2018, at 3:05 PM, Kővágó Zoltán wrote: >> >> On 2018-12-28 01:46, Programmingkid wrote: >>> On Dec 27, 2018, at 8:33 AM, Kővágó Zoltán wrote: Hi, I've pushed it to my github (modulo some random fixes not yet on

Re: [Qemu-devel] [PATCH v2 23/52] audio: remove audio_MIN, audio_MAX

2018-12-23 Thread Zoltán Kővágó
Hi Phil, On 2018-12-24 00:49, Philippe Mathieu-Daudé wrote: > Hi Zoltán, > > On 12/23/18 9:51 PM, Kővágó, Zoltán wrote: >> There's already a MIN and MAX macro in include/qemu/osdep.h, use them >> instead. >> >> Signed-off-by: Kővágó, Zoltán >> >> --- >> >> Changes from v1: >> * removed