[PATCH] ASoC: soc-pcm: Revert "call snd_soc_component_open/close() once"
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Wed Feb 19 20:27:35 CET 2020
On 2/19/20 12:53 PM, Kai Vehmanen wrote:
> Hey,
>
> On Wed, 19 Feb 2020, 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
>> in the reverted patch was not sufficient and led to PCM playback and
>> module unload errors.
>
> I tried to keep part of the original patch at first, but I kept hitting
> new issues either in component load, or in module unload-reload flow.
> Thanks to Pierre and Ranjani for early reviews.
>
> So in the end I ended up with a full revert. This at least works on all
> SOF device topologies I tested with.
>
> At the root of the problem is that component open is called with multiple
> substreams and driver open (and close) should be called for each substream
> as well. This also caused problems to the added module refcounting logic..
> so that is reverted as well.
I also tried to find a fix in parallel with Kai's work, but no luck.
First I am not sure why we need to add a 'module' state in addition to
the existing module ref-counting, and the 'opened' state management
looks too simple. revert-and-revisit seems like the best course of
action indeed.
More information about the Alsa-devel
mailing list