[alsa-devel] [PATCH v3 05/14] ASoC: SOF: Add PCM operations support
Andy Shevchenko
andriy.shevchenko at intel.com
Wed Dec 12 14:12:22 CET 2018
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
More information about the Alsa-devel
mailing list