33940dd3 | 01-Mar-2022 |
Volker Rümelin <vr_qemu@t-online.de> |
audio: add pcm_ops function table for capture backend
Add a pcm_ops function table for the capture backend. This avoids additional code in the next patches to test if the pcm_ops table is available.
audio: add pcm_ops function table for capture backend
Add a pcm_ops function table for the capture backend. This avoids additional code in the next patches to test if the pcm_ops table is available.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20220301191311.26695-8-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
a806f959 | 01-Mar-2022 |
Volker Rümelin <vr_qemu@t-online.de> |
audio: copy playback stream in sequential order
Change the code to copy the playback stream in sequential order. The advantage can be seen in the next patches where the stream copy operation effecti
audio: copy playback stream in sequential order
Change the code to copy the playback stream in sequential order. The advantage can be seen in the next patches where the stream copy operation effectively becomes a write through operation.
The following diagram shows the average buffer fill level and the stream copy sequence. ### represents a timer_period sized chunk. The rest of the buffer sizes are not to scale.
With current code: |--------| |#####111| |---#####| sw->buf mix_buf backend buffer 1. clip |--------| |---#####| |111##222| sw->buf mix_buf backend buffer 2. write to audio device 333 -> |--------| |---#####| |---111##| -> 222 sw->buf mix_buf backend buffer 3a. sw device write |-----333| |---#####| |---111##| sw->buf mix_buf backend buffer 3b. resample and mix |--------| |333#####| |---111##| sw->buf mix_buf backend buffer
With this patch: 111 -> |--------| |---#####| |---#####| sw->buf mix_buf backend buffer 1a: sw device write |-----111| |---#####| |---#####| sw->buf mix_buf backend buffer 1b. resample and mix |--------| |111##222| |---#####| sw->buf mix_buf backend buffer 2. clip |--------| |---111##| |222##333| sw->buf mix_buf backend buffer 3. write to audio device |--------| |---111##| |---222##| -> 333 sw->buf mix_buf backend buffer
The effective total playback buffer size is reduced by timer_period.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20220301191311.26695-7-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
369829a4 | 01-Mar-2022 |
Volker Rümelin <vr_qemu@t-online.de> |
jackaudio: use more jack audio buffers
The next patch reduces the effective qemu playback buffer size by timer-period. Increase the number of jack audio buffers by one to preserve the total effectiv
jackaudio: use more jack audio buffers
The next patch reduces the effective qemu playback buffer size by timer-period. Increase the number of jack audio buffers by one to preserve the total effective buffer size. The size of one jack audio buffer is 512 samples. With audio defaults that's 512 samples / 44100 samples/s = 11.6 ms and only slightly larger than the timer-period of 10 ms.
The larger jack audio buffer increases audio dropout safety, because the high priority jack-audio worker threads can provide audio data for a longer period of time as with a smaller buffer and more audio data in the mixing engine buffer that they can't access.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com> Message-Id: <20220301191311.26695-6-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
30ff5e24 | 01-Mar-2022 |
Volker Rümelin <vr_qemu@t-online.de> |
paaudio: increase default latency to 46ms
This is a patch to improve the pulseaudio playback experience. Asking pulseaudio for a playback latency of 15ms is quite demanding. Increase this to 46ms. T
paaudio: increase default latency to 46ms
This is a patch to improve the pulseaudio playback experience. Asking pulseaudio for a playback latency of 15ms is quite demanding. Increase this to 46ms. The total playback latency now is 31ms larger. One of the next patches will reduce the total playback latency again by more than 46ms.
Here is a quote from the PulseAudio Latency Control documentation: 'For the sake of (...) drop-out safety always make sure to pick the highest latency possible that fulfills your needs.'
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20220301191311.26695-5-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
0ceb26af | 01-Mar-2022 |
Volker Rümelin <vr_qemu@t-online.de> |
audio: inline function audio_pcm_sw_get_rpos_in()
Simplify code by inlining function audio_pcm_sw_get_rpos_in() at the only call site and remove the duplicated audio_bug() test.
Signed-off-by: Volk
audio: inline function audio_pcm_sw_get_rpos_in()
Simplify code by inlining function audio_pcm_sw_get_rpos_in() at the only call site and remove the duplicated audio_bug() test.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20220301191311.26695-4-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
251f1549 | 01-Mar-2022 |
Volker Rümelin <vr_qemu@t-online.de> |
audio: add function audio_pcm_hw_conv_in()
Add a function audio_pcm_hw_conv_in() similar to the existing counterpart function audio_pcm_hw_clip_out(). This function reduces the number of calls to th
audio: add function audio_pcm_hw_conv_in()
Add a function audio_pcm_hw_conv_in() similar to the existing counterpart function audio_pcm_hw_clip_out(). This function reduces the number of calls to the pcm_ops functions get_buffer_in() and put_buffer_in(). That's one less call to get_buffer_in() and put_buffer_in() every time the conv_buffer wraps around.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20220301191311.26695-3-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
8e56a172 | 01-Mar-2022 |
Volker Rümelin <vr_qemu@t-online.de> |
audio: move function audio_pcm_hw_clip_out()
Move the function audio_pcm_hw_clip_out() into the correct section 'Hard voice (playback)'.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed
audio: move function audio_pcm_hw_clip_out()
Move the function audio_pcm_hw_clip_out() into the correct section 'Hard voice (playback)'.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20220301191311.26695-2-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
9d90ceb2 | 26-Dec-2021 |
Volker Rümelin <vr_qemu@t-online.de> |
dsoundaudio: fix crackling audio recordings
Audio recordings with the DirectSound backend don't sound right. A look a the Microsoft online documentation tells us why.
From the DirectSound Programmi
dsoundaudio: fix crackling audio recordings
Audio recordings with the DirectSound backend don't sound right. A look a the Microsoft online documentation tells us why.
From the DirectSound Programming Guide, Capture Buffer Information: 'You can safely copy data from the buffer only up to the read cursor.'
Change the code to read up to the read cursor instead of the capture cursor.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20211226154017.6067-2-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
87430d5b | 07-Oct-2021 |
Paolo Bonzini <pbonzini@redhat.com> |
configure, meson: move audio driver detection to Meson
This brings a change that makes audio drivers more similar to all other modules. All drivers are built by default, while --audio-drv-list only
configure, meson: move audio driver detection to Meson
This brings a change that makes audio drivers more similar to all other modules. All drivers are built by default, while --audio-drv-list only governs the default choice of the audio driver.
Meson options are added to disable the drivers, and the next patches will fix the help messages and command line options, and especially make the non-default drivers available via -audiodev.
Cc: Gerd Hoffman <kraxel@redhat.com> Cc: Volker Rümelin <vr_qemu@t-online.de> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20211007130630.632028-4-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
986bdbc6 | 16-Jun-2021 |
Akihiko Odaki <akihiko.odaki@gmail.com> |
coreaudio: Fix output stream format settings
Before commit 7d6948cd98cf5ad8a3458a4ce7fdbcb79bcd1212, it was coded to retrieve the initial output stream format settings, modify the frame rate, and se
coreaudio: Fix output stream format settings
Before commit 7d6948cd98cf5ad8a3458a4ce7fdbcb79bcd1212, it was coded to retrieve the initial output stream format settings, modify the frame rate, and set again. However, I removed a frame rate modification code by mistake in the commit. It also assumes the initial output stream format is consistent with what QEMU expects, but that expectation is not in the code, which makes it harder to understand and will lead to breakage if the initial settings change.
This change explicitly sets all of the output stream settings to solve these problems.
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20210616141721.54091-1-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
2833d697 | 17-May-2021 |
Volker Rümelin <vr_qemu@t-online.de> |
jackaudio: avoid that the client name contains the word (NULL)
Currently with jackaudio client name and qemu guest name unset, the JACK client names are out-(NULL) and in-(NULL). These names are use
jackaudio: avoid that the client name contains the word (NULL)
Currently with jackaudio client name and qemu guest name unset, the JACK client names are out-(NULL) and in-(NULL). These names are user visible in the patch bay. Replace the function call to qemu_get_vm_name() with a call to audio_application_name() which replaces NULL with "qemu" to have more descriptive names.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20210517194604.2545-4-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
37a54d05 | 17-May-2021 |
Volker Rümelin <vr_qemu@t-online.de> |
audio: move code to audio/audio.c
Move the code to generate the pa_context_new() application name argument to a function in audio/audio.c. The new function audio_application_name() will also be used
audio: move code to audio/audio.c
Move the code to generate the pa_context_new() application name argument to a function in audio/audio.c. The new function audio_application_name() will also be used in the jackaudio backend.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20210517194604.2545-3-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
50db82d8 | 17-May-2021 |
Volker Rümelin <vr_qemu@t-online.de> |
paaudio: remove unused stream flags
In current code there are no calls to pa_stream_get_latency() or pa_stream_get_time() to receive latency or time information.
Remove the flags PA_STREAM_INTERPOL
paaudio: remove unused stream flags
In current code there are no calls to pa_stream_get_latency() or pa_stream_get_time() to receive latency or time information.
Remove the flags PA_STREAM_INTERPOLATE_TIMING and PA_STREAM_AUTO_TIMING_UPDATE which instruct PulseAudio to calculate this information in regular intervals.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20210517194604.2545-2-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
3ba6e3f6 | 11-Mar-2021 |
Akihiko Odaki <akihiko.odaki@gmail.com> |
coreaudio: Handle output device change
An output device change can occur when plugging or unplugging an earphone.
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20210311151512.
coreaudio: Handle output device change
An output device change can occur when plugging or unplugging an earphone.
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20210311151512.22096-3-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
7d6948cd | 11-Mar-2021 |
Akihiko Odaki <akihiko.odaki@gmail.com> |
coreaudio: Extract device operations
This change prepare to support dynamic device changes, which requires to perform device initialization/deinitialization multiple times.
Signed-off-by: Akihiko O
coreaudio: Extract device operations
This change prepare to support dynamic device changes, which requires to perform device initialization/deinitialization multiple times.
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20210311151512.22096-2-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|