On Thu, 03 Aug 2017 13:20:39 +0200, Takashi Sakamoto wrote:
Hi,
In a design of ALSA control core, each set of elements have data of Type-Length-Value shape. This is called as TLV data. In ALSA control interface, applications can three types of requests to elements about TLV data; read, write and command.
In current implementation of ALSA control core, these three requests are handled with read lock of a counting semaphore. However, this has an issue of concurrent access because in theory write/command requests have sub-effects to change state of the set of elements in a point of TLV data. Read requests and write/command requests are handled exclusively as well as each write/command requests.
This patchset is for this purpose. Additionally, this applies code refactoring to TLV ioctl handler and TLV handler for user-defined element set so that they get better shape for readers.
Taking the rw mutex outside snd_ctl_tlv_ioctl() is a good idea. It simplified things a lot, indeed.
Now applied all patches. Thanks!
Takashi