Re: [PATCH v3 11/17] ASoC: Intel: avs: Firmware resources management utilities

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

 



> > > + * @modres_mutex: For synchronizing any @mods_info updates
> > Is this mutex really necessary? Can you please elaborate under what
> > circumstances your will have parallel module updates?
> 
> 
> 
> 
> Yes, we believe modres_mutex is necessary. All information regarding 
> 
> modules exposed by the firmware are stored within ->mods_info cache.
> 
> 
> 
> That's just a snapshot though. When a new library gets loaded, new 
> 
> modules may be available for use and so the driver updates the 
> 
> ->mods_info cache to have the latest snapshot. As information found 
> 
> there is used when streaming (e.g.: instantiating modules), we enter
> a 
> 
> scenario when multiple threads could be reading/updating the
> ->mods_info 
> 
> at once. To prevent any unwanted behavior, mutex has been added.
This is the part that's hard to follow without seeing the actual code
where this new library is loaded. When does a libray get loaded? When
you start streaming and you realize that the stream requires a module
that is not built into the base FW? Can this be done during topology
loading instead?

Thanks,
Rnajani




[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