Re: Can DMA address, periods, buffer size, etc change after hw_params is called?

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

 



Hans-Christian Egtvedt wrote:
> I wonder if I must take care handling changes in DMA address, number of
> periods and period size in the prepare callback?
> 
> Or are these locked after the first time prepare is called?

The hardware parameters like buffer/period size and sample format are
set by calling the hw_params callback; they are valid until a call to
hw_free (or another call to hw_params), which doesn't happen while the
stream is running.

The DMA address is selected by the driver in the hw_params callback, but
most drivers let the framework handle this by calling
snd_pcm_lib_malloc_pages().

The prepare and start/stop trigger callbacks are called only between
hw_params/hw_free, but they could be called multiple times, so you
should handle this stuff in the prepare callback only if your device
requires that this is done every time before a stream is started.


Best regards,
Clemens
_______________________________________________
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