]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: direct: allow users to configure different period sizes
authorJoshua Frkuska <joshua_frkuska@mentor.com>
Fri, 30 Dec 2016 06:26:15 +0000 (11:56 +0530)
committerTakashi Iwai <tiwai@suse.de>
Mon, 2 Jan 2017 13:50:27 +0000 (14:50 +0100)
commit0a61c796810fcec8b386e5311e871b1744b45a67
tree5c559d20a04a8d6d7d7084f52532276b1e9a3ecb
parent9ed4075f05a4242f32331f7f2c365767970f5003
pcm: direct: allow users to configure different period sizes

This patch allows the effective period size to be a multiple of the
slave-pcm period size.
Allowing only exact multiple of original period size is achieved by
borrowing code from the kernel hwrules implementation.

This patch is intended to save cpu workload when for example, the
slave operates with very small periods but a user does not need that
small periods.

This feature is enabled by default and can be disabled by adding
config option 'var_periodsize 0'.

Signed-off-by: Alexander Jahn <ajahn@de.adit-jv.com>
Signed-off-by: Andreas Pape <apape@de.adit-jv.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_direct.c
src/pcm/pcm_direct.h
src/pcm/pcm_dmix.c
src/pcm/pcm_dshare.c
src/pcm/pcm_dsnoop.c