On 2022-03-08 6:22 PM, Ranjani Sridharan wrote:
On Tue, 2022-03-08 at 17:57 +0100, Cezary Rojewski wrote:
Scenario you describe is correct and does not prompt the need for the mutex.
However, ->mods_info is accessed through getters found in utils.c (this
very patch) during stream creation too. That fragment is part of path
management series though - it was requested to split those bits away.
So, there is a possibility for a platform-soc-component to have its
->probe() called - and thus triggering ->mods_info update - while a
stream is being opened on a different sound card simultaneously. To
avoid unwanted behavior e.g.: looping through ->mods_info while it's
being updated in separate thread, we lock the array.
Keeping in mind that this driver is meant for older platforms, how likely are you to support multiple sound cards with those topologies?
Not sure what's the question here. Age of the platform has nothing to do with the subject. There is not a single DSP-capable platform that Intel has shipped that would not contain more one audio device onboard. At least I'm not aware of any.
Regards, Czarek