Re: hw_params function and OSS emulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Wed, 22 Aug 2007 13:25:04 -0700 (PDT),
Trent Piepho wrote:
> 
> 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?

The latter case.


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

The buffer allocation in prepare callback would actually do work.
I've never mentioned that it doesn't work.  It's just not
recommended, simply because the prepare is called more often than
hw_params even without changing the parameters.


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux