mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-06 13:29:59 -05:00
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>
This commit is contained in:
parent
9ed4075f05
commit
0a61c79681
5 changed files with 84 additions and 10 deletions
|
|
@ -1040,6 +1040,7 @@ int snd_pcm_dmix_open(snd_pcm_t **pcmp, const char *name,
|
|||
dmix->state = SND_PCM_STATE_OPEN;
|
||||
dmix->slowptr = opts->slowptr;
|
||||
dmix->max_periods = opts->max_periods;
|
||||
dmix->var_periodsize = opts->var_periodsize;
|
||||
dmix->sync_ptr = snd_pcm_dmix_sync_ptr;
|
||||
|
||||
retry:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue