Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Cc: Mark Brown <broonie@kernel.org>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Takashi Iwai <tiwai@suse.com>
Subject: [RFC] soc_pcm_open: error path behavior change since v5.6
Date: Thu, 3 Sep 2020 10:31:35 +0200	[thread overview]
Message-ID: <48810933-41cf-265c-1784-2e2acf979720@intel.com> (raw)

Hello,

Some time ago negative-tests found out that behavior of soc_pcm_open has 
changed, quite sure this might be a regression hence my email. Till v5.6 
soc_pcm_open was invoking ::shutdown() for cpu_dai in error path only if 
::startup() succeeded first (label: 'out'). After addition of commit:

	5d9fa03e6c3514266fa94851ab1b6dd6e0595a13
	ASoC: soc-pcm: tidyup soc_pcm_open() order

this is no longer true. ::shutdown() can and will be invoked for given 
cpu_dai despite ::startup()'s failure. This complicated further since 
the merging of cpu & codec dais.

The same applies to codec_dais: notice the usage of 
for_each_rtd_codec_dai_rollback macro instead of for_each_rtd_dais in 
error path in v5.6.

Should dai's ::shutdown() be introducing some kind of state-check from 
now on? - similarly to how developers deal with some of the core pcm 
operations e.g.: ::prepare() (as it may get invoked multiple times in a 
row so check is there to prevent redundancy).
Or, perhaps behavior change should be reverted with ::shutdown() routine 
again being called only after successful ::startup()?

Czarek

             reply	other threads:[~2020-09-03  8:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03  8:31 Cezary Rojewski [this message]
2020-09-03 13:16 ` [RFC] soc_pcm_open: error path behavior change since v5.6 Mark Brown
2020-09-04  9:35   ` Cezary Rojewski
2020-09-06 23:11     ` Kuninori Morimoto
2020-09-04  0:01 ` Kuninori Morimoto
2020-09-04  9:25   ` Mark Brown

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=48810933-41cf-265c-1784-2e2acf979720@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox