alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/hdmi: Drop bogus check at closing a stream
@ 2021-02-11  8:31 Takashi Iwai
  2021-02-11 10:38 ` Kai Vehmanen
  0 siblings, 1 reply; 2+ messages in thread
From: Takashi Iwai @ 2021-02-11  8:31 UTC (permalink / raw)
  To: alsa-devel; +Cc: Kai Vehmanen

Some users reported the kernel WARNING with stack traces from
hdmi_pcm_close(), and it's the line checking the per_cvt->assigned
flag.  This used to be a valid check in the past because the flag was
turned on/off only at opening and closing a PCM stream.  Meanwhile,
since the introduction of the silent-stream mode, this flag may be
turned on/off at the monitor connection/disconnection time, which
isn't always associated with the PCM open/close.  Hence this may lead
to the inconsistent per_cvt->assigned flag at closing.

As the check itself became almost useless and confuses users as if it
were a serious problem, just drop the check.

Fixes: b1a5039759cb ("ALSA: hda/hdmi: fix silent stream for first playback to DP")
Cc: <stable@vger.kernel.org>
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210987
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/pci/hda/patch_hdmi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 97adff0cbcab..e405be7929e3 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -2130,7 +2130,6 @@ static int hdmi_pcm_close(struct hda_pcm_stream *hinfo,
 			goto unlock;
 		}
 		per_cvt = get_cvt(spec, cvt_idx);
-		snd_BUG_ON(!per_cvt->assigned);
 		per_cvt->assigned = 0;
 		hinfo->nid = 0;
 
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: hda/hdmi: Drop bogus check at closing a stream
  2021-02-11  8:31 [PATCH] ALSA: hda/hdmi: Drop bogus check at closing a stream Takashi Iwai
@ 2021-02-11 10:38 ` Kai Vehmanen
  0 siblings, 0 replies; 2+ messages in thread
From: Kai Vehmanen @ 2021-02-11 10:38 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Kai Vehmanen

Hi,

On Thu, 11 Feb 2021, Takashi Iwai wrote:

> Some users reported the kernel WARNING with stack traces from
> hdmi_pcm_close(), and it's the line checking the per_cvt->assigned
> flag.  This used to be a valid check in the past because the flag was
> turned on/off only at opening and closing a PCM stream.  Meanwhile,
> since the introduction of the silent-stream mode, this flag may be
> turned on/off at the monitor connection/disconnection time, which

ack, this needs to be removed:

Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>

Br, Kai


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-11 10:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11  8:31 [PATCH] ALSA: hda/hdmi: Drop bogus check at closing a stream Takashi Iwai
2021-02-11 10:38 ` Kai Vehmanen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).