From patchwork Thu Oct 13 17:52:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 2177 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp407864wrs; Thu, 13 Oct 2022 11:02:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4l/hTIUbwEyvaHJQVmwKUZOA6YTx198eiIMG+5veezLJQA955BgEpgowqWuL5neJSrwhhj X-Received: by 2002:a17:907:162a:b0:78d:e212:7b74 with SMTP id hb42-20020a170907162a00b0078de2127b74mr725954ejc.288.1665684158614; Thu, 13 Oct 2022 11:02:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665684158; cv=none; d=google.com; s=arc-20160816; b=R/ICFOyXHc6UGwReFlko9fFO3h2kNegHqMEVl6nXyT5/gBb4KwPlj+dotpbNNPa/Y4 AwqaiBFMeAGdbDxSnpNkmJL+8xZSIVB6sZ6SqP2wYeAw0r60Lu0VDD/nxMlmwYYULMbF QxWXBQGDZ5bKnMoaax/dkemX1NJGFoRPdSymXxGlh3M5blQUu6QSfcFgPLA/Yh32D3Py 8Xfir3jPBX4zsg3bjPjVvIChDuAN+/w9dSwymawGNe+cjixdVbrDEzLnmyoTGBBuR/s8 6WeJrR2gcvgWL9FCk/AVT5gyisQfGfK2pHt/4A8dhPAM0LS1zZPHtOw9hSpftHr6vSdN lerw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=a3JpVz6ef15ntBNEjPSJvXDqBLpPP+7k4i9ChduGTn8=; b=gorcoOraXRaJPpXLD3lpn3+Q/DztZ+IpZ8qpndOWUkEun1ZegzexxaitF/qGctHm0I bQ5jRd0/OY7Emdg2aO/7E1uK2vjbgCD3kz7yfUSKmDRwmFqltH7fcU5xpGGper+aSOjI /oWt2AjUc01HE/pG0xyRo7Jn70ljhsqLtBrSzYfs5v7q4cTq7ppW7w65UddfVrlBmuGE xJ5vIgDeAf4ZknwkC6fbU3EqCPS2hjP+hq3Tv+P86hPE2U2qZEGVtQN82dNNnlrwg0O+ 8OTK4xvZEYe6SEmm1j51SWpyUVny8dAoEBd9ZxLOgLfuag3xn6TVoHAWs8pGQp6N6zj+ o2Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="js/xArCa"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt19-20020a170907729300b0077bd074d50bsi370642ejc.105.2022.10.13.11.01.48; Thu, 13 Oct 2022 11:02:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="js/xArCa"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230331AbiJMSBS (ORCPT + 99 others); Thu, 13 Oct 2022 14:01:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230305AbiJMSBM (ORCPT ); Thu, 13 Oct 2022 14:01:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B55521E03; Thu, 13 Oct 2022 11:00:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CDB5D61917; Thu, 13 Oct 2022 17:56:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D46EDC433D6; Thu, 13 Oct 2022 17:56:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1665683784; bh=2iHxenFtI8mSAwNAHHPUzm/iJw5O3Wst9WFoFFijL5Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=js/xArCaCaoI0R3SQsNmbcnyZyTZTbxBmme58Bed8a2vqU0sAKqPLKZD1p55mDdji R9NXsFAoOEdFKWwJ0MYUSM3xTJZo+A2AYI+xRxXzOmWzlkh64TjhZH9So8jF7vO/Eg hFCm/TNZP8BlcHskVR7/4yXasFxMtkPRyVwnrvvY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kai Vehmanen , Jaroslav Kysela , Takashi Iwai , Sasha Levin Subject: [PATCH 5.10 22/54] ALSA: hda/hdmi: Fix the converter reuse for the silent stream Date: Thu, 13 Oct 2022 19:52:16 +0200 Message-Id: <20221013175147.898801881@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221013175147.337501757@linuxfoundation.org> References: <20221013175147.337501757@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746596432215994594?= X-GMAIL-MSGID: =?utf-8?q?1746596432215994594?= From: Jaroslav Kysela [ Upstream commit 5f80d6bd2b01de4cafac3302f58456bf860322fc ] When the user space pcm stream uses the silent stream converter, it is no longer allocated for the silent stream. Clear the appropriate flag in the hdmi_pcm_open() function. The silent stream setup may be applied in hdmi_pcm_close() (and the error path - open fcn) again. If the flag is not cleared, the reuse conditions for the silent stream converter in hdmi_choose_cvt() may improperly share this converter. Cc: Kai Vehmanen Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20220913070216.3233974-1-perex@perex.cz Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/pci/hda/patch_hdmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index e6f261e8c5ae..c3fcf478037f 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1269,6 +1269,7 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo, set_bit(pcm_idx, &spec->pcm_in_use); per_pin = get_pin(spec, pin_idx); per_pin->cvt_nid = per_cvt->cvt_nid; + per_pin->silent_stream = false; hinfo->nid = per_cvt->cvt_nid; /* flip stripe flag for the assigned stream if supported */