aboutsummaryrefslogtreecommitdiff
path: root/hw/audio
diff options
context:
space:
mode:
authorVolker RĂ¼melin <vr_qemu@t-online.de>2020-01-04 10:11:19 +0100
committerGerd Hoffmann <kraxel@redhat.com>2020-01-06 08:47:16 +0100
commitc435fea72bbae2c37e4ae375cbecfee0d4a5470c (patch)
tree32e8bdb5facc7d42eedbd452657af7c3c8b8ce34 /hw/audio
parentdf016a1998147ec328d7e800a7f7582e053720d1 (diff)
hda-codec: fix recording rate control
Apply previous commit to hda_audio_input_cb for the same reasons. Signed-off-by: Volker RĂ¼melin <vr_qemu@t-online.de> Message-id: 20200104091122.13971-2-vr_qemu@t-online.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/audio')
-rw-r--r--hw/audio/hda-codec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c
index 768ba31e79..e711a99a41 100644
--- a/hw/audio/hda-codec.c
+++ b/hw/audio/hda-codec.c
@@ -265,8 +265,6 @@ static void hda_audio_input_cb(void *opaque, int avail)
int64_t to_transfer = MIN(B_SIZE - (wpos - rpos), avail);
- hda_timer_sync_adjust(st, -((wpos - rpos) + to_transfer - (B_SIZE >> 1)));
-
while (to_transfer) {
uint32_t start = (uint32_t) (wpos & B_MASK);
uint32_t chunk = (uint32_t) MIN(B_SIZE - start, to_transfer);
@@ -278,6 +276,8 @@ static void hda_audio_input_cb(void *opaque, int avail)
break;
}
}
+
+ hda_timer_sync_adjust(st, -((wpos - rpos) - (B_SIZE >> 1)));
}
static void hda_audio_output_timer(void *opaque)