[alsa-devel] hw_params function and OSS emulation

Trent Piepho xyzzy at speakeasy.org
Wed Aug 22 22:25:04 CEST 2007


On Wed, 22 Aug 2007, Takashi Iwai wrote:
> At Wed, 22 Aug 2007 09:28:31 -0500,
> Timur Tabi wrote:
> >
> > Takashi Iwai wrote:
> >
> > >> 3) Can I assume that .hw_params() is never called after .prepare() is called?
> > >
> > > The call is allowed.
> >
> > Ugh, so in other words, .hw_params() and .prepare() can be called any number
> > of times in any order?
>
> Well, prepare is always after hw_params.  But the number of times is
> unlimited.

Does that mean that once prepare is called, the hw_params can no longer
change?  Or do you mean that hw_params must always be called before
prepare, but it's possible to call hw_params again after prepare, provided
one then calls prepare again before trigger?

If that is the case, wouldn't it work to allocate the DMA buffer the first
time prepare is called?


More information about the Alsa-devel mailing list