14cefe14 | 10-Jan-2021 |
Volker Rümelin <vr_qemu@t-online.de> |
sdlaudio: don't start playback in init routine
Every emulated audio device has a way to enable audio playback. Don't start playback until the guest enables the audio device. This patch keeps the SDL
sdlaudio: don't start playback in init routine
Every emulated audio device has a way to enable audio playback. Don't start playback until the guest enables the audio device. This patch keeps the SDL2 device pause state in sync with hw->enabled.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Reviewed-by: Thomas Huth <thuth@redhat.com> Tested-by: Thomas Huth <thuth@redhat.com> Message-id: 9315afe5-5958-c0b4-ea1e-14769511a9d5@t-online.de Message-Id: <20210110100239.27588-4-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
5a0926c2 | 10-Jan-2021 |
Volker Rümelin <vr_qemu@t-online.de> |
sdlaudio: add -audiodev sdl,out.buffer-count option
Currently there is a crackling noise with SDL2 audio playback. Commit bcf19777df: "audio/sdlaudio: Allow audio playback with SDL2" already mention
sdlaudio: add -audiodev sdl,out.buffer-count option
Currently there is a crackling noise with SDL2 audio playback. Commit bcf19777df: "audio/sdlaudio: Allow audio playback with SDL2" already mentioned the crackling noise.
Add an out.buffer-count option to give users a chance to select sane settings for glitch free audio playback. The idea was taken from the coreaudio backend.
The in.buffer-count option will be used with one of the next patches.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Acked-by: Markus Armbruster <armbru@redhat.com> Message-id: 9315afe5-5958-c0b4-ea1e-14769511a9d5@t-online.de Message-Id: <20210110100239.27588-3-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
ff69c481 | 10-Jan-2021 |
Volker Rümelin <vr_qemu@t-online.de> |
audio: fix bit-rotted code
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-id: 9315afe5-5958-c0b4-ea1e-14769511a9d5@t-online.de Message-Id: <20210110100239.27588-2-vr_qemu@t-online.de> S
audio: fix bit-rotted code
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-id: 9315afe5-5958-c0b4-ea1e-14769511a9d5@t-online.de Message-Id: <20210110100239.27588-2-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
06c8c375 | 15-Dec-2020 |
Gerd Hoffmann <kraxel@redhat.com> |
audio: add sanity check
Check whenever we actually found the spiceaudio driver before flipping the can_be_default field.
Fixes: f0c4555edfdd ("audio: remove qemu_spice_audio_init()") Buglink: https
audio: add sanity check
Check whenever we actually found the spiceaudio driver before flipping the can_be_default field.
Fixes: f0c4555edfdd ("audio: remove qemu_spice_audio_init()") Buglink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977301 Reported-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20201215081151.20095-1-kraxel@redhat.com>
show more ...
|
ab32b78c | 10-Dec-2020 |
Philippe Mathieu-Daudé <philmd@redhat.com> |
audio: Simplify audio_bug() removing old code
This code (introduced in commit 1d14ffa97ea, Oct 2005) is likely unused since years. Time to remove it. If the condition is true, simply call abort().
audio: Simplify audio_bug() removing old code
This code (introduced in commit 1d14ffa97ea, Oct 2005) is likely unused since years. Time to remove it. If the condition is true, simply call abort().
Suggested-by: Gerd Hoffmann <gerd@kraxel.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20201210223506.263709-1-philmd@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
ba6371b0 | 13-Dec-2020 |
Volker Rümelin <vr_qemu@t-online.de> |
audio: remove unused function audio_is_cleaning_up()
The previous commit removed the last call site of audio_is_cleaning_up(). Remove the now unused function.
Tested-by: Howard Spoelstra <hsp.cat7@
audio: remove unused function audio_is_cleaning_up()
The previous commit removed the last call site of audio_is_cleaning_up(). Remove the now unused function.
Tested-by: Howard Spoelstra <hsp.cat7@gmail.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-id: 20201213130528.5863-4-vr_qemu@t-online.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
ceb1165e | 13-Dec-2020 |
Volker Rümelin <vr_qemu@t-online.de> |
coreaudio: always stop audio playback on shut down
Always stop audio playback and remove the playback callback when QEMU exits.
On shut down the function coreaudio_fini_out() destroys the coreaudio
coreaudio: always stop audio playback on shut down
Always stop audio playback and remove the playback callback when QEMU exits.
On shut down the function coreaudio_fini_out() destroys the coreaudio mutex but fails to stop audio playback and to remove the audio playback callback, because function audio_is_cleaning_up() always returns true when called from coreaudio_fini_out(). Now there is a time window from pthread_mutex_destroy() to program exit where Core Audio may call the audio playback callback which tries to lock the destroyed coreaudio mutex. This leads to the following error.
coreaudio: Could not lock voice for audioDeviceIOProc Reason: Invalid argument
This bug was reported on the qemu-discuss mailing list. https://lists.nongnu.org/archive/html/qemu-discuss/2020-10/msg00018.html
Tested-by: Howard Spoelstra <hsp.cat7@gmail.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-id: 20201213130528.5863-3-vr_qemu@t-online.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
53e78d1c | 13-Dec-2020 |
Volker Rümelin <vr_qemu@t-online.de> |
coreaudio: don't start playback in init routine
Every emulated audio device has a way to enable audio playback. Don't start playback until the guest enables the audio device to keep the Core Audio d
coreaudio: don't start playback in init routine
Every emulated audio device has a way to enable audio playback. Don't start playback until the guest enables the audio device to keep the Core Audio device run state in sync with hw->enabled.
Tested-by: Howard Spoelstra <hsp.cat7@gmail.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-id: 20201213130528.5863-2-vr_qemu@t-online.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
a8a98cfd | 20-Sep-2020 |
Volker Rümelin <vr_qemu@t-online.de> |
audio: run downstream playback queue unconditionally
Run the downstream playback queue even if there are no samples in the mixing engine buffer. The downstream queue may still have queued samples.
audio: run downstream playback queue unconditionally
Run the downstream playback queue even if there are no samples in the mixing engine buffer. The downstream queue may still have queued samples.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200920171729.15861-7-vr_qemu@t-online.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
2d882307 | 20-Sep-2020 |
Volker Rümelin <vr_qemu@t-online.de> |
audio: align audio_generic_write with audio_pcm_hw_run_out
The function audio_generic_write should work exactly like audio_pcm_hw_run_out. It's a very similar function working on a different buffer.
audio: align audio_generic_write with audio_pcm_hw_run_out
The function audio_generic_write should work exactly like audio_pcm_hw_run_out. It's a very similar function working on a different buffer.
This patch significantly reduces the number of drop-outs with the DirectSound backend. To hear the difference start qemu with -audiodev dsound,id=audio0,out.mixing-engine=off and play a song in the guest with and without this patch.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200920171729.15861-6-vr_qemu@t-online.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
ac221f45 | 20-Sep-2020 |
Volker Rümelin <vr_qemu@t-online.de> |
audio: remove unnecessary calls to put_buffer_in
This patch removes unnecessary calls to the pcm_ops function put_buffer_in(). No audio backend needs this call if the returned length of pcm_ops func
audio: remove unnecessary calls to put_buffer_in
This patch removes unnecessary calls to the pcm_ops function put_buffer_in(). No audio backend needs this call if the returned length of pcm_ops function get_buffer_in() is zero.
For the DirectSound backend this prevents a call to dsound_unlock_in() without a preceding call to dsound_lock_in(). While Windows doesn't complain it seems wrong anyway.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200920171729.15861-5-vr_qemu@t-online.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
b9896dc5 | 20-Sep-2020 |
Volker Rümelin <vr_qemu@t-online.de> |
audio: align audio_generic_read with audio_pcm_hw_run_in
The function audio_generic_read should work exactly like audio_pcm_hw_run_in. It's a very similar function working on a different buffer.
Si
audio: align audio_generic_read with audio_pcm_hw_run_in
The function audio_generic_read should work exactly like audio_pcm_hw_run_in. It's a very similar function working on a different buffer.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200920171729.15861-4-vr_qemu@t-online.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
aec6d0dc | 20-Sep-2020 |
Volker Rümelin <vr_qemu@t-online.de> |
audio/spiceaudio: always rate limit playback stream
The playback rate with the spiceaudio backend is currently too fast if there's no spice client connected or the spice client can't play audio. Rat
audio/spiceaudio: always rate limit playback stream
The playback rate with the spiceaudio backend is currently too fast if there's no spice client connected or the spice client can't play audio. Rate limit the audio playback stream in all cases. To calculate the rate correctly the limiter has to know the maximum buffer size.
Fixes: 8c198ff065 ("spiceaudio: port to the new audio backend api") Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200920171729.15861-3-vr_qemu@t-online.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
4c3356f9 | 20-Sep-2020 |
Volker Rümelin <vr_qemu@t-online.de> |
audio/audio: fix video playback slowdown with spiceaudio
This patch allows the audio backends get_buffer_out() functions to drop audio data and mitigates a bug reported on the qemu-devel mailing lis
audio/audio: fix video playback slowdown with spiceaudio
This patch allows the audio backends get_buffer_out() functions to drop audio data and mitigates a bug reported on the qemu-devel mailing list.
https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03832.html
The new rules for the variables buf and size returned by get_buffer_out() are: size == 0: Downstream playback buffer is full. Retry later. size > 0, buf != NULL: Copy size bytes to buf for playback. size > 0, buf == NULL: Drop size bytes.
The audio playback rate with spiceaudio for the no audio case is too fast, but that's what we had before commit fb35c2cec5 "audio/dsound: fix invalid parameters error". The complete fix comes with the next patch.
Reported-by: Qi Zhou <atmgnd@outlook.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200920171729.15861-2-vr_qemu@t-online.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|