From 9d340f6755fe3ee311f6758a453fae785ec05528 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 2 Jul 2018 16:55:11 +0200 Subject: audio/hda: adjust larger gaps faster Signed-off-by: Gerd Hoffmann Message-id: 20180702145513.11481-1-kraxel@redhat.com --- hw/audio/hda-codec.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'hw') diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index 31c66d4..9f630fa 100644 --- a/hw/audio/hda-codec.c +++ b/hw/audio/hda-codec.c @@ -203,6 +203,9 @@ static inline void hda_timer_sync_adjust(HDAAudioStream *st, int64_t target_pos) if (target_pos < -limit) { corr = -HDA_TIMER_TICKS; } + if (target_pos < -(2 * limit)) { + corr = -(4 * HDA_TIMER_TICKS); + } if (corr == 0) { return; } -- cgit v1.1 From cabedbc24eb53c3feee612750929a7e307600e20 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 2 Jul 2018 16:55:12 +0200 Subject: audio/hda: fix CID 1393631 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-id: 20180702145513.11481-2-kraxel@redhat.com --- hw/audio/hda-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw') diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index 9f630fa..2b58c35 100644 --- a/hw/audio/hda-codec.c +++ b/hw/audio/hda-codec.c @@ -189,7 +189,7 @@ struct HDAAudioState { static inline int64_t hda_bytes_per_second(HDAAudioStream *st) { - return 2 * st->as.nchannels * st->as.freq; + return 2LL * st->as.nchannels * st->as.freq; } static inline void hda_timer_sync_adjust(HDAAudioStream *st, int64_t target_pos) -- cgit v1.1