[PATCH] ASoC: soc-pcm: fix state tracking error in snd_soc_component_open/close()

Dmitry Osipenko digetx at gmail.com
Mon Feb 24 16:47:27 CET 2020


24.02.2020 15:01, Mark Brown пишет:
> On Thu, Feb 20, 2020 at 11:49:55AM +0200, Kai Vehmanen wrote:
>> ASoC component open/close and snd_soc_component_module_get/put are called
>> independently for each component-substream pair, so the logic added in
>> commit dd03907bf129 ("ASoC: soc-pcm: call snd_soc_component_open/close()
>> once") was not sufficient and led to PCM playback and module unload errors.
>>
>> Implement handling of failures directly in soc_pcm_components_open(),
>> so that any successfully opened components are closed upon error with
>> other components. This allows to clean up error handling in
>> soc_pcm_open() without adding more state tracking.
> 
> Do people have thoughts on this?  I do like this approach but can't
> really test effectively myself.
> 

I haven't tried to review this patch, but it works fine on NVIDIA Tegra:

Tested-by: Dmitry Osipenko <digetx at gmail.com>


More information about the Alsa-devel mailing list