dmix - Allow more flexible buffer sizes

With the patch, dmix allows apps to use more flexible buffer sizes.
The max buffer size is unlimited, and the minimal buffer size is
(period size * 2).  The buffer size is aligned to period size.

The period size is still bound to the period size of slave PCM.

To back to the old behavior (the fixed buffer size), you can set

   defaults.pcm.dmix_variable_buffer false

in your configuration.
This commit is contained in:
Takashi Iwai 2006-03-21 10:27:35 +00:00
parent 8ef339762a
commit 7e6c920836
7 changed files with 83 additions and 57 deletions

View file

@ -57,6 +57,7 @@ defaults.pcm.nonblock 1
defaults.pcm.ipc_key 5678293
defaults.pcm.ipc_gid audio
defaults.pcm.ipc_perm 0660
defaults.pcm.dmix_variable_buffer true
defaults.pcm.front.card defaults.pcm.card
defaults.pcm.front.device defaults.pcm.device
defaults.pcm.rear.card defaults.pcm.card

View file

@ -92,4 +92,9 @@ pcm.!dmix {
default 16
}
}
# Allow apps different buffer sizes
variable_buffer_size {
@func refer
name defaults.pcm.dmix_variable_buffer
}
}