[alsa-devel] [PATCH 26/29] ALSA: oxfw: Add support AMDTP in-stream

Takashi Sakamoto o-takashi at sakamocchi.jp
Mon Nov 24 02:03:05 CET 2014


Clemens,

On Nov 20 2014 19:32, Takashi Sakamoto wrote:
>> And why are the substreams counters atomic?
>> Can't they just be normal variables accessed from inside the mutex?
> 
> Just for my convinience. I didn't want to write many
> mutex_lock()/mutex_unlock() because wrong coding of them causes-dead
> lock, then push them inner stream.c. This idea is good except for
> reference couters, so I added atomic_t.
> 
> An attached patch achieves your idea over my patchset. Handling
> reference counter is easy to understand (because it's arithmetric
> operation) but I don't like much mutex_lock()/mutex_unlock().
> 
> Can I request you to explain about the advantages of your idea?

Oops. I attached a patch for Dice driver...

But my strategy for programming is nearly the same. Would you please
give me some comments so as I can post new patchsets in this week?


Regards

Takashi Sakamoto
o-takashi at sakamocchi.jp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-oxfw-use-mutex-only-instead-of-atomic_t-to-handle-cr.patch
Type: text/x-diff
Size: 10536 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20141124/68032e84/attachment.bin>


More information about the Alsa-devel mailing list