From patchwork Thu Jun 11 15:16:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geoffrey McRae X-Patchwork-Id: 1307945 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=reject dis=none) header.from=hostfission.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=hostfission.com header.i=@hostfission.com header.a=rsa-sha256 header.s=mail header.b=PHUIoUEP; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49jkbR4DNyz9sRK for ; Fri, 12 Jun 2020 12:05:55 +1000 (AEST) Received: from localhost ([::1]:43646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjZ4r-0007tg-9Q for incoming@patchwork.ozlabs.org; Thu, 11 Jun 2020 22:05:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjZ3n-0006Qq-ED for qemu-devel@nongnu.org; Thu, 11 Jun 2020 22:04:47 -0400 Received: from mail1.hostfission.com ([139.99.139.48]:34052) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjZ3l-0004yA-Qf for qemu-devel@nongnu.org; Thu, 11 Jun 2020 22:04:47 -0400 Received: from moya.office.hostfission.com (office.hostfission.com [220.233.29.71]) by mail1.hostfission.com (Postfix) with ESMTP id 7B69D443E9; Fri, 12 Jun 2020 12:04:43 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hostfission.com; s=mail; t=1591927483; bh=pg+SEjYVoc0ewqGzX4xmTtmRex2TRmRRC0Bo/Lc2z+s=; h=From:Date:Subject:To:Cc:From; b=PHUIoUEPV7xm7KH1TEKdw8zPsWHy6wovGLMruvJd1b6K3SFD/IxEa59sA5HoLrV+Y Cix32bVIoTzx1vRsHoCJ/79BGONb9Ss178TxQfBfYOBgP2HvdWlyp6/hwhuGksFEme tu+rOCIZGYw7En+gVX1ED9z87mBXdPrECuhdhl3U= Received: by moya.office.hostfission.com (Postfix, from userid 0) id 665813A0172; Fri, 12 Jun 2020 12:04:43 +1000 (AEST) From: Geoffrey McRae Date: Fri, 12 Jun 2020 01:16:41 +1000 Subject: [PATCH 4/6] audio/jack: do not remove ports when finishing To: Cc: X-Mailer: mail (GNU Mailutils 3.5) Message-Id: <20200612020443.665813A0172@moya.office.hostfission.com> Received-SPF: pass client-ip=139.99.139.48; envelope-from=geoff@hostfission.com; helo=mail1.hostfission.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/11 20:16:15 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This fixes a hang when there is a communications issue with the JACK server. Simply closing the connection is enough to completely clean up and as such we do not need to remove the ports first. Signed-off-by: Geoffrey McRae --- audio/jackaudio.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/audio/jackaudio.c b/audio/jackaudio.c index 58c7344497..249cbd3265 100644 --- a/audio/jackaudio.c +++ b/audio/jackaudio.c @@ -548,9 +548,6 @@ static void qjack_client_fini(QJackClient *c) { switch (c->state) { case QJACK_STATE_RUNNING: - for (int i = 0; i < c->nchannels; ++i) { - jack_port_unregister(c->client, c->port[i]); - } jack_deactivate(c->client); /* fallthrough */