diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-11-21 12:46:07 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-11-21 12:46:07 +0000 |
commit | 996970236c00f244ed9518238fef480725a40ff2 (patch) | |
tree | 43d1015444a71caa6b2efc4c77de4fa43a438cb9 /hw | |
parent | 7b5425318a27d0a41c1008a36c502719255b8f5e (diff) | |
parent | c55c974486b0dadf97fe47e2e789d5dba9b77138 (diff) | |
download | qemu-996970236c00f244ed9518238fef480725a40ff2.zip qemu-996970236c00f244ed9518238fef480725a40ff2.tar.gz qemu-996970236c00f244ed9518238fef480725a40ff2.tar.bz2 |
Merge remote-tracking branch 'remotes/kraxel/tags/fixes-20191121-pull-request' into staging
two audio fixes and one gtk message fix.
# gpg: Signature made Thu 21 Nov 2019 10:04:32 GMT
# gpg: using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/fixes-20191121-pull-request:
ui/gtk: fix gettext message's charset.
display: xlnx_dp: Provide sufficient bytes for silent audio channel
audio: fix audio recording
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/display/xlnx_dp.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c index fde3b21..7058443 100644 --- a/hw/display/xlnx_dp.c +++ b/hw/display/xlnx_dp.c @@ -394,13 +394,18 @@ static void xlnx_dp_audio_callback(void *opaque, int avail) written = AUD_write(s->amixer_output_stream, &s->out_buffer[s->data_ptr], s->byte_left); } else { + int len_to_copy; /* * There is nothing to play.. We don't have any data! Fill the * buffer with zero's and send it. */ written = 0; - memset(s->out_buffer, 0, 1024); - AUD_write(s->amixer_output_stream, s->out_buffer, 1024); + while (avail) { + len_to_copy = MIN(AUD_CHBUF_MAX_DEPTH, avail); + memset(s->out_buffer, 0, len_to_copy); + avail -= AUD_write(s->amixer_output_stream, s->out_buffer, + len_to_copy); + } } } else { written = AUD_write(s->amixer_output_stream, |