diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-07-04 07:28:11 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-07-04 07:28:11 +0100 |
commit | 6d8ad1614e0c97c59a87e6c6208ebeb94e769149 (patch) | |
tree | cf793613266b006bda8e9fbcde3d326309ca81a5 /hw | |
parent | 2a018f6e98782a4931b936a3087404ed81685bac (diff) | |
parent | 1a961e785f59eba1fa8e06d5b1ebc84927b4b3a3 (diff) | |
download | qemu-6d8ad1614e0c97c59a87e6c6208ebeb94e769149.zip qemu-6d8ad1614e0c97c59a87e6c6208ebeb94e769149.tar.gz qemu-6d8ad1614e0c97c59a87e6c6208ebeb94e769149.tar.bz2 |
Merge remote-tracking branch 'remotes/kraxel/tags/audio-20180703-pull-request' into staging
audio: hda fixes, timer tracing
# gpg: Signature made Tue 03 Jul 2018 13:10:03 BST
# gpg: using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/audio-20180703-pull-request:
audio: add audio timer trace points
audio/hda: fix CID 1393631
audio/hda: adjust larger gaps faster
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/audio/hda-codec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index 31c66d4..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) @@ -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; } |