[PATCH] audio/dsound: fix invalid parameters error

2020-02-02 Thread Kővágó, Zoltán
Windows (unlike wine) bails out when IDirectSoundBuffer8::Lock is called with zero length. Also, hw->pos_emul handling was incorrect when calling this function for the first time. Signed-off-by: Kővágó, Zoltán Reported-by: KJ Liew --- I've tested this patch on wine and a borrowed Win

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

2020-02-02 Thread Kővágó, Zoltán
This adds proper support for float samples in mixeng by adding a new audio format for it. Limitations: only native endianness is supported. Signed-off-by: Kővágó, Zoltán --- This patch is meant to be applied on top of "[PATCH] coreaudio: fix coreaudio playback" by Volker Rümelin, av

[PATCH v6 08/10] usb-audio: support more than two channels of audio

2019-10-13 Thread Kővágó, Zoltán
device that supports 5.1 and 7.1 audio. Signed-off-by: Kővágó, Zoltán --- Notes: According to the spec the channel order is front left, front right, center, lfe, surround left, surround right for 5.1 sound. But alsa uses front left, front right, surround left, surround right, center

[PATCH v6 10/10] paaudio: fix channel order for usb-audio 5.1 and 7.1 streams

2019-10-13 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/paaudio.c | 50 - 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index d195b1caa8..6ff0d17537 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -338,17

[PATCH v6 07/10] usb-audio: do not count on avail bytes actually available

2019-10-13 Thread Kővágó, Zoltán
This assumption is no longer true when mixeng is turned off. Signed-off-by: Kővágó, Zoltán --- hw/usb/dev-audio.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index ae42e5a2f1..74c99b1f12 100644 --- a

[PATCH v6 05/10] audio: replace shift in audio_pcm_info with bytes_per_frame

2019-10-13 Thread Kővágó, Zoltán
The bit shifting trick worked because the number of bytes per frame was always a power-of-two (since QEMU only supports mono, stereo and 8, 16 and 32 bit samples). But if we want to add support for surround sound, this no longer holds true. Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c

[PATCH v6 06/10] audio: basic support for multichannel audio

2019-10-13 Thread Kővágó, Zoltán
Which currently only means removing some checks. Old code won't require more than two channels, but new code will need it. Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c | 7 --- audio/audio.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/audio/alsaau

[PATCH v6 09/10] usbaudio: change playback counters to 64 bit

2019-10-13 Thread Kővágó, Zoltán
rod % USBAUDIO_PACKET_SIZE(channels) assertion no longer holds true, which will result in overflowing the buffer. With 64 bit variables, it would take about 762000 years to overflow. Signed-off-by: Kővágó, Zoltán --- hw/usb/dev-audio.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) d

[PATCH v6 04/10] audio: support more than two channels in volume setting

2019-10-13 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio.c | 30 ++ audio/audio.h | 10 ++ audio/audio_int.h | 4 ++-- audio/paaudio.c| 20 audio/spiceaudio.c | 14 -- 5 files changed, 54 insertions(+), 24 deletions

[PATCH v6 01/10] audio: add mixing-engine option (documentation)

2019-10-13 Thread Kővágó, Zoltán
of scope: https://wiki.qemu.org/Internships/ProjectIdeas/AudioGStreamer Signed-off-by: Kővágó, Zoltán --- Notes: Changes from v1: * renamed mixeng to mixing-engine Changes from v5: * better documentation Changes from v1: * renamed mixeng to mixing-engine qapi/

[PATCH v6 02/10] audio: make mixeng optional

2019-10-13 Thread Kővágó, Zoltán
Implementation of the previously added mixing-engine option. Signed-off-by: Kővágó, Zoltán --- Notes: Changes from v4: * audio_pcm_hw_add_* always returns a new HW (or fails) when not using mixeng audio/audio.c | 70 ++ audio

[PATCH v6 00/10] Audio: Mixeng-free 5.1/7.1 audio support

2019-10-13 Thread Kővágó, Zoltán
Hi, I've updated my mixeng-free patches. This time it's only documentation fixes in the first patch, otherwise it's identical to v5. Regards, Zoltan Kővágó, Zoltán (10): audio: add mixing-engine option (documentation) audio: make mixeng optional paaudio: get/put_buffer fu

[PATCH v6 03/10] paaudio: get/put_buffer functions

2019-10-13 Thread Kővágó, Zoltán
This lets us avoid some buffer copying when using mixeng. Signed-off-by: Kővágó, Zoltán --- audio/paaudio.c | 83 + 1 file changed, 83 insertions(+) diff --git a/audio/paaudio.c b/audio/paaudio.c index ed31f863f7..6ccdf31415 100644 --- a/audio

[PATCH v5 10/10] paaudio: fix channel order for usb-audio 5.1 and 7.1 streams

2019-09-30 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/paaudio.c | 50 - 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index d195b1caa8..6ff0d17537 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -338,17

[PATCH v5 07/10] usb-audio: do not count on avail bytes actually available

2019-09-30 Thread Kővágó, Zoltán
This assumption is no longer true when mixeng is turned off. Signed-off-by: Kővágó, Zoltán --- hw/usb/dev-audio.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index ae42e5a2f1..74c99b1f12 100644 --- a

[PATCH v5 04/10] audio: support more than two channels in volume setting

2019-09-30 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio.c | 30 ++ audio/audio.h | 10 ++ audio/audio_int.h | 4 ++-- audio/paaudio.c| 20 audio/spiceaudio.c | 14 -- 5 files changed, 54 insertions(+), 24 deletions

[PATCH v5 02/10] audio: make mixeng optional

2019-09-30 Thread Kővágó, Zoltán
Implementation of the previously added mixing-engine option. Signed-off-by: Kővágó, Zoltán --- Notes: Changes from v4: * audio_pcm_hw_add_* always returns a new HW (or fails) when not using mixeng audio/audio.c | 70 ++ audio

[PATCH v5 03/10] paaudio: get/put_buffer functions

2019-09-30 Thread Kővágó, Zoltán
This lets us avoid some buffer copying when using mixeng. Signed-off-by: Kővágó, Zoltán --- audio/paaudio.c | 83 + 1 file changed, 83 insertions(+) diff --git a/audio/paaudio.c b/audio/paaudio.c index ed31f863f7..6ccdf31415 100644 --- a/audio

[PATCH v5 08/10] usb-audio: support more than two channels of audio

2019-09-30 Thread Kővágó, Zoltán
device that supports 5.1 and 7.1 audio. Signed-off-by: Kővágó, Zoltán --- Notes: According to the spec the channel order is front left, front right, center, lfe, surround left, surround right for 5.1 sound. But alsa uses front left, front right, surround left, surround right, center

[PATCH v5 05/10] audio: replace shift in audio_pcm_info with bytes_per_frame

2019-09-30 Thread Kővágó, Zoltán
The bit shifting trick worked because the number of bytes per frame was always a power-of-two (since QEMU only supports mono, stereo and 8, 16 and 32 bit samples). But if we want to add support for surround sound, this no longer holds true. Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c

[PATCH v5 01/10] audio: add mixing-engine option (documentation)

2019-09-30 Thread Kővágó, Zoltán
sable mixeng. However mixeng is not removed, only made optional, so this shouldn't be a big concern. Signed-off-by: Kővágó, Zoltán --- Notes: Changes from v1: * renamed mixeng to mixing-engine qapi/audio.json | 5 + qemu-options.hx | 6 ++ 2 files changed, 11 insertion

[PATCH v5 09/10] usbaudio: change playback counters to 64 bit

2019-09-30 Thread Kővágó, Zoltán
rod % USBAUDIO_PACKET_SIZE(channels) assertion no longer holds true, which will result in overflowing the buffer. With 64 bit variables, it would take about 762000 years to overflow. Signed-off-by: Kővágó, Zoltán --- hw/usb/dev-audio.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) d

[PATCH v5 06/10] audio: basic support for multichannel audio

2019-09-30 Thread Kővágó, Zoltán
Which currently only means removing some checks. Old code won't require more than two channels, but new code will need it. Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c | 7 --- audio/audio.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/audio/alsaau

[PATCH v5 00/10] Audio: Mixeng-free 5.1/7.1 audio support

2019-09-30 Thread Kővágó, Zoltán
Dropped the "paaudio: channel-map option" patch, instead the paaudio backend will automatically figure out the current channel map for now (see the last patch). Currently this only works with usb-audio, if other frontends gain support for multi-channel audio, it might require some rethin

[PATCH v4 19/24] audio: replace shift in audio_pcm_info with bytes_per_frame

2019-09-19 Thread Kővágó, Zoltán
The bit shifting trick worked because the number of bytes per frame was always a power-of-two (since QEMU only supports mono, stereo and 8, 16 and 32 bit samples). But if we want to add support for surround sound, this no longer holds true. Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c

[PATCH v4 14/24] audio: split ctl_* functions into enable_* and volume_*

2019-09-19 Thread Kővágó, Zoltán
This way we no longer need vararg functions, improving compile time error detection. Also now it's possible to check actually what commands are supported, without needing to manually update ctl_caps. Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c | 62 --

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

2019-09-19 Thread Kővágó, Zoltán
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 | 7 +-- qemu-options.hx | 9 + 3 files changed, 28 insertions

[PATCH v4 12/24] audio: unify input and output mixeng buffer management

2019-09-19 Thread Kővágó, Zoltán
Usage notes: hw->samples became hw->{mix,conv}_buf->size, except before initialization (audio_pcm_hw_alloc_resources_*), hw->samples gives the initial size of the STSampleBuffer. The next commit tries to fix this inconsistency. Signed-off-by: Kővágó, Zoltán --- audio/audio.c

[PATCH v4 16/24] audio: make mixeng optional

2019-09-19 Thread Kővágó, Zoltán
Implementation of the previously added mixing-engine option. Signed-off-by: Kővágó, Zoltán --- audio/audio.c | 70 ++ audio/audio_template.h | 20 2 files changed, 78 insertions(+), 12 deletions(-) diff --git a/audio/audio.c b/audio

[PATCH v4 22/24] usb-audio: do not count on avail bytes actually available

2019-09-19 Thread Kővágó, Zoltán
This assumption is no longer true when mixeng is turned off. Signed-off-by: Kővágó, Zoltán --- hw/usb/dev-audio.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index ae42e5a2f1..74c99b1f12 100644 --- a

[PATCH v4 13/24] audio: common rate control code for timer based outputs

2019-09-19 Thread Kővágó, Zoltán
This commit removes the ad-hoc rate-limiting code from noaudio and wavaudio, and replaces them with a (slightly modified) code from spiceaudio. This way multiple write calls (for example when the circular buffer wraps around) do not cause problems. Signed-off-by: Kővágó, Zoltán --- audio

[PATCH v4 08/24] sdlaudio: port to the new audio backend api

2019-09-19 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/sdlaudio.c | 87 +++- 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c index 14b11f0335..f7ac8cd101 100644 --- a/audio/sdlaudio.c +++ b/audio/sdlaudio.c @@ -41,8

[PATCH v4 24/24] usbaudio: change playback counters to 64 bit

2019-09-19 Thread Kővágó, Zoltán
rod % USBAUDIO_PACKET_SIZE(channels) assertion no longer holds true, which will result in overflowing the buffer. With 64 bit variables, it would take about 762000 years to overflow. Signed-off-by: Kővágó, Zoltán --- hw/usb/dev-audio.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) d

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

2019-09-19 Thread Kővágó, Zoltán
sable mixeng. However mixeng is not removed, only made optional, so this shouldn't be a big concern. Signed-off-by: Kővágó, Zoltán --- Notes: Changes from v1: * renamed mixeng to mixing-engine qapi/audio.json | 5 + qemu-options.hx | 6 ++ 2 files changed, 11 insertion

[PATCH v4 10/24] wavaudio: port to the new audio backend api

2019-09-19 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- Notes: Changes from v3: * fix compilation on 32-bit targets audio/wavaudio.c | 54 1 file changed, 9 insertions(+), 45 deletions(-) diff --git a/audio/wavaudio.c b/audio/wavaudio.c index b6eeeb4e26

[PATCH v4 18/24] audio: support more than two channels in volume setting

2019-09-19 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio.c | 30 ++ audio/audio.h | 10 ++ audio/audio_int.h | 4 ++-- audio/paaudio.c| 20 audio/spiceaudio.c | 14 -- 5 files changed, 54 insertions(+), 24 deletions

[PATCH v4 11/24] audio: remove remains of the old backend api

2019-09-19 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio.c | 42 ++ audio/audio_int.h | 7 --- 2 files changed, 6 insertions(+), 43 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index e29a1e15eb..435bcf20c1 100644 --- a/audio/audio.c +++ b/audio

[PATCH v4 06/24] ossaudio: port to the new audio backend api

2019-09-19 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/ossaudio.c | 272 +-- 1 file changed, 96 insertions(+), 176 deletions(-) diff --git a/audio/ossaudio.c b/audio/ossaudio.c index 1696933688..2782512706 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c

[PATCH v4 05/24] noaudio: port to the new audio backend api

2019-09-19 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/noaudio.c | 43 +-- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/audio/noaudio.c b/audio/noaudio.c index 0fb2629cf2..b054fd225b 100644 --- a/audio/noaudio.c +++ b/audio/noaudio.c @@ -41,10 +41,9

[PATCH v4 04/24] dsoundaudio: port to the new audio backend api

2019-09-19 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/dsound_template.h | 47 --- audio/dsoundaudio.c | 305 +--- 2 files changed, 91 insertions(+), 261 deletions(-) diff --git a/audio/dsound_template.h b/audio/dsound_template.h index 8ece870c9e..9f10b688df 100644

[PATCH v4 03/24] coreaudio: port to the new audio backend api

2019-09-19 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/coreaudio.c | 130 -- 1 file changed, 69 insertions(+), 61 deletions(-) diff --git a/audio/coreaudio.c b/audio/coreaudio.c index d1be58b40a..5cde42f982 100644 --- a/audio/coreaudio.c +++ b/audio/coreaudio.c

[PATCH v4 20/24] audio: basic support for multichannel audio

2019-09-19 Thread Kővágó, Zoltán
Which currently only means removing some checks. Old code won't require more than two channels, but new code will need it. Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c | 7 --- audio/audio.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/audio/alsaau

[PATCH v4 07/24] paaudio: port to the new audio backend api

2019-09-19 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/Makefile.objs | 1 - audio/audio_pt_int.c | 173 audio/audio_pt_int.h | 22 --- audio/paaudio.c | 372 ++- configure| 5 - 5 files changed, 45 insertions(+), 528 deletions

[PATCH v4 02/24] alsaaudio: port to the new audio backend api

2019-09-19 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c | 302 -- 1 file changed, 80 insertions(+), 222 deletions(-) diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c index 591344dccd..19124d09d8 100644 --- a/audio/alsaaudio.c +++ b/audio/alsaaudio.c

[PATCH v4 01/24] audio: api for mixeng code free backends

2019-09-19 Thread Kővágó, Zoltán
er is more convenient for them. Signed-off-by: Kővágó, Zoltán --- Notes: Changes from v2: * audio_pcm_hw_run_out: handle NULL result from get_buffer_out audio/audio.c | 216 - audio/audio_int.h | 43 ++-- audio/audio_templ

[PATCH v4 00/24] Audio: Mixeng-free 5.1/7.1 audio support

2019-09-19 Thread Kővágó, Zoltán
Hi, This is the newest iteration of my mixeng-free audio patches. Changes from v3: * fixed typo in documentation * fix wavaudio format-string error on 32-bit targets. Regards, Zoltan Kővágó, Zoltán (24): audio: api for mixeng code free backends alsaaudio: port to the new audio backend api

[Qemu-devel] [PATCH v3 24/24] usbaudio: change playback counters to 64 bit

2019-09-15 Thread Kővágó, Zoltán
rod % USBAUDIO_PACKET_SIZE(channels) assertion no longer holds true, which will result in overflowing the buffer. With 64 bit variables, it would take about 762000 years to overflow. Signed-off-by: Kővágó, Zoltán --- hw/usb/dev-audio.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) d

[Qemu-devel] [PATCH v3 22/24] usb-audio: do not count on avail bytes actually available

2019-09-15 Thread Kővágó, Zoltán
This assumption is no longer true when mixeng is turned off. Signed-off-by: Kővágó, Zoltán --- hw/usb/dev-audio.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index ae42e5a2f1..74c99b1f12 100644 --- a

[Qemu-devel] [PATCH v3 21/24] paaudio: channel-map option

2019-09-15 Thread Kővágó, Zoltán
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 | 7 +-- qemu-options.hx | 9 + 3 files changed, 28 insertions

[Qemu-devel] [PATCH v3 18/24] audio: support more than two channels in volume setting

2019-09-15 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio.c | 30 ++ audio/audio.h | 10 ++ audio/audio_int.h | 4 ++-- audio/paaudio.c| 20 audio/spiceaudio.c | 14 -- 5 files changed, 54 insertions(+), 24 deletions

[Qemu-devel] [PATCH v3 14/24] audio: split ctl_* functions into enable_* and volume_*

2019-09-15 Thread Kővágó, Zoltán
This way we no longer need vararg functions, improving compile time error detection. Also now it's possible to check actually what commands are supported, without needing to manually update ctl_caps. Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c | 62 --

[Qemu-devel] [PATCH v3 17/24] paaudio: get/put_buffer functions

2019-09-15 Thread Kővágó, Zoltán
This lets us avoid some buffer copying when using mixeng. Signed-off-by: Kővágó, Zoltán --- audio/paaudio.c | 83 + 1 file changed, 83 insertions(+) diff --git a/audio/paaudio.c b/audio/paaudio.c index ed31f863f7..6ccdf31415 100644 --- a/audio

[Qemu-devel] [PATCH v3 13/24] audio: common rate control code for timer based outputs

2019-09-15 Thread Kővágó, Zoltán
This commit removes the ad-hoc rate-limiting code from noaudio and wavaudio, and replaces them with a (slightly modified) code from spiceaudio. This way multiple write calls (for example when the circular buffer wraps around) do not cause problems. Signed-off-by: Kővágó, Zoltán --- audio

[Qemu-devel] [PATCH v3 20/24] audio: basic support for multichannel audio

2019-09-15 Thread Kővágó, Zoltán
Which currently only means removing some checks. Old code won't require more than two channels, but new code will need it. Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c | 7 --- audio/audio.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/audio/alsaau

[Qemu-devel] [PATCH v3 16/24] audio: make mixeng optional

2019-09-15 Thread Kővágó, Zoltán
Implementation of the previously added mixing-engine option. Signed-off-by: Kővágó, Zoltán --- audio/audio.c | 70 ++ audio/audio_template.h | 20 2 files changed, 78 insertions(+), 12 deletions(-) diff --git a/audio/audio.c b/audio

[Qemu-devel] [PATCH v3 04/24] dsoundaudio: port to the new audio backend api

2019-09-15 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/dsound_template.h | 47 --- audio/dsoundaudio.c | 305 +--- 2 files changed, 91 insertions(+), 261 deletions(-) diff --git a/audio/dsound_template.h b/audio/dsound_template.h index 8ece870c9e..9f10b688df 100644

[Qemu-devel] [PATCH v3 11/24] audio: remove remains of the old backend api

2019-09-15 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio.c | 42 ++ audio/audio_int.h | 7 --- 2 files changed, 6 insertions(+), 43 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index e29a1e15eb..435bcf20c1 100644 --- a/audio/audio.c +++ b/audio

[Qemu-devel] [PATCH v3 19/24] audio: replace shift in audio_pcm_info with bytes_per_frame

2019-09-15 Thread Kővágó, Zoltán
The bit shifting trick worked because the number of bytes per frame was always a power-of-two (since QEMU only supports mono, stereo and 8, 16 and 32 bit samples). But if we want to add support for surround sound, this no longer holds true. Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c

[Qemu-devel] [PATCH v3 10/24] wavaudio: port to the new audio backend api

2019-09-15 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/wavaudio.c | 54 1 file changed, 9 insertions(+), 45 deletions(-) diff --git a/audio/wavaudio.c b/audio/wavaudio.c index b6eeeb4e26..7816097db8 100644 --- a/audio/wavaudio.c +++ b/audio/wavaudio.c @@ -36,52

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

2019-09-15 Thread Kővágó, Zoltán
Hi, I've updated my patch series, fixing some bugs related to spice audio. This should now work with all supported backends on linux, dsound and coreaudio remain untested. Regards, Zoltan Kővágó, Zoltán (24): audio: api for mixeng code free backends alsaaudio: port to the new audio ba

[Qemu-devel] [PATCH v3 03/24] coreaudio: port to the new audio backend api

2019-09-15 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/coreaudio.c | 130 -- 1 file changed, 69 insertions(+), 61 deletions(-) diff --git a/audio/coreaudio.c b/audio/coreaudio.c index d1be58b40a..5cde42f982 100644 --- a/audio/coreaudio.c +++ b/audio/coreaudio.c

[Qemu-devel] [PATCH v3 15/24] audio: add mixeng option (documentation)

2019-09-15 Thread Kővágó, Zoltán
sable mixeng. However mixeng is not removed, only made optional, so this shouldn't be a big concern. Signed-off-by: Kővágó, Zoltán --- Notes: Changes from v1: * renamed mixeng to mixing-engine qapi/audio.json | 5 + qemu-options.hx | 6 ++ 2 files changed, 11 insertion

[Qemu-devel] [PATCH v3 06/24] ossaudio: port to the new audio backend api

2019-09-15 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/ossaudio.c | 272 +-- 1 file changed, 96 insertions(+), 176 deletions(-) diff --git a/audio/ossaudio.c b/audio/ossaudio.c index 1696933688..2782512706 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c

[Qemu-devel] [PATCH v3 12/24] audio: unify input and output mixeng buffer management

2019-09-15 Thread Kővágó, Zoltán
Usage notes: hw->samples became hw->{mix,conv}_buf->size, except before initialization (audio_pcm_hw_alloc_resources_*), hw->samples gives the initial size of the STSampleBuffer. The next commit tries to fix this inconsistency. Signed-off-by: Kővágó, Zoltán --- audio/audio.c

[Qemu-devel] [PATCH v3 02/24] alsaaudio: port to the new audio backend api

2019-09-15 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c | 302 -- 1 file changed, 80 insertions(+), 222 deletions(-) diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c index 591344dccd..19124d09d8 100644 --- a/audio/alsaaudio.c +++ b/audio/alsaaudio.c

[Qemu-devel] [PATCH v3 07/24] paaudio: port to the new audio backend api

2019-09-15 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/Makefile.objs | 1 - audio/audio_pt_int.c | 173 audio/audio_pt_int.h | 22 --- audio/paaudio.c | 372 ++- configure| 5 - 5 files changed, 45 insertions(+), 528 deletions

[Qemu-devel] [PATCH v3 01/24] audio: api for mixeng code free backends

2019-09-15 Thread Kővágó, Zoltán
er is more convenient for them. Signed-off-by: Kővágó, Zoltán --- Notes: Changes from v2: * audio_pcm_hw_run_out: handle NULL result from get_buffer_out audio/audio.c | 216 - audio/audio_int.h | 43 ++-- audio/audio_templ

[Qemu-devel] [PATCH v3 08/24] sdlaudio: port to the new audio backend api

2019-09-15 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/sdlaudio.c | 87 +++- 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c index 14b11f0335..f7ac8cd101 100644 --- a/audio/sdlaudio.c +++ b/audio/sdlaudio.c @@ -41,8

[Qemu-devel] [PATCH v3 05/24] noaudio: port to the new audio backend api

2019-09-15 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/noaudio.c | 43 +-- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/audio/noaudio.c b/audio/noaudio.c index 0fb2629cf2..b054fd225b 100644 --- a/audio/noaudio.c +++ b/audio/noaudio.c @@ -41,10 +41,9

[Qemu-devel] [PATCH 3/3] audio: paaudio: ability to specify stream name

2019-09-10 Thread Kővágó, Zoltán
This can be used to identify stream in tools like pavucontrol when one creates multiple -audiodevs or runs multiple qemu instances. Signed-off-by: Kővágó, Zoltán --- audio/paaudio.c | 4 ++-- qapi/audio.json | 6 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/audio

[Qemu-devel] [PATCH 1/3] audio: fix parameter dereference before NULL check

2019-09-10 Thread Kővágó, Zoltán
This should fix Coverity issues CID 1405305 and 1405301. Signed-off-by: Kővágó, Zoltán --- audio/audio_template.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/audio/audio_template.h b/audio/audio_template.h index 2562bf5f00..cc4b53b5d7 100644 --- a/audio

[Qemu-devel] [PATCH 0/3] Audio: misc fixes for "Audio 20190821 patches", part two

2019-09-10 Thread Kővágó, Zoltán
v id unconditionally, while the last commit adds a new option to qapi to override it. This way we can easily drop the last commit if it turns out to be unnecessary. Regards, Zoltan Kővágó, Zoltán (3): audio: fix parameter dereference before NULL check audio: paaudio: fix connection and stream n

[Qemu-devel] [PATCH 2/3] audio: paaudio: fix connection and stream name

2019-09-10 Thread Kővágó, Zoltán
Connection name was previously erroneously set to the server socket path, while connection names were simply "qemu". After this patch, the connection name will be the vm name (falling back to "qemu" if not specified), while stream names will be the audiodev's id. Sign

[Qemu-devel] [PATCH v2 20/24] audio: basic support for multichannel audio

2019-09-08 Thread Kővágó, Zoltán
Which currently only means removing some checks. Old code won't require more than two channels, but new code will need it. Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c | 7 --- audio/audio.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/audio/alsaau

[Qemu-devel] [PATCH v2 18/24] audio: support more than two channels in volume setting

2019-09-08 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio.c | 30 ++ audio/audio.h | 10 ++ audio/audio_int.h | 4 ++-- audio/paaudio.c| 20 audio/spiceaudio.c | 14 -- 5 files changed, 54 insertions(+), 24 deletions

[Qemu-devel] [PATCH v2 16/24] audio: make mixeng optional

2019-09-08 Thread Kővágó, Zoltán
Implementation of the previously added mixing-engine option. Signed-off-by: Kővágó, Zoltán --- audio/audio.c | 70 ++ audio/audio_template.h | 20 2 files changed, 78 insertions(+), 12 deletions(-) diff --git a/audio/audio.c b/audio

[Qemu-devel] [PATCH v2 13/24] audio: common rate control code for timer based outputs

2019-09-08 Thread Kővágó, Zoltán
This commit removes the ad-hoc rate-limiting code from noaudio and wavaudio, and replaces them with a (slightly modified) code from spiceaudio. This way multiple write calls (for example when the circular buffer wraps around) do not cause problems. Signed-off-by: Kővágó, Zoltán --- audio

[Qemu-devel] [PATCH v2 15/24] audio: add mixeng option (documentation)

2019-09-08 Thread Kővágó, Zoltán
sable mixeng. However mixeng is not removed, only made optional, so this shouldn't be a big concern. Signed-off-by: Kővágó, Zoltán --- Notes: Changes from v1: * renamed mixeng to mixing-engine qapi/audio.json | 5 + qemu-options.hx | 6 ++ 2 files changed, 11 insertion

[Qemu-devel] [PATCH v2 24/24] usbaudio: change playback counters to 64 bit

2019-09-08 Thread Kővágó, Zoltán
rod % USBAUDIO_PACKET_SIZE(channels) assertion no longer holds true, which will result in overflowing the buffer. With 64 bit variables, it would take about 762000 years to overflow. Signed-off-by: Kővágó, Zoltán --- hw/usb/dev-audio.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) d

[Qemu-devel] [PATCH v2 06/24] ossaudio: port to the new audio backend api

2019-09-08 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/ossaudio.c | 272 +-- 1 file changed, 96 insertions(+), 176 deletions(-) diff --git a/audio/ossaudio.c b/audio/ossaudio.c index 1696933688..2782512706 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c

[Qemu-devel] [PATCH v2 19/24] audio: replace shift in audio_pcm_info with bytes_per_frame

2019-09-08 Thread Kővágó, Zoltán
The bit shifting trick worked because the number of bytes per frame was always a power-of-two (since QEMU only supports mono, stereo and 8, 16 and 32 bit samples). But if we want to add support for surround sound, this no longer holds true. Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c

[Qemu-devel] [PATCH v2 22/24] usb-audio: do not count on avail bytes actually available

2019-09-08 Thread Kővágó, Zoltán
This assumption is no longer true when mixeng is turned off. Signed-off-by: Kővágó, Zoltán --- hw/usb/dev-audio.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index ae42e5a2f1..74c99b1f12 100644 --- a

[Qemu-devel] [PATCH v2 10/24] wavaudio: port to the new audio backend api

2019-09-08 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/wavaudio.c | 54 1 file changed, 9 insertions(+), 45 deletions(-) diff --git a/audio/wavaudio.c b/audio/wavaudio.c index b6eeeb4e26..7816097db8 100644 --- a/audio/wavaudio.c +++ b/audio/wavaudio.c @@ -36,52

[Qemu-devel] [PATCH v2 21/24] paaudio: channel-map option

2019-09-08 Thread Kővágó, Zoltán
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 | 7 +-- qemu-options.hx | 9 + 3 files changed, 28 insertions

[Qemu-devel] [PATCH v2 14/24] audio: split ctl_* functions into enable_* and volume_*

2019-09-08 Thread Kővágó, Zoltán
This way we no longer need vararg functions, improving compile time error detection. Also now it's possible to check actually what commands are supported, without needing to manually update ctl_caps. Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c | 62 --

[Qemu-devel] [PATCH v2 01/24] audio: api for mixeng code free backends

2019-09-08 Thread Kővágó, Zoltán
er is more convenient for them. Signed-off-by: Kővágó, Zoltán --- audio/audio.c | 211 - audio/audio_int.h | 43 +++-- audio/audio_template.h | 1 + 3 files changed, 246 insertions(+), 9 deletions(-) diff --git a/audio/audio.c b/audio/au

[Qemu-devel] [PATCH v2 12/24] audio: unify input and output mixeng buffer management

2019-09-08 Thread Kővágó, Zoltán
Usage notes: hw->samples became hw->{mix,conv}_buf->size, except before initialization (audio_pcm_hw_alloc_resources_*), hw->samples gives the initial size of the STSampleBuffer. The next commit tries to fix this inconsistency. Signed-off-by: Kővágó, Zoltán --- audio/audio.c

[Qemu-devel] [PATCH v2 02/24] alsaaudio: port to the new audio backend api

2019-09-08 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c | 302 -- 1 file changed, 80 insertions(+), 222 deletions(-) diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c index 591344dccd..19124d09d8 100644 --- a/audio/alsaaudio.c +++ b/audio/alsaaudio.c

[Qemu-devel] [PATCH v2 08/24] sdlaudio: port to the new audio backend api

2019-09-08 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/sdlaudio.c | 87 +++- 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c index 14b11f0335..f7ac8cd101 100644 --- a/audio/sdlaudio.c +++ b/audio/sdlaudio.c @@ -41,8

[Qemu-devel] [PATCH v2 07/24] paaudio: port to the new audio backend api

2019-09-08 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/Makefile.objs | 1 - audio/audio_pt_int.c | 173 audio/audio_pt_int.h | 22 --- audio/paaudio.c | 372 ++- configure| 5 - 5 files changed, 45 insertions(+), 528 deletions

[Qemu-devel] [PATCH v2 11/24] audio: remove remains of the old backend api

2019-09-08 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio.c | 42 ++ audio/audio_int.h | 7 --- 2 files changed, 6 insertions(+), 43 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index f5a5942da9..c945f23724 100644 --- a/audio/audio.c +++ b/audio

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

2019-09-08 Thread Kővágó, Zoltán
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 "audio: remove hw->samples, buffer_size_in/out pcm_ops" Regards, Zoltan

[Qemu-devel] [PATCH v2 04/24] dsoundaudio: port to the new audio backend api

2019-09-08 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/dsound_template.h | 47 +++--- audio/dsoundaudio.c | 307 +--- 2 files changed, 92 insertions(+), 262 deletions(-) diff --git a/audio/dsound_template.h b/audio/dsound_template.h index 8ece870c9e..9f10b688df 100644

[Qemu-devel] [PATCH v2 03/24] coreaudio: port to the new audio backend api

2019-09-08 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/coreaudio.c | 130 -- 1 file changed, 69 insertions(+), 61 deletions(-) diff --git a/audio/coreaudio.c b/audio/coreaudio.c index d1be58b40a..5cde42f982 100644 --- a/audio/coreaudio.c +++ b/audio/coreaudio.c

[Qemu-devel] [PATCH v2 05/24] noaudio: port to the new audio backend api

2019-09-08 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/noaudio.c | 43 +-- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/audio/noaudio.c b/audio/noaudio.c index 0fb2629cf2..b054fd225b 100644 --- a/audio/noaudio.c +++ b/audio/noaudio.c @@ -41,10 +41,9

[Qemu-devel] [PATCH v2 3/4] audio: paaudio: fix client name

2019-08-26 Thread Kővágó, Zoltán
pa_context_new expects a client name, not a server socket path. Signed-off-by: Kővágó, Zoltán Reviewed-by: Maxim Levitsky --- audio/paaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index bfef9acaad..777b8e4718 100644 --- a/audio

[Qemu-devel] [PATCH v2 1/4] audio: fix invalid malloc size in audio_create_pdos

2019-08-26 Thread Kővágó, Zoltán
direction options: a string, an uint32 and a bool. Oss has the same fields, coreaudio has a single uint32, paaudio has a string and an uint32, all other backends only use the common options, so currently no per direction options struct should be larger than alsa's. Signed-off-by: Kővágó, Zol

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

2019-08-26 Thread Kővágó, Zoltán
This can be used to identify stream in tools like pavucontrol when one creates multiple -audiodevs or runs multiple qemu instances. Signed-off-by: Kővágó, Zoltán Reviewed-by: Maxim Levitsky --- qapi/audio.json | 6 ++ audio/paaudio.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions

[Qemu-devel] [PATCH v2 2/4] audio: omitting audiodev= parameter is only deprecated

2019-08-26 Thread Kővágó, Zoltán
Unfortunately, changes introduced in af2041ed2d "audio: audiodev= parameters no longer optional when -audiodev present" breaks backward compatibility. This patch changes the error into a deprecation warning. Signed-off-by: Kővágó, Zoltán --- qemu-deprecated.texi | 7 +++ aud

[Qemu-devel] [PATCH v2 0/4] Audio: misc fixes for "Audio 20190821 patches"

2019-08-26 Thread Kővágó, Zoltán
Hi, This is the second iteration of my "random fixes" patchset. Compared to v1, this has a new patch, fixing the memory error caused by an invalid malloc. Regards, Zoltan Kővágó, Zoltán (4): audio: fix invalid malloc size in audio_create_pdos audio: omitting audiodev= paramet

  1   2   3   4   5   6   7   >