[alsa-devel] [PATCH v2 1/2] ASoC: dapm: support user-defined stop condition in dai_get_connected_widgets

Mark Brown broonie at kernel.org
Fri May 13 14:09:05 CEST 2016


On Thu, Apr 14, 2016 at 02:03:18PM +0100, Piotr Stankiewicz wrote:

> + * Optionally, can be supplied with a function acting as a stopping condition.
> + * This function takes the dapm widget currently being examined and the walk
> + * direction as an arguments, and should return an integer, as follows:
> + * - >=0: if the walk is to be stopped (this should indicate the number of
> + *        endpoints the widget has),
> + * - <0 : if the walk is to be continued as normal.

This seems really weird and uncomfortable.  From the naming I would
expect it to be a boolean function and I'm struggling to understand when
it would be useful to report multiple endpoints on a widget (edge
widgets normally being single objects).  The whole counting thing is
mainly a combination of debugging and an artefact of the implementation.
What's the motivation here?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20160513/3ed9c053/attachment.sig>


More information about the Alsa-devel mailing list