[alsa-devel] [PATCH 2/7] ASoC: DAPM: Pass snd_dapm_soc_update as parameter
broonie at opensource.wolfsonmicro.com
Thu Apr 28 21:40:55 CEST 2011
On Thu, Apr 28, 2011 at 06:46:08PM +0200, Lars-Peter Clausen wrote:
> Pass the snd_dapm_soc_update struct as parameter to dapm_widget_update instead
> of passing it indirectly as a field of the snd_soc_dapm_context struct.
> This should make it more obvious were the struct is coming from and make the
> code easier to comprehend.
If we're going to do something like this it would be better to make the
update a more complex object so we weren't passing the stream update
separately. The update should be "what we're doing right now" which
includes the stream operation (even though the stream operation is only
used to keep the pre and post widgets limping along) and looking at the
code they mostly don't care about the streams at all, only tlv320dac33
is using them and I think it can live without.
TBH I'm not sure how much of a help I find this, it's nice to not have
to pass the operation we're doing about all the time especially if we
end up using more context information in the middle of the operation
(which I suspect we may end up doing). You still have to work back
through the call chain to find where the data came from.
More information about the Alsa-devel