[alsa-devel] [PATCH v5 03/12] ALSA: control: Add init callback for kcontrol

Mark Brown broonie at kernel.org
Tue Sep 9 13:44:25 CEST 2014


On Mon, Sep 08, 2014 at 01:38:07PM +0530, Vinod Koul wrote:

Please (as I'm sure has been pointed out before) fix your mailer to word
wrap within paragraphs.

> On Mon, Sep 08, 2014 at 10:04:42AM +0200, Takashi Iwai wrote:

> > For example, you can embed an init flag into your record and call the
> > initializer in get/put callback if not called yet.

> Yes but that would involve open coding in all control hanlers for the driver :

> if (!initialized)
> 	allocate_control_mem();

> This approach was done earlier (checking in info) and flaged off by Mark. It make better to
> have these handled in the framework.

No, that's not the problem I identified.  The bug you had was that the
driver was initialising the data in only the info callback and would
just fail if someone decided to call another callback first.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140909/4647e6be/attachment.sig>


More information about the Alsa-devel mailing list