[alsa-devel] [PATCH v2 2/4] ASoC: hdmi-codec: remove reference to the current substream
Mark Brown
broonie at kernel.org
Wed May 8 10:57:58 CEST 2019
On Wed, May 08, 2019 at 10:08:44AM +0200, Jerome Brunet wrote:
> On Wed, 2019-05-08 at 16:00 +0900, Mark Brown wrote:
> > The advantage of mutexes is that they are very simple and clear to
> > reason about. It is therefore unclear that this conversion to use
> > atomic variables is an improvement, they're generally more complex
> > to reason about and fragile.
> The point of this patch is not to remove the mutex in favor of atomic
> operations
Sure, but you mixed in a conversion to atomic operations as well.
> I can put back mutex to protect the flag if you prefer.
> Another solution would be to use the mutex as the 'busy' flag.
> Get the ownership of the hdmi using try_lock() in startup() and
> release it in shutdown()
> Would you have a preference Mark ?
Probably using a mutex for the flag is clearer. I'd rather keep things
as simple as absolutely possible to avoid people making mistakes in
future.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20190508/14f1de82/attachment.sig>
More information about the Alsa-devel
mailing list