Re: Query regarding pcm->private_data

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

 



Pharaoh . wrote:
> I am reading 'Wring an alsa driver'.  It says following about the
> private_data:
> 
> You can allocate a record for the substream and store it in
> runtime->private_data. Usually, this is done in the open callback.
> Don't mix this with pcm->private_data. The pcm->private_data usually
> points the chip instance assigned statically at the creation of PCM, while the
> runtime->private_data points a dynamic data created at the PCM open callback.
> 
> What does static and dynamic mean here?

Nothing much.  "Static" just means that this is not allocated/freed
together with a stream's runtime.  The my_chip data is usually allocated
from the heap, but the runtime->private_data is _more_ dynamic because
it is allocated every time a stream is opened.


HTH
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