[alsa-devel] [v4 05/12] ASoC: Intel: mrfld: add bytes control for modules
Mark Brown
broonie at kernel.org
Mon Aug 18 16:25:33 CEST 2014
On Mon, Aug 18, 2014 at 03:45:15PM +0530, Subhransu S. Prusty wrote:
> On Mon, Aug 18, 2014 at 11:06:09AM +0530, Subhransu S. Prusty wrote:
> > > I wouldn't expect an info call to be allocating anything - why is it
> > > doing that? It's not looking at the alocated data except to see if the
> > > allocation succeeded. What happens if someone manages to do a get or
> > > set without having first done an info and why aren't we doing any
> > > allocation on initialisation?
> > Will move after control initialization.
> As I have to initialize the params, and if it's done in probe after
> control creation, it's required to iterate over the controls list and
> match certain pattern to find the control and then initialize. This doesn't
> look elegant. Instead I would prefer adding an init callback in the control
> to do this operation. What do you recommend?
Something like that sounds reasonable, or doing it when writing to the
control - the point is that info() is a terrible place to do this for
the reasons outline above.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140818/24bf3dd1/attachment.sig>
More information about the Alsa-devel
mailing list