[alsa-devel] [PATCH v4 4/6] core: add API header and driver header files

Nallasellan, Singaravelan singaravelan.nallasellan at intel.com
Tue Dec 13 14:02:54 CET 2011


> > > +struct snd_compr_runtime {
> > > +	snd_pcm_state_t state;
> > > +	struct snd_compr_ops *ops;
> > > +	void *buffer;
> 
> > Can we define buffer as char *?
> 
> Clearly we *can* but why would we want to do that for a pointer to unstructured
> data?
True, it will always be pointer to bytes. u8 could also be used. 
No big advantage here. It will be clear.
> 
> > > +	size_t buffer_size;
> > > +	size_t fragment_size;
> 
> > Can we define buffer_size and fragment_size as unsigned items?
> > Can we have negative size here?
> 
> Again, what is the advantage in doing this?

The size will be positive anyways. Why don't we do it?
No big advantage here as well. It will be clear.


More information about the Alsa-devel mailing list