From nobody Tue Feb 10 04:15:56 2026 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; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1578315261; cv=none; d=zohomail.com; s=zohoarc; b=d8dm/TxGFUCvWqxO2moSlDVdNm5qlo+Hybvxpqunr8X/7AuMbKhzjn7LrWKzeXDb7IuA9oLRLkx5H8Kp9cQLYS43bVg6q7ffCVmPrAEsMEuLkA+K3dSvIpVFRNjb2hO0eB1eDbvakyGF/cgxUH7nK9Hf+zkF1c1Yzp/unDQiSO0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578315261; h=Content-Type:Content-Transfer-Encoding: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=Kh8HpDlNt551/dDZefIn5BOFL1sqd2pyx1rSXguRPeY=; b=ngnki8lheiNFr3TNeuAxBI6J9oAlWxN4mqS40k8rf9DS4jh2VuQyJzLYSZ2AZ8fPgV/maz06hree8R6G1SF/eM6A13BAKH0U0ZZzAu08+YnhfxBqs0d5vkzfGAdkJ4Do0n3SNLX23FgZi5vGfAvfI7MHDbHQQ3R7UX2/dG12UvA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1578315261501490.952524270387; Mon, 6 Jan 2020 04:54:21 -0800 (PST) Received: from localhost ([::1]:51446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioRtj-0002Oe-EC for importer@patchew.org; Mon, 06 Jan 2020 07:54:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58251) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioRsC-0000qE-L7 for qemu-devel@nongnu.org; Mon, 06 Jan 2020 07:52:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ioRsB-0000ob-Kc for qemu-devel@nongnu.org; Mon, 06 Jan 2020 07:52:44 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:47685 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ioRsB-0000mx-Gw for qemu-devel@nongnu.org; Mon, 06 Jan 2020 07:52:43 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-39-khPHw9KBPKuEW0nqtghzTQ-1; Mon, 06 Jan 2020 07:52:41 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8B9EF801E76; Mon, 6 Jan 2020 12:52:40 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-98.ams2.redhat.com [10.36.116.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id 83F247FB4C; Mon, 6 Jan 2020 12:52:37 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 97BAF491B; Mon, 6 Jan 2020 13:52:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578315162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Kh8HpDlNt551/dDZefIn5BOFL1sqd2pyx1rSXguRPeY=; b=BZmhujtTWps0REfD7KMelY3mSRupLRfVe2G288VBuqlNc+3+6deP/FBrjeT8+GLAa/xS8b 3qde0+R5G4Q/XUEiMdhOdkWLWOaEHJUND6IMBCJBoSA5SeUVWtaBKDQO59Wtg7uuRDwSiA DYb5LBEdzDBeiMoASdo+l8TMUKxAdng= From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 2/6] hda-codec: fix recording rate control Date: Mon, 6 Jan 2020 13:52:32 +0100 Message-Id: <20200106125236.24132-3-kraxel@redhat.com> In-Reply-To: <20200106125236.24132-1-kraxel@redhat.com> References: <20200106125236.24132-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: khPHw9KBPKuEW0nqtghzTQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 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: =?UTF-8?q?Volker=20R=C3=BCmelin?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Volker R=C3=BCmelin Apply previous commit to hda_audio_input_cb for the same reasons. Signed-off-by: Volker R=C3=BCmelin Message-id: 20200104091122.13971-2-vr_qemu@t-online.de Signed-off-by: Gerd Hoffmann --- 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 768ba31e7926..e711a99a414a 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.18.1