From nobody Tue Feb 10 11:15:19 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; 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=1579765919; cv=none; d=zohomail.com; s=zohoarc; b=I1X86TR19Mu54Tnp0nlOAdvLVgYGERNvYc+EnolK63n+ZL1PB/+frVL90nrAZzAIw0qgq52hr+nTlKZmHzDIjigk7m2qnpRV7r8CmpQx3/hDuKpmIjPr1n8YD1ZHHespXfH98lJvwKwNfHMNxLQhfXOTek9/vnw1NWEkVXpyuWY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579765919; 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=th3SJp0eKiDlr7E8cToBlLxjegf2scnnddHCjlmXO7c=; b=XDkAyeeUixEutLBVE5UMCXZ2yC6eYeRIsZiZxe6xOTKxX6ztT4gmCl7Ju2U7jGGa/XPrb6IqQcGH5zOPe2Be4+yuD8pu/uJb3h9od4+cSql70CYqyCVxASLgx33wya7xhBVKGkNZO2YcTokH+hioy7IOA3mcxEVrknmp3CAaSRc= 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 157976591956958.48284892078607; Wed, 22 Jan 2020 23:51:59 -0800 (PST) Received: from localhost ([::1]:52380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuXHR-0007vp-RZ for importer@patchew.org; Thu, 23 Jan 2020 02:51:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46171) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuXFd-00061L-Lc for qemu-devel@nongnu.org; Thu, 23 Jan 2020 02:50:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iuXFb-0004iV-NC for qemu-devel@nongnu.org; Thu, 23 Jan 2020 02:50:05 -0500 Received: from mailout07.t-online.de ([194.25.134.83]:56294) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iuXFb-0004hB-HP for qemu-devel@nongnu.org; Thu, 23 Jan 2020 02:50:03 -0500 Received: from fwd35.aul.t-online.de (fwd35.aul.t-online.de [172.20.27.145]) by mailout07.t-online.de (Postfix) with SMTP id 0D7E6420C3D4; Thu, 23 Jan 2020 08:50:02 +0100 (CET) Received: from linpower.localnet (EG4kSMZfQh937Ei9W3xhVB+UPLFVHknNBDFVSK8dnWKC+wMwWpejyJtib4H-JrwQfY@[46.86.62.122]) by fwd35.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1iuXFZ-32WwxE0; Thu, 23 Jan 2020 08:50:01 +0100 Received: by linpower.localnet (Postfix, from userid 1000) id 60EF9200F7D; Thu, 23 Jan 2020 08:49:43 +0100 (CET) From: =?UTF-8?q?Volker=20R=C3=BCmelin?= To: Gerd Hoffmann Subject: [PATCH 8/9] ossaudio: disable poll mode can't be reached Date: Thu, 23 Jan 2020 08:49:42 +0100 Message-Id: <20200123074943.6699-8-vr_qemu@t-online.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <1e29e1d3-b59b-fcd6-cdff-a680bcdbffa4@t-online.de> References: <1e29e1d3-b59b-fcd6-cdff-a680bcdbffa4@t-online.de> MIME-Version: 1.0 X-ID: EG4kSMZfQh937Ei9W3xhVB+UPLFVHknNBDFVSK8dnWKC+wMwWpejyJtib4H-JrwQfY X-TOI-MSGID: 98d184ff-a104-44b3-b651-0d2090ea5e6b Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 194.25.134.83 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?q?Zolt=C3=A1n=20K=C5=91v=C3=A1g=C3=B3?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Currently there is no way to disable poll mode in oss_enable_out and oss_enable_in when it was enabled before. The enable code path always resets the poll mode state variable. Fixes: b027a538c6 "oss: Remove unused error handling of qemu_set_fd_handler" Signed-off-by: Volker R=C3=BCmelin --- audio/ossaudio.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/audio/ossaudio.c b/audio/ossaudio.c index 39a6fc09e5..f88d076ec2 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c @@ -579,14 +579,12 @@ static void oss_enable_out(HWVoiceOut *hw, bool enabl= e) AudiodevOssPerDirectionOptions *opdo =3D oss->dev->u.oss.out; =20 if (enable) { - bool poll_mode =3D opdo->try_poll; + hw->poll_mode =3D opdo->try_poll; =20 ldebug("enabling voice\n"); - if (poll_mode) { + if (hw->poll_mode) { oss_poll_out(hw); - poll_mode =3D 0; } - hw->poll_mode =3D poll_mode; =20 if (!oss->mmapped) { return; @@ -708,17 +706,15 @@ static void oss_enable_in(HWVoiceIn *hw, bool enable) AudiodevOssPerDirectionOptions *opdo =3D oss->dev->u.oss.out; =20 if (enable) { - bool poll_mode =3D opdo->try_poll; + hw->poll_mode =3D opdo->try_poll; =20 - if (poll_mode) { + if (hw->poll_mode) { oss_poll_in(hw); - poll_mode =3D 0; } - hw->poll_mode =3D poll_mode; } else { if (hw->poll_mode) { - hw->poll_mode =3D 0; qemu_set_fd_handler (oss->fd, NULL, NULL, NULL); + hw->poll_mode =3D 0; } } } --=20 2.16.4