[alsa-devel] Alsa timing question

Raymond Toy rtoy at google.com
Tue Aug 30 21:04:33 CEST 2011


On Tue, Aug 30, 2011 at 12:49 AM, Clemens Ladisch <clemens at ladisch.de>wrote:

> Raymond Toy wrote:
> >> However, if you're using the dmix plugin, the period size of your
> >> application's device will not necessarily be identical with the period
> >> size of the hardware device.
> >
> > Would dmix allow me to control this better than pulse audio?
>
> These parameters must be chosen by dmix before the first dmix device is
> used, so applications cannot control them directly.
>
> The defaults for dmix's period_size, period_time, and periods are 1024,
> -1, and 16.  They can be overridden by setting the configuration values
> defaults.dmix.DRIVER.period_size/period_time/periods, where DRIVER is
> the internal driver name (the name between the colon and the hyphen in
> /proc/asound/cards, or the file name in /usr/share/alsa/cards/).
>
>
Thanks for the info.  Can this be done programmatically?  I've done some
tests using dmix by setting up my .asoundrc appropriately, and dmix works
very nicely once I got the dmix period size and buffer size to agree with my
application.  However for the application, I don't want to have to tell the
user to set up dmix.  (Yes, I know this is not nice, but we're doing this
for testing right now, to make it easier for users to test this.)

Thanks,

Ray


More information about the Alsa-devel mailing list