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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Cezary

> 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()?

I'm sorry but I couldn't 100% understand your opinion.
But I understand that it is related to rollback order.
Now I'm posting patch for it. It is not yet 100% but 1st step.
Does it help for you ?

https://lore.kernel.org/r/87wo1kvozz.wl-kuninori.morimoto.gx@xxxxxxxxxxx

Thank you for your help !!

Best regards
---
Kuninori Morimoto



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux