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.
Takashi Sakamoto (5): ALSA: control: queue events within locking of controls_rwsem for TLV operation ALSA: control: use counting semaphore as write lock for TLV write/command operations ALSA: control: obsolete user_ctl_lock ALSA: control: code refactoring TLV ioctl handler ALSA: control: code refactoring for TLV request handler to user element set
include/sound/core.h | 2 - sound/core/control.c | 252 +++++++++++++++++++++++++++++++-------------------- sound/core/init.c | 1 - 3 files changed, 155 insertions(+), 100 deletions(-)