Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] soc_pcm_open: error path behavior change since v5.6
@ 2020-09-03  8:31 Cezary Rojewski
  2020-09-03 13:16 ` Mark Brown
  2020-09-04  0:01 ` Kuninori Morimoto
  0 siblings, 2 replies; 6+ messages in thread
From: Cezary Rojewski @ 2020-09-03  8:31 UTC (permalink / raw)
  To: alsa-devel@alsa-project.org
  Cc: Mark Brown, Pierre-Louis Bossart, Kuninori Morimoto, Takashi Iwai

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

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

end of thread, other threads:[~2020-09-06 23:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-03  8:31 [RFC] soc_pcm_open: error path behavior change since v5.6 Cezary Rojewski
2020-09-03 13:16 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox