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>
This commit is contained in:
parent
df016a1998
commit
c435fea72b
@ -265,8 +265,6 @@ static void hda_audio_input_cb(void *opaque, int avail)
|
|||||||
|
|
||||||
int64_t to_transfer = MIN(B_SIZE - (wpos - rpos), 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) {
|
while (to_transfer) {
|
||||||
uint32_t start = (uint32_t) (wpos & B_MASK);
|
uint32_t start = (uint32_t) (wpos & B_MASK);
|
||||||
uint32_t chunk = (uint32_t) MIN(B_SIZE - start, to_transfer);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hda_timer_sync_adjust(st, -((wpos - rpos) - (B_SIZE >> 1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hda_audio_output_timer(void *opaque)
|
static void hda_audio_output_timer(void *opaque)
|
||||||
|
Loading…
Reference in New Issue
Block a user