Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp378400rwi; Mon, 10 Oct 2022 01:28:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4j2YJCaNk458YJTQIQwiyIYzpRszIYOxkefjsYOvhy3EPgU5GVYN5e0t9Y0Uw9+3iW05Zu X-Received: by 2002:a17:906:5d0d:b0:783:10cb:2829 with SMTP id g13-20020a1709065d0d00b0078310cb2829mr13739341ejt.209.1665390491087; Mon, 10 Oct 2022 01:28:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665390491; cv=none; d=google.com; s=arc-20160816; b=YbGJn8okNF+HneUJDcZCtFKsJNLU24GlpwH15N3hGisxzIUupMLeJaX3OeWo+LpH+N 7RVfpZm9bfqHjp9lsawlgc45Ko+176ZpIpLxg5t8+gBGIBmEvIPK9/IyBfP6yig8bhn0 9TzFSbPsTeLrnunmwftHDofLueErqI/85HDKWT2zj46HP4kLQHsDB0CQc03kLK7F4aNs DQFT7jnnmlN/7YGAvKZGnaT8PLS3q2lCKXa1cvOu8yjuibJ2/Mra2d5kKX1BCeJEVrHs Q40YAkcQuSefsMz1rvV+lejTwVdDVjv5PmcljSmqxgeH0Csud6W1zlkpvPs4W9pkHilh t/hg== 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=Ev2WmTK62fXOUG0YkJGDsA3AJWYwfNO3pENFBz/C2iA=; b=JFlg6V0Bw2nmFDsBNXCPYXNPSE2TFTz1LZborg7IVSympt4fLa1cJ9yeRRzqE7TKjJ d0LD9HLdiBSjM8fpaVBBRfLcco+8xXxIesNtufMXTNJCP7MkHTHw4GmQLDp8yTvxW/p+ SlISEeZsECB2yisi9wu1UZxEAk2izd0mPE0Ada+FPdmgSk1vj9ciyifA9+Crj09SBMeS Y26tIfXcKKfO8uxDiTJVBK+bjQP0s9FzMqBpddQ6gDcORiXFt6a+jA7QYS+Wsz/C70Ou 8o1D8sZe5d8uHVDOw6za1r/FBC9X+FE9YXqnwKvVIuQNLZ875+rzzDAUwXE1B/yRubkP cVlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oZrbEFzg; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 7-20020a508747000000b0044615ee1b6fsi9573644edv.218.2022.10.10.01.27.46; Mon, 10 Oct 2022 01:28:11 -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=oZrbEFzg; 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 S231514AbiJJHTj (ORCPT + 99 others); Mon, 10 Oct 2022 03:19:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232456AbiJJHSD (ORCPT ); Mon, 10 Oct 2022 03:18:03 -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 2B0F222BFB; Mon, 10 Oct 2022 00:12:07 -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 4E34760EA7; Mon, 10 Oct 2022 07:09:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F412C433C1; Mon, 10 Oct 2022 07:09:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1665385746; bh=S+37KtSGUzleq/dZfn19t0o4NkUukA9tB4DzcRapmio=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oZrbEFzgSEZiNRv37TuJd8ceTx5yUpnGGeg7IqJvbPPgOvJm0SuC7NQBDcXJIQkMj MycMX7mFfoPAOKAxmJ1MP21sA2Ypx2/V1+uRNDYZexpQmQoNy2puwaWJfnBUVFhpIJ kfgW6eHDubOvSctHi2Ta8vKuOlkUQmbrJBXMMq4k= 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.15 19/37] ALSA: hda/hdmi: Fix the converter reuse for the silent stream Date: Mon, 10 Oct 2022 09:05:38 +0200 Message-Id: <20221010070331.778305155@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221010070331.211113813@linuxfoundation.org> References: <20221010070331.211113813@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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 d3da42e0e7b3..1994a83fa391 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1270,6 +1270,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 */ -- 2.35.1