diff mbox series

[2/5] hda-codec: fix recording rate control

Message ID 08ea1c13-aa53-31f4-4495-ff4e455ae3ad@t-online.de (mailing list archive)
State New, archived
Headers show
Series audio fixes | expand

Commit Message

Volker Rümelin Dec. 19, 2019, 8:04 p.m. UTC
Apply previous commit to hda_audio_input_cb for the same
reasons.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
---
 hw/audio/hda-codec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Gerd Hoffmann Jan. 3, 2020, 1:10 p.m. UTC | #1
On Thu, Dec 19, 2019 at 09:04:16PM +0100, Volker Rümelin wrote:
> Apply previous commit to hda_audio_input_cb for the same
> reasons.

This mail is multipart text+html and "git am" can't process it (the
others are text only).  Can you please resend the patches, preferably
with "git send-email" to avoid them being sent as multipart?  They all
look good to me (this series and the 6th patch sent as separate mail).

thanks,
  Gerd
Volker Rümelin Jan. 4, 2020, 9:02 a.m. UTC | #2
> This mail is multipart text+html and "git am" can't process it (the
> others are text only).  Can you please resend the patches, preferably
> with "git send-email" to avoid them being sent as multipart?  They all
> look good to me (this series and the 6th patch sent as separate mail).
>
>
Sorry, I made a mistake here. I will send a version 2 patch series with
git send-email.

With best regards,
Volker
diff mbox series

Patch

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)