On Wed, Dec 12, 2018 at 09:04:38AM +0100, Takashi Iwai wrote: > On Tue, 11 Dec 2018 22:23:09 +0100, > Pierre-Louis Bossart wrote: > > > > + /* number of pages should be rounded up */ > > + if (runtime->dma_bytes % PAGE_SIZE) > > + pcm.params.buffer.pages = (runtime->dma_bytes / PAGE_SIZE) + 1; > > + else > > + pcm.params.buffer.pages = runtime->dma_bytes / PAGE_SIZE; > > There is likely some nice macro for this :) DIV_ROUND_UP() ? -- With Best Regards, Andy Shevchenko _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel