Re: hw_params function and OSS emulation

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

 



At Wed, 22 Aug 2007 16:08:49 -0500,
Timur Tabi wrote:
> 
> Takashi Iwai wrote:
> 
> > 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.
> 
> What is the driver supposed to do on the second call to .prepare()?  In other 
> words, what is the point of calling it multiple times in a row?  Once my 
> driver is prepared to start, how could it become more prepared?

The purpose of prepare callback is to make the PCM stream ready to
start.  (The trigger callbacks are supposed to be just triggering, not
preparing the stream.)
Usually, once after the PCM is triggered, the registers are no
longer as same as the beginning.  If you want to stop and restart the
stream, you'll very likely to reset the registers again.  That's why
prepare is called again.  (Or, your driver is always go-or-die? :)


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