[RFC] soc_pcm_open: error path behavior change since v5.6

Mark Brown broonie at kernel.org
Thu Sep 3 15:16:34 CEST 2020


On Thu, Sep 03, 2020 at 10:31:35AM +0200, Cezary Rojewski wrote:

> 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:

Please don't invent new notation that nobody else uses, it just makes
your messages harder to read.

> 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).

If there are stateful things it's probably better to do that from a
robustness point of view whatever is going on.

> Or, perhaps behavior change should be reverted with ::shutdown() routine
> again being called only after successful ::startup()?

IIRC part of the thinking there was that we were getting the keeping
track part of things wrong and sometimes missing things that should be
being shut down in error paths.  Anything that tries to stop extra calls
would need to be very clearly robust and easily maintainable.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20200903/94e6b7ce/attachment.sig>


More information about the Alsa-devel mailing list