All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Vehmanen <kai.vehmanen@linux.intel.com>
To: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>,
	ALSA development <alsa-devel@alsa-project.org>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>
Subject: Re: [PATCH] ALSA: hda/hdmi: Fix the converter reuse for the silent stream
Date: Mon, 19 Sep 2022 14:33:02 +0300 (EEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2209191430310.2722275@eliteleevi.tm.intel.com> (raw)
In-Reply-To: <20220913070216.3233974-1-perex@perex.cz>

Hi,

sorry for the late review (as Takashi already applied).

On Tue, 13 Sep 2022 09:02:16 +0200, Jaroslav Kysela wrote:
> 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.

Jaroslav, did you hit a real-life problem with a particular sequence? The 
converter allocation was done in a sticky fashion on purpose. The silent 
stream setup (clearing KAE and/or letting codec to power down) was only 
released if the receiver is disconnected from the system. I.e. no actions 
were done in PCM close (on purpose).

Now if there were issues, I wonder whether we should modify the pcm_close 
instead, and avoid some of the cleanup in this case, as a better fix.

I think your patch will create a new problem:
 - receiver A connected to CVT X
 - silent stream enabled for X
 - app opens a PCM, connected to A+X, silent stream disabled  
 - receiver A disconnected
 -> actions in silent_stream_disable() not run correctly for CVT X

Br, Kai

  parent reply	other threads:[~2022-09-19 11:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-13  7:02 [PATCH] ALSA: hda/hdmi: Fix the converter reuse for the silent stream Jaroslav Kysela
2022-09-16 14:15 ` Takashi Iwai
2022-09-19 11:33 ` Kai Vehmanen [this message]
2022-09-19 13:17   ` Jaroslav Kysela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2209191430310.2722275@eliteleevi.tm.intel.com \
    --to=kai.vehmanen@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.