[alsa-devel] [PATCH] ALSA: pcm: Mostly constify constraints

Takashi Iwai tiwai at suse.de
Thu Jul 5 12:41:05 CEST 2012

At Thu, 5 Jul 2012 11:35:28 +0100,
Mark Brown wrote:
> On Thu, Jul 05, 2012 at 11:55:36AM +0200, Takashi Iwai wrote:
> > The rule->private pointer isn't designed to be always const.  The data
> > purely depends on each rule function, thus whether it can be const or
> > not also depends on the rule, too.  For simple rules like list take
> > indeed the constant list.  But more complex rules may take a struct
> > containing variables changed on the fly (e.g. the max rate set by
> > user via control API).
> Well, it's mostly const - it's const unless the rule itself starts
> fiddling with stuff which I'd have expected to be the exception rather
> than the rule.

Well, the only rule is that rule (function) rules the meaning of the
private pointer :)


More information about the Alsa-devel mailing list