From nobody Thu Nov 13 04:46:59 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1576785912; cv=none; d=zohomail.com; s=zohoarc; b=nZZGCskA6CwKWpcHgpYoWQohHm/nCisbaW5U9wNzEuZKTtn+tAxaM8XEuXMnegLlCVg4Nt1umvsrb8ucOi+8+Cj1Hk9JDh4+gRgUG8s56ggh5bkM4stRm5uNGsxIukavgC0q8RCVChCBogkbgD28BnlfXiZgjKMk2ZzrPZZQLuQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576785912; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=38Mk5q4ROeG9K/yMidcZEFERSggPBRy2zFsI/4KUnkQ=; b=kEgidI1JyXETFZ7jYaS4NxcPyTRjdPNHyL2wt8PJT0fikQYMiSCVIxdAg+azkh6d045WA84IZ2RTK5R/p8znRucGrN4omuzjwCizSKoFTUiTZLuAgu2K85iD/FAbxOOOGusjR5cuQEVBwlPLEsGqgqwmpRehdq98b3trfpLtqXE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576785912640311.8200652933168; Thu, 19 Dec 2019 12:05:12 -0800 (PST) Received: from localhost ([::1]:47324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ii22p-0000TF-DO for importer@patchew.org; Thu, 19 Dec 2019 15:05:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49995) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ii223-0008OP-01 for qemu-devel@nongnu.org; Thu, 19 Dec 2019 15:04:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ii221-0001oN-Qx for qemu-devel@nongnu.org; Thu, 19 Dec 2019 15:04:22 -0500 Received: from mailout11.t-online.de ([194.25.134.85]:52208) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ii221-0001fn-Gz for qemu-devel@nongnu.org; Thu, 19 Dec 2019 15:04:21 -0500 Received: from fwd02.aul.t-online.de (fwd02.aul.t-online.de [172.20.26.148]) by mailout11.t-online.de (Postfix) with SMTP id 03819422183B; Thu, 19 Dec 2019 21:04:20 +0100 (CET) Received: from [192.168.211.200] (SUGkSqZ1whffNCN1h7XYDfYU8mnY17v7cTj4PoJWrz18QKJbU7CyNfJkRWir9jzgAn@[46.86.55.2]) by fwd02.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1ii21x-2Fkh4S0; Thu, 19 Dec 2019 21:04:17 +0100 Subject: [PATCH 2/5] hda-codec: fix recording rate control From: =?UTF-8?Q?Volker_R=c3=bcmelin?= To: Gerd Hoffmann References: Message-ID: <08ea1c13-aa53-31f4-4495-ff4e455ae3ad@t-online.de> Date: Thu, 19 Dec 2019 21:04:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------96E699F27F3941B227FB4792" Content-Language: de-DE X-ID: SUGkSqZ1whffNCN1h7XYDfYU8mnY17v7cTj4PoJWrz18QKJbU7CyNfJkRWir9jzgAn X-TOI-MSGID: e54a930e-1124-4056-8d16-d18c99b7771d X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 194.25.134.85 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: QEMU , =?UTF-8?B?Wm9sdMOhbiBLxZF2w6Fnw7M=?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" This is a multi-part message in MIME format. --------------96E699F27F3941B227FB4792 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Apply previous commit to hda_audio_input_cb for the same reasons. Signed-off-by: Volker R=C3=BCmelin --- hw/audio/hda-codec.c | 4 ++-- 1 file 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) =20 int64_t to_transfer =3D MIN(B_SIZE - (wpos - rpos), avail); =20 - hda_timer_sync_adjust(st, -((wpos - rpos) + to_transfer - (B_SIZE >> 1= ))); - while (to_transfer) { uint32_t start =3D (uint32_t) (wpos & B_MASK); uint32_t chunk =3D (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))); } =20 static void hda_audio_output_timer(void *opaque) --=20 2.16.4 --------------96E699F27F3941B227FB4792 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Apply previous commit to hda_audio_input_cb for the same
reasons.

Signed-off-by: Volker R=C3=BCmelin <vr_qemu@t-online.de>
---
 hw/audio/hda-codec.c | 4 ++--
 1 file 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 avai=
l)
=20
     int64_t to_transfer =3D MIN(B_SIZE - (wpos - rpos), avail);
=20
-    hda_timer_sync_adjust(st, -((wpos - rpos) + to_transfer - (B_SIZE &g=
t;> 1)));
-
     while (to_transfer) {
         uint32_t start =3D (uint32_t) (wpos & B_MASK);
         uint32_t chunk =3D (uint32_t) MIN(B_SIZE - start, to_transfer);
@@ -278,6 +276,8 @@ static void hda_audio_input_cb(void *opaque, int avai=
l)
             break;
         }
     }
+
+    hda_timer_sync_adjust(st, -((wpos - rpos) - (B_SIZE >> 1)));
 }
=20
 static void hda_audio_output_timer(void *opaque)
--=20
2.16.4

--------------96E699F27F3941B227FB4792--