]> git.alsa-project.org Git - alsa-utils.git/commit
alsabat: refactoring alsa capture thread
authorLu, Han <han.lu@intel.com>
Wed, 23 Mar 2016 07:52:42 +0000 (15:52 +0800)
committerTakashi Iwai <tiwai@suse.de>
Wed, 23 Mar 2016 16:51:21 +0000 (17:51 +0100)
commit241d7fc1bbc9d954b8197de4cb78ea82c6b2a814
tree2dc7efc49f9c6d51819abe16d264f854e2032a98
parentc5b022e6217614f26a8d37fc8ab623f27b536562
alsabat: refactoring alsa capture thread

Refactoring ALSA capture thread:
  1. Move file open/seek operations to sub function, so all file
  processes are now on a single function (read_from_pcm_loop()), so
  the structure is more reasonable, the function API is simplified
  and no need file cleanup in thread loop.
  2. Replace the wav header processing lines with a general function
  (update_wav_header()), which can be reused in other sections.
  3. Add pthread_exit() for thread to exit safely in single line mode,
  and correct comment.

Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
bat/alsa.c
bat/common.c
bat/common.h